]> git.karo-electronics.de Git - linux-beck.git/commit
drm/tilcdc: verify fb pitch
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 7 Feb 2014 17:37:07 +0000 (17:37 +0000)
committerJyri Sarha <jsarha@ti.com>
Thu, 25 Feb 2016 14:39:29 +0000 (16:39 +0200)
commit6f206e9d2a965771e99bca4c22dbadac1b58a0e8
tree58a645d30eaf0d50c833c3541daeb9eed9960a85
parent3d19306a8240a163f6b02bb46213c277d6d44e08
drm/tilcdc: verify fb pitch

LCDC hardware does not support fb pitch that is different (i.e. larger)
than the screen size. The driver currently does no checks for this, and
the results of too big pitch are are flickering and lower fps.

This issue easily happens when using libdrm's modetest tool with non-32
bpp modes. As modetest always allocated 4 bytes per pixel, it implies a
bigger pitch for 16 or 24 bpp modes.

This patch adds a check to reject pitches the hardware cannot support.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drivers/gpu/drm/tilcdc/tilcdc_crtc.c