mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: vop2: fix initialization of possible_crtcs variable
@ 2023-03-15  9:01 Michael Riesch
  0 siblings, 0 replies; only message in thread
From: Michael Riesch @ 2023-03-15  9:01 UTC (permalink / raw)
  To: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel
  Cc: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter,
	Michael Riesch, Sascha Hauer, kernel test robot,
	Nathan Chancellor

The variable possible_crtcs is not initialized properly since commit
604be85547ce ("drm/rockchip: Add VOP2 driver"). A first attempt to fix this
issue has been made in commit 368419a2d429 ("drm/rockchip: vop2: initialize
possible_crtcs properly") but turned out to be incomplete. Initialize the
variable with zero to cover all possible paths.

Fixes: 368419a2d429 ("drm/rockchip: vop2: initialize possible_crtcs properly")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index 1667e5324b29..0569f1211d9b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -2301,7 +2301,7 @@ static int vop2_create_crtcs(struct vop2 *vop2)
 	nvp = 0;
 	for (i = 0; i < vop2->registered_num_wins; i++) {
 		struct vop2_win *win = &vop2->win[i];
-		u32 possible_crtcs;
+		u32 possible_crtcs = 0;
 
 		if (vop2->data->soc_id == 3566) {
 			/*
@@ -2329,8 +2329,6 @@ static int vop2_create_crtcs(struct vop2 *vop2)
 			}
 		} else if (win->type == DRM_PLANE_TYPE_OVERLAY) {
 			possible_crtcs = (1 << nvps) - 1;
-		} else {
-			possible_crtcs = 0;
 		}
 
 		ret = vop2_plane_init(vop2, win, possible_crtcs);
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-15  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15  9:01 [PATCH] drm/rockchip: vop2: fix initialization of possible_crtcs variable Michael Riesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®