summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_dmm_priv.h
diff options
context:
space:
mode:
authorTomi Valkeinen2014-09-25 21:24:28 +0200
committerTomi Valkeinen2015-03-24 12:50:55 +0100
commit2dab0bab6b749590086d44a04f9debc4fe894fd6 (patch)
treedf9a64ab389c77891e575d835862659edb6e1256 /drivers/gpu/drm/omapdrm/omap_dmm_priv.h
parentdrm/omap: fix error handling in omap_framebuffer_create() (diff)
downloadkernel-qcow2-linux-2dab0bab6b749590086d44a04f9debc4fe894fd6.tar.gz
kernel-qcow2-linux-2dab0bab6b749590086d44a04f9debc4fe894fd6.tar.xz
kernel-qcow2-linux-2dab0bab6b749590086d44a04f9debc4fe894fd6.zip
drm/omap: handle incompatible buffer stride and pixel size
omapdrm doesn't check if the pitch of the framebuffer and the color format's bits-per-pixel are compatible. omapdss requires that the stride of a buffer is an integer number of pixels For example, when using modetest with a display that has x resolution of 1280, and using packed 24 RGB mode (3 bytes per pixel), modetest allocates a buffer with a byte stride of 4 * 1280 = 5120. But 5120 / 3 = 1706.666... pixels, which causes wrong colors and a tilt on the screen. Add a check into omapdrm to return an error if the user tries to use such a combination. Note: this is not a HW requirement at least for non-rotation use cases, but a SW driver requirement. In the future we should study if also rotation use cases are fine with any stride size, and if so, change the driver to allow these strides. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_dmm_priv.h')
0 files changed, 0 insertions, 0 deletions