[PATCH 18/37] drm/amd/display: Allow inverted gamma

Kazlauskas, Nicholas Nicholas.Kazlauskas at amd.com
Wed Oct 23 15:55:43 UTC 2019


On 2019-10-23 11:44 a.m., Li, Sun peng (Leo) wrote:
> 
> 
> On 2019-10-23 11:23 a.m., Michel Dänzer wrote:
>> On 2019-10-17 9:13 p.m., sunpeng.li at amd.com wrote:
>>> From: Aidan Yang <Aidan.Yang at amd.com>
>>>
>>> [why]
>>> There's a use case for inverted gamma
>>> and it's been confirmed that negative slopes are ok.
>>>
>>> [how]
>>> Remove code for blocking non-monotonically increasing gamma
>>>
>>> Signed-off-by: Aidan Yang <Aidan.Yang at amd.com>
>>> Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac at amd.com>
>>> Acked-by: Leo Li <sunpeng.li at amd.com>
>>> Acked-by: Reza Amini <Reza.Amini at amd.com>
>>
>> Does this fix https://bugs.freedesktop.org/110677 ? If so, it should be
>> referenced in the commit log, and the report resolved once this lands in
>> drm-next or Linus' tree.
> 
> I don't think it would, not on reported platform at least. This change
> only modifies for DCN families, so RX580 wouldn't be affected.
> 
> Leo

Looks like the same check exists on DCE though, it could probably be 
dropped as well to fix this bug.

See:
dce110_translate_regamma_to_hw_format()

	while (i != hw_points + 1) {
		if (dc_fixpt_lt(rgb_plus_1->red, rgb->red))
			rgb_plus_1->red = rgb->red;
		if (dc_fixpt_lt(rgb_plus_1->green, rgb->green))
			rgb_plus_1->green = rgb->green;
		if (dc_fixpt_lt(rgb_plus_1->blue, rgb->blue))
			rgb_plus_1->blue = rgb->blue;

		rgb->delta_red = dc_fixpt_sub(rgb_plus_1->red, rgb->red);
		rgb->delta_green = dc_fixpt_sub(rgb_plus_1->green, rgb->green);
		rgb->delta_blue = dc_fixpt_sub(rgb_plus_1->blue, rgb->blue);

		++rgb_plus_1;
		++rgb;
		++i;
	}


Nicholas Kazlauskas

> 
>>
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> 



More information about the amd-gfx mailing list