[Intel-gfx] [PATCH v1] drm/i915: GTT offset is cut by 32b-flag.

Sergii Romantsov sergii.romantsov at globallogic.com
Fri Nov 2 15:48:46 UTC 2018


Seems extending of any PIN_XXX flags to 64b has no sense for all other
cases.
But also in the code there is mismatching of 64 and 32b flags/data usage
(32b flags may be put to 64b arguments).
Seems that shouldn't cause any issues anymore, but if you think that it
should be fixed - please, let me know - would like to complete that case.

On Fri, Nov 2, 2018 at 5:47 PM Sergii Romantsov <sergii.romantsov at gmail.com>
wrote:

> Operating with gtt-addresses has to be done with 64b variables.
>
> CC: Kenneth Graunke <kenneth at whitecape.org>
> CC: Chris Wilson <chris at chris-wilson.co.uk>
> Fixes: a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT
> systems.)
> Fixes: c7c6e46f913b (drm/i915: Convert execbuf to use struct-of-array
> packing for critical fields)
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108619
> Signed-off-by: Sergii Romantsov <sergii.romantsov at globallogic.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 3f0c612..1973b79 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -611,7 +611,7 @@ static int eb_reserve_vma(const struct i915_execbuffer
> *eb,
>
>         if (exec_flags & EXEC_OBJECT_PINNED) {
>                 pin_flags |= entry->offset | PIN_OFFSET_FIXED;
> -               pin_flags &= ~PIN_NONBLOCK; /* force overlapping checks */
> +               pin_flags &= ~(u64)PIN_NONBLOCK; /* force overlapping
> checks */
>         } else if (exec_flags & __EXEC_OBJECT_NEEDS_BIAS) {
>                 pin_flags |= BATCH_OFFSET_BIAS | PIN_OFFSET_BIAS;
>         }
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>


-- 
Sergii Romantsov
GlobalLogic Inc.
www.globallogic.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20181102/02513d18/attachment-0001.html>


More information about the Intel-gfx mailing list