diff options
author | Keith Packard <keithp@keithp.com> | 2008-05-08 10:44:02 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-05-08 10:44:02 -0700 |
commit | 9af4c497433398fa4576a7c1c31036448cf4f24c (patch) | |
tree | 796775f0bebcdedc7b28dbc2511bfc00797786fc /linux-core/drmP.h | |
parent | effc6d998f080ba6f9c81d1b4b0e75a42be0238e (diff) |
[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.
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r-- | linux-core/drmP.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index cdeecc30..11688cdd 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -652,6 +652,15 @@ struct drm_gem_object { uint32_t read_domains; uint32_t write_domain; + /** + * While validating an exec operation, the + * new read/write domain values are computed here. + * They will be transferred to the above values + * at the point that any cache flushing occurs + */ + uint32_t pending_read_domains; + uint32_t pending_write_domain; + void *driver_private; }; @@ -765,6 +774,13 @@ struct drm_driver { int (*gem_init_object) (struct drm_gem_object *obj); void (*gem_free_object) (struct drm_gem_object *obj); + /** + * Driver-specific callback to set memory domains from userspace + */ + int (*gem_set_domain) (struct drm_gem_object *obj, + uint32_t read_domains, + uint32_t write_domain); + struct drm_fence_driver *fence_driver; struct drm_bo_driver *bo_driver; @@ -1392,6 +1408,8 @@ int drm_gem_name_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); int drm_gem_open_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); +int drm_gem_set_domain_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); void drm_gem_open(struct drm_device *dev, struct drm_file *file_private); void drm_gem_release(struct drm_device *dev, struct drm_file *file_private); |