From 2140e102f942edf7982cee2a3f00caf234551687 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 1 May 2008 11:39:06 -0700 Subject: checkpoint: rename to GEM and a few more i915 bits. --- linux-core/i915_drv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 5a6f0adc..c77c329f 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -586,6 +586,8 @@ static struct drm_driver driver = { .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, .ioctls = i915_ioctls, + .gem_init_object = i915_gem_init_object, + .gem_free_object = i915_gem_free_object, .fops = { .owner = THIS_MODULE, .open = drm_open, -- cgit v1.2.3 From ab3549d1336fc6c08581a9fd14a83513649d9187 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 2 May 2008 16:34:16 -0700 Subject: Add a bit of /proc/dri/*/gem support. Clean up some refcount/pagelock issues. Track named objects in /proc/dri/0/gem_names. Track total object count in /proc/dri/0/gem_objects. Initialize device gem data. return -ENODEV for gem ioctls if the driver doesn't support gem. Call unlock_page when unbinding from gtt. Add numerous misssing calls to drm_gem_object_unreference. --- linux-core/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index c77c329f..3e788d25 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -566,7 +566,7 @@ static struct drm_driver driver = { */ .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR | */ - DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED, + DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM, .load = i915_driver_load, .unload = i915_driver_unload, .firstopen = i915_driver_firstopen, -- cgit v1.2.3 From 9af4c497433398fa4576a7c1c31036448cf4f24c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 8 May 2008 10:44:02 -0700 Subject: [intel-gem] Move domains to relocation records. add set_domain ioctl. Domain information is about buffer relationships, not buffer contents. That means a relocation contains the domain information as it knows how the source buffer references the target buffer. This also adds the set_domain ioctl so that user space can move buffers to the cpu domain. --- linux-core/i915_drv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index 3e788d25..ae8cf3e0 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -588,6 +588,7 @@ static struct drm_driver driver = { .ioctls = i915_ioctls, .gem_init_object = i915_gem_init_object, .gem_free_object = i915_gem_free_object, + .gem_set_domain = i915_gem_set_domain_ioctl, .fops = { .owner = THIS_MODULE, .open = drm_open, -- cgit v1.2.3 From ff39db099b9ca6c8feee68101a2269345b7bd798 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 11 May 2008 00:10:16 -0700 Subject: [GEM] Make pread/pwrite manage memory domains. No luck with movnti though. pread and pwrite must update the memory domains to ensure consistency with the GPU. At some point, it should be possible to avoid clflush through this path, but that isn't working for me. --- linux-core/i915_drv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index ae8cf3e0..cc47ed64 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -589,6 +589,7 @@ static struct drm_driver driver = { .gem_init_object = i915_gem_init_object, .gem_free_object = i915_gem_free_object, .gem_set_domain = i915_gem_set_domain_ioctl, + .gem_flush_pwrite = i915_gem_flush_pwrite, .fops = { .owner = THIS_MODULE, .open = drm_open, -- cgit v1.2.3 From 7dced2f33a952ad12aafb7a3e34747156020a3ae Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 15 May 2008 11:21:11 -0700 Subject: [gem] Hold dev->struct_mutex to protect structure data. --- linux-core/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core/i915_drv.c') diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index cc47ed64..a50ee53c 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -588,7 +588,7 @@ static struct drm_driver driver = { .ioctls = i915_ioctls, .gem_init_object = i915_gem_init_object, .gem_free_object = i915_gem_free_object, - .gem_set_domain = i915_gem_set_domain_ioctl, + .gem_set_domain = i915_gem_set_domain, .gem_flush_pwrite = i915_gem_flush_pwrite, .fops = { .owner = THIS_MODULE, -- cgit v1.2.3