public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Dave Airlie <airlied@redhat.com>,
	Tian Tao <tiantao6@hisilicon.com>
Subject: Re: [Intel-gfx] [PATCH 10/15] drm/vram-helpers: Create DRM_GEM_VRAM_PLANE_HELPER_FUNCS
Date: Thu, 24 Jun 2021 15:39:22 +0200	[thread overview]
Message-ID: <YNSLCkFVDoly65QZ@phenom.ffwll.local> (raw)
In-Reply-To: <da2c2108-6f48-6a85-db71-c93614484369@suse.de>

On Thu, Jun 24, 2021 at 09:46:20AM +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 22.06.21 um 18:55 schrieb Daniel Vetter:
> > Like we have for the shadow helpers too, and roll it out to drivers.
> 
> In addition to the plane-helper macro, you may also want to add
> DRM_GEM_VRAM_SIMPLE_DISPLAY_PIPE_FUNCS and use it in bochs.

Hm I guess we can do that when we have a 2nd such case. I was more aiming
to make it as friction-less as possible that drivers end up with a
prepare_fb implementation which fishes out the implicit fences as needed
in this series.

Thanks for looking at this patch, I'm merging them all to drm-misc-next
now.
-Daniel

> 
> Best regards
> Thomas
> 
> > 
> > Acked-by: Tian Tao <tiantao6@hisilicon.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Dave Airlie <airlied@redhat.com>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: Hans de Goede <hdegoede@redhat.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Maxime Ripard <mripard@kernel.org>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Tian Tao <tiantao6@hisilicon.com>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >   drivers/gpu/drm/ast/ast_mode.c                 |  3 +--
> >   drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c |  3 +--
> >   drivers/gpu/drm/vboxvideo/vbox_mode.c          |  3 +--
> >   include/drm/drm_gem_vram_helper.h              | 12 ++++++++++++
> >   4 files changed, 15 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> > index e5996ae03c49..f5d58c3088fe 100644
> > --- a/drivers/gpu/drm/ast/ast_mode.c
> > +++ b/drivers/gpu/drm/ast/ast_mode.c
> > @@ -612,8 +612,7 @@ ast_primary_plane_helper_atomic_disable(struct drm_plane *plane,
> >   }
> >   static const struct drm_plane_helper_funcs ast_primary_plane_helper_funcs = {
> > -	.prepare_fb = drm_gem_vram_plane_helper_prepare_fb,
> > -	.cleanup_fb = drm_gem_vram_plane_helper_cleanup_fb,
> > +	DRM_GEM_VRAM_PLANE_HELPER_FUNCS,
> >   	.atomic_check = ast_primary_plane_helper_atomic_check,
> >   	.atomic_update = ast_primary_plane_helper_atomic_update,
> >   	.atomic_disable = ast_primary_plane_helper_atomic_disable,
> > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
> > index 29b8332b2bca..ccf80e369b4b 100644
> > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
> > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
> > @@ -158,8 +158,7 @@ static const struct drm_plane_funcs hibmc_plane_funcs = {
> >   };
> >   static const struct drm_plane_helper_funcs hibmc_plane_helper_funcs = {
> > -	.prepare_fb	= drm_gem_vram_plane_helper_prepare_fb,
> > -	.cleanup_fb	= drm_gem_vram_plane_helper_cleanup_fb,
> > +	DRM_GEM_VRAM_PLANE_HELPER_FUNCS,
> >   	.atomic_check = hibmc_plane_atomic_check,
> >   	.atomic_update = hibmc_plane_atomic_update,
> >   };
> > diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c b/drivers/gpu/drm/vboxvideo/vbox_mode.c
> > index 964381d55fc1..972c83b720aa 100644
> > --- a/drivers/gpu/drm/vboxvideo/vbox_mode.c
> > +++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c
> > @@ -488,8 +488,7 @@ static const struct drm_plane_helper_funcs vbox_primary_helper_funcs = {
> >   	.atomic_check = vbox_primary_atomic_check,
> >   	.atomic_update = vbox_primary_atomic_update,
> >   	.atomic_disable = vbox_primary_atomic_disable,
> > -	.prepare_fb	= drm_gem_vram_plane_helper_prepare_fb,
> > -	.cleanup_fb	= drm_gem_vram_plane_helper_cleanup_fb,
> > +	DRM_GEM_VRAM_PLANE_HELPER_FUNCS,
> >   };
> >   static const struct drm_plane_funcs vbox_primary_plane_funcs = {
> > diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h
> > index 27ed7e9243b9..f48d181c824b 100644
> > --- a/include/drm/drm_gem_vram_helper.h
> > +++ b/include/drm/drm_gem_vram_helper.h
> > @@ -124,6 +124,18 @@ void
> >   drm_gem_vram_plane_helper_cleanup_fb(struct drm_plane *plane,
> >   				     struct drm_plane_state *old_state);
> > +/**
> > + * DRM_GEM_VRAM_PLANE_HELPER_FUNCS -
> > + *	Initializes struct drm_plane_helper_funcs for VRAM handling
> > + *
> > + * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This
> > + * macro initializes struct drm_plane_helper_funcs to use the respective helper
> > + * functions.
> > + */
> > +#define DRM_GEM_VRAM_PLANE_HELPER_FUNCS \
> > +	.prepare_fb = drm_gem_vram_plane_helper_prepare_fb, \
> > +	.cleanup_fb = drm_gem_vram_plane_helper_cleanup_fb
> > +
> >   /*
> >    * Helpers for struct drm_simple_display_pipe_funcs
> >    */
> > 
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
> 




-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-06-24 13:39 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 16:54 [Intel-gfx] [PATCH 00/15] implicit fencing/dma-resv rules for shared buffers Daniel Vetter
2021-06-22 16:54 ` [Intel-gfx] [PATCH 01/15] dma-resv: Fix kerneldoc Daniel Vetter
2021-06-22 18:19   ` Alex Deucher
2021-06-22 18:49   ` Sam Ravnborg
2021-06-22 19:19     ` Daniel Vetter
2021-06-23  8:31   ` Christian König
2021-06-23 15:15     ` Daniel Vetter
2021-06-22 16:54 ` [Intel-gfx] [PATCH 02/15] dma-buf: Switch to inline kerneldoc Daniel Vetter
2021-06-22 18:24   ` Alex Deucher
2021-06-22 19:01   ` Sam Ravnborg
2021-06-22 19:21     ` Daniel Vetter
2021-06-23  8:32   ` Christian König
2021-06-23 16:17   ` [Intel-gfx] [PATCH] " Daniel Vetter
2021-06-23 17:33     ` Sam Ravnborg
2021-06-22 16:54 ` [Intel-gfx] [PATCH 03/15] dma-buf: Document dma-buf implicit fencing/resv fencing rules Daniel Vetter
2021-06-23  8:41   ` Christian König
2021-06-23 16:19   ` [Intel-gfx] [PATCH] " Daniel Vetter
2021-06-24  6:59     ` Dave Airlie
2021-06-24 11:08     ` [Intel-gfx] [Mesa-dev] " Daniel Stone
2021-06-24 11:23       ` Daniel Vetter
2021-06-22 16:55 ` [Intel-gfx] [PATCH 04/15] drm/panfrost: Shrink sched_lock Daniel Vetter
2021-06-23 16:52   ` Boris Brezillon
2021-06-22 16:55 ` [Intel-gfx] [PATCH 05/15] drm/panfrost: Use xarray and helpers for depedency tracking Daniel Vetter
2021-06-23 16:51   ` Boris Brezillon
2021-06-22 16:55 ` [Intel-gfx] [PATCH 06/15] drm/panfrost: Fix implicit sync Daniel Vetter
2021-06-23 16:47   ` Boris Brezillon
2021-06-23 19:17     ` Daniel Vetter
2021-06-22 16:55 ` [Intel-gfx] [PATCH 07/15] drm/atomic-helper: make drm_gem_plane_helper_prepare_fb the default Daniel Vetter
2021-06-22 19:10   ` Sam Ravnborg
2021-06-22 20:20     ` Daniel Vetter
2021-06-23 15:39       ` Sam Ravnborg
2021-06-23 16:22   ` [Intel-gfx] [PATCH] " Daniel Vetter
2021-06-22 16:55 ` [Intel-gfx] [PATCH 08/15] drm/<driver>: drm_gem_plane_helper_prepare_fb is now " Daniel Vetter
2021-06-24  8:32   ` Philipp Zabel
2021-06-22 16:55 ` [Intel-gfx] [PATCH 09/15] drm/armada: Remove prepare/cleanup_fb hooks Daniel Vetter
2021-06-24 12:46   ` Maxime Ripard
2021-06-22 16:55 ` [Intel-gfx] [PATCH 10/15] drm/vram-helpers: Create DRM_GEM_VRAM_PLANE_HELPER_FUNCS Daniel Vetter
2021-06-24  7:38   ` Thomas Zimmermann
2021-06-24  7:46   ` Thomas Zimmermann
2021-06-24 13:39     ` Daniel Vetter [this message]
2021-06-22 16:55 ` [Intel-gfx] [PATCH 11/15] drm/omap: Follow implicit fencing in prepare_fb Daniel Vetter
2021-06-22 16:55 ` [Intel-gfx] [PATCH 12/15] drm/simple-helper: drm_gem_simple_display_pipe_prepare_fb as default Daniel Vetter
2021-06-22 19:15   ` Sam Ravnborg
2021-06-23 16:24   ` [Intel-gfx] [PATCH] " Daniel Vetter
2021-06-23 17:34     ` Sam Ravnborg
2021-06-22 16:55 ` [Intel-gfx] [PATCH 13/15] drm/tiny: drm_gem_simple_display_pipe_prepare_fb is the default Daniel Vetter
2021-06-22 16:55 ` [Intel-gfx] [PATCH 14/15] drm/gem: Tiny kernel clarification for drm_gem_fence_array_add Daniel Vetter
2021-06-23  8:42   ` Christian König
2021-06-24 12:41     ` Daniel Vetter
2021-06-24 12:48       ` Christian König
2021-06-24 13:32         ` Daniel Vetter
2021-06-24 13:35           ` Christian König
2021-06-24 13:41             ` Daniel Vetter
2021-06-24 13:45               ` Christian König
2021-06-22 16:55 ` [Intel-gfx] [PATCH 15/15] RFC: drm/amdgpu: Implement a proper implicit fencing uapi Daniel Vetter
2021-06-23  9:45   ` Bas Nieuwenhuizen
2021-06-23 12:18     ` Daniel Vetter
2021-06-23 12:59       ` Christian König
2021-06-23 13:38         ` Bas Nieuwenhuizen
2021-06-23 13:44           ` Christian König
2021-06-23 13:49             ` Daniel Vetter
2021-06-23 14:02               ` Christian König
2021-06-23 14:50                 ` Daniel Vetter
2021-06-23 14:58                   ` Bas Nieuwenhuizen
2021-06-23 15:03                     ` Daniel Vetter
2021-06-23 15:07                       ` Christian König
2021-06-23 15:12                         ` Daniel Vetter
2021-06-23 15:15                           ` Christian König
2021-06-22 17:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for implicit fencing/dma-resv rules for shared buffers Patchwork
2021-06-22 17:11 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-06-22 17:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-06-22 19:12 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-23 17:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for implicit fencing/dma-resv rules for shared buffers (rev5) Patchwork
2021-06-23 17:07 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-06-23 17:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-06-23 21:04 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=YNSLCkFVDoly65QZ@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=tiantao6@hisilicon.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