drm/i915: Test for imported buffers with drm_gem_is_imported()
Subsystems (2)
PATCH 1/1 drm/i915: Test for imported buffers with drm_gem_is_imported()
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The test itself does not change.
--- drivers/gpu/drm/i915/gem/i915_gem_object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_object.c +3 -3
@@ -372,12 +372,12 @@ void __i915_gem_object_pages_fini(struct drm_i915_gem_object *obj)* and ttm_bo_cleanup_memtype_use() shouldn't be invoked for * dma-buf, so it's safe to take the lock. */ -if (obj->base.import_attach) +if (drm_gem_is_imported (&obj->base))i915_gem_object_lock (obj,NULL );__i915_gem_object_put_pages (obj); -if (obj->base.import_attach) +if (drm_gem_is_imported (&obj->base))i915_gem_object_unlock (obj);GEM_BUG_ON (i915_gem_object_has_pages (obj));
@@ -391,7 +391,7 @@ void __i915_gem_free_object(struct drm_i915_gem_object *obj)bitmap_free (obj->bit_17); -if (obj->base.import_attach) +if (drm_gem_is_imported (&obj->base))drm_prime_gem_destroy (&obj->base,NULL );drm_gem_free_mmap_offset (&obj->base);
Signature · 1 line
2.52.0
Patchwork
CI✗ i915.CI.BAT: failure for drm/i915: Test for imported buffers with drm_gem_is_imported()
== Series Details ==
== Series Details ==
Series: drm/i915: Test for imported buffers with drm_gem_is_imported()
URL : https://patchwork.freedesktop.org/series/162301/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_18062 -> Patchwork_162301v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_162301v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_162301v1, 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_162301v1/index.html
Participating hosts (42 -> 41)
------------------------------
Additional (1): fi-pnv-d510
Missing (2): bat-dg2-13 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_162301v1:
### IGT changes ###
#### Possible regressions ####
* igt@core_hotunplug@unbind-rebind:
- fi-pnv-d510: NOTRUN -> [ABORT][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/fi-pnv-d510/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_162301v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_create@basic@lmem0:
- bat-dg1-7: [PASS][2] -> [ABORT][3] ([i915#15759]) +1 other test abort
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18062/bat-dg1-7/igt@gem_exec_create@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/bat-dg1-7/igt@gem_exec_create@[email protected]
* igt@gem_lmem_swapping@parallel-random-engines@lmem0:
- bat-dg2-8: [PASS][4] -> [ABORT][5] ([i915#15759]) +1 other test abort
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18062/bat-dg2-8/igt@gem_lmem_swapping@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/bat-dg2-8/igt@gem_lmem_swapping@[email protected]
* igt@i915_selftest@live@workarounds:
- bat-dg2-9: NOTRUN -> [DMESG-FAIL][6] ([i915#12061]) +1 other test dmesg-fail
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/bat-dg2-9/igt@i915_selftest@[email protected]
- bat-mtlp-9: [PASS][7] -> [DMESG-FAIL][8] ([i915#12061]) +1 other test dmesg-fail
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18062/bat-mtlp-9/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/bat-mtlp-9/igt@i915_selftest@[email protected]
* igt@kms_psr@psr-primary-mmap-gtt:
- fi-pnv-d510: NOTRUN -> [SKIP][9] +29 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/fi-pnv-d510/igt@[email protected]
#### Possible fixes ####
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-dg2-9: [ABORT][10] ([i915#15759]) -> [PASS][11] +1 other test pass
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18062/bat-dg2-9/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/bat-dg2-9/igt@[email protected]
- bat-dg1-6: [ABORT][12] ([i915#15759]) -> [PASS][13] +1 other test pass
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18062/bat-dg1-6/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/bat-dg1-6/igt@[email protected]
* igt@i915_selftest@live@workarounds:
- bat-dg2-14: [DMESG-FAIL][14] ([i915#12061]) -> [PASS][15] +1 other test pass
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18062/bat-dg2-14/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/bat-dg2-14/igt@i915_selftest@[email protected]
[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#15759]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15759
Build changes
-------------
* Linux: CI_DRM_18062 -> Patchwork_162301v1
CI-20190529: 20190529
CI_DRM_18062: 568403859ba7182ce2a59553664b34d58467adeb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8774: 8892452285d691f612ecb3b2a6fefc50983af15f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_162301v1: 568403859ba7182ce2a59553664b34d58467adeb @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_162301v1/index.html
Tvrtko Ursulin
maintainerQuoted 33 lines · Thomas Zimmermann
Instead of testing
import_attachfor imported GEM buffers, invokedrm_gem_is_imported()to do the test. The test itself does not change.Signed-off-by Thomas Zimmermann <[email protected]>Cc Jani Nikula <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Tvrtko Ursulin <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_object.c +2
-2@@ -372,12 +372,12 @@ void __i915_gem_object_pages_fini(struct drm_i915_gem_object *obj)* and ttm_bo_cleanup_memtype_use() shouldn't be invoked for * dma-buf, so it's safe to take the lock. */ -if (obj->base.import_attach) +if (drm_gem_is_imported (&obj->base))i915_gem_object_lock (obj,NULL );__i915_gem_object_put_pages (obj); -if (obj->base.import_attach) +if (drm_gem_is_imported (&obj->base))i915_gem_object_unlock (obj);GEM_BUG_ON (i915_gem_object_has_pages (obj));
drivers/gpu/drm/i915/gem/i915_gem_object.c void __i915_gem_free_object(struct drm_i915_gem_object *obj) · line 397
Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_object.c +1
-1@@ -391,7 +391,7 @@ void __i915_gem_free_object(struct drm_i915_gem_object *obj)bitmap_free (obj->bit_17); -if (obj->base.import_attach) +if (drm_gem_is_imported (&obj->base))drm_prime_gem_destroy (&obj->base,NULL );drm_gem_free_mmap_offset (&obj->base);
LGTM. Want us to merge it via i915 or you want to take the group via drm-misc?
What is the end goal btw, just cleanup or you plan to remove/rename the member? If latter there are some other places which access it directly.
Regards,
Tvrtko
Hi
Am 27.02.26 um 15:59 schrieb Tvrtko Ursulin:
Quoted 33 lines · Thomas Zimmermann
Quoted 31 lines
Instead of testing
import_attachfor imported GEM buffers, invokedrm_gem_is_imported()to do the test. The test itself does not change.Signed-off-by Thomas Zimmermann <[email protected]>Cc Jani Nikula <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Tvrtko Ursulin <[email protected]>---
drivers/gpu/drm/i915/gem/i915_gem_object.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_object.c +2
-1@@ -372,12 +372,12 @@ void __i915_gem_object_pages_fini(structdrm_i915_gem_object *obj) * and ttm_bo_cleanup_memtype_use() shouldn't be invoked for * dma-buf, so it's safe to take the lock. */ - if (obj->base.import_attach) + if (drm_gem_is_imported(&obj->base)) i915_gem_object_lock(obj, NULL); __i915_gem_object_put_pages(obj); - if (obj->base.import_attach) + if (drm_gem_is_imported(&obj->base)) i915_gem_object_unlock(obj); GEM_BUG_ON(i915_gem_object_has_pages(obj));@@ -391,7 +391,7 @@ void __i915_gem_free_object(struct
Quoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_object.c void __i915_gem_free_object(struct drm_i915_gem_object *obj) · line 397
Quoted 6 lines
drivers/gpu/drm/i915/gem/i915_gem_object.c +1
-0drm_i915_gem_object *obj) bitmap_free(obj->bit_17); - if (obj->base.import_attach) + if (drm_gem_is_imported(&obj->base)) drm_prime_gem_destroy(&obj->base, NULL); drm_gem_free_mmap_offset(&obj->base);LGTM. Want us to merge it via i915 or you want to take the group via drm-misc?
Please merge it via i915 trees.
Quoted 2 lines
What is the end goal btw, just cleanup or you plan to remove/rename the member? If latter there are some other places which access it directly.
There's no further goal. It's just about making the code easier to understand. I had these changes here for some time already and finally wanted to get them merged..
Best regards
Thomas
Quoted 5 lines
Regards,
Tvrtko
Signature · 6 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
Tvrtko Ursulin
maintainerQuoted 45 lines · Thomas Zimmermann
Hi
Am 27.02.26 um 15:59 schrieb Tvrtko Ursulin:
Quoted 33 lines · Thomas Zimmermann
Quoted 31 lines
Instead of testing
import_attachfor imported GEM buffers, invokedrm_gem_is_imported()to do the test. The test itself does not change.Signed-off-by Thomas Zimmermann <[email protected]>Cc Jani Nikula <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Tvrtko Ursulin <[email protected]>---
drivers/gpu/drm/i915/gem/i915_gem_object.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_object.c +2
-1@@ -372,12 +372,12 @@ void __i915_gem_object_pages_fini(structdrm_i915_gem_object *obj) * and ttm_bo_cleanup_memtype_use() shouldn't be invoked for * dma-buf, so it's safe to take the lock. */ - if (obj->base.import_attach) + if (drm_gem_is_imported(&obj->base)) i915_gem_object_lock(obj, NULL); __i915_gem_object_put_pages(obj); - if (obj->base.import_attach) + if (drm_gem_is_imported(&obj->base)) i915_gem_object_unlock(obj); GEM_BUG_ON(i915_gem_object_has_pages(obj));@@ -391,7 +391,7 @@ void __i915_gem_free_object(structQuoted 8 lines
drivers/gpu/drm/i915/gem/i915_gem_object.c void __i915_gem_free_object(struct drm_i915_gem_object *obj) · line 397
Quoted 6 lines
drivers/gpu/drm/i915/gem/i915_gem_object.c +1
-0drm_i915_gem_object *obj) bitmap_free(obj->bit_17); - if (obj->base.import_attach) + if (drm_gem_is_imported(&obj->base)) drm_prime_gem_destroy(&obj->base, NULL); drm_gem_free_mmap_offset(&obj->base);LGTM. Want us to merge it via i915 or you want to take the group via drm-misc?
Quoted 6 lines
Please merge it via i915 trees.
Quoted 2 lines
What is the end goal btw, just cleanup or you plan to remove/rename the member? If latter there are some other places which access it directly.
There's no further goal. It's just about making the code easier to understand. I had these changes here for some time already and finally wanted to get them merged..
Acknowledged and merged, thank you for the cleanup!
Regards,
Tvrtko