Re: [RFCv2 06/14] drm/i915: let __i915_gem_context_create() takes context creation params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Wang, Zhi A
> Sent: Thursday, February 18, 2016 7:42 PM
> 
> Let the core logic of context creation service creats the GEM context by
> context creation params.
> 
> Now it provides following options for context creation:
> - Need to create legacy context for this GEM context?
> - Need to create PPGTT instance for this GEM context?
> - Need to treat this context as the global default context?
> 
> And for all the assumptions in the original implementation, we keep them
> in the upper-level wrapper.
> 
> Signed-off-by: Zhi Wang <zhi.a.wang@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem_context.c | 71
> ++++++++++++++++++++-------------
>  1 file changed, 43 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c
> b/drivers/gpu/drm/i915/i915_gem_context.c
> index 5516346..cda09f7 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -223,6 +223,13 @@ static int __create_legacy_hw_context(struct drm_device *dev,
>  	return 0;
>  }
> 
> +struct i915_gem_context_create_params {
> +	struct drm_i915_file_private *file_priv;
> +	bool has_legacy_ctx;

'has_legacy_ctx" means slightly different from 'is_legacy_ctx' in
original place. :-)

> +	bool has_ppgtt;

similarly 'has_ppgtt' has different meaning from original 
USE_FULL_PPGTT... from your purpose looks it is for indicating
whether a new ppgtt should be created here, then a clearer
name is required.

> +	bool is_default_ctx;

You abandoned 'global' from original name. Any reason?

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux