dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Melissa Wen <melissa.srw@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: airlied@linux.ie, hamohammed.sa@gmail.com,
	dri-devel@lists.freedesktop.org, rodrigosiqueiramelo@gmail.com,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 0/4] vkms: Switch to shadow-buffered plane state
Date: Mon, 5 Jul 2021 22:29:45 +0100	[thread overview]
Message-ID: <20210705212945.qwwrrbxe5ygotycf@smtp.gmail.com> (raw)
In-Reply-To: <YOMVFi3q/JSoZ+p9@phenom.ffwll.local>

On 07/05, Daniel Vetter wrote:
> On Mon, Jul 05, 2021 at 12:05:28PM +0200, Thomas Zimmermann wrote:
> > Hi
> > 
> > Am 05.07.21 um 11:27 schrieb Daniel Vetter:
> > > On Mon, Jul 05, 2021 at 09:46:29AM +0200, Thomas Zimmermann wrote:
> > > > Vkms copies each plane's framebuffer into the output buffer; essentially
> > > > using a shadow buffer. DRM provides struct drm_shadow_plane_state, which
> > > > handles the details of mapping/unmapping shadow buffers into memory for
> > > > active planes.
> > > > 
> > > > Convert vkms to the helpers. Makes vkms use shared code and gives more
> > > > test exposure to shadow-plane helpers.
> > > > 
> > > > Thomas Zimmermann (4):
> > > >    drm/gem: Export implementation of shadow-plane helpers
> > > >    drm/vkms: Inherit plane state from struct drm_shadow_plane_state
> > > >    drm/vkms: Let shadow-plane helpers prepare the plane's FB
> > > >    drm/vkms: Use dma-buf mapping from shadow-plane state for composing
> > > 
> > > So I think right now this fits, but I think it'll mismit going forward: We
> > > don't really have a shadow-plane that we then toss to the hw, it's a
> > > shadow-crtc-area. Right now there's no difference, because we don't
> > > support positioning/scaling the primary plane. But that's all kinda stuff
> > > that's on the table.
> > > 
> > > But conceptually at least the compositioning buffer should bet part of the
> > > crtc, not of the primary plane.
> > > 
> > > So not sure what to do, but also coffee hasn't kicked in yet, so maybe I'm
> > > just confused.
> > 
> > I'm not sure if I understand your concern. Can you elaborate? The
> > compositing output buffer is not affected by this patchset. Only the input
> > frambuffers of the planes. Those are shadow buffers. AFAICT the composer
> > code memcpy's the primary plane and then blends the other planes on top.
> > Supporting transformation of the primary plane doesn't really change much
> > wrt to the vmaping of input fbs.
> 
> Yeah that's the current implementation, because that's easier. But
> fundamentally we don't need a copy of the input shadow plane, we need a
> scratch area that's sized for the crtc.

Maybe I'm missing something, but I am not sure the relevance for vkms to
switch to shadow-buffered plane. (?)

Btw, in terms of code changes, it works well and also vmap error stops
to happen (reported in the last update of todo list). This fix seems to
be a side-effect because it replaces the vkms_prepare_fb that got
problematic since (I guess) the last switch to shmem. 

Thanks,
Melissa

> So if the primary plane is smaller than the crtc window (because we use
> plane hw for compositing, or maybe primary plane shows a vidoe with black
> borders or whatever), then the primary plane shadow isn't the right size.
> 
> And yes this means some surgery, vkms isn't there yet at all. But still it
> would mean we're going right here, but then have to backtrack before we
> can go left again. So a detour.
> 
> Also I don't think any other driver will ever need this, you really only
> need it when you want to composite planes in software - which defeats the
> purpose of planes. Except when the goal of your driver is to be a software
> model.
> -Daniel
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

  reply	other threads:[~2021-07-05 21:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05  7:46 [PATCH 0/4] vkms: Switch to shadow-buffered plane state Thomas Zimmermann
2021-07-05  7:46 ` [PATCH 1/4] drm/gem: Export implementation of shadow-plane helpers Thomas Zimmermann
2021-07-05  7:46 ` [PATCH 2/4] drm/vkms: Inherit plane state from struct drm_shadow_plane_state Thomas Zimmermann
2021-07-05  7:46 ` [PATCH 3/4] drm/vkms: Let shadow-plane helpers prepare the plane's FB Thomas Zimmermann
2021-07-05  7:46 ` [PATCH 4/4] drm/vkms: Use dma-buf mapping from shadow-plane state for composing Thomas Zimmermann
2021-07-05  9:27 ` [PATCH 0/4] vkms: Switch to shadow-buffered plane state Daniel Vetter
2021-07-05 10:05   ` Thomas Zimmermann
2021-07-05 14:20     ` Daniel Vetter
2021-07-05 21:29       ` Melissa Wen [this message]
2021-07-06  5:02         ` Thomas Zimmermann
2021-07-11 22:30           ` Melissa Wen
2021-07-06  4:59       ` Thomas Zimmermann
2021-07-06  8:16         ` Daniel Vetter
2021-07-12 11:56 ` Sumera Priyadarsini
2021-07-12 13:23   ` Thomas Zimmermann
2021-07-12 14:26     ` Sumera Priyadarsini
2021-07-12 18:01       ` Thomas Zimmermann

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=20210705212945.qwwrrbxe5ygotycf@smtp.gmail.com \
    --to=melissa.srw@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).