From 7917cd17e6986faf7341038c85f44e8fc260c7a4 Mon Sep 17 00:00:00 2001 From: Damon Ding Date: Thu, 14 Aug 2025 10:41:47 +0800 Subject: [PATCH] drm/rockchip: vop: Remove the flag &vop->is_iommu_needed Through analysis of the code logic, we found that the flag &vop->is_iommu_needed is redundant. After removing it, the iommu will be enabled at the same time as the first atomic flush operation, which may refresh the frame or not. This modification can make codes more concise and allow iommu to be initialized at an earlier time point, which may avoid the potential problems(see commit 97e3aa256f89 ("drm/rockchip: vop2: Remove the flag &vop2->is_iommu_needed")) Change-Id: If8932de972c2a4bbd04ac6b3d6c8d363a3b2cefc Signed-off-by: Damon Ding --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 97a3d0de7968..4d752d86f583 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -284,7 +284,6 @@ struct vop { struct drm_property *feature_prop; bool is_iommu_enabled; - bool is_iommu_needed; bool is_enabled; bool support_multi_area; @@ -2727,11 +2726,6 @@ static void vop_plane_atomic_update(struct drm_plane *plane, dsp_w, dsp_h, dest->x1, dest->y1, vop_plane_state->zpos, &fb->format->format, afbc_en ? "[AFBC]" : "", &vop_plane_state->yrgb_mst); - /* - * spi interface(vop_plane_state->yrgb_kvaddr, fb->pixel_format, - * actual_w, actual_h) - */ - vop->is_iommu_needed = true; } static int vop_plane_atomic_async_check(struct drm_plane *plane, @@ -4948,7 +4942,7 @@ static void vop_crtc_atomic_flush(struct drm_crtc *crtc, vop_cfg_update(crtc, old_crtc_state); - if (!vop->is_iommu_enabled && vop->is_iommu_needed) { + if (!vop->is_iommu_enabled) { int ret; if (s->mode_update)