[PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

Michel Dänzer michel at daenzer.net
Fri Jun 15 06:57:07 UTC 2018


On 2018-06-14 09:49 PM, Leo Li wrote:
> On 2018-06-14 12:57 PM, Michel Dänzer wrote:
>> On 2018-06-01 06:03 PM, sunpeng.li at amd.com wrote:
>>> From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>
>>>
>>> This ended up being different enough from v2 to warrant a new
>>> patchset. Per
>>> Michel's suggestions, there have been various optimizations and
>>> cleanups.
>>> Here's what's changed:
>>>
>>> * Cache DRM color management property IDs at pre-init,
>>>      * instead of querying DRM each time we need to modify color
>>> properties.
>>>
>>> * Remove drmmode_update_cm_props().
>>>      * Update color properties in drmmode_output_get_property() instead.
>>>      * This also makes old calls to update_cm_props redundant.
>>>
>>> * Get rid of fake CRTCs.
>>>      * Previously, we were allocating a fake CRTC to configure color
>>> props on
>>>        outputs that don't have a CRTC.
>>>      * Instead, rr_configure_and_change_cm_property() can be easily
>>> modified to
>>>        accept NULL CRTCs.
>>
>> Is it currently ever the case in the hardware / kernel, or expected to
>> ever be, that colour management is supported for some but not all CRTCs
>> of a GPU?
>>
> 
> This was more of an effort to align with what DRM allows, which is
> per-CRTC cm support and LUT sizes. I'm not aware of any current or
> future hardware where this is the case though. It was a relatively
> simple thing to implement, so I thought, might as well.
> 
>> If not, the LUT sizes could be tracked once instead of per CRTC, and at
>> least the (DE)GAMMA_LUT_SIZE properties could always return the proper
>> values, even if the output currently isn't associated with a CRTC.
>>
> 
> My original take was that it's best to support what the framework
> allows. But it does sound like this would have more utility to the
> client, and simplify the code as well.

Right. In contrast to the generic modesetting driver, we can take
advantage of properties of our GPUs in this driver.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list