drm/i915: fix i915_gem_object_wait_moving_fence
Subsystems (2)
PATCH v2 1/1 drm/i915: fix i915_gem_object_wait_moving_fence
All of CI is just failing with the following, which prevents loading of the module:
i915 0000:03:00.0: [drm] *ERROR* Scratch setup failed
Best guess is that this comes from the pin_map() for the scratch page, which does an i915_gem_object_wait_moving_fence() somewhere. It looks like this now calls into dma_resv_wait_timeout() which can return the remaining timeout, leading to the caller thinking this is an error.
v2(Lucas): handle ret == 0
--- drivers/gpu/drm/i915/gem/i915_gem_object.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_object.c +9 -2
@@ -772,9 +772,16 @@ int i915_gem_object_get_moving_fence(struct drm_i915_gem_object *obj,int i915_gem_object_wait_moving_fence (struct drm_i915_gem_object *obj,bool intr) { +long ret; +assert_object_held (obj); -return dma_resv_wait_timeout (obj->base. resv,DMA_RESV_USAGE_KERNEL , - intr,MAX_SCHEDULE_TIMEOUT ); + + ret =dma_resv_wait_timeout (obj->base. resv,DMA_RESV_USAGE_KERNEL , + intr,MAX_SCHEDULE_TIMEOUT ); +if (!ret) + ret = -ETIME ; + +return ret <0 ? ret :0 ; }#if IS_ENABLED (CONFIG_DRM_I915_SELFTEST )
Signature · 1 line
2.34.1
Am 08.04.22 um 10:42 schrieb Matthew Auld:
Quoted 10 lines
All of CI is just failing with the following, which prevents loading of the module:
i915 0000:03:00.0: [drm] *ERROR* Scratch setup failedBest guess is that this comes from the
pin_map()for the scratch page, which does ani915_gem_object_wait_moving_fence()somewhere. It looks like this now calls intodma_resv_wait_timeout()which can return the remaining timeout, leading to the caller thinking this is an error.
Quoted 8 lines
v2(Lucas): handle ret == 0
Fixes 1d7f5e6c5240 ("drm/i915: drop bo->moving dependency")Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>Cc Lucas De Marchi <[email protected]>Cc Daniel Vetter <[email protected]>Reviewed-by Christian König <[email protected]> #v1
Should I push it to drm-misc-next?
Quoted 27 lines
--- drivers/gpu/drm/i915/gem/i915_gem_object.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_object.c +9
-2@@ -772,9 +772,16 @@ int i915_gem_object_get_moving_fence(struct drm_i915_gem_object *obj,int i915_gem_object_wait_moving_fence (struct drm_i915_gem_object *obj,bool intr) { +long ret; +assert_object_held (obj); -return dma_resv_wait_timeout (obj->base. resv,DMA_RESV_USAGE_KERNEL , - intr,MAX_SCHEDULE_TIMEOUT ); + + ret =dma_resv_wait_timeout (obj->base. resv,DMA_RESV_USAGE_KERNEL , + intr,MAX_SCHEDULE_TIMEOUT ); +if (!ret) + ret = -ETIME ; + +return ret <0 ? ret :0 ; }#if IS_ENABLED (CONFIG_DRM_I915_SELFTEST )
Quoted 20 lines · Christian König
Am 08.04.22 um 10:42 schrieb Matthew Auld:
Quoted 10 lines
All of CI is just failing with the following, which prevents loading of the module:
i915 0000:03:00.0: [drm] *ERROR* Scratch setup failed
Best guess is that this comes from the
pin_map()for the scratch page, which does ani915_gem_object_wait_moving_fence()somewhere. It looks like this now calls intodma_resv_wait_timeout()which can return the remaining timeout, leading to the caller thinking this is an error.Quoted 8 lines
v2(Lucas): handle ret == 0
Fixes 1d7f5e6c5240 ("drm/i915: drop bo->moving dependency")Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>Cc Lucas De Marchi <[email protected]>Cc Daniel Vetter <[email protected]>Reviewed-by Christian König <[email protected]> #v1
Quoted 3 lines
Reviewed-by Christian König <[email protected]>Should I push it to drm-misc-next?
I guess we need to wait for at least BAT result to come back. I will ping here, assuming that comes back green. Thanks.
Quoted 29 lines
Quoted 28 lines
---
drivers/gpu/drm/i915/gem/i915_gem_object.c| 11 +++++++++--1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_object.c +9
-2@@ -772,9 +772,16 @@ int i915_gem_object_get_moving_fence(structdrm_i915_gem_object *obj, int i915_gem_object_wait_moving_fence(struct drm_i915_gem_object *obj, bool intr) { + long ret; + assert_object_held(obj); - return dma_resv_wait_timeout(obj->base. resv, DMA_RESV_USAGE_KERNEL, - intr, MAX_SCHEDULE_TIMEOUT); + + ret = dma_resv_wait_timeout(obj->base. resv, DMA_RESV_USAGE_KERNEL, + intr, MAX_SCHEDULE_TIMEOUT); + if (!ret) + ret = -ETIME; + + return ret < 0 ? ret : 0; } #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
Quoted 21 lines · Matthew Auld
Quoted 20 lines · Christian König
Am 08.04.22 um 10:42 schrieb Matthew Auld:
Quoted 18 lines
All of CI is just failing with the following, which prevents loading of the module:
i915 0000:03:00.0: [drm] *ERROR* Scratch setup failed
Best guess is that this comes from the
pin_map()for the scratch page, which does ani915_gem_object_wait_moving_fence()somewhere. It looks like this now calls intodma_resv_wait_timeout()which can return the remaining timeout, leading to the caller thinking this is an error.v2(Lucas): handle ret == 0
Fixes 1d7f5e6c5240 ("drm/i915: drop bo->moving dependency")Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>Cc Lucas De Marchi <[email protected]>Cc Daniel Vetter <[email protected]>Reviewed-by Christian König <[email protected]> #v1
Quoted 5 lines
Quoted 3 lines
Reviewed-by Christian König <[email protected]>Should I push it to drm-misc-next?
I guess we need to wait for at least BAT result to come back. I will ping here, assuming that comes back green. Thanks.
Ok, please go ahead with merging.
Quoted 31 lines
Quoted 31 lines
Quoted 30 lines
---
drivers/gpu/drm/i915/gem/i915_gem_object.c| 11 +++++++++--1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_object.c +9
-2@@ -772,9 +772,16 @@ int i915_gem_object_get_moving_fence(structdrm_i915_gem_object *obj, int i915_gem_object_wait_moving_fence(struct drm_i915_gem_object *obj, bool intr) { + long ret; + assert_object_held(obj); - return dma_resv_wait_timeout(obj->base. resv,DMA_RESV_USAGE_KERNEL , - intr, MAX_SCHEDULE_TIMEOUT); + + ret = dma_resv_wait_timeout(obj->base. resv, DMA_RESV_USAGE_KERNEL, + intr, MAX_SCHEDULE_TIMEOUT); + if (!ret) + ret = -ETIME; + + return ret < 0 ? ret : 0; }#if
IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
Quoted 10 lines · Matthew Auld
All of CI is just failing with the following, which prevents loading of the module:
i915 0000:03:00.0: [drm] *ERROR* Scratch setup failedBest guess is that this comes from the
pin_map()for the scratch page, which does ani915_gem_object_wait_moving_fence()somewhere. It looks like this now calls intodma_resv_wait_timeout()which can return the remaining timeout, leading to the caller thinking this is an error.
Quoted 8 lines
v2(Lucas): handle ret == 0
Fixes 1d7f5e6c5240 ("drm/i915: drop bo->moving dependency")Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>Cc Lucas De Marchi <[email protected]>Cc Daniel Vetter <[email protected]>Reviewed-by Christian König <[email protected]> #v1
For the record, patchwork is disabled at this time. Trybot is still up if you want CI to verify this.
Signature · 1 line
Petri Latvala
Quoted 30 lines
--- drivers/gpu/drm/i915/gem/i915_gem_object.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_object.c +9
-2@@ -772,9 +772,16 @@ int i915_gem_object_get_moving_fence(struct drm_i915_gem_object *obj,int i915_gem_object_wait_moving_fence (struct drm_i915_gem_object *obj,bool intr) { +long ret; +assert_object_held (obj); -return dma_resv_wait_timeout (obj->base. resv,DMA_RESV_USAGE_KERNEL , - intr,MAX_SCHEDULE_TIMEOUT ); + + ret =dma_resv_wait_timeout (obj->base. resv,DMA_RESV_USAGE_KERNEL , + intr,MAX_SCHEDULE_TIMEOUT ); +if (!ret) + ret = -ETIME ; + +return ret <0 ? ret :0 ; }#if IS_ENABLED (CONFIG_DRM_I915_SELFTEST )Signature · 1 line
2.34.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: fix i915_gem_object_wait_moving_fence
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915: fix i915_gem_object_wait_moving_fence
URL : https://patchwork.freedesktop.org/series/102396/
State : failure
== Summary ==
Applying: drm/i915: fix i915_gem_object_wait_moving_fence Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/gem/i915_gem_object.c
Falling back to patching base and 3-way merge... No changes -- Patch already applied.