[PATCH 05/11] drm/rockchip: Test for imported buffers with drm_gem_is_imported()
Andy Yan
andyshrk at 163.com
Tue Apr 15 04:00:03 UTC 2025
Hi Thomas,
At 2025-04-14 21:48:12, "Thomas Zimmermann" <tzimmermann at suse.de> wrote:
>Instead of testing import_attach for imported GEM buffers, invoke
>drm_gem_is_imported() to do the test. The helper tests the dma_buf
>itself while import_attach is just an artifact of the import. Prepares
>to make import_attach optional.
>
>Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>Cc: Sandy Huang <hjc at rock-chips.com>
>Cc: "Heiko Stübner" <heiko at sntech.de>
>Cc: Andy Yan <andy.yan at rock-chips.com>
>---
> drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
>index 6330b883efc3..e44396d46dc1 100644
>--- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
>+++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
>@@ -332,7 +332,7 @@ void rockchip_gem_free_object(struct drm_gem_object *obj)
> struct rockchip_drm_private *private = drm->dev_private;
> struct rockchip_gem_object *rk_obj = to_rockchip_obj(obj);
>
>- if (obj->import_attach) {
>+ if (drm_gem_is_imported(obj)) {
After applying this patch, when I tested glmark2-es2-wayland under Weston, the weston would freeze.
It seems it goto the else path.
I'm still conducting further analysis to figure out the exact cause.
> if (private->domain) {
> rockchip_gem_iommu_unmap(rk_obj);
> } else {
>--
>2.49.0
More information about the dri-devel
mailing list