[Intel-gfx] [PATCH] drm/i915: Set correct domains values at _i915_vma_move_to_active

Matthew Auld matthew.auld at intel.com
Thu Sep 8 10:13:28 UTC 2022


On 08/09/2022 10:46, Das, Nirmoy wrote:
> 
> On 9/8/2022 11:40 AM, Matthew Auld wrote:
>> On 07/09/2022 18:26, Nirmoy Das wrote:
>>> Fix regression introduced by commit:
>>> "drm/i915: Individualize fences before adding to dma_resv obj"
>>> which sets obj->read_domains to 0 for both read and write paths.
>>> Also set obj->write_domain to 0 on read path which was removed by
>>> the commit.
>>>
>>> References: https://gitlab.freedesktop.org/drm/intel/-/issues/6639
>>> Fixes: 842d9346b2fd ("drm/i915: Individualize fences before adding to 
>>> dma_resv obj")
>>> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
>>> Cc: <stable at vger.kernel.org> # v5.16+
>>> Cc: Matthew Auld <matthew.auld at intel.com>
>>> Cc: Andrzej Hajda <andrzej.hajda at intel.com>
>>
>> Should I go ahead and push this?
> 
> 
> Yes,  please go ahead. Lots people are effected because of this regression.

Pushed with:
Fixes: 420a07b841d0 ("drm/i915: Individualize fences before adding to 
dma_resv obj")

Otherwise dim complains it seems.

> 
> 
> Nirmoy
> 
>>
>>> ---
>>>   drivers/gpu/drm/i915/i915_vma.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_vma.c 
>>> b/drivers/gpu/drm/i915/i915_vma.c
>>> index 260371716490..373582cfd8f3 100644
>>> --- a/drivers/gpu/drm/i915/i915_vma.c
>>> +++ b/drivers/gpu/drm/i915/i915_vma.c
>>> @@ -1882,12 +1882,13 @@ int _i915_vma_move_to_active(struct i915_vma 
>>> *vma,
>>>           enum dma_resv_usage usage;
>>>           int idx;
>>>   -        obj->read_domains = 0;
>>>           if (flags & EXEC_OBJECT_WRITE) {
>>>               usage = DMA_RESV_USAGE_WRITE;
>>>               obj->write_domain = I915_GEM_DOMAIN_RENDER;
>>> +            obj->read_domains = 0;
>>>           } else {
>>>               usage = DMA_RESV_USAGE_READ;
>>> +            obj->write_domain = 0;
>>>           }
>>>             dma_fence_array_for_each(curr, idx, fence)


More information about the Intel-gfx mailing list