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

Commit b9eb1a61 authored by Thomas Hellstrom's avatar Thomas Hellstrom
Browse files

drm/vmwgfx: Kill a bunch of sparse warnings



We're giving up all attempts to keep cpu- and device byte ordering separate.

This silences sparse when compiled using
make C=2 CF="-D__CHECK_ENDIAN__"

Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
parent f6b05004
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
#include "svga_reg.h"

typedef uint32 PPN;
typedef __le64 PPN64;
typedef u64 PPN64;

/*
 * 3D Hardware Version
+4 −4
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ static bool vmw_cmdbuf_try_alloc(struct vmw_cmdbuf_man *man,
 * no space available ATM, it turns on IRQ handling and sleeps waiting for it to
 * become available.
 */
int vmw_cmdbuf_alloc_space(struct vmw_cmdbuf_man *man,
static int vmw_cmdbuf_alloc_space(struct vmw_cmdbuf_man *man,
				  struct drm_mm_node *node,
				  size_t size,
				  bool interruptible)
+6 −6
Original line number Diff line number Diff line
@@ -135,9 +135,9 @@ static void vmw_hw_context_destroy(struct vmw_resource *res)
		return;
	}

	cmd->header.id = cpu_to_le32(SVGA_3D_CMD_CONTEXT_DESTROY);
	cmd->header.size = cpu_to_le32(sizeof(cmd->body));
	cmd->body.cid = cpu_to_le32(res->id);
	cmd->header.id = SVGA_3D_CMD_CONTEXT_DESTROY;
	cmd->header.size = sizeof(cmd->body);
	cmd->body.cid = res->id;

	vmw_fifo_commit(dev_priv, sizeof(*cmd));
	vmw_fifo_resource_dec(dev_priv);
@@ -215,9 +215,9 @@ static int vmw_context_init(struct vmw_private *dev_priv,
		return -ENOMEM;
	}

	cmd->header.id = cpu_to_le32(SVGA_3D_CMD_CONTEXT_DEFINE);
	cmd->header.size = cpu_to_le32(sizeof(cmd->body));
	cmd->body.cid = cpu_to_le32(res->id);
	cmd->header.id = SVGA_3D_CMD_CONTEXT_DEFINE;
	cmd->header.size = sizeof(cmd->body);
	cmd->body.cid = res->id;

	vmw_fifo_commit(dev_priv, sizeof(*cmd));
	vmw_fifo_resource_inc(dev_priv);
+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ int vmw_dmabuf_unpin(struct vmw_private *dev_priv,
	if (unlikely(ret != 0))
		return ret;

	ret = ttm_bo_reserve(bo, interruptible, false, false, 0);
	ret = ttm_bo_reserve(bo, interruptible, false, false, NULL);
	if (unlikely(ret != 0))
		goto err;

+2 −2
Original line number Diff line number Diff line
@@ -1225,7 +1225,7 @@ static void vmw_master_drop(struct drm_device *dev,
 * @dev_priv: Pointer to device private struct.
 * Needs the reservation sem to be held in non-exclusive mode.
 */
void __vmw_svga_enable(struct vmw_private *dev_priv)
static void __vmw_svga_enable(struct vmw_private *dev_priv)
{
	spin_lock(&dev_priv->svga_lock);
	if (!dev_priv->bdev.man[TTM_PL_VRAM].use_type) {
@@ -1254,7 +1254,7 @@ void vmw_svga_enable(struct vmw_private *dev_priv)
 * Needs the reservation sem to be held in exclusive mode.
 * Will not empty VRAM. VRAM must be emptied by caller.
 */
void __vmw_svga_disable(struct vmw_private *dev_priv)
static void __vmw_svga_disable(struct vmw_private *dev_priv)
{
	spin_lock(&dev_priv->svga_lock);
	if (dev_priv->bdev.man[TTM_PL_VRAM].use_type) {
Loading