[RESEND,v4] xfree86: Immediately handle failure to set HW cursor

Alexandre Courbot gnurou at gmail.com
Fri Sep 9 08:13:30 UTC 2016


Hi Hans, apologies for the delayed reply!

On Thu, Sep 1, 2016 at 11:24 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> Hi,
>
> On 22-06-16 10:48, Alexandre Courbot wrote:
>>
>> There is currently no reliable way to report failure to set a HW
>> cursor. Still such failures can happen if e.g. the MODE_CURSOR DRM
>> ioctl fails (which currently happens at least with modesetting on Tegra
>> for format incompatibility reasons).
>>
>> As failures are currently handled by setting the HW cursor size to
>> (0,0), the fallback to SW cursor will not happen until the next time the
>> cursor changes and xf86CursorSetCursor() is called again. In the
>> meantime, the cursor will be invisible to the user.
>>
>> This patch addresses that by adding _xf86CrtcFuncs::set_cursor_check and
>> _xf86CursorInfoRec::ShowCursorCheck hook variants that return booleans.
>> This allows to propagate errors up to xf86CursorSetCursor(), which can
>> then fall back to using the SW cursor immediately.
>>
>> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
>> Reviewed-by: Keith Packard <keithp at keithp.com>
>> Cc: Michael Thayer <michael.thayer at oracle.com>
>> Cc: Michel Dänzer <michel at daenzer.net>
>
>
> Is this one still needed; or is this fully covered by the switch to
> load_cursor_argb_check() ? :
>
> https://cgit.freedesktop.org/xorg/xserver/commit/?id=14c21ea1c9496638b1feb8e6145c440fb4f1d14b
>
> ?

It appears this patch indeed fixes the issue I have - looking at the
commit log it seems like it was addressing the exact same problem. So
you can just drop my patch - thanks!


More information about the xorg-devel mailing list