]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
drm/vmwgfx: Update the user-space interface.
authorThomas Hellstrom <thellstrom@vmware.com>
Tue, 9 Feb 2010 19:41:55 +0000 (19:41 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Feb 2010 01:58:09 +0000 (11:58 +1000)
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>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
include/drm/vmwgfx_drm.h

index 135be9688c90d583a14680d2b6dc52461011eec8..0eaf68273eaf332b1ebafed88270afc94c1e7fdc 100644 (file)
 #include "ttm/ttm_execbuf_util.h"
 #include "ttm/ttm_module.h"
 
-#define VMWGFX_DRIVER_DATE "20090724"
+#define VMWGFX_DRIVER_DATE "20100118"
 #define VMWGFX_DRIVER_MAJOR 0
-#define VMWGFX_DRIVER_MINOR 1
-#define VMWGFX_DRIVER_PATCHLEVEL 2
+#define VMWGFX_DRIVER_MINOR 9
+#define VMWGFX_DRIVER_PATCHLEVEL 0
 #define VMWGFX_FILE_PAGE_OFFSET 0x00100000
 #define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
 #define VMWGFX_MAX_RELOCATIONS 2048
index 778851f9f1d60d3c04fbb5befb14990598df5e4c..1c7a316454d80ceb9aaeb6c83d6ac6a82f1cae1f 100644 (file)
@@ -48,6 +48,12 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
        case DRM_VMW_PARAM_FIFO_OFFSET:
                param->value = dev_priv->mmio_start;
                break;
+       case DRM_VMW_PARAM_HW_CAPS:
+               param->value = dev_priv->capabilities;
+               break;
+       case DRM_VMW_PARAM_FIFO_CAPS:
+               param->value = dev_priv->fifo.capabilities;
+               break;
        default:
                DRM_ERROR("Illegal vmwgfx get param request: %d\n",
                          param->param);
index c7efbd47ab8469e3b38c6d92d57a7d10e144cea0..933e90d82866583cb6a6fd35f0a4e6536d3b1150 100644 (file)
@@ -610,9 +610,10 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
                 */
                srf->flags &= ~SVGA3D_SURFACE_HINT_SCANOUT;
                srf->scanout = true;
-       } else {
+       } else if (req->scanout)
+               srf->scanout = true;
+       else
                srf->scanout = false;
-       }
 
        if (srf->scanout &&
            srf->num_sizes == 1 &&
index 2be7e1249b6f60d18cf006f454fc4e6cd4d9df6b..dfaf3c2d2c8e7bd734f48820433e4505d614e1ed 100644 (file)
@@ -68,7 +68,8 @@
 #define DRM_VMW_PARAM_NUM_FREE_STREAMS 1
 #define DRM_VMW_PARAM_3D               2
 #define DRM_VMW_PARAM_FIFO_OFFSET      3
-
+#define DRM_VMW_PARAM_HW_CAPS          4
+#define DRM_VMW_PARAM_FIFO_CAPS        5
 
 /**
  * struct drm_vmw_getparam_arg
@@ -181,6 +182,8 @@ struct drm_vmw_context_arg {
  * The size of the array should equal the total number of mipmap levels.
  * @shareable: Boolean whether other clients (as identified by file descriptors)
  * may reference this surface.
+ * @scanout: Boolean whether the surface is intended to be used as a
+ * scanout.
  *
  * Input data to the DRM_VMW_CREATE_SURFACE Ioctl.
  * Output data from the DRM_VMW_REF_SURFACE Ioctl.
@@ -192,7 +195,7 @@ struct drm_vmw_surface_create_req {
        uint32_t mip_levels[DRM_VMW_MAX_SURFACE_FACES];
        uint64_t size_addr;
        int32_t shareable;
-       uint32_t pad64;
+       int32_t scanout;
 };
 
 /**
@@ -295,6 +298,9 @@ union drm_vmw_surface_reference_arg {
  *
  * @commands: User-space address of a command buffer cast to an uint64_t.
  * @command-size: Size in bytes of the command buffer.
+ * @throttle-us: Sleep until software is less than @throttle_us
+ * microseconds ahead of hardware. The driver may round this value
+ * to the nearest kernel tick.
  * @fence_rep: User-space address of a struct drm_vmw_fence_rep cast to an
  * uint64_t.
  *
@@ -304,7 +310,7 @@ union drm_vmw_surface_reference_arg {
 struct drm_vmw_execbuf_arg {
        uint64_t commands;
        uint32_t command_size;
-       uint32_t pad64;
+       uint32_t throttle_us;
        uint64_t fence_rep;
 };