drm/rockchip: vop2: initialize the convert_mode and csc_coef before use

If the value of covert_mode and csc_coef not initialize, the
compile will assign a default value which may be different by
different compiles. It should initialize their default value
explicitly before use.

Fixes: c08d820f80 ("drm/rockchip: vop2: Support post csc color range convert")

Change-Id: I39be672d6f8fda8fdf8298eafe140f449da32e46
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
This commit is contained in:
Zhang Yubing
2024-12-25 14:43:21 +08:00
committed by Tao Huang
parent 3b667c194b
commit eb2aff477d

View File

@@ -11659,8 +11659,8 @@ static void vop3_post_csc_config(struct drm_crtc *crtc, struct post_acm *acm, st
struct vop2 *vop2 = vp->vop2;
struct drm_plane *plane;
struct drm_plane_state *pstate;
struct post_csc_coef csc_coef;
struct post_csc_convert_mode convert_mode;
struct post_csc_coef csc_coef = {};
struct post_csc_convert_mode convert_mode = {};
bool acm_enable;
bool post_r2y_en = false;
bool post_csc_en = false;