[Intel-gfx] [PATCH] drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE

Chris Wilson chris at chris-wilson.co.uk
Thu Sep 13 15:18:13 UTC 2018


Quoting Ville Syrjala (2018-09-13 16:04:05)
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Use I915_GTT_PAGE_SIZE when talking about GTT pages rather than
> physical pages.

Yup, these are all concerned with GTT units so we prefer
I915_GTT_PAGE_SIZE.
 
> There are some PAGE_SHIFTs left though. Not sure if we want to
> introduce I915_GTT_PAGE_SHIFT or what?

Nah, I think gcc is good for doing the right thing for a constant divide
by a power of two. If you spot some, just change them over to
(x / GTT_PAGE_SIZE) and double check gcc emits the same code. If it
doesn't just flag it in the commit message and then one day we may feel
the urge for another cleanup.

> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Suggested-by: Chris Wilson <chris at chris-wilson.co.uk> # at least some of it :)
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list