Re: [PATCH v2 34/37] drm/i915: Introduce GEM_OBJECT_SETPARAM with I915_PARAM_MEMORY_REGION

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

 



Quoting Matthew Auld (2019-06-27 21:56:30)
> +int i915_gem_setparam_ioctl(struct drm_device *dev, void *data,
> +                           struct drm_file *file)
> +{
> +       struct drm_i915_gem_context_param *args = data;

The plan was to use the upper_32_bits() or whatever as the class. To
future proof, I would recommend being more explicit with a switch.

> +       if (args->param <= I915_CONTEXT_PARAM_MAX)
> +               return i915_gem_context_setparam_ioctl(dev, data, file);
> +
> +       return i915_gem_object_setparam_ioctl(dev, data, file);
> +}

>  /* Allow drivers to submit batchbuffers directly to hardware, relying
>   * on the security mechanisms provided by hardware.
> @@ -1595,11 +1597,36 @@ struct drm_i915_gem_context_param {
>   *   i915_context_engines_bond (I915_CONTEXT_ENGINES_EXT_BOND)
>   */
>  #define I915_CONTEXT_PARAM_ENGINES     0xa
> +
> +#define I915_CONTEXT_PARAM_MAX         0xffffffff
>  /* Must be kept compact -- no holes and well documented */

Hahaha. Good one.

The rest of the patch is clearly very early proof of concept as it needs
the locking reworked.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux