]> git.baikalelectronics.ru Git - kernel.git/commit
drm/v3d: clean caches at the end of render jobs on request from user space
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 19 Sep 2019 07:10:16 +0000 (09:10 +0200)
committerEric Anholt <eric@anholt.net>
Thu, 19 Sep 2019 19:57:44 +0000 (12:57 -0700)
commit04a471e5fadbc5218eb9f191333a10c7aac6e84d
treeffe45207b55ea1b78303e052a73bde3b35a3fb87
parent2d00da40bd360bc29f4955a09f3a164bf4b714fa
drm/v3d: clean caches at the end of render jobs on request from user space

Extends the user space ioctl for CL submissions so it can include a request
to flush the cache once the CL execution has completed. Fixes memory
write violation messages reported by the kernel in workloads involving
shader memory writes (SSBOs, shader images, scratch, etc) which sometimes
also lead to GPU resets during Piglit and CTS workloads.

v2: if v3d_job_init() fails we need to kfree() the job instead of
    v3d_job_put() it (Eric Anholt).

v3 (Eric Anholt):
  - Drop _FLAG suffix from the new flag name.
  - Add a new param so userspace can tell whether cache flushing is
    implemented in the kernel.

Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190919071016.4578-1-itoral@igalia.com
drivers/gpu/drm/v3d/v3d_drv.c
drivers/gpu/drm/v3d/v3d_gem.c
include/uapi/drm/v3d_drm.h