drm/sun4i: Fix uninitialized variables in vi layer
min_scale and max_scale in sun8i_vi_layer_atomic_check() can be used
without initialization.
Fix that.
Fixes: b862a648de
("drm/sun4i: Add support for HW scaling to DE2")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171206152603.25937-1-jernej.skrabec@siol.net
This commit is contained in:
parent
89f3f35620
commit
bc29489f71
|
@ -253,6 +253,9 @@ static int sun8i_vi_layer_atomic_check(struct drm_plane *plane,
|
|||
clip.x2 = crtc_state->adjusted_mode.hdisplay;
|
||||
clip.y2 = crtc_state->adjusted_mode.vdisplay;
|
||||
|
||||
min_scale = DRM_PLANE_HELPER_NO_SCALING;
|
||||
max_scale = DRM_PLANE_HELPER_NO_SCALING;
|
||||
|
||||
if (layer->mixer->cfg->scaler_mask & BIT(layer->channel)) {
|
||||
min_scale = SUN8I_VI_SCALER_SCALE_MIN;
|
||||
max_scale = SUN8I_VI_SCALER_SCALE_MAX;
|
||||
|
|
Loading…
Reference in New Issue