[Intel-gfx] [RFC] drm/i915/gtt: Allow >= 4GB offsets in X86_32
Chris Wilson
chris at chris-wilson.co.uk
Thu Jul 16 09:22:53 PDT 2015
On Thu, Jul 16, 2015 at 05:18:18PM +0100, Michel Thierry wrote:
> Commit c44ef60e4370 ("drm/i915/gtt: Allow >= 4GB sizes for vm.") took care
> of most of this changes, but i915_gem_obj_offset still returned an unsigned
> long, which in only 4-bytes long in 32-bit kernels.
>
> Change return type (and other related offset variables) to u64.
>
> Since Global GTT is always limited to 4GB, this change is not required
> in i915_gem_obj_ggtt_offset.
>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
> ---
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index fd17204..0cc6bf9 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4390,15 +4390,16 @@ i915_gem_object_do_pin(struct drm_i915_gem_object *obj,
> return -EBUSY;
>
> if (i915_vma_misplaced(vma, alignment, flags)) {
> - unsigned long offset;
> + u64 offset;
> offset = ggtt_view ? i915_gem_obj_ggtt_offset_view(obj, ggtt_view) :
> i915_gem_obj_offset(obj, vm);
We don't need offset here since we already have vma->node.start
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list