drm/rockchip: vop: Use __drm_atomic_helper_plane_reset instead of copying the logic

A new helper function(__drm_atomic_helper_plane_reset) has been added
for linking a plane with its state and resetting the core
properties(alpha, rotation, etc.) to their default values.
Use that instead of duplicating the logic.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I3219f6ee0eef49c59277c84ea6efc72ae4a90ef9
This commit is contained in:
Andy Yan
2021-10-22 15:47:19 +08:00
committed by Tao Huang
parent 339b80072b
commit f001cec92f

View File

@@ -2147,10 +2147,9 @@ static void vop_atomic_plane_reset(struct drm_plane *plane)
if (!vop_plane_state)
return;
__drm_atomic_helper_plane_reset(plane, &vop_plane_state->base);
win->state.zpos = win->zpos;
vop_plane_state->global_alpha = 0xff;
plane->state = &vop_plane_state->base;
plane->state->plane = plane;
}
static struct drm_plane_state *