Re: [PATCH v5 17/19] drm/i915: Wa32bitGeneralStateOffset & Wa32bitInstructionBaseOffset

Chris Wilson
2015-07-29T11:17:55Z

On Wed, Jul 29, 2015 at 12:05:55PM +0100, Michel Thierry wrote:
> >@@ -680,8 +680,8 @@ eb_vma_misplaced(struct i915_vma *vma)
> > if (entry->flags & __EXEC_OBJECT_NEEDS_MAP && !obj->map_and_fenceable)
> > return !only_mappable_for_reloc(entry->flags);
> >
> >- if (!(entry->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) &&
> >- (vma->node.start + vma->node.size) >= (1ULL << 32))
> >+ if ((entry->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) == 0 &&
> >+ (vma->node.start + vma->node.size - 1) >> 32)
> > return true;
> >
> > return false;
> >
> Also updated this part to follow your suggestion.
>
> I also spent a bit more time trying to figure what gcc was doing
> here. But I can't reproduce it locally, I get sizeof(1ULL<<32) = 8
> and 1ULL<<32 doesn't seem to be zero (in 32 and 64 bit kernels).
>
> Could it be related to the gcc version? I'm using 4.8.4.

It looked valid to me as well, but a printk confirmed that gcc was
hitting that path for every object.

gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
-Chris

--
Chris Wilson, Intel Open Source Technology Centre