]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commitdiff
drm/tidss: fix corrupted plane pixel formats
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 10 Dec 2019 08:05:04 +0000 (10:05 +0200)
committerJyri Sarha <jsarha@ti.com>
Wed, 11 Dec 2019 10:36:07 +0000 (12:36 +0200)
fourcc array is filled with the fourccs that are available, but
ARRAY_SIZE(fourccs) is used to tell the number of fourccs. This can lead
to uninitialized values at the end of fourcc to be considered as pixel
formats.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drivers/gpu/drm/tidss/tidss_dispc7.c

index 4d2c1acbbc22c9cb7894911ef2fd60776e1ded29..2b5f50c3e958655d804e8260ace0a1cfeb2f65b0 100644 (file)
@@ -3016,7 +3016,7 @@ static int dispc7_modeset_init(struct dispc_device *dispc)
 
                tplane = tidss_plane_create(tidss, hw_plane_id,
                                            DRM_PLANE_TYPE_OVERLAY, crtc_mask,
-                                           fourccs, ARRAY_SIZE(fourccs));
+                                           fourccs, num_fourccs);
 
                if (IS_ERR(tplane)) {
                        dev_err(tidss->dev, "plane create failed\n");