All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zack Rusin <zackr@vmware.com>
To: <dri-devel@lists.freedesktop.org>
Cc: krastevm@vmware.com, sroland@vmware.com
Subject: [PATCH 1/6] drm/vmwgfx: Fix incorrect enum usage
Date: Tue, 4 May 2021 23:57:35 -0400	[thread overview]
Message-ID: <20210505035740.286923-2-zackr@vmware.com> (raw)
In-Reply-To: <20210505035740.286923-1-zackr@vmware.com>

SVGA_REG_ENABLE is a register name, and SVGA_REG_ENABLE_(ENABLE|
DISABLE|HIDE) are its valid values. We were incorrectly setting
the register value to itself. This happened to work because
the SVGA_REG_ENABLE is happens to to be the same value as
SVGA_REG_ENABLE_ENABLE, but is still semantically incorrect.
Lets use the correct enum when setting SVGA_REG_ENABLE.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 7805ba0e1c49..1b27d7f7fcfa 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1179,7 +1179,7 @@ static void __vmw_svga_enable(struct vmw_private *dev_priv)
 	struct ttm_resource_manager *man = ttm_manager_type(&dev_priv->bdev, TTM_PL_VRAM);
 
 	if (!ttm_resource_manager_used(man)) {
-		vmw_write(dev_priv, SVGA_REG_ENABLE, SVGA_REG_ENABLE);
+		vmw_write(dev_priv, SVGA_REG_ENABLE, SVGA_REG_ENABLE_ENABLE);
 		ttm_resource_manager_set_used(man, true);
 	}
 }
-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-05-05  3:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05  3:57 [PATCH 0/6] drm/vmwgfx: SVGA v3 and arm64 support Zack Rusin
2021-05-05  3:57 ` Zack Rusin [this message]
2021-05-05  3:57 ` [PATCH 2/6] drm/vmwgfx: Mark a surface gpu-dirty after the SVGA3dCmdDXGenMips command Zack Rusin
2021-05-05  3:57 ` [PATCH 3/6] drm/vmwgfx: Fix cpu updates of coherent multisample surfaces Zack Rusin
2021-05-05  3:57 ` [PATCH 4/6] drm/vmwgfx: Remove the reservation semaphore Zack Rusin
2021-05-05  3:57 ` [PATCH 5/6] drm/vmwgfx: Add basic support for SVGA3 Zack Rusin
2021-05-05  7:46   ` kernel test robot
2021-05-05  7:46     ` kernel test robot
2021-05-05  8:23   ` kernel test robot
2021-05-05  8:23     ` kernel test robot
2021-05-05 10:10   ` kernel test robot
2021-05-05 10:10     ` kernel test robot
2021-05-05 10:10   ` [PATCH] drm/vmwgfx: fix badzero.cocci warnings kernel test robot
2021-05-05 10:10     ` kernel test robot
2021-05-05 19:10   ` [PATCH 5/6] drm/vmwgfx: Add basic support for SVGA3 Zack Rusin
2021-05-05  3:57 ` [PATCH 6/6] drm/vmwgfx: Port vmwgfx to arm64 Zack Rusin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210505035740.286923-2-zackr@vmware.com \
    --to=zackr@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krastevm@vmware.com \
    --cc=sroland@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.