Setting the display calibration ramps using weston

Graeme Gill graeme2 at argyllcms.com
Mon Apr 1 22:45:58 PDT 2013


Kristian Høgsberg wrote:

> 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.

In general it's not a number, it's a set of calibration curves. Typically
color managed environments will use the vcgt tag from the ICC profile
that is currently associated with the display. There is no standard
way of identifying what ICC profile is associated with a display
in a Linux context, although there are 3 CMMs (Color Management Modules)
commonly used (colord, Oyranos, and ArgyllCMS's ucmm). For X11, calibration
curves are typically set using XF86VidModeSetGammaRamp() or XRRSetCrtcGamma()
(ie., this is what "dispwin" does.)

The display's ICC profile will also be stored in the _ICC_PROFILE atom,
to make it available to the display client, so that color can be adjusted
appropriately for that display. Using XRandR it will/should
also be set in an output property. Given the lack of standardization and the
complexity of a CMM sub-system, I think the display sub-system should be aiming
to provide a suitable policy free API to set an outputs ramp.

Since a display's color characteristics are a property of the display,
a way of associating the current display with it's corresponding
ICC profile is desirable - ie. Knowing the EDID of the display
on an output is such a mechanism. A means of the CMM being
notified when a display on an output is changed is also
desirable. High end displays allow setting internal per channel
lookup curves at a higher resolution than the video card LUTs,
and may also support matrices and 3D cLUTs. Typically DDC
(or sometimes USB) is used to set this, so ideally there
would be a means for the CMM and/or an application to be able to
identify an outputs corresponding DDC channel, so that
it can talk to the display on a given output.

> 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.

If this is merely a default, then why not default to linear ?

If it's not a default, then I'm concerned that setting a "gamma" value
from a .ini file is rather far from the sort of mechanism expected for
a modern color managed desktop.

Graeme Gill


More information about the wayland-devel mailing list