]> git.baikalelectronics.ru Git - kernel.git/commit
drm/etnaviv: fix mmap operations for userptr and dma-buf objects
authorLucas Stach <l.stach@pengutronix.de>
Wed, 27 Apr 2016 10:27:02 +0000 (12:27 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Fri, 6 May 2016 08:42:33 +0000 (10:42 +0200)
commit9c9c9b42ad26bbb54f02ba3229091f1dd82d2956
treea02474c1e2d5c4b275732ba390ba2115d7fd44b1
parent2d69c2e6e7790b864b0e498beaa7ddfb417a276b
drm/etnaviv: fix mmap operations for userptr and dma-buf objects

Add an indirect object operations call to allow distinct implementations
of the mmap operation based on the type of the object.

This ensures that the exporter is called to set up the mmap for imported
dma-bufs and disallows mapping of userptr objects through the DRM file,
as this might lead to serious corruption of kernel internal state.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/gpu/drm/etnaviv/etnaviv_gem.h
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c