Re: [RFC] drm/i915/gtt: Allow >= 4GB offsets in X86_32

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

 



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@xxxxxxxx>
> Signed-off-by: Michel Thierry <michel.thierry@xxxxxxxxx>
> ---

> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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