diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2010-02-09 14:41:55 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-10 20:58:09 -0500 |
commit | f77cef3db357aeea22d82a2aa4f0ef8fbae41d47 (patch) | |
tree | 55e05387f639cfeb9f2c610f13ec2b77453ed9a6 | |
parent | e28cab42f384745c8a947a9ccd51e4aae52f5d51 (diff) |
drm/vmwgfx: Update the user-space interface.
When time-based throttling is implemented, we need to bump minor.
When the old way of detecting scanout is removed, we need to bump major.
In the meantime, this change should not break existing user-space.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 5 | ||||
-rw-r--r-- | include/drm/vmwgfx_drm.h | 12 |
4 files changed, 21 insertions, 8 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 135be9688c90..0eaf68273eaf 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |||
@@ -39,10 +39,10 @@ | |||
39 | #include "ttm/ttm_execbuf_util.h" | 39 | #include "ttm/ttm_execbuf_util.h" |
40 | #include "ttm/ttm_module.h" | 40 | #include "ttm/ttm_module.h" |
41 | 41 | ||
42 | #define VMWGFX_DRIVER_DATE "20090724" | 42 | #define VMWGFX_DRIVER_DATE "20100118" |
43 | #define VMWGFX_DRIVER_MAJOR 0 | 43 | #define VMWGFX_DRIVER_MAJOR 0 |
44 | #define VMWGFX_DRIVER_MINOR 1 | 44 | #define VMWGFX_DRIVER_MINOR 9 |
45 | #define VMWGFX_DRIVER_PATCHLEVEL 2 | 45 | #define VMWGFX_DRIVER_PATCHLEVEL 0 |
46 | #define VMWGFX_FILE_PAGE_OFFSET 0x00100000 | 46 | #define VMWGFX_FILE_PAGE_OFFSET 0x00100000 |
47 | #define VMWGFX_FIFO_STATIC_SIZE (1024*1024) | 47 | #define VMWGFX_FIFO_STATIC_SIZE (1024*1024) |
48 | #define VMWGFX_MAX_RELOCATIONS 2048 | 48 | #define VMWGFX_MAX_RELOCATIONS 2048 |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c index 778851f9f1d6..1c7a316454d8 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | |||
@@ -48,6 +48,12 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data, | |||
48 | case DRM_VMW_PARAM_FIFO_OFFSET: | 48 | case DRM_VMW_PARAM_FIFO_OFFSET: |
49 | param->value = dev_priv->mmio_start; | 49 | param->value = dev_priv->mmio_start; |
50 | break; | 50 | break; |
51 | case DRM_VMW_PARAM_HW_CAPS: | ||
52 | param->value = dev_priv->capabilities; | ||
53 | break; | ||
54 | case DRM_VMW_PARAM_FIFO_CAPS: | ||
55 | param->value = dev_priv->fifo.capabilities; | ||
56 | break; | ||
51 | default: | 57 | default: |
52 | DRM_ERROR("Illegal vmwgfx get param request: %d\n", | 58 | DRM_ERROR("Illegal vmwgfx get param request: %d\n", |
53 | param->param); | 59 | param->param); |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index c7efbd47ab84..933e90d82866 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | |||
@@ -610,9 +610,10 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data, | |||
610 | */ | 610 | */ |
611 | srf->flags &= ~SVGA3D_SURFACE_HINT_SCANOUT; | 611 | srf->flags &= ~SVGA3D_SURFACE_HINT_SCANOUT; |
612 | srf->scanout = true; | 612 | srf->scanout = true; |
613 | } else { | 613 | } else if (req->scanout) |
614 | srf->scanout = true; | ||
615 | else | ||
614 | srf->scanout = false; | 616 | srf->scanout = false; |
615 | } | ||
616 | 617 | ||
617 | if (srf->scanout && | 618 | if (srf->scanout && |
618 | srf->num_sizes == 1 && | 619 | srf->num_sizes == 1 && |
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h index 2be7e1249b6f..dfaf3c2d2c8e 100644 --- a/include/drm/vmwgfx_drm.h +++ b/include/drm/vmwgfx_drm.h | |||
@@ -68,7 +68,8 @@ | |||
68 | #define DRM_VMW_PARAM_NUM_FREE_STREAMS 1 | 68 | #define DRM_VMW_PARAM_NUM_FREE_STREAMS 1 |
69 | #define DRM_VMW_PARAM_3D 2 | 69 | #define DRM_VMW_PARAM_3D 2 |
70 | #define DRM_VMW_PARAM_FIFO_OFFSET 3 | 70 | #define DRM_VMW_PARAM_FIFO_OFFSET 3 |
71 | 71 | #define DRM_VMW_PARAM_HW_CAPS 4 | |
72 | #define DRM_VMW_PARAM_FIFO_CAPS 5 | ||
72 | 73 | ||
73 | /** | 74 | /** |
74 | * struct drm_vmw_getparam_arg | 75 | * struct drm_vmw_getparam_arg |
@@ -181,6 +182,8 @@ struct drm_vmw_context_arg { | |||
181 | * The size of the array should equal the total number of mipmap levels. | 182 | * The size of the array should equal the total number of mipmap levels. |
182 | * @shareable: Boolean whether other clients (as identified by file descriptors) | 183 | * @shareable: Boolean whether other clients (as identified by file descriptors) |
183 | * may reference this surface. | 184 | * may reference this surface. |
185 | * @scanout: Boolean whether the surface is intended to be used as a | ||
186 | * scanout. | ||
184 | * | 187 | * |
185 | * Input data to the DRM_VMW_CREATE_SURFACE Ioctl. | 188 | * Input data to the DRM_VMW_CREATE_SURFACE Ioctl. |
186 | * Output data from the DRM_VMW_REF_SURFACE Ioctl. | 189 | * Output data from the DRM_VMW_REF_SURFACE Ioctl. |
@@ -192,7 +195,7 @@ struct drm_vmw_surface_create_req { | |||
192 | uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES]; | 195 | uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES]; |
193 | uint64_t size_addr; | 196 | uint64_t size_addr; |
194 | int32_t shareable; | 197 | int32_t shareable; |
195 | uint32_t pad64; | 198 | int32_t scanout; |
196 | }; | 199 | }; |
197 | 200 | ||
198 | /** | 201 | /** |
@@ -295,6 +298,9 @@ union drm_vmw_surface_reference_arg { | |||
295 | * | 298 | * |
296 | * @commands: User-space address of a command buffer cast to an uint64_t. | 299 | * @commands: User-space address of a command buffer cast to an uint64_t. |
297 | * @command-size: Size in bytes of the command buffer. | 300 | * @command-size: Size in bytes of the command buffer. |
301 | * @throttle-us: Sleep until software is less than @throttle_us | ||
302 | * microseconds ahead of hardware. The driver may round this value | ||
303 | * to the nearest kernel tick. | ||
298 | * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an | 304 | * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an |
299 | * uint64_t. | 305 | * uint64_t. |
300 | * | 306 | * |
@@ -304,7 +310,7 @@ union drm_vmw_surface_reference_arg { | |||
304 | struct drm_vmw_execbuf_arg { | 310 | struct drm_vmw_execbuf_arg { |
305 | uint64_t commands; | 311 | uint64_t commands; |
306 | uint32_t command_size; | 312 | uint32_t command_size; |
307 | uint32_t pad64; | 313 | uint32_t throttle_us; |
308 | uint64_t fence_rep; | 314 | uint64_t fence_rep; |
309 | }; | 315 | }; |
310 | 316 | ||