LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Eric Anholt <eric@anholt.net>
Cc: dri-devel@lists.freedesktop.org, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] drm: Make the prime vmap/vunmap hooks optional.
Date: Tue, 24 Apr 2018 15:13:09 +0200 [thread overview]
Message-ID: <20180424131309.GE31310@phenom.ffwll.local> (raw)
In-Reply-To: <20180424004610.4637-2-eric@anholt.net>
On Mon, Apr 23, 2018 at 05:46:08PM -0700, Eric Anholt wrote:
> Some drivers leave these unimplemented, so don't make them have
> unimplemented stubs.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_prime.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
> index caf675e3e692..397b46b33739 100644
> --- a/drivers/gpu/drm/drm_prime.c
> +++ b/drivers/gpu/drm/drm_prime.c
> @@ -409,7 +409,10 @@ void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf)
> struct drm_gem_object *obj = dma_buf->priv;
> struct drm_device *dev = obj->dev;
>
> - return dev->driver->gem_prime_vmap(obj);
> + if (dev->driver->gem_prime_vmap)
> + return dev->driver->gem_prime_vmap(obj);
> + else
> + return NULL;
> }
> EXPORT_SYMBOL(drm_gem_dmabuf_vmap);
>
> @@ -426,7 +429,8 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr)
> struct drm_gem_object *obj = dma_buf->priv;
> struct drm_device *dev = obj->dev;
>
> - dev->driver->gem_prime_vunmap(obj, vaddr);
> + if (dev->driver->gem_prime_vunmap)
> + dev->driver->gem_prime_vunmap(obj, vaddr);
> }
> EXPORT_SYMBOL(drm_gem_dmabuf_vunmap);
>
> --
> 2.17.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2018-04-24 13:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 0:46 [PATCH v2 0/3] V3D DRM driver Eric Anholt
2018-04-24 0:46 ` [PATCH v2 1/3] drm: Make the prime vmap/vunmap hooks optional Eric Anholt
2018-04-24 13:13 ` Daniel Vetter [this message]
2018-04-24 0:46 ` [PATCH v2 2/3] dt-bindings: Add a new binding for Broadcom V3D 3.x and newer GPUs Eric Anholt
2018-04-27 19:53 ` Rob Herring
2018-04-24 0:46 ` [PATCH v2 3/3] drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+ Eric Anholt
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=20180424131309.GE31310@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--subject='Re: [PATCH v2 1/3] drm: Make the prime vmap/vunmap hooks optional.' \
/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
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).