From: Thomas Hellstrom <thellstrom@vmware.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: airlied@redhat.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: Avoid calling the cursor_set2 callback from the drm_mode_cursor ioctl
Date: Mon, 30 Nov 2015 14:35:53 +0100 [thread overview]
Message-ID: <565C50B9.8020207@vmware.com> (raw)
In-Reply-To: <20151129091838.GZ17050@phenom.ffwll.local>
On 11/29/2015 10:18 AM, Daniel Vetter wrote:
> On Fri, Nov 27, 2015 at 01:24:11PM +0100, Thomas Hellstrom wrote:
>> On 11/27/2015 01:02 PM, Ville Syrjälä wrote:
>>> On Fri, Nov 27, 2015 at 12:42:15PM +0100, Thomas Hellstrom wrote:
>>>> On 11/27/2015 11:11 AM, Daniel Vetter wrote:
>>>>> On Thu, Nov 26, 2015 at 10:52:14AM -0800, Thomas Hellstrom wrote:
>>>>>> If the drm_mode_cursor_ioctl is called and the cursor_set2 callback is
>>>>>> implemented, the cursor hotspot is set to (0,0) which is incompatible
>>>>>> with vmwgfx where the hotspot should instead remain unchanged.
>>>>>>
>>>>>> So if the driver implements both cursor_set2 and cursor_set, prefer calling
>>>>>> the latter from the drm_mode_cursor ioctl.
>>>>>>
>>>>>> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
>>>>> That looks like papering over a bug in the client - it simply shouldn't
>>>>> mix these two if it expects the hotspot to stick around. There was also
>>>>> recently a big discussion about hotspot behaviour, and the conclusion was
>>>>> that qxl got it all wrong. Since that was specifically added for qxl I'm
>>>>> not sure how well this was ever tested ...
>>>> No, this is not the case, This is for old Xorg userspace that first sets
>>>> the hotspot using our ancient
>>>> driver-private ioctl and then calls drm_mode_cursor() to update the cursor.
>>>>
>>>> Now if we were to implement cursor_set2, which is apparently needed to
>>>> get gnome-shell/Wayland cursors in the right place, without this fix, it
>>>> would break old Xorg, so we don't have much choice in this case from
>>>> what I can tell.
>>>>
>>>> The root problem here is that the drm_mode_cursor() behaviour in the
>>>> presence of cursor_set2 didn't take the existing vmware hotspot
>>>> semantics into account.
> Ugh. I think the simplest solution is to not mix up the two hotspots, i.e.
> separately keep track of both the legacy vmwgfx hotspot and the drm core
> hotspot. Then in the actual cursor set code add them. A bit of ugly in the
> vmwgfx code (but not much), instead of leaking that driver private legacy
> ioctl semantics into drm core. Would that work?
>
>
Hmm.
Yes it would probably work. Good idea.
I guess we just need to make sure that both hotspots are reset to (0,0)
at master drop.
/Thomas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-11-30 13:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 18:52 [PATCH 1/2] drm: Avoid calling the cursor_set2 callback from the drm_mode_cursor ioctl Thomas Hellstrom
2015-11-26 18:52 ` [PATCH 2/2] drm/vmwgfx: Implement the cursor_set2 callback Thomas Hellstrom
2015-11-27 10:11 ` [PATCH 1/2] drm: Avoid calling the cursor_set2 callback from the drm_mode_cursor ioctl Daniel Vetter
2015-11-27 11:42 ` Thomas Hellstrom
2015-11-27 12:02 ` Ville Syrjälä
2015-11-27 12:24 ` Thomas Hellstrom
2015-11-29 9:18 ` Daniel Vetter
2015-11-30 13:35 ` Thomas Hellstrom [this message]
2015-11-30 14:55 ` Daniel Vetter
2015-11-30 15:52 ` Thomas Hellstrom
2015-11-30 16:12 ` Daniel Vetter
2015-11-30 19:50 ` Sinclair Yeh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=565C50B9.8020207@vmware.com \
--to=thellstrom@vmware.com \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.