drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
Subsystems (2)
PATCH 1/1 drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
From: Ville Syrjälä <[email protected]>
inlined from ‘i915_ttm_get_pages’ at ../drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:../drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: warning: ‘places[0].flags’ is used uninitialized [-Wuninitialized]
165 | places[0].flags |= TTM_PL_FLAG_DESIRED;
| ~~~~~~~~~^~~~~~../drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function ‘i915_ttm_get_pages’:../drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: ‘places’ declared here
837 | struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1];
| ^~~~~~
Furhermore we then proceed to call i915_ttm_place_from_region() which memset()s the whole thing back to zero anyway. So in the end we lose the TTM_PL_FLAG_DESIRED flag (and fortunately also whatever else stack garbage happened to be in the flags at this point).
No idea what functional changes this will result in...
--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gem/i915_gem_ttm.c +1 -1
@@ -162,10 +162,10 @@ i915_ttm_placement_from_obj(const struct drm_i915_gem_object *obj,unsigned int flags = obj->flags;unsigned int i; - places[0 ].flags |=TTM_PL_FLAG_DESIRED ;i915_ttm_place_from_region (num_allowed ? obj->mm.placements[0 ] : obj->mm.region, &places[0 ], obj->bo_offset, obj->base.size, flags); + places[0 ].flags |=TTM_PL_FLAG_DESIRED ;/* Cache this on object? */ for (i =0 ; i < num_allowed; ++i) {
Signature · 1 line
2.43.0
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
== Series Details ==
== Series Details ==
Series: drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
URL : https://patchwork.freedesktop.org/series/130457/
State : warning
== Summary ==
Error: dim checkpatch failed23d3c3b71c2f drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
-:9: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #9:
inlined from ‘i915_ttm_get_pages’ at ../drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:
total: 0 errors, 1 warnings, 0 checks, 11 lines checked
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
URL : https://patchwork.freedesktop.org/series/130457/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_14352 -> Patchwork_130457v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_130457v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_130457v1, please notify your bug team ([email protected]) 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_130457v1/index.html
Participating hosts (41 -> 40)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_130457v1:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_fence@basic-await@vecs0:
- bat-rplp-1: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14352/bat-rplp-1/igt@gem_exec_fence@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_130457v1/bat-rplp-1/igt@gem_exec_fence@[email protected]
Known issues
------------
Here are the changes found in Patchwork_130457v1 that come from known issues:
### CI changes ###
#### Issues hit ####
* boot:
- bat-arls-3: [PASS][3] -> [FAIL][4] ([i915#10234])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14352/bat-arls-3/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_130457v1/bat-arls-3/boot.html
[i915#10234]: https://gitlab.freedesktop.org/drm/intel/issues/10234
Build changes
-------------
* Linux: CI_DRM_14352 -> Patchwork_130457v1
CI-20190529: 20190529
CI_DRM_14352: 0d7a78693be62a8d1cd311376815b89b18de8204 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7731: 17f897a81868fb35c6a7033a8b07256659742248 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_130457v1: 0d7a78693be62a8d1cd311376815b89b18de8204 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
30570721800e drm/i915/ttm: Fix TTM_PL_FLAG_DESIRED
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_130457v1/index.html
Am 27.02.24 um 21:26 schrieb Ville Syrjala:
Quoted 11 lines
From: Ville Syrjälä <[email protected]>
inlined from ‘i915_ttm_get_pages’ at
../drivers/gpu/drm/i915/gem/i915_gem_ttm.c:847:2:../drivers/gpu/drm/i915/gem/i915_gem_ttm.c:165:18: warning: ‘places[0].flags’ is used uninitialized [-Wuninitialized]165 | places[0].flags |= TTM_PL_FLAG_DESIRED; | ~~~~~~~~~^~~~~~
../drivers/gpu/drm/i915/gem/i915_gem_ttm.c: In function ‘i915_ttm_get_pages’:../drivers/gpu/drm/i915/gem/i915_gem_ttm.c:837:26: note: ‘places’ declared here
837 | structttm_placeplaces[I915_TTM_MAX_PLACEMENTS + 1];
| ^~~~~~
Quoted 6 lines
Furhermore we then proceed to call
i915_ttm_place_from_region()which memset()s the whole thing back to zero anyway. So in the end we lose theTTM_PL_FLAG_DESIREDflag (and fortunately also whatever else stack garbage happened to be in the flags at this point).No idea what functional changes this will result in...
I've already send out the same patch yesterday. Please review that one.
Sorry for the noise, didn't realized that i915_ttm_place_from_region() was initializing the flags and not the caller while converting this.
Thanks,
Christian.
Quoted 28 lines
Cc Somalapuram Amaranath <[email protected]>Cc Christian König <[email protected]>Cc Zack Rusin <[email protected]>Cc Thomas Zimmermann <[email protected]>Cc Thomas Hellström <[email protected]>Fixes a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/gem/i915_gem_ttm.c +1
-1@@ -162,10 +162,10 @@ i915_ttm_placement_from_obj(const struct drm_i915_gem_object *obj,unsigned int flags = obj->flags;unsigned int i; - places[0 ].flags |=TTM_PL_FLAG_DESIRED ;i915_ttm_place_from_region (num_allowed ? obj->mm.placements[0 ] : obj->mm.region, &places[0 ], obj->bo_offset, obj->base.size, flags); + places[0 ].flags |=TTM_PL_FLAG_DESIRED ;/* Cache this on object? */ for (i =0 ; i < num_allowed; ++i) {