On 2/27/2026 2:54 PM, Karol Wachowski wrote:
> On 2/27/2026 2:31 PM, Thomas Zimmermann wrote:
>> Instead of testing import_attach for imported GEM buffers, invoke
>> drm_gem_is_imported() to do the test. The test itself does not change.
> 
> Thank you for spotting this.
> 
> There's also another place in drivers/accel/ivpu/ivpu_gem.c:51
> drm_WARN_ON(&vdev->drm, !bo->base.base.import_attach);
> 
> We will push a patch for that.

I've sent a patch that covers both cases in a single commit. Thanks.
Karol


> 
>>
>> Signed-off-by: Thomas Zimmermann <[email protected]>
>> Cc: Maciej Falkowski <[email protected]>
>> Cc: Karol Wachowski <[email protected]>
>> Cc: Oded Gabbay <[email protected]>
>> ---
>>  drivers/accel/ivpu/ivpu_gem.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c
>> index 98b9ce26962b..9e2f1b60f632 100644
>> --- a/drivers/accel/ivpu/ivpu_gem.c
>> +++ b/drivers/accel/ivpu/ivpu_gem.c
>> @@ -157,7 +157,7 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)
>>      }
>>  
>>      if (bo->base.sgt) {
>> -            if (bo->base.base.import_attach) {
>> +            if (drm_gem_is_imported(&bo->base.base)) {
>>                      dma_buf_unmap_attachment(bo->base.base.import_attach,
>>                                               bo->base.sgt, 
>> DMA_BIDIRECTIONAL);
>>              } else {
> Reviewed-by: Karol Wachowski <[email protected]>

Reply via email to