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>
This commit is contained in:
@@ -79,6 +79,7 @@ struct etnaviv_gem_ops {
|
||||
int (*get_pages)(struct etnaviv_gem_object *);
|
||||
void (*release)(struct etnaviv_gem_object *);
|
||||
void *(*vmap)(struct etnaviv_gem_object *);
|
||||
int (*mmap)(struct etnaviv_gem_object *, struct vm_area_struct *);
|
||||
};
|
||||
|
||||
static inline bool is_active(struct etnaviv_gem_object *etnaviv_obj)
|
||||
|
Reference in New Issue
Block a user