drm/vmwgfx: Fix incorrect write to read-only register
Subsystems (3)
PATCH 1/1 drm/vmwgfx: Fix incorrect write to read-only register
Commit "drm/vmwgfx: correct fb_fix_screeninfo.line_length", while fixing a vmwgfx fbdev bug, also writes the pitch to a supposedly read-only register:SVGA_REG_BYTES_PER_LINE, while it should be (and also in fact is) written to SVGA_REG_PITCHLOCK.
There has been some reports of incorrect rendering with the mentioned commit and Ubuntu 12.04. While hard to reproduce, hopefully this patch will correct that issue.
--- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +0 -1
@@ -179,7 +179,6 @@ static int vmw_fb_set_par(struct fb_info *info)vmw_write (vmw_priv,SVGA_REG_DISPLAY_POSITION_Y , info->var.yoffset);vmw_write (vmw_priv,SVGA_REG_DISPLAY_WIDTH , info->var.xres);vmw_write (vmw_priv,SVGA_REG_DISPLAY_HEIGHT , info->var.yres); -vmw_write (vmw_priv,SVGA_REG_BYTES_PER_LINE , info->fix.line_length);vmw_write (vmw_priv,SVGA_REG_DISPLAY_ID ,SVGA_ID_INVALID ); }
Signature · 1 line
1.8.3.2
----- Original Message -----
Quoted 9 lines
Commit "drm/vmwgfx: correct fb_fix_screeninfo.line_length", while fixing a vmwgfx fbdev bug, also writes the pitch to a supposedly read-only register:
SVGA_REG_BYTES_PER_LINE, while it should be (and also in fact is) written toSVGA_REG_PITCHLOCK.There has been some reports of incorrect rendering with the mentioned commit and Ubuntu 12.04. While hard to reproduce, hopefully this patch will correct that issue.
Quoted 7 lines
Cc Christopher Friedt <[email protected]>Tested-by Christopher Friedt <[email protected]>Signed-off-by Thomas Hellstrom <[email protected]>--- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 1 - 1 file changed, 1 deletion(-)
Quoted 17 lines
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +0
-2@@ -179,7 +179,6 @@ static int vmw_fb_set_par(struct fb_info *info)vmw_write (vmw_priv,SVGA_REG_DISPLAY_POSITION_Y , info->var.yoffset);vmw_write (vmw_priv,SVGA_REG_DISPLAY_WIDTH , info->var.xres);vmw_write (vmw_priv,SVGA_REG_DISPLAY_HEIGHT , info->var.yres); -vmw_write (vmw_priv,SVGA_REG_BYTES_PER_LINE , info->fix.line_length);vmw_write (vmw_priv,SVGA_REG_DISPLAY_ID ,SVGA_ID_INVALID ); } --1.8.3.2