[PATCH xserver 1/2] xfree86/modes: Fix HW cursor clipping for crtc->driverIsPerformingTransform
Michel Dänzer
michel at daenzer.net
Fri Dec 25 18:43:28 PST 2015
On 26.12.2015 11:31, Michel Dänzer wrote:
> On 26.12.2015 04:08, Keith Packard wrote:
>> Michel Dänzer <michel at daenzer.net> writes:
>>
>>> From: Michel Dänzer <michel.daenzer at amd.com>
>>>
>>> Even if the driver is handling the transform, we still need to transform
>>> the cursor position for clipping, otherwise we may hide the HW cursor
>>> when the cursor is actually inside the area covered by the CRTC.
>>
>> I would expect that driverIsPerformingTransform would apply only to the
>> output path, and not to the cursor.
>
> If that was the case, xf86_crtc_set_cursor_position wouldn't check for
> driverIsPerformingTransform in the first place and would always
> transform the coordinates passed to the driver.
>
>
>> In the only example of this that I can find (in xf86-video-omap), the
>> driver just has to call xf86CrtcTransformCursorPos itself.
>
> Sure, the driver has to call xf86CrtcTransformCursorPos itself, because
> xf86_crtc_set_cursor_position doesn't do it in the
> driverIsPerformingTransform case.
>
> The problem fixed by this patch is that xf86_crtc_set_cursor hides the
> cursor in cases where it should be visible, because it uses the
> untransformed coordinates to check whether the cursor is visible in the
> driverIsPerformingTransform case. Note that the fix only applies the
> transform for the visibility check in this case, not to the coordinates
> passed to the driver.
Maybe it would be clearer if I renamed clip_x/y to crtc_x/y, indicating
that it's the position in the CRTC coordinate space?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list