drm/i915/ttm: fix sparse warning
Subsystems (7)
Matthew Auld
reviewerPATCH 1/6 drm/i915/ttm: fix sparse warning
Sparse complains with:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse:
expected restricted vm_fault_t [assigned] [usertype] retdrivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int
--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +3 -2
@@ -1067,11 +1067,12 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf) .interruptible = true, .no_wait_gpu = true, /* should be idle already */ }; +int err;GEM_BUG_ON (!bo->ttm || !(bo->ttm->page_flags &TTM_TT_FLAG_SWAPPED )); - ret =ttm_bo_validate (bo,i915_ttm_sys_placement (), &ctx); -if (ret) { + err =ttm_bo_validate (bo,i915_ttm_sys_placement (), &ctx); +if (err) {dma_resv_unlock (bo->base.resv);return VM_FAULT_SIGBUS ; }
Signature · 1 line
2.39.1
Matthew Auld
reviewerPATCH 2/6 drm/i915/ttm: audit remaining bo->resource
In the near future TTM will have NULL bo->resource when the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULL bo->resource should be taken to mean swapped-out or purged object.
References: 516198d317d8 ("drm/i915: audit bo->resource usage v3")
--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 12 +++++++++--- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 7 ++++++- drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 7 +++++-- 3 files changed, 20 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +9 -3
@@ -472,7 +472,7 @@ static int i915_ttm_shrink(struct drm_i915_gem_object *obj, unsigned int flags)struct ttm_placement place = {};int ret; -if (!bo->ttm || bo->resource->mem_type !=TTM_PL_SYSTEM ) +if (!bo->ttm || (bo->resource && bo->resource->mem_type !=TTM_PL_SYSTEM ))return 0 ;GEM_BUG_ON (!i915_tt->is_shmem);
@@ -511,7 +511,13 @@ static void i915_ttm_delete_mem_notify(struct ttm_buffer_object *bo) {struct drm_i915_gem_object *obj =i915_ttm_to_gem (bo); -if (bo->resource && !i915_ttm_is_ghost_object (bo)) { +/* +* This gets called twice by ttm, so long as we have a ttm resource or +* ttm_tt then we can still safely call this. Due to pipeline-gutting, +* we maybe have NULL bo->resource, but in that case we should always +* have a ttm alive (like if the pages are swapped out). +*/ +if ((bo->resource || bo->ttm) && !i915_ttm_is_ghost_object (bo)) {__i915_gem_object_pages_fini (obj);i915_ttm_free_cached_io_rsgt (obj); }
@@ -1198,7 +1204,7 @@ static void i915_ttm_unmap_virtual(struct drm_i915_gem_object *obj)assert_object_held_shared (obj); -if (i915_ttm_cpu_maps_iomem (bo->resource)) { +if (bo->resource &&i915_ttm_cpu_maps_iomem (bo->resource)) { wakeref =intel_runtime_pm_get (&to_i915 (obj->base.dev)->runtime_pm);/* userfault_count is protected by obj lock and rpm wakeref. */
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c +6 -1
@@ -83,7 +83,8 @@ void i915_ttm_adjust_domains_after_move(struct drm_i915_gem_object *obj) {struct ttm_buffer_object *bo =i915_gem_to_ttm (obj); -if (i915_ttm_cpu_maps_iomem (bo->resource) || bo->ttm->caching != ttm_cached) { +if ((bo->resource &&i915_ttm_cpu_maps_iomem (bo->resource)) || + bo->ttm->caching != ttm_cached) { obj->write_domain =I915_GEM_DOMAIN_WC ; obj->read_domains =I915_GEM_DOMAIN_WC ; }else {
@@ -711,6 +712,10 @@ int i915_gem_obj_copy_ttm(struct drm_i915_gem_object *dst,assert_object_held (dst);assert_object_held (src); + +if (GEM_WARN_ON (!src_bo->resource || !dst_bo->resource)) +return -EINVAL ; +i915_deps_init (&deps,GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN); ret =dma_resv_reserve_fences (src_bo->base.resv,1 );
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +5 -2
@@ -53,7 +53,7 @@ static int i915_ttm_backup(struct i915_gem_apply_to_region *apply,unsigned int flags;int err =0 ; -if (bo->resource->mem_type ==I915_PL_SYSTEM || obj->ttm.backup) +if (!bo->resource || bo->resource->mem_type ==I915_PL_SYSTEM || obj->ttm.backup)return 0 ;if (pm_apply->allow_gpu &&i915_gem_object_evictable (obj))
@@ -187,7 +187,10 @@ static int i915_ttm_restore(struct i915_gem_apply_to_region *apply,return err;/* Content may have been swapped. */ - err =ttm_tt_populate (backup_bo->bdev, backup_bo->ttm, &ctx); +if (!backup_bo->resource) + err =ttm_bo_validate (backup_bo,i915_ttm_sys_placement (), &ctx); +if (!err) + err =ttm_tt_populate (backup_bo->bdev, backup_bo->ttm, &ctx);if (!err) { err =i915_gem_obj_copy_ttm (obj, backup, pm_apply->allow_gpu, false);
Signature · 1 line
2.39.1
Re: [Intel-gfx] [PATCH 2/6] drm/i915/ttm: audit remaining bo->resource
Quoted 44 lines · Matthew Auld
In the near future TTM will have NULL
bo->resourcewhen the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULLbo->resourceshould be taken to mean swapped-out or purged object.References:
516198d317d8("drm/i915: auditbo->resourceusage v3")Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>Cc Nirmoy Das <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 12 +++++++++--- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 7 ++++++- drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 7 +++++-- 3 files changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +8
-2@@ -472,7 +472,7 @@ static int i915_ttm_shrink(struct drm_i915_gem_object *obj, unsigned int flags)struct ttm_placement place = {};int ret; -if (!bo->ttm || bo->resource->mem_type !=TTM_PL_SYSTEM ) +if (!bo->ttm || (bo->resource && bo->resource->mem_type !=TTM_PL_SYSTEM ))return 0 ;GEM_BUG_ON (!i915_tt->is_shmem);@@ -511,7 +511,13 @@ static void i915_ttm_delete_mem_notify(struct ttm_buffer_object *bo) {struct drm_i915_gem_object *obj =i915_ttm_to_gem (bo); -if (bo->resource && !i915_ttm_is_ghost_object (bo)) { +/* +* This gets called twice by ttm, so long as we have a ttm resource or +* ttm_tt then we can still safely call this. Due to pipeline-gutting, +* we maybe have NULL bo->resource, but in that case we should always +* have a ttm alive (like if the pages are swapped out). +*/ +if ((bo->resource || bo->ttm) && !i915_ttm_is_ghost_object (bo)) {__i915_gem_object_pages_fini (obj);i915_ttm_free_cached_io_rsgt (obj); }
drivers/gpu/drm/i915/gem/i915_gem_ttm.c static void i915_ttm_unmap_virtual(struct drm_i915_gem_object *obj) · line 1207
Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +1
-1@@ -1198,7 +1204,7 @@ static void i915_ttm_unmap_virtual(struct drm_i915_gem_object *obj)assert_object_held_shared (obj); -if (i915_ttm_cpu_maps_iomem (bo->resource)) { +if (bo->resource &&i915_ttm_cpu_maps_iomem (bo->resource)) {
I wonder if i915_ttm_cpu_maps_iomem couldn't handle null resource?
Quoted 33 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +0
-0wakeref =intel_runtime_pm_get (&to_i915 (obj->base.dev)->runtime_pm);/* userfault_count is protected by obj lock and rpm wakeref. */ drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c +6
-1@@ -83,7 +83,8 @@ void i915_ttm_adjust_domains_after_move(struct drm_i915_gem_object *obj) {struct ttm_buffer_object *bo =i915_gem_to_ttm (obj); -if (i915_ttm_cpu_maps_iomem (bo->resource) || bo->ttm->caching != ttm_cached) { +if ((bo->resource &&i915_ttm_cpu_maps_iomem (bo->resource)) || + bo->ttm->caching != ttm_cached) { obj->write_domain =I915_GEM_DOMAIN_WC ; obj->read_domains =I915_GEM_DOMAIN_WC ; }else {@@ -711,6 +712,10 @@ int i915_gem_obj_copy_ttm(struct drm_i915_gem_object *dst,assert_object_held (dst);assert_object_held (src); + +if (GEM_WARN_ON (!src_bo->resource || !dst_bo->resource)) +return -EINVAL ; +i915_deps_init (&deps,GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN); ret =dma_resv_reserve_fences (src_bo->base.resv,1 );drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +0
-0
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c static int i915_ttm_backup(struct i915_gem_apply_to_region *apply, · line 56
Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +1
-1@@ -53,7 +53,7 @@ static int i915_ttm_backup(struct i915_gem_apply_to_region *apply,unsigned int flags;int err =0 ; -if (bo->resource->mem_type ==I915_PL_SYSTEM || obj->ttm.backup) +if (!bo->resource || bo->resource->mem_type ==I915_PL_SYSTEM || obj->ttm.backup)
!i915_ttm_cpu_maps_iomem ?
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c static int i915_ttm_restore(struct i915_gem_apply_to_region *apply, · line 193
Quoted 12 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +4
-1return 0 ;if (pm_apply->allow_gpu &&i915_gem_object_evictable (obj))@@ -187,7 +187,10 @@ static int i915_ttm_restore(struct i915_gem_apply_to_region *apply,return err;/* Content may have been swapped. */ - err =ttm_tt_populate (backup_bo->bdev, backup_bo->ttm, &ctx); +if (!backup_bo->resource) + err =ttm_bo_validate (backup_bo,i915_ttm_sys_placement (), &ctx); +if (!err) + err =ttm_tt_populate (backup_bo->bdev, backup_bo->ttm, &ctx);
Regards
Andrzej
Quoted 3 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +0
-0if (!err) { err =i915_gem_obj_copy_ttm (obj, backup, pm_apply->allow_gpu, false);
Re: [Intel-gfx] [PATCH 2/6] drm/i915/ttm: audit remaining bo->resource
Quoted 47 lines · Andrzej Hajda
Quoted 45 lines · Matthew Auld
In the near future TTM will have NULL
bo->resourcewhen the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULLbo->resourceshould be taken to mean swapped-out or purged object.References:
516198d317d8("drm/i915: auditbo->resourceusage v3")Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>Cc Nirmoy Das <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 12 +++++++++--- drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 7 ++++++- drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 7 +++++-- 3 files changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +8
-2@@ -472,7 +472,7 @@ static int i915_ttm_shrink(struct drm_i915_gem_object *obj, unsigned int flags)struct ttm_placement place = {};int ret; -if (!bo->ttm || bo->resource->mem_type !=TTM_PL_SYSTEM ) +if (!bo->ttm || (bo->resource && bo->resource->mem_type !=TTM_PL_SYSTEM ))return 0 ;GEM_BUG_ON (!i915_tt->is_shmem);@@ -511,7 +511,13 @@ static void i915_ttm_delete_mem_notify(struct ttm_buffer_object *bo) {struct drm_i915_gem_object *obj =i915_ttm_to_gem (bo); -if (bo->resource && !i915_ttm_is_ghost_object (bo)) { +/* +* This gets called twice by ttm, so long as we have a ttm resource or +* ttm_tt then we can still safely call this. Due to pipeline-gutting, +* we maybe have NULL bo->resource, but in that case we should always +* have a ttm alive (like if the pages are swapped out). +*/ +if ((bo->resource || bo->ttm) && !i915_ttm_is_ghost_object (bo)) {__i915_gem_object_pages_fini (obj);i915_ttm_free_cached_io_rsgt (obj); }@@ -1198,7 +1204,7 @@ static void i915_ttm_unmap_virtual(struct drm_i915_gem_object *obj)
Quoted 6 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c static void i915_ttm_unmap_virtual(struct drm_i915_gem_object *obj) · line 1207
Quoted 4 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +1
-1assert_object_held_shared (obj); -if (i915_ttm_cpu_maps_iomem (bo->resource)) { +if (bo->resource &&i915_ttm_cpu_maps_iomem (bo->resource)) {I wonder if
i915_ttm_cpu_maps_iomemcouldn't handle null resource?
Yeah, seems reasonable to me.
Quoted 66 lines
Quoted 35 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +0
-0wakeref =intel_runtime_pm_get (&to_i915 (obj->base.dev)->runtime_pm);/* userfault_count is protected by obj lock and rpm wakeref. */ drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c +6
-1@@ -83,7 +83,8 @@ void i915_ttm_adjust_domains_after_move(struct drm_i915_gem_object *obj) {struct ttm_buffer_object *bo =i915_gem_to_ttm (obj); -if (i915_ttm_cpu_maps_iomem (bo->resource) || bo->ttm->caching != ttm_cached) { +if ((bo->resource &&i915_ttm_cpu_maps_iomem (bo->resource)) || + bo->ttm->caching != ttm_cached) { obj->write_domain =I915_GEM_DOMAIN_WC ; obj->read_domains =I915_GEM_DOMAIN_WC ; }else {@@ -711,6 +712,10 @@ int i915_gem_obj_copy_ttm(struct drm_i915_gem_object *dst,assert_object_held (dst);assert_object_held (src); + +if (GEM_WARN_ON (!src_bo->resource || !dst_bo->resource)) +return -EINVAL ; +i915_deps_init (&deps,GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN); ret =dma_resv_reserve_fences (src_bo->base.resv,1 );drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +0
-0drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c static int i915_ttm_backup(struct i915_gem_apply_to_region *apply, · line 56
Quoted 5 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +1
-1@@ -53,7 +53,7 @@ static int i915_ttm_backup(struct i915_gem_apply_to_region *apply,unsigned int flags;int err =0 ; -if (bo->resource->mem_type ==I915_PL_SYSTEM || obj->ttm.backup) +if (!bo->resource || bo->resource->mem_type ==I915_PL_SYSTEM || obj->ttm.backup)!i915_ttm_cpu_maps_iomem ?
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c static int i915_ttm_restore(struct i915_gem_apply_to_region *apply, · line 193
Quoted 12 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +4
-1return 0 ;if (pm_apply->allow_gpu &&i915_gem_object_evictable (obj))@@ -187,7 +187,10 @@ static int i915_ttm_restore(struct i915_gem_apply_to_region *apply,return err;/* Content may have been swapped. */ - err =ttm_tt_populate (backup_bo->bdev, backup_bo->ttm, &ctx); +if (!backup_bo->resource) + err =ttm_bo_validate (backup_bo,i915_ttm_sys_placement (), &ctx); +if (!err) + err =ttm_tt_populate (backup_bo->bdev, backup_bo->ttm, &ctx);Reviewed-by Andrzej Hajda <[email protected]>Regards
AndrzejQuoted 3 lines
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +0
-0if (!err) { err =i915_gem_obj_copy_ttm (obj, backup, pm_apply->allow_gpu, false);
Matthew Auld
reviewerPATCH 3/6 drm/ttm: clear the ttm_tt when bo->resource is NULL
In reply to Matthew AuldIn the next few patches, when initially creating a ttm BO, the bo->resource is NULL, and the driver is then expected to handle the initial dummy move. However, if this is created as a system resource the first ttm_tt we create will always have the clear value set to false. Previously the initial ttm_tt would be created in ttm_bo_validate() with the clear parameter always set to true.
--- drivers/gpu/drm/ttm/ttm_bo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +1 -2
@@ -120,8 +120,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,bool old_use_tt, new_use_tt;int ret; - old_use_tt = bo->resource && -ttm_manager_type (bdev, bo->resource->mem_type)->use_tt; + old_use_tt = !bo->resource ||ttm_manager_type (bdev, bo->resource->mem_type)->use_tt; new_use_tt =ttm_manager_type (bdev, mem->mem_type)->use_tt;ttm_bo_unmap_virtual (bo);
Signature · 1 line
2.39.1
Matthew Auld
reviewerPATCH 4/6 drm/ttm: stop allocating dummy resources during BO creation
In reply to Matthew AuldFrom: Christian König <[email protected]>
That should not be necessary any more when drivers should at least be able to handle the move without a resource.
--- drivers/gpu/drm/ttm/ttm_bo.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +0 -7
@@ -952,7 +952,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo, struct sg_table *sg, struct dma_resv *resv, void (*destroy) (struct ttm_buffer_object *)) { - static const struct ttm_place sys_mem = { .mem_type = TTM_PL_SYSTEM }; int ret;kref_init (&bo->kref);
@@ -969,12 +968,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo, bo->base.resv = &bo->base._resv;atomic_inc (&ttm_glob.bo_count); - ret =ttm_resource_alloc (bo, &sys_mem, &bo->resource); -if (unlikely (ret)) { -ttm_bo_put (bo); -return ret; - } -/* * For ttm_bo_type_device buffers, allocate * address space from the device.
Signature · 1 line
2.39.1
Matthew Auld
reviewerPATCH 5/6 drm/ttm: stop allocating a dummy resource for pipelined gutting
In reply to Matthew AuldFrom: Christian König <[email protected]>
That should not be necessary any more when drivers should at least be able to handle a move without a resource.
--- drivers/gpu/drm/ttm/ttm_bo_util.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +2 -13
@@ -704,30 +704,23 @@ EXPORT_SYMBOL(ttm_bo_move_sync_cleanup);*/ int ttm_bo_pipeline_gutting (struct ttm_buffer_object *bo) { -static const struct ttm_place sys_mem = { .mem_type =TTM_PL_SYSTEM };struct ttm_buffer_object *ghost; -struct ttm_resource *sys_res;struct ttm_tt *ttm;int ret; - ret =ttm_resource_alloc (bo, &sys_mem, &sys_res); -if (ret) -return ret; -/* If already idle, no need for ghost object dance. */ if (dma_resv_test_signaled (bo->base.resv,DMA_RESV_USAGE_BOOKKEEP )) {if (!bo->ttm) {/* See comment below about clearing. */ ret =ttm_tt_create (bo, true);if (ret) - goto error_free_sys_mem; +return ret; }else {ttm_tt_unpopulate (bo->bdev, bo->ttm);if (bo->type == ttm_bo_type_device)ttm_tt_mark_for_clear (bo->ttm); }ttm_resource_free (bo, &bo->resource); -ttm_bo_assign_mem (bo, sys_res);return 0 ; }
@@ -744,7 +737,7 @@ int ttm_bo_pipeline_gutting(struct ttm_buffer_object *bo) ret =ttm_tt_create (bo, true);swap (bo->ttm, ttm);if (ret) - goto error_free_sys_mem; +return ret; ret =ttm_buffer_object_transfer (bo, &ghost);if (ret)
@@ -760,13 +753,9 @@ int ttm_bo_pipeline_gutting(struct ttm_buffer_object *bo)dma_resv_unlock (&ghost->base._resv);ttm_bo_put (ghost); bo->ttm = ttm; -ttm_bo_assign_mem (bo, sys_res);return 0 ; error_destroy_tt:ttm_tt_destroy (bo->bdev, ttm); - -error_free_sys_mem: -ttm_resource_free (bo, &sys_res);return ret; }
Signature · 1 line
2.39.1
Matthew Auld
reviewerPATCH 6/6 drm/ttm: prevent moving of pinned BOs
In reply to Matthew AuldFrom: Christian König <[email protected]>
We have checks for this in the individual drivers move callback, but it's probably better to generally forbid that on a higher level.
Also stops exporting ttm_resource_compat() since that's not necessary any more after removing the extra checks in vmwgfx.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ---- drivers/gpu/drm/nouveau/nouveau_bo.c | 3 --- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ---- drivers/gpu/drm/ttm/ttm_bo.c | 20 ++++++++++++-------- drivers/gpu/drm/ttm/ttm_resource.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 19 ++----------------- 6 files changed, 14 insertions(+), 37 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -4
@@ -466,11 +466,7 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict,return r; } -/* Can't move a pinned BO */ abo =ttm_to_amdgpu_bo (bo); -if (WARN_ON_ONCE (abo->tbo.pin_count >0 )) -return -EINVAL ; - adev =amdgpu_ttm_adev (bo->bdev); if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
drivers/gpu/drm/nouveau/nouveau_bo.c +0 -3
@@ -1015,9 +1015,6 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict,if (ret) goto out_ntfy; -if (nvbo->bo.pin_count) -NV_WARN (drm,"Moving pinned object %p!\n" , nvbo); -if (drm->client.device.info.family <NV_DEVICE_INFO_V0_TESLA ) { ret =nouveau_bo_vm_bind (bo, new_reg, &new_tile);if (ret)
drivers/gpu/drm/radeon/radeon_ttm.c +0 -4
@@ -211,11 +211,7 @@ static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,if (r)return r; -/* Can't move a pinned BO */ rbo = container_of(bo, struct radeon_bo, tbo); -if (WARN_ON_ONCE (rbo->tbo.pin_count >0 )) -return -EINVAL ; - rdev =radeon_get_rdev (bo->bdev);if (old_mem->mem_type ==TTM_PL_SYSTEM && bo->ttm ==NULL ) {ttm_bo_move_null (bo, new_mem);
drivers/gpu/drm/ttm/ttm_bo.c +12 -8
@@ -893,14 +893,18 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,if (!placement->num_placement && !placement->num_busy_placement)return ttm_bo_pipeline_gutting (bo); -/* -* Check whether we need to move buffer. -*/ -if (!bo->resource || !ttm_resource_compat (bo->resource, placement)) { - ret =ttm_bo_move_buffer (bo, placement, ctx); -if (ret) -return ret; - } +/* Check whether we need to move buffer. */ +if (bo->resource &&ttm_resource_compat (bo->resource, placement)) +return 0 ; + +/* Moving of pinned BOs is forbidden */ +if (bo->pin_count) +return -EINVAL ; + + ret =ttm_bo_move_buffer (bo, placement, ctx); +if (ret) +return ret; +/* * We might need to add a TTM. */
drivers/gpu/drm/ttm/ttm_resource.c +0 -1
@@ -361,7 +361,6 @@ bool ttm_resource_compat(struct ttm_resource *res,return false; } -EXPORT_SYMBOL (ttm_resource_compat);void ttm_resource_set_bo (struct ttm_resource *res,struct ttm_buffer_object *bo)
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +2 -17
@@ -87,12 +87,7 @@ int vmw_bo_pin_in_placement(struct vmw_private *dev_priv,if (unlikely (ret !=0 )) goto err; -if (buf->base.pin_count >0 ) - ret =ttm_resource_compat (bo->resource, placement) - ?0 : -EINVAL ; -else - ret =ttm_bo_validate (bo, placement, &ctx); - + ret =ttm_bo_validate (bo, placement, &ctx);if (!ret)vmw_bo_pin_reserved (buf, true);
@@ -128,12 +123,6 @@ int vmw_bo_pin_in_vram_or_gmr(struct vmw_private *dev_priv,if (unlikely (ret !=0 )) goto err; -if (buf->base.pin_count >0 ) { - ret =ttm_resource_compat (bo->resource, &vmw_vram_gmr_placement) - ?0 : -EINVAL ; - goto out_unreserve; - } - ret =ttm_bo_validate (bo, &vmw_vram_gmr_placement, &ctx);if (likely (ret ==0 ) || ret == -ERESTARTSYS ) goto out_unreserve;
@@ -218,11 +207,7 @@ int vmw_bo_pin_in_start_of_vram(struct vmw_private *dev_priv, (void )ttm_bo_validate (bo, &vmw_sys_placement, &ctx); } -if (buf->base.pin_count >0 ) - ret =ttm_resource_compat (bo->resource, &placement) - ?0 : -EINVAL ; -else - ret =ttm_bo_validate (bo, &placement, &ctx); + ret =ttm_bo_validate (bo, &placement, &ctx);/* For some reason we didn't end up at the start of vram */ WARN_ON (ret ==0 && bo->resource->start !=0 );
Signature · 1 line
2.39.1
Quoted 10 lines · Matthew Auld
Sparse complains with:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse:
expected restrictedvm_fault_t[assigned] [usertype] retdrivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got intFixes 516198d317d8 ("drm/i915: audit bo->resource usage v3")Reported-by kernel test robot <[email protected]>Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>
Regards
Andrzej
Quoted 23 lines
--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +3
-2@@ -1067,11 +1067,12 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf) .interruptible = true, .no_wait_gpu = true, /* should be idle already */ }; +int err;GEM_BUG_ON (!bo->ttm || !(bo->ttm->page_flags &TTM_TT_FLAG_SWAPPED )); - ret =ttm_bo_validate (bo,i915_ttm_sys_placement (), &ctx); -if (ret) { + err =ttm_bo_validate (bo,i915_ttm_sys_placement (), &ctx); +if (err) {dma_resv_unlock (bo->base.resv);return VM_FAULT_SIGBUS ; }
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/6] drm/i915/ttm: fix sparse warning
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm/i915/ttm: fix sparse warning
URL : https://patchwork.freedesktop.org/series/113482/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately. +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return' +./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'+drivers/gpu/drm/ttm/ttm_bo_util.c:318:38: expected void *virtual+drivers/gpu/drm/ttm/ttm_bo_util.c:318:38: got void [noderef] __iomem *+drivers/gpu/drm/ttm/ttm_bo_util.c:318:38: warning: incorrect type in assignment (different address spaces)+drivers/gpu/drm/ttm/ttm_bo_util.c:321:38: expected void *virtual+drivers/gpu/drm/ttm/ttm_bo_util.c:321:38: got void [noderef] __iomem *+drivers/gpu/drm/ttm/ttm_bo_util.c:321:38: warning: incorrect type in assignment (different address spaces)+drivers/gpu/drm/ttm/ttm_bo_util.c:324:38: expected void *virtual+drivers/gpu/drm/ttm/ttm_bo_util.c:324:38: got void [noderef] __iomem *+drivers/gpu/drm/ttm/ttm_bo_util.c:324:38: warning: incorrect type in assignment (different address spaces)+drivers/gpu/drm/ttm/ttm_bo_util.c:427:28: expected void volatile [noderef] __iomem *addr+drivers/gpu/drm/ttm/ttm_bo_util.c:427:28: got void *virtual+drivers/gpu/drm/ttm/ttm_bo_util.c:427:28: warning: incorrect type in argument 1 (different address spaces) +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return' +./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return'
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915/ttm: fix sparse warning
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm/i915/ttm: fix sparse warning
URL : https://patchwork.freedesktop.org/series/113482/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12665 -> Patchwork_113482v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_113482v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_113482v1, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/index.html
Participating hosts (25 -> 25)
------------------------------
Additional (1): fi-kbl-soraka
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_113482v1:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@execlists:
- fi-kbl-soraka: NOTRUN -> [ABORT][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/fi-kbl-soraka/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_113482v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s0@smem:
- bat-dg1-5: [PASS][2] -> [FAIL][3] ([fdo#103375]) +7 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12665/bat-dg1-5/igt@gem_exec_suspend@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/bat-dg1-5/igt@gem_exec_suspend@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#4613]) +3 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/fi-kbl-soraka/igt@[email protected]
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][6] ([i915#1886])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271]) +15 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/fi-kbl-soraka/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@hangcheck:
- {bat-dg2-11}: [ABORT][8] -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12665/bat-dg2-11/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/bat-dg2-11/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@reset:
- {bat-rpls-2}: [ABORT][10] ([i915#4983]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12665/bat-rpls-2/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/bat-rpls-2/igt@i915_selftest@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-n3050: [FAIL][12] ([i915#6298]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12665/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
Build changes
-------------
* Linux: CI_DRM_12665 -> Patchwork_113482v1
CI-20190529: 20190529
CI_DRM_12665: 9fe703f7b1b32722945b20286223666c52241113 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7141: a978df7912acda18eada1b1d2ae4b438ed3e940b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113482v1: 9fe703f7b1b32722945b20286223666c52241113 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
2190d237a2a5 drm/ttm: prevent moving of pinned BOsb17047d7089e drm/ttm: stop allocating a dummy resource for pipelined gutting 6f64ebdc74c2 drm/ttm: stop allocating dummy resources during BO creation 3afe3f796d21 drm/ttm: clear the ttm_tt when bo->resource is NULL a8fbd720a41f drm/i915/ttm: audit remaining bo->resource 09de7bab5e90 drm/i915/ttm: fix sparse warning
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113482v1/index.html
Am 30.01.23 um 11:12 schrieb Matthew Auld:
Quoted 10 lines
Sparse complains with:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse:
expected restrictedvm_fault_t[assigned] [usertype] retdrivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got intFixes 516198d317d8 ("drm/i915: audit bo->resource usage v3")Reported-by kernel test robot <[email protected]>Signed-off-by Matthew Auld <[email protected]>Cc Christian König <[email protected]>
I'm on vacation this week. going to push this to drm-misc-next when I'm back unless someone is faster.
Thanks,
Christian.
Quoted 23 lines
--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +3
-2@@ -1067,11 +1067,12 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf) .interruptible = true, .no_wait_gpu = true, /* should be idle already */ }; +int err;GEM_BUG_ON (!bo->ttm || !(bo->ttm->page_flags &TTM_TT_FLAG_SWAPPED )); - ret =ttm_bo_validate (bo,i915_ttm_sys_placement (), &ctx); -if (ret) { + err =ttm_bo_validate (bo,i915_ttm_sys_placement (), &ctx); +if (err) {dma_resv_unlock (bo->base.resv);return VM_FAULT_SIGBUS ; }