[Intel-gfx] [PATCH 05/15] drm/i915: introduce drm_i915_gem_object page_size member
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Tue Mar 7 09:34:30 UTC 2017
Hi,
On 06/03/2017 23:54, Matthew Auld wrote:
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 2 ++
> drivers/gpu/drm/i915/i915_gem_object.h | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7c20601fe1de..0a6ed2c54629 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3975,6 +3975,8 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
>
> obj->ops = ops;
>
> + obj->page_size = I915_GTT_PAGE_SIZE;
> +
> reservation_object_init(&obj->__builtin_resv);
> obj->resv = &obj->__builtin_resv;
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h
> index 33b0dc4782a9..31bcf87d3745 100644
> --- a/drivers/gpu/drm/i915/i915_gem_object.h
> +++ b/drivers/gpu/drm/i915/i915_gem_object.h
> @@ -90,6 +90,8 @@ struct drm_i915_gem_object {
>
> unsigned long flags;
>
> + unsigned long page_size; /* 4K(default), 64K, 2M, 1G */
> +
Could we get away with an unsigned int for this field and the colouring,
function arguments, etc following in subsequent patches? Or it is
expected that >4G pages might happen in some reasonable time? Maybe a
pointless saving, I don't know, just asking.
Regards,
Tvrtko
> /**
> * Have we taken a reference for the object for incomplete GPU
> * activity?
>
More information about the Intel-gfx
mailing list