aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-08-16 10:15:34 +1000
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-08-17 10:10:06 +0200
commitec6f1bb90c9865d4a5af01b1c643bcf020d88706 (patch)
treeba4ab858b7d96ea08ace354332eb9c79bafb65eb /drivers/gpu/drm/i915/i915_dma.c
parentdrm/i915: Allow VGA on CRTC 2 (diff)
downloadlinux-dev-ec6f1bb90c9865d4a5af01b1c643bcf020d88706.tar.xz
linux-dev-ec6f1bb90c9865d4a5af01b1c643bcf020d88706.zip
drm/i915: implement dma buf begin_cpu_access (v2)
In order for udl vmap to work properly, we need to push the object into the CPU domain before we start copying the data to the USB device. This along with the udl change avoids userspace explicit mapping to be used. v2: add a flag for userspace to query to know if Intel kernel driver can deal with the vmap flushing properly. In theory udl would need a flag also, but I intend to push the patches very close to each other and other drivers should do the right thing from the start. I've added a test to my intel-gpu-tools prime branch, however testing this is a bit messy since the only way to get udl to vmap is to rendering something. I've tested this with real code as well to make sure it works. Signed-off-by: Dave Airlie <airlied@redhat.com> [danvet: resolved conflict, which required reallocating the PARAM number to 21.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 2285ae31717a..2cba7b4a04ed 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1012,6 +1012,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
case I915_PARAM_HAS_SEMAPHORES:
value = i915_semaphore_is_enabled(dev);
break;
+ case I915_PARAM_HAS_PRIME_VMAP_FLUSH:
+ value = 1;
+ break;
default:
DRM_DEBUG_DRIVER("Unknown parameter %d\n",
param->param);