mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>, dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:VIRTIO GPU DRIVER" 
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH] drm/virtio: drop prime import/export callbacks
Date: Fri, 11 Jan 2019 13:03:39 +0200	[thread overview]
Message-ID: <1465b863-8ea4-9200-3332-11777f537390@gmail.com> (raw)
In-Reply-To: <20190110111545.26768-1-kraxel@redhat.com>

On 1/10/19 1:15 PM, Gerd Hoffmann wrote:
> Also set prime_handle_to_fd and prime_fd_to_handle to NULL,
> so drm will not advertive DRM_PRIME_CAP_{IMPORT,EXPORT} to
> userspace.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> ---
>   drivers/gpu/drm/virtio/virtgpu_drv.h   |  4 ----
>   drivers/gpu/drm/virtio/virtgpu_drv.c   |  4 ----
>   drivers/gpu/drm/virtio/virtgpu_prime.c | 14 --------------
>   3 files changed, 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
> index cf896d8793..4f2f3c43a4 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_drv.h
> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
> @@ -354,10 +354,6 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
>   /* virtgpu_prime.c */
>   int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
>   void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
> -struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
> -struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
> -	struct drm_device *dev, struct dma_buf_attachment *attach,
> -	struct sg_table *sgt);
>   void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj);
>   void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
>   int virtgpu_gem_prime_mmap(struct drm_gem_object *obj,
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
> index af92964b68..b996ac1d4f 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_drv.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
> @@ -205,14 +205,10 @@ static struct drm_driver driver = {
>   #if defined(CONFIG_DEBUG_FS)
>   	.debugfs_init = virtio_gpu_debugfs_init,
>   #endif
> -	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> -	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>   	.gem_prime_export = drm_gem_prime_export,
>   	.gem_prime_import = drm_gem_prime_import,
>   	.gem_prime_pin = virtgpu_gem_prime_pin,
>   	.gem_prime_unpin = virtgpu_gem_prime_unpin,
> -	.gem_prime_get_sg_table = virtgpu_gem_prime_get_sg_table,
> -	.gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table,
>   	.gem_prime_vmap = virtgpu_gem_prime_vmap,
>   	.gem_prime_vunmap = virtgpu_gem_prime_vunmap,
>   	.gem_prime_mmap = virtgpu_gem_prime_mmap,
> diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c
> index 86ce0ae93f..c59ec34c80 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_prime.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_prime.c
> @@ -39,20 +39,6 @@ void virtgpu_gem_prime_unpin(struct drm_gem_object *obj)
>   	WARN_ONCE(1, "not implemented");
>   }
>   
> -struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
> -{
> -	WARN_ONCE(1, "not implemented");
> -	return ERR_PTR(-ENODEV);
> -}
> -
> -struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
> -	struct drm_device *dev, struct dma_buf_attachment *attach,
> -	struct sg_table *table)
> -{
> -	WARN_ONCE(1, "not implemented");
> -	return ERR_PTR(-ENODEV);
> -}
> -
>   void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj)
>   {
>   	struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);


  reply	other threads:[~2019-01-11 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 11:15 Gerd Hoffmann
2019-01-11 11:03 ` Oleksandr Andrushchenko [this message]
2019-01-11 21:14 ` Dave Airlie

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=1465b863-8ea4-9200-3332-11777f537390@gmail.com \
    --to=andr2000@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®