All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH RFC 1/4] drm/i915: add create_context2 ioctl
Date: Mon, 15 Aug 2016 15:03:40 +0300	[thread overview]
Message-ID: <1471262620.10724.11.camel@linux.intel.com> (raw)
In-Reply-To: <1471261687-10601-2-git-send-email-mika.kuoppala@intel.com>

On ma, 2016-08-15 at 14:48 +0300, Mika Kuoppala wrote:
> @@ -2566,6 +2566,7 @@ static const struct drm_ioctl_desc i915_ioctls[] = {
>  	DRM_IOCTL_DEF_DRV(I915_GEM_USERPTR, i915_gem_userptr_ioctl, DRM_RENDER_ALLOW),
>  	DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_GETPARAM, i915_gem_context_getparam_ioctl, DRM_RENDER_ALLOW),
>  	DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_SETPARAM, i915_gem_context_setparam_ioctl, DRM_RENDER_ALLOW),
> +	DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_CREATE2, i915_gem_context_create2_ioctl, DRM_UNLOCKED),

Why DRM_UNLOCKED?

> @@ -394,7 +398,8 @@ i915_gem_context_create_gvt(struct drm_device *dev)
>  	if (ret)
>  		return ERR_PTR(ret);
>  
> -	ctx = i915_gem_create_context(dev, NULL);
> +	ctx = i915_gem_create_context(dev, NULL, USES_FULL_PPGTT(dev) ?
> +				      I915_GEM_CONTEXT_FULL_PPGTT : 0);

Could use flags variable here just like below this point in code.

> @@ -552,7 +561,8 @@ int i915_gem_context_open(struct drm_device *dev, struct drm_file *file)
>  	idr_init(&file_priv->context_idr);
>  
>  	mutex_lock(&dev->struct_mutex);
> -	ctx = i915_gem_create_context(dev, file_priv);
> +	ctx = i915_gem_create_context(dev, file_priv, USES_FULL_PPGTT(dev) ?
> +				      I915_GEM_CONTEXT_FULL_PPGTT : 0);

Ditto.

> +int i915_gem_context_create_ioctl(struct drm_device *dev, void *data,
> +				  struct drm_file *file)
> +{
> +	struct drm_i915_gem_context_create *args = data;
> +	struct drm_i915_gem_context_create2 tmp;

'args2' just as we have create2?

> @@ -1142,6 +1144,22 @@ struct drm_i915_gem_context_create {
>  	__u32 pad;
>  };
>  
> +/*
> + * SVM handling
> + *
> + * A context can opt in to SVM support (thereby using its CPU page tables
> + * when accessing data from the GPU) by using the %I915_ENABLE_SVM flag

s/I915_ENABLE_SVM/I915_GEM_CONTEXT_ENABLE_SVM/ ?

> + * and passing an existing context id.  This is a one way transition; SVM
> + * contexts can not be downgraded into PPGTT contexts once converted.
> + */
> +#define I915_GEM_CONTEXT_ENABLE_SVM		(1<<0)
> +#define I915_GEM_CONTEXT_FULL_PPGTT		(1<<1)

BIT()

With the above addressed;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-08-15 12:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 11:48 [PATCH RFC 0/4] svm support Mika Kuoppala
2016-08-15 11:48 ` [PATCH RFC 1/4] drm/i915: add create_context2 ioctl Mika Kuoppala
2016-08-15 11:55   ` Chris Wilson
2016-08-15 12:25     ` Mika Kuoppala
2016-08-15 12:56       ` Chris Wilson
2016-08-15 16:25         ` Jesse Barnes
2016-08-15 16:36           ` Chris Wilson
2016-08-15 12:03   ` Joonas Lahtinen [this message]
2016-08-15 11:48 ` [PATCH RFC 2/4] drm/i915: IOMMU based SVM implementation v13 Mika Kuoppala
2016-08-15 12:05   ` Chris Wilson
2016-08-15 12:13     ` David Woodhouse
2016-08-15 12:23       ` Chris Wilson
2016-08-15 12:30         ` David Woodhouse
2016-08-15 12:53           ` Chris Wilson
2016-08-15 13:04             ` David Woodhouse
2016-08-15 12:07   ` David Woodhouse
2016-08-15 11:48 ` [PATCH RFC 3/4] drm/i915: add SVM execbuf ioctl v10 Mika Kuoppala
2016-08-15 12:09   ` Chris Wilson
2016-08-15 12:34     ` Mika Kuoppala
2016-08-15 16:26       ` Jesse Barnes
2016-08-17  9:37         ` Joonas Lahtinen
2016-08-17 14:59           ` Jesse Barnes
2016-08-15 11:48 ` [PATCH RFC 4/4] drm/i915: Add param for SVM Mika Kuoppala
2016-08-15 12:11   ` Chris Wilson
2016-08-15 12:22     ` Mika Kuoppala
2016-08-15 12:24 ` ✗ Ro.CI.BAT: failure for svm support Patchwork
2016-08-15 13:43 ` [PATCH RFC 0/4] " Chris Wilson

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=1471262620.10724.11.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=mika.kuoppala@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.