[Intel-gfx] [PATCH 11/15] drm/i915: Drop create_vm argument to i915_gem_create_context
Thierry, Michel
michel.thierry at intel.com
Fri Aug 8 15:06:13 CEST 2014
> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Daniel Vetter
> Sent: Wednesday, August 06, 2014 2:05 PM
> To: Intel Graphics Development
> Cc: Daniel Vetter
> Subject: [Intel-gfx] [PATCH 11/15] drm/i915: Drop create_vm argument to
> i915_gem_create_context
>
> Now that all the flow is streamlined the rule is simple: We create
> a new ppgtt for a new context when we have full ppgtt enabled.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_gem_context.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c
> b/drivers/gpu/drm/i915/i915_gem_context.c
> index c00e5d027774..655ed6228aab 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -229,8 +229,7 @@ err_out:
> */
> static struct intel_context *
> i915_gem_create_context(struct drm_device *dev,
> - struct drm_i915_file_private *file_priv,
> - bool create_vm)
> + struct drm_i915_file_private *file_priv)
> {
> const bool is_global_default_ctx = file_priv == NULL;
> struct intel_context *ctx;
> @@ -258,7 +257,7 @@ i915_gem_create_context(struct drm_device *dev,
> }
> }
>
> - if (create_vm) {
> + if (USES_FULL_PPGTT(dev)) {
> struct i915_hw_ppgtt *ppgtt = i915_ppgtt_create(dev,
> file_priv);
>
> if (IS_ERR_OR_NULL(ppgtt)) {
> @@ -337,7 +336,7 @@ int i915_gem_context_init(struct drm_device *dev)
> }
> }
>
> - ctx = i915_gem_create_context(dev, NULL,
> USES_FULL_PPGTT(dev));
> + ctx = i915_gem_create_context(dev, NULL);
> if (IS_ERR(ctx)) {
> DRM_ERROR("Failed to create default global context (error
> %ld)\n",
> PTR_ERR(ctx));
> @@ -438,7 +437,7 @@ 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,
> USES_FULL_PPGTT(dev));
> + ctx = i915_gem_create_context(dev, file_priv);
> mutex_unlock(&dev->struct_mutex);
>
> if (IS_ERR(ctx)) {
> @@ -696,7 +695,7 @@ int i915_gem_context_create_ioctl(struct drm_device
> *dev, void *data,
> if (ret)
> return ret;
>
> - ctx = i915_gem_create_context(dev, file_priv,
> USES_FULL_PPGTT(dev));
> + ctx = i915_gem_create_context(dev, file_priv);
> mutex_unlock(&dev->struct_mutex);
> if (IS_ERR(ctx))
> return PTR_ERR(ctx);
> --
> 1.9.3
Reviewed-by: Michel Thierry <michel.thierry at intel.com>
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6656 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140808/348e7c5b/attachment.bin>
More information about the Intel-gfx
mailing list