~mir-team/mir/development-branch

« back to all changes in this revision

Viewing changes to src/platforms/mesa/server/kms/real_kms_output.cpp

  • Committer: Daniel van Vugt
  • Date: 2016-11-01 09:34:45 UTC
  • mto: This revision was merged to the branch mainline in revision 3798.
  • Revision ID: daniel.van.vugt@canonical.com-20161101093445-zq00as33ep8khqyr
Fix the bug. Test now passes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
            std::invalid_argument("set_gamma: mismatch gamma LUT sizes"));
297
297
    }
298
298
 
299
 
    if (drmModeCrtcSetGamma(
 
299
    int ret = drmModeCrtcSetGamma(
300
300
        drm_fd,
301
301
        current_crtc->crtc_id,
302
302
        gamma.red.size(),
303
303
        const_cast<uint16_t*>(gamma.red.data()),
304
304
        const_cast<uint16_t*>(gamma.green.data()),
305
 
        const_cast<uint16_t*>(gamma.blue.data())) != 0)
306
 
    {
307
 
        BOOST_THROW_EXCEPTION(
308
 
            std::system_error(errno, std::system_category(), "drmModeCrtcSetGamma Failed"));
309
 
    }
 
305
        const_cast<uint16_t*>(gamma.blue.data()));
 
306
 
 
307
    int err = -ret;
 
308
    if (err)
 
309
        mir::log_warning("drmModeCrtcSetGamma failed: %s", strerror(err));
 
310
 
 
311
    // TODO: return bool in future? Then do what with it?
310
312
}