diff mbox series

[3/4] drm/nouveau: use drm_gem_plane_helper_prepare_fb

Message ID 20220429134230.24334-3-christian.koenig@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/4] drm: handle kernel fences in drm_gem_plane_helper_prepare_fb v2 | expand

Commit Message

Christian König April 29, 2022, 1:42 p.m. UTC
Instead of manually adjusting the plane state.

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/nouveau/dispnv50/wndw.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Lyude Paul April 29, 2022, 8:04 p.m. UTC | #1
Reviewed-by: Lyude Paul <lyude@redhat.com>

Also consider this as permission to push this to drm-misc-next

On Fri, 2022-04-29 at 15:42 +0200, Christian König wrote:
> Instead of manually adjusting the plane state.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Cc: Karol Herbst <kherbst@redhat.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Maxime Ripard <maxime@cerno.tech>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/wndw.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> index 8642b84ea20c..bb8a4601e0d9 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> @@ -32,6 +32,7 @@
>  
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_gem_atomic_helper.h>
>  #include <drm/drm_fourcc.h>
>  
>  #include "nouveau_bo.h"
> @@ -558,9 +559,7 @@ nv50_wndw_prepare_fb(struct drm_plane *plane, struct
> drm_plane_state *state)
>                         asyw->image.handle[0] = ctxdma->object.handle;
>         }
>  
> -       ret = dma_resv_get_singleton(nvbo->bo.base.resv,
> -                                    DMA_RESV_USAGE_WRITE,
> -                                    &asyw->state.fence);
> +       ret = drm_gem_plane_helper_prepare_fb(plane, state);
>         if (ret)
>                 return ret;
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
index 8642b84ea20c..bb8a4601e0d9 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
@@ -32,6 +32,7 @@ 
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_gem_atomic_helper.h>
 #include <drm/drm_fourcc.h>
 
 #include "nouveau_bo.h"
@@ -558,9 +559,7 @@  nv50_wndw_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state)
 			asyw->image.handle[0] = ctxdma->object.handle;
 	}
 
-	ret = dma_resv_get_singleton(nvbo->bo.base.resv,
-				     DMA_RESV_USAGE_WRITE,
-				     &asyw->state.fence);
+	ret = drm_gem_plane_helper_prepare_fb(plane, state);
 	if (ret)
 		return ret;