summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-05-12 13:01:57 -0700
committerKeith Packard <keithp@keithp.com>2008-05-12 13:01:57 -0700
commit6aeff6b9e32b61beed0d5c3d871968fa6217b79d (patch)
treeeac5593102775751b0d6632666785bb92efcaf98
parent6950b7da7157d4d775fc09c7bc31fb0e769c4249 (diff)
[gem] Set write domain to CPU when doing pwrite.
Leave the flush call in place, which can fix domains up if necessary.
-rw-r--r--linux-core/drm_gem.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/linux-core/drm_gem.c b/linux-core/drm_gem.c
index 14cf7e47..e20cfe07 100644
--- a/linux-core/drm_gem.c
+++ b/linux-core/drm_gem.c
@@ -276,9 +276,9 @@ drm_gem_pread_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
if (dev->driver->gem_set_domain) {
- ret = dev->driver->gem_set_domain (obj,
- DRM_GEM_DOMAIN_CPU,
- 0);
+ ret = dev->driver->gem_set_domain(obj,
+ DRM_GEM_DOMAIN_CPU,
+ 0);
if (ret) {
drm_gem_object_unreference(obj);
return ret;
@@ -363,9 +363,9 @@ drm_gem_pwrite_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
if (dev->driver->gem_set_domain) {
- ret = dev->driver->gem_set_domain (obj,
- DRM_GEM_DOMAIN_CPU,
- 0);
+ ret = dev->driver->gem_set_domain(obj,
+ DRM_GEM_DOMAIN_CPU,
+ DRM_GEM_DOMAIN_CPU);
if (ret) {
drm_gem_object_unreference(obj);
return ret;
@@ -376,7 +376,7 @@ drm_gem_pwrite_ioctl(struct drm_device *dev, void *data,
written = vfs_write(obj->filp,
(char __user *)(uintptr_t) args->data_ptr,
args->size, &offset);
-
+
if (written != args->size) {
drm_gem_object_unreference(obj);
if (written < 0)