Setting the display calibration ramps using weston

Richard Hughes hughsient at gmail.com
Tue Apr 2 02:21:08 PDT 2013


On 2 April 2013 02:42, Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> All the KMS interactions happens in src/compositor-drm.c.  As you say,
> the end result should be calling drmModeCrtcSetGamma(), but what's the
> input?

The user selected ICC profile which contain the gamma curves.

>  We don't have protocol for changing this and it's similar to
> the default resultion, in that it's a compositor configuration thing.

Hmm, we need to be able to change this on the fly, for instance the
user changing the profile or clearing the curves to linear for
profiling.

> So for something like weston, where we store our configuration in
> weston.ini, I'd expect that we add a config key to set the gamma (is
> this just a number like what xgamma takes?

I was thinking of doing this in two passes.

1. Read the hardcoded .icc file from weston.ini, optionally extract
the gamma curves using lcms and squirt the result into
drmModeCrtcSetGamma
2. Get the output configuration from colord and listen for changes using DBus

> blue?) per output in weston.ini.  So we need to parse that in
> output_section_done() and store in struct drm_configured_output, copy
> the value into struct drm_output in create_output_for_connector() and
> then apply that whenever we call drmModeSetCrtc(), generally.

I'll have a play with this today, thanks for the pointers.

Richard


More information about the wayland-devel mailing list