[PATCH] drm/i915/gt: Report full vm address range
Nirmoy Das
nirmoy.das at linux.intel.com
Thu Mar 14 16:05:08 UTC 2024
On 3/14/2024 3:04 PM, Lionel Landwerlin wrote:
> Hi Andi,
>
> In Mesa we've been relying on I915_CONTEXT_PARAM_GTT_SIZE so as long
> as that is adjusted by the kernel
What do you mean by adjusted by, should it be a aligned size?
I915_CONTEXT_PARAM_GTT_SIZE ioctl is returning vm->total which is
adjusted(reduced by a page).
This patch might cause silent error as it is not removing WABB which is
using the reserved page to add dummy blt and if userspace is using that
page then it will be overwritten.
Regards,
Nirmoy
> , we should be able to continue working without issues.
>
> Acked-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>
> Thanks,
>
> -Lionel
>
> On 13/03/2024 21:39, Andi Shyti wrote:
>> Commit 9bb66c179f50 ("drm/i915: Reserve some kernel space per
>> vm") has reserved an object for kernel space usage.
>>
>> Userspace, though, needs to know the full address range.
>>
>> Fixes: 9bb66c179f50 ("drm/i915: Reserve some kernel space per vm")
>> Signed-off-by: Andi Shyti <andi.shyti at linux.intel.com>
>> Cc: Andrzej Hajda <andrzej.hajda at intel.com>
>> Cc: Chris Wilson <chris.p.wilson at linux.intel.com>
>> Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>> Cc: Michal Mrozek <michal.mrozek at intel.com>
>> Cc: Nirmoy Das <nirmoy.das at intel.com>
>> Cc: <stable at vger.kernel.org> # v6.2+
>> ---
>> drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
>> b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
>> index fa46d2308b0e..d76831f50106 100644
>> --- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
>> +++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
>> @@ -982,8 +982,9 @@ static int gen8_init_rsvd(struct
>> i915_address_space *vm)
>> vm->rsvd.vma = i915_vma_make_unshrinkable(vma);
>> vm->rsvd.obj = obj;
>> - vm->total -= vma->node.size;
>> +
>> return 0;
>> +
>> unref:
>> i915_gem_object_put(obj);
>> return ret;
>
>
More information about the dri-devel
mailing list