]> git.baikalelectronics.ru Git - kernel.git/commit
drm/etnaviv: get rid of userptr worker
authorLucas Stach <l.stach@pengutronix.de>
Fri, 17 Nov 2017 13:16:10 +0000 (14:16 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 2 Jan 2018 16:09:47 +0000 (17:09 +0100)
commit8ba2b33c0750406bbfd6228ebef6931d7374b332
treef9a80eb3c48cc6dc972222da590ecede267c508b
parentffef23e5738b1cbe4b3551f8254fe38ba72d6860
drm/etnaviv: get rid of userptr worker

All code paths which populate userptr BOs are fine with the get_pages
function taking the mmap_sem lock. This allows to get rid of the pretty
involved architecture with a worker being scheduled if the mmap_sem
needs to be taken, but instead call GUP directly and allow it to take
the lock if necessary.

This simplifies the code a lot and removes the possibility of this
function returning -EAGAIN, which complicates object population
handling at the callers.

A notable change in behavior is that we don't allow a process to populate
objects with user pages from a foreign MM anymore. This would have been an
invalid use before, as it breaks the assumptions made in the etnaviv kernel
driver to enfore cache coherence. We now disallow this by rejecting the
request to populate those objects. Well behaving userspace is unaffected by
this change.

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