Setting the display calibration ramps using weston

Kristian Høgsberg hoegsberg at gmail.com
Mon Apr 1 18:42:10 PDT 2013


On Sun, Mar 31, 2013 at 06:24:30PM +0100, Richard Hughes wrote:
> krh mentioned in a G+ post that I should add to weston functionality
> to set the output gamma ramps for color calibration. Does anyone have
> any ideas on where I should start? I'm familiar with color stuff, but
> the Weston internals confuse me somewhat. I need to be a position
> where I can call drmModeCrtcSetGamma() on each output as it is enabled
> and also at hotplug add. Any pointers very welcome, thanks!

Hi Richard,

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?  We don't have protocol for changing this and it's similar to
the default resultion, in that it's a compositor configuration thing.

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? or one for red, green and
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.

Kristian

> Richard
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list