[PATCH xserver 1/2] xfree86/modes: Fix HW cursor clipping for crtc->driverIsPerformingTransform

Michel Dänzer michel at daenzer.net
Fri Jan 29 18:48:31 PST 2016

On 30.01.2016 02:56, Keith Packard wrote:
> Aaron Plattner <aplattner at nvidia.com> writes:
>> On 01/29/2016 07:23 AM, Keith Packard wrote:
>>> Michel Dänzer <michel at daenzer.net> writes:
>>>> I'm not sure that makes sense; e.g. it seems inconsistent with leaving
>>>> the cursor image untransformed in the driverIsPerformingTransform case.
>>>> It seems to me like the idea behind driverIsPerformingTransform was to
>>>> leave all transformations to the driver/hardware.
>>> I was just thinking that we've already done the transform to perform the
>>> clip, so forcing the driver to *also* transform seems weird to me.
>> The idea was that for GPUs that can do scaling after compositing the
>> cursor, you want to program the untransformed cursor position and then
>> let the hardware transform happen, while on the Tegra hardware I wrote
>> this for, it couldn't do that and the transform had to be applied to the
>> cursor separately.  I left it up to the driver to decide so that we
>> could use this path in the desktop GPU X driver.  That was the idea
>> behind
>> http://marc.info/?l=freedesktop-xorg-devel&m=131431532812271&w=2

I kind of figured you're not using that anymore, since it's clearly not
usable in general. :)

> Right, the problem we've uncovered is that someone needs to perform
> clipping of the cursor position, and that needs to happen in the
> transformed space. Transforming the coordinate, clipping and then
> sending the untransformed coordinates and hoping the driver
> transform matches the server transform seems silly to me.

We could let the driver specify exactly which aspects of transformation
it wants to handle itself via several flags in
driverIsPerformingTransform. Then we can pass either the transformed or
untransformed cursor coordinates to the driver depending on one of those

I'll explore that when I get a chance and send new patches.

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

More information about the xorg-devel mailing list