Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ae7b03c authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie
Browse files

vmwgfx: Bump major



This bumps driver major version as a result of previous incompatible
interface changes.

In addition, a leftover command definition is removed from the
vmwgfx_drm.h header.

Also a strict version check is enforced on the exebuf ioctl.

This is intended to be the last major bump before exiting staging.

Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ae2a1040
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -40,9 +40,9 @@
#include "ttm/ttm_module.h"
#include "vmwgfx_fence.h"

#define VMWGFX_DRIVER_DATE "20100927"
#define VMWGFX_DRIVER_MAJOR 1
#define VMWGFX_DRIVER_MINOR 4
#define VMWGFX_DRIVER_DATE "20110901"
#define VMWGFX_DRIVER_MAJOR 2
#define VMWGFX_DRIVER_MINOR 0
#define VMWGFX_DRIVER_PATCHLEVEL 0
#define VMWGFX_FILE_PAGE_OFFSET 0x00100000
#define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
+14 −0
Original line number Diff line number Diff line
@@ -734,6 +734,20 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
	struct vmw_fence_obj *fence;
	uint32_t handle;

	/*
	 * This will allow us to extend the ioctl argument while
	 * maintaining backwards compatibility:
	 * We take different code paths depending on the value of
	 * arg->version.
	 */

	if (unlikely(arg->version != DRM_VMW_EXECBUF_VERSION)) {
		DRM_ERROR("Incorrect execbuf version.\n");
		DRM_ERROR("You're running outdated experimental "
			  "vmwgfx user-space drivers.");
		return -EINVAL;
	}

	ret = ttm_read_lock(&vmaster->lock, true);
	if (unlikely(ret != 0))
		return ret;
+1 −45
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@
#define DRM_VMW_MAX_SURFACE_FACES 6
#define DRM_VMW_MAX_MIP_LEVELS 24

#define DRM_VMW_EXT_NAME_LEN 128

#define DRM_VMW_GET_PARAM            0
#define DRM_VMW_ALLOC_DMABUF         1
@@ -90,49 +89,6 @@ struct drm_vmw_getparam_arg {
	uint32_t pad64;
};

/*************************************************************************/
/**
 * DRM_VMW_EXTENSION - Query device extensions.
 */

/**
 * struct drm_vmw_extension_rep
 *
 * @exists: The queried extension exists.
 * @driver_ioctl_offset: Ioctl number of the first ioctl in the extension.
 * @driver_sarea_offset: Offset to any space in the DRI SAREA
 * used by the extension.
 * @major: Major version number of the extension.
 * @minor: Minor version number of the extension.
 * @pl: Patch level version number of the extension.
 *
 * Output argument to the DRM_VMW_EXTENSION Ioctl.
 */

struct drm_vmw_extension_rep {
	int32_t exists;
	uint32_t driver_ioctl_offset;
	uint32_t driver_sarea_offset;
	uint32_t major;
	uint32_t minor;
	uint32_t pl;
	uint32_t pad64;
};

/**
 * union drm_vmw_extension_arg
 *
 * @extension - Ascii name of the extension to be queried. //In
 * @rep - Reply as defined above. //Out
 *
 * Argument to the DRM_VMW_EXTENSION Ioctl.
 */

union drm_vmw_extension_arg {
	char extension[DRM_VMW_EXT_NAME_LEN];
	struct drm_vmw_extension_rep rep;
};

/*************************************************************************/
/**
 * DRM_VMW_CREATE_CONTEXT - Create a host context.
@@ -315,7 +271,7 @@ union drm_vmw_surface_reference_arg {
 * Argument to the DRM_VMW_EXECBUF Ioctl.
 */

#define DRM_VMW_EXECBUF_VERSION 0
#define DRM_VMW_EXECBUF_VERSION 1

struct drm_vmw_execbuf_arg {
	uint64_t commands;