All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtio-dev@lists.oasis-open.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"open list:ABI/API" <linux-api@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM DRIVERS" <dri-devel@lists.freedesktop.org>,
	"open list:VIRTIO CORE,
	NET..." <virtualization@lists.linux-foundation.org>,
	Daniel Vetter <daniel@ffwll.ch>, Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH] Add virtio gpu driver.
Date: Mon, 30 May 2016 16:47:55 +0200	[thread overview]
Message-ID: <20160530144755.GK27098__25228.9768345237$1464619694$gmane$org@phenom.ffwll.local> (raw)
In-Reply-To: <1464616236.5179.41.camel@redhat.com>

On Mon, May 30, 2016 at 03:50:36PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > - add a small core function to registerr HOT_X/HOT_Y for a (cursor) plane,
> >   e.g. drm_plane_register_hotspot(). That should allocate the properties
> >   (if they don't exist yet) and then attach those props to the cursor. We
> >   don't want those props everywhere, but only on drivers that support/need
> >   them, aka virtual hw.
> 
> Hmm, why is this special to virtual hw?
> 
> >  	if (crtc->cursor) {
> > -		ret = drm_mode_cursor_universal(crtc, req, file_priv);
> > +		if (drm_core_check_feature(DRIVER_ATOMIC))
> > +			ret = drm_mode_cursor_atomic(crtc, req, file_priv);
> > +		else
> > +			ret = drm_mode_cursor_universal(crtc, req, file_priv);
> >  		goto out;
> 
> >   drm_mode_cursor_atomic would simply be a fusing of
> >   drm_mode_cursor_universal + drm_atomic_helper_update_plane (dump all the
> >   intermediate variables and store directly in the plane state), with the
> >   addition of also storing hot_x/y into the plane state.
> 
> Hmm, that'll either make drm_mode_cursor_atomic a big cut+pasted
> function, or need quite some refactoring to move common code into
> functions callable from both drm_mode_cursor_atomic
> +drm_mode_cursor_universal ...
> 
> Why attach the hotspot to the plane?  Wouldn't it make more sense to
> make it a framebuffer property?

We don't have properties on the framebuffer. I guess you /could/ just add
it internally to struct drm_framebuffer, and not bother exposing to
userspace. I guess that would be a lot simpler, but it also means that
atomic userspace can't use hotspots before we add properties to fbs. And
doing that is a bit tricky since drm_framebuffer objects are meant to be
invariant - this assumption is deeply in-grained into the code all over
the place, everything just compares pointers when semantically it means to
compare the entire fb (including backing storage pointer/offsets and
everything).

So would be a bit more work to wire up for atomic userspace, but indeed a
lot less work to implement. I'm totally happy if you go with that tradeoff
;-)

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  parent reply	other threads:[~2016-05-30 14:47 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 16:07 [PATCH] Add virtio gpu driver Gerd Hoffmann
2015-03-24 16:07 ` Gerd Hoffmann
2015-03-24 16:15 ` Michael S. Tsirkin
2015-03-24 16:15 ` Michael S. Tsirkin
2015-03-24 16:15   ` Michael S. Tsirkin
2015-03-25 14:52   ` Gerd Hoffmann
2015-03-25 14:52   ` Gerd Hoffmann
2015-03-25 14:52     ` Gerd Hoffmann
2015-03-25 15:24     ` Michael S. Tsirkin
2015-03-25 15:24       ` Michael S. Tsirkin
2015-03-25 15:37       ` Gerd Hoffmann
2015-03-25 15:37         ` Gerd Hoffmann
2015-03-25 17:09         ` Michael S. Tsirkin
2015-03-25 17:09         ` Michael S. Tsirkin
2015-03-25 17:09           ` Michael S. Tsirkin
2015-03-26  7:12           ` Gerd Hoffmann
2015-03-26  7:12             ` Gerd Hoffmann
2015-03-26  8:18             ` Michael S. Tsirkin
2015-03-26  8:18             ` Michael S. Tsirkin
2015-03-26  8:18               ` Michael S. Tsirkin
2015-03-26  8:42               ` [virtio-dev] " Gerd Hoffmann
2015-03-26  8:42               ` Gerd Hoffmann
2015-03-26  8:42                 ` Gerd Hoffmann
2015-03-26  9:04                 ` Michael S. Tsirkin
2015-03-26  9:04                   ` Michael S. Tsirkin
2015-03-26 11:38                   ` Gerd Hoffmann
2015-03-26 11:38                     ` Gerd Hoffmann
2015-03-26 11:53                     ` Michael S. Tsirkin
2015-03-26 11:53                       ` Michael S. Tsirkin
2015-03-26 15:07                       ` Gerd Hoffmann
2015-03-26 15:07                         ` Gerd Hoffmann
2015-03-26 16:47                         ` Michael S. Tsirkin
2015-03-26 16:47                           ` Michael S. Tsirkin
2015-03-26 22:49                           ` Alex Elsayed
2015-03-27  8:08                           ` Gerd Hoffmann
2015-03-27  8:08                             ` Gerd Hoffmann
2015-03-27  8:08                           ` Gerd Hoffmann
2015-03-26 16:47                         ` Michael S. Tsirkin
2015-03-26 15:07                       ` Gerd Hoffmann
2015-03-26 11:53                     ` Michael S. Tsirkin
2015-03-26 16:52                     ` One Thousand Gnomes
2015-03-26 16:52                     ` One Thousand Gnomes
2015-03-26 11:38                   ` Gerd Hoffmann
2015-03-26  9:04                 ` Michael S. Tsirkin
2015-03-26  7:12           ` Gerd Hoffmann
2015-03-25 15:37       ` Gerd Hoffmann
2015-03-25 15:24     ` Michael S. Tsirkin
2015-03-24 16:50 ` Daniel Vetter
2015-03-24 16:50 ` Daniel Vetter
2015-03-24 16:50   ` Daniel Vetter
2015-03-25 14:53   ` Gerd Hoffmann
2015-03-25 14:53     ` Gerd Hoffmann
2015-03-26  8:53     ` Daniel Vetter
2015-03-26  8:53     ` Daniel Vetter
2015-03-26  8:53       ` Daniel Vetter
2015-03-30 12:23   ` Gerd Hoffmann
2015-03-30 12:23     ` Gerd Hoffmann
2015-03-30 14:49     ` Daniel Vetter
2015-03-30 14:49     ` Daniel Vetter
2015-03-30 14:49       ` Daniel Vetter
2016-05-25 16:40       ` Daniel Vetter
2016-05-25 16:40       ` Daniel Vetter
2016-05-25 16:40         ` Daniel Vetter
2016-05-25 16:44         ` Emil Velikov
2016-05-25 16:44         ` Emil Velikov
2016-05-25 16:44           ` Emil Velikov
2016-05-27  7:48         ` Gerd Hoffmann
2016-05-27  7:48         ` Gerd Hoffmann
2016-05-27  7:48           ` Gerd Hoffmann
2016-05-27  9:03           ` Daniel Vetter
2016-05-27  9:03           ` Daniel Vetter
2016-05-27  9:03             ` Daniel Vetter
2016-05-30 13:50             ` Gerd Hoffmann
2016-05-30 13:50             ` Gerd Hoffmann
2016-05-30 13:50               ` Gerd Hoffmann
2016-05-30 14:47               ` Daniel Vetter
2016-05-30 14:47                 ` Daniel Vetter
2016-05-31  6:29                 ` Gerd Hoffmann
2016-05-31  6:29                 ` Gerd Hoffmann
2016-05-31  6:29                   ` Gerd Hoffmann
2016-05-31  6:55                   ` Daniel Vetter
2016-05-31  6:55                   ` Daniel Vetter
2016-05-31  6:55                     ` Daniel Vetter
2016-05-31  7:00                   ` Pekka Paalanen
2016-05-31  7:00                     ` Pekka Paalanen
2016-05-31  7:00                   ` Pekka Paalanen
2016-05-30 14:47               ` Daniel Vetter [this message]
2015-03-30 12:23   ` Gerd Hoffmann
2015-03-24 17:04 ` Michael S. Tsirkin
2015-03-24 17:04   ` Michael S. Tsirkin
2015-03-24 17:04 ` Michael S. Tsirkin
2015-03-24 20:47 ` Paul Bolle
2015-03-24 20:47   ` Paul Bolle
2015-03-24 20:47 ` Paul Bolle
2015-03-24 22:50 ` Daniel Stone
2015-03-24 22:50 ` Daniel Stone
2015-03-24 22:50   ` Daniel Stone
2015-03-25  0:00   ` Dave Airlie
2015-03-25  0:00   ` Dave Airlie
2015-03-25  0:00     ` Dave Airlie
2015-03-25  5:47     ` Daniel Stone
2015-03-25  5:47     ` Daniel Stone
2015-03-25 15:19   ` Gerd Hoffmann
2015-03-25 15:19   ` Gerd Hoffmann
2015-03-25 15:19     ` Gerd Hoffmann

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='20160530144755.GK27098__25228.9768345237$1464619694$gmane$org@phenom.ffwll.local' \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.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.