Linux virtualization list
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org,
	spice-devel@lists.freedesktop.org,
	"Dave Airlie" <airlied@redhat.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 4/4] drm/qxl: add drm_gem_plane_helper_prepare_fb
Date: Wed, 4 May 2022 11:27:19 +0200	[thread overview]
Message-ID: <YnJG95uJDD6tK8RN@phenom.ffwll.local> (raw)
In-Reply-To: <20220429134230.24334-4-christian.koenig@amd.com>

On Fri, Apr 29, 2022 at 03:42:30PM +0200, Christian König wrote:
> We could need to wait for the pin to complete here.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: virtualization@lists.linux-foundation.org
> Cc: spice-devel@lists.freedesktop.org

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/qxl/qxl_display.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
> index 9a9c29b1d3e1..9a64fa4c7530 100644
> --- a/drivers/gpu/drm/qxl/qxl_display.c
> +++ b/drivers/gpu/drm/qxl/qxl_display.c
> @@ -34,6 +34,7 @@
>  #include <drm/drm_plane_helper.h>
>  #include <drm/drm_probe_helper.h>
>  #include <drm/drm_simple_kms_helper.h>
> +#include <drm/drm_gem_atomic_helper.h>
>  
>  #include "qxl_drv.h"
>  #include "qxl_object.h"
> @@ -829,6 +830,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
>  	struct qxl_device *qdev = to_qxl(plane->dev);
>  	struct drm_gem_object *obj;
>  	struct qxl_bo *user_bo;
> +	int ret;
>  
>  	if (!new_state->fb)
>  		return 0;
> @@ -852,7 +854,11 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
>  		qxl_free_cursor(old_cursor_bo);
>  	}
>  
> -	return qxl_bo_pin(user_bo);
> +	ret = qxl_bo_pin(user_bo);
> +	if (ret)
> +		return ret;
> +
> +	return drm_gem_plane_helper_prepare_fb(plane, new_state);
>  }
>  
>  static void qxl_plane_cleanup_fb(struct drm_plane *plane,
> -- 
> 2.25.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

      reply	other threads:[~2022-05-04  9:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220429134230.24334-1-christian.koenig@amd.com>
2022-04-29 13:42 ` [PATCH 4/4] drm/qxl: add drm_gem_plane_helper_prepare_fb Christian König
2022-05-04  9:27   ` Daniel Vetter [this message]

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=YnJG95uJDD6tK8RN@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=spice-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox