public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/userptr: Convert to drm_i915_private
Date: Thu, 19 May 2016 16:29:07 +0100	[thread overview]
Message-ID: <573DDBC3.3080101@linux.intel.com> (raw)
In-Reply-To: <1463671036-3235-1-git-send-email-chris@chris-wilson.co.uk>


On 19/05/16 16:17, Chris Wilson wrote:
> userptr directly only uses drm_device in a single interface where it
> meant to use drm_i915_private (everywhere else we have to derive it from
> the drm_i915_gem_object and so require going from drm_device).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/i915_drv.h         | 2 +-
>   drivers/gpu/drm/i915/i915_gem.c         | 5 +----
>   drivers/gpu/drm/i915/i915_gem_userptr.c | 4 +---
>   3 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 72f0b02a8372..b89817178874 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2966,7 +2966,7 @@ int i915_gem_set_tiling(struct drm_device *dev, void *data,
>   			struct drm_file *file_priv);
>   int i915_gem_get_tiling(struct drm_device *dev, void *data,
>   			struct drm_file *file_priv);
> -int i915_gem_init_userptr(struct drm_device *dev);
> +void i915_gem_init_userptr(struct drm_i915_private *dev_priv);
>   int i915_gem_userptr_ioctl(struct drm_device *dev, void *data,
>   			   struct drm_file *file);
>   int i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 24cab8802c2e..6a31445a0471 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4913,10 +4913,7 @@ int i915_gem_init(struct drm_device *dev)
>   	 */
>   	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
>
> -	ret = i915_gem_init_userptr(dev);
> -	if (ret)
> -		goto out_unlock;
> -
> +	i915_gem_init_userptr(dev_priv);
>   	i915_gem_init_ggtt(dev);
>
>   	ret = i915_gem_context_init(dev);
> diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
> index 32d9726e38b1..380d15cf7ff0 100644
> --- a/drivers/gpu/drm/i915/i915_gem_userptr.c
> +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
> @@ -855,10 +855,8 @@ i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file
>   	return 0;
>   }
>
> -int
> -i915_gem_init_userptr(struct drm_device *dev)
> +void i915_gem_init_userptr(struct drm_i915_private *dev_priv)
>   {
> -	struct drm_i915_private *dev_priv = to_i915(dev);
>   	mutex_init(&dev_priv->mm_lock);
>   	hash_init(dev_priv->mm_structs);
>   	return 0;
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-05-19 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 15:17 [PATCH] drm/i915/userptr: Convert to drm_i915_private Chris Wilson
2016-05-19 15:29 ` Tvrtko Ursulin [this message]
2016-05-19 15:46 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-05-23 10:17 ` [PATCH] " Joonas Lahtinen

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=573DDBC3.3080101@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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