linux_dsm_epyc7002/drivers/gpu/drm/omapdrm
Chris Wilson 18b862dcd5 dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()
Drivers, especially i915.ko, can fail during the initial migration of a
dma-buf for CPU access. However, the error code from the driver was not
being propagated back to ioctl and so userspace was blissfully ignorant
of the failure. Rendering corruption ensues.

Whilst fixing the ioctl to return the error code from
dma_buf_start_cpu_access(), also do the same for
dma_buf_end_cpu_access().  For most drivers, dma_buf_end_cpu_access()
cannot fail. i915.ko however, as most drivers would, wants to avoid being
uninterruptible (as would be required to guarrantee no failure when
flushing the buffer to the device). As userspace already has to handle
errors from the SYNC_IOCTL, take advantage of this to be able to restart
the syscall across signals.

This fixes a coherency issue for i915.ko as well as reducing the
uninterruptible hold upon its BKL, the struct_mutex.

Fixes commit c11e391da2
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Feb 11 20:04:51 2016 -0200

    dma-buf: Add ioctls to allow userspace to flush

Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible
Testcase: igt/prime_mmap_coherency/ioctl-errors
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tiago Vignatti <tiago.vignatti@intel.com>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
CC: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: intel-gfx@lists.freedesktop.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1458331359-2634-1-git-send-email-chris@chris-wilson.co.uk
2016-03-19 11:03:49 +01:00
..
displays drm/omap: make omapdrm select OMAP2_DSS 2015-12-29 11:07:48 +02:00
dss fbdev changes for 4.5 2016-01-18 11:58:31 -08:00
Kconfig drm/omap: make omapdrm select OMAP2_DSS 2015-12-29 11:07:48 +02:00
Makefile fbdev changes for 4.5 2016-01-18 11:58:31 -08:00
omap_connector.c drm: omapdrm: Switch connector DPMS to atomic helpers 2015-06-12 22:52:48 +03:00
omap_crtc.c drm/omapdrm: removed optional dummy crtc mode_fixup function. 2016-03-04 17:59:02 +01:00
omap_debugfs.c drm: omapdrm: Make fbdev emulation optional 2015-12-31 11:25:42 +02:00
omap_dmm_priv.h drm/omap: fix race conditon in DMM 2015-03-24 13:50:59 +02:00
omap_dmm_tiler.c drm/omap: Use bitmaps for TILER placement 2015-12-31 11:25:47 +02:00
omap_dmm_tiler.h drm/omap: fix TILER on OMAP5 2015-03-24 13:50:55 +02:00
omap_drv.c drm/omap: Nuke close hooks 2016-02-08 09:55:50 +01:00
omap_drv.h drm/omap: Nuke close hooks 2016-02-08 09:55:50 +01:00
omap_encoder.c drm/omap: remove obsolete manager assignment 2015-12-31 11:25:48 +02:00
omap_fb.c drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
omap_fbdev.c drm: omapdrm: Make fbdev emulation optional 2015-12-31 11:25:42 +02:00
omap_gem_dmabuf.c dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access() 2016-03-19 11:03:49 +01:00
omap_gem.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-01-17 13:40:25 -08:00
omap_irq.c drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
omap_plane.c drm: omapdrm: Fix plane state free in plane reset handler 2015-12-31 11:25:42 +02:00
tcm-sita.c drm/omap: Use bitmaps for TILER placement 2015-12-31 11:25:47 +02:00
tcm-sita.h drm/omap: move out of staging 2013-02-16 17:38:06 -05:00
tcm.h drm/omap: Use bitmaps for TILER placement 2015-12-31 11:25:47 +02:00
TODO drm/omap: move out of staging 2013-02-16 17:38:06 -05:00