From: Zack Rusin Date: Wed, 5 May 2021 03:57:35 +0000 (-0400) Subject: drm/vmwgfx: Fix incorrect enum usage X-Git-Tag: accepted/tizen/unified/20230118.172025~6402^2~28^2~420 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cc8bfeeb7366a24f3ad726c05117984b89a90e1;p=platform%2Fkernel%2Flinux-rpi.git drm/vmwgfx: Fix incorrect enum usage 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 Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210505035740.286923-2-zackr@vmware.com --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 7805ba0..1b27d7f 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); } }