]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/exynos: forbid creating framebuffers from too small GEM buffers
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 12 Jul 2017 10:09:22 +0000 (12:09 +0200)
committerInki Dae <inki.dae@samsung.com>
Tue, 8 Aug 2017 22:34:23 +0000 (07:34 +0900)
commit1899bd57570a3e610db574b57d1e7e66378aa908
tree39c0e986685fb3ebb6f533dd8f55db16d0db9bfa
parent5669b9989eaa664cacbad6a85631550bccdad963
drm/exynos: forbid creating framebuffers from too small GEM buffers

Add a check if the framebuffer described by the provided drm_mode_fb_cmd2
structure fits into provided GEM buffers. Without this check it is
possible to create a framebuffer object from a small buffer and set it to
the hardware, what results in displaying system memory outside the
allocated GEM buffer.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fb.c