mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Eric Anholt <eric@anholt.net>
Cc: dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Dave Airlie <airlied@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] v3d: fixup for submit alignment and check for zero flags in other ioctls.
Date: Wed, 2 May 2018 09:44:17 +0200	[thread overview]
Message-ID: <20180502074416.GW12521@phenom.ffwll.local> (raw)
In-Reply-To: <20180501175845.14837-1-eric@anholt.net>

On Tue, May 01, 2018 at 10:58:45AM -0700, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
> 
> airlied + danvet: this is the last change I think we need before I can
> merge v3d with your acks.  Sending as a diff so you don't have to look
> at the whole thing again.  Look good?

Hm I thought I've checked all your ioctl and made sure you're checking for
0 everywhere ... I guess I was blind. Anyway, lgtm, ack still holds.
-Daniel

> 
>  drivers/gpu/drm/v3d/v3d_bo.c  | 10 ++++++++++
>  drivers/gpu/drm/v3d/v3d_gem.c |  5 +++++
>  include/uapi/drm/v3d_drm.h    |  3 +++
>  3 files changed, 18 insertions(+)
> 
> diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
> index 2be4e8b71604..7b1e2a549a71 100644
> --- a/drivers/gpu/drm/v3d/v3d_bo.c
> +++ b/drivers/gpu/drm/v3d/v3d_bo.c
> @@ -325,6 +325,11 @@ int v3d_create_bo_ioctl(struct drm_device *dev, void *data,
>  	struct v3d_bo *bo = NULL;
>  	int ret;
>  
> +	if (args->flags != 0) {
> +		DRM_INFO("unknown create_bo flags: %d\n", args->flags);
> +		return -EINVAL;
> +	}
> +
>  	bo = v3d_bo_create(dev, file_priv, PAGE_ALIGN(args->size));
>  	if (IS_ERR(bo))
>  		return PTR_ERR(bo);
> @@ -344,6 +349,11 @@ int v3d_mmap_bo_ioctl(struct drm_device *dev, void *data,
>  	struct drm_gem_object *gem_obj;
>  	int ret;
>  
> +	if (args->flags != 0) {
> +		DRM_INFO("unknown mmap_bo flags: %d\n", args->flags);
> +		return -EINVAL;
> +	}
> +
>  	gem_obj = drm_gem_object_lookup(file_priv, args->handle);
>  	if (!gem_obj) {
>  		DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle);
> diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
> index fa39a1e35263..b513f9189caf 100644
> --- a/drivers/gpu/drm/v3d/v3d_gem.c
> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
> @@ -503,6 +503,11 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
>  	struct drm_syncobj *sync_out;
>  	int ret = 0;
>  
> +	if (args->pad != 0) {
> +		DRM_INFO("pad must be zero: %d\n", args->pad);
> +		return -EINVAL;
> +	}
> +
>  	exec = kcalloc(1, sizeof(*exec), GFP_KERNEL);
>  	if (!exec)
>  		return -ENOMEM;
> diff --git a/include/uapi/drm/v3d_drm.h b/include/uapi/drm/v3d_drm.h
> index 201a07645bdd..7b6627783608 100644
> --- a/include/uapi/drm/v3d_drm.h
> +++ b/include/uapi/drm/v3d_drm.h
> @@ -101,6 +101,9 @@ struct drm_v3d_submit_cl {
>  
>  	/* Number of BO handles passed in (size is that times 4). */
>  	__u32 bo_handle_count;
> +
> +	/* Pad, must be zero-filled. */
> +	__u32 pad;
>  };
>  
>  /**
> -- 
> 2.17.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      reply	other threads:[~2018-05-02  7:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 18:10 [PATCH v3 0/2] V3D DRM driver Eric Anholt
2018-04-30 18:10 ` [PATCH v3 1/2] dt-bindings: Add a new binding for Broadcom V3D 3.x and newer GPUs Eric Anholt
2018-04-30 19:44   ` Rob Herring
2018-04-30 18:10 ` [PATCH v3 2/2] drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+ Eric Anholt
2018-05-01 17:58   ` [PATCH] v3d: fixup for submit alignment and check for zero flags in other ioctls Eric Anholt
2018-05-02  7:44     ` 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=20180502074416.GW12521@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.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®