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 97e3aa256f ("drm/rockchip: vop2: Remove the
flag &vop2->is_iommu_needed"))

Change-Id: If8932de972c2a4bbd04ac6b3d6c8d363a3b2cefc
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
This commit is contained in:
Damon Ding
2025-08-14 10:41:47 +08:00
committed by Tao Huang
parent ff538ea7f5
commit 7917cd17e6

View File

@@ -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)