[PATCH xserver] xfree86/modes: Use RRTransformEqual in xf86RandR12CrtcSet

Michel Dänzer michel at daenzer.net
Tue Jun 20 03:52:17 UTC 2017


On 20/06/17 12:36 AM, Aaron Plattner wrote:
> On 06/19/2017 01:57 AM, Michel Dänzer wrote:
>> On 16/06/17 03:25 PM, Aaron Plattner wrote:
>>> On 06/15/2017 07:31 PM, Michel Dänzer wrote:
>>>> From: Michel Dänzer <michel.daenzer at amd.com>
>>>>
>>>> The memcmp didn't catch when e.g. only the filter changed. Tested by
>>>> alternately running
>>>>
>>>> xrandr --output DVI-I-0 --scale-from 3840x2160 --filter bilinear
>>>> xrandr --output DVI-I-0 --scale-from 3840x2160 --filter nearest
>>>>
>>>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
>>>> ---
>>>>    hw/xfree86/modes/xf86RandR12.c | 3 +--
>>>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/hw/xfree86/modes/xf86RandR12.c
>>>> b/hw/xfree86/modes/xf86RandR12.c
>>>> index 55d88e331..fe8770d61 100644
>>>> --- a/hw/xfree86/modes/xf86RandR12.c
>>>> +++ b/hw/xfree86/modes/xf86RandR12.c
>>>> @@ -1170,8 +1170,7 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
>>>>        if ((transform != NULL) != crtc->transformPresent)
>>>>            changed = TRUE;
>>>>        else if (transform &&
>>>
>>> RRTransformEqual treats NULL transform pointers as the identity, so I
>>> think you can just drop the transform && check here.
>>
>> Thanks for the suggestion. Unfortunately, AFAICT
>> xf86CrtcSetModeTransform doesn't reset crtc->transform to the identity
>> when crtc->transformPresent = FALSE, so skipping the transform && would
>> lead to false positives in that case and transform == NULL.
> 
> Hmm, okay. In that case,
> 
> Reviewed-by: Aaron Plattner <aplattner at nvidia.com>

Thanks Aaron, pushed your fix and this one:

remote: Updating patchwork state for https://patchwork.freedesktop.org/project/Xorg/list/
remote: I: patch #161917 updated using rev 091af80be48c37f16c679d35fc12ad33e6b0cd74.
remote: I: patch #161955 updated using rev 4212c884c423e5ce2cd3b4d67c0d656475fddc79.
remote: I: 2 patch(es) updated to state Accepted.
To ssh+git://git.freedesktop.org/git/xorg/xserver
   ba336b240..4212c884c  master -> master


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


More information about the xorg-devel mailing list