All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/vmwgfx: Fix incorrect write to read-only register
@ 2014-07-03  7:14 Thomas Hellstrom
  2014-07-03  9:30 ` Jakob Bornecrantz
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Hellstrom @ 2014-07-03  7:14 UTC (permalink / raw)
  To: jakob; +Cc: Christopher Friedt, Thomas Hellstrom, stable, dri-devel

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.

Cc: stable@vger.kernel.org
Cc: Christopher Friedt <chrisfriedt@gmail.com>
Tested-by: Christopher Friedt <chrisfriedt@gmail.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index a89ad93..b031b48 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/vmwgfx: Fix incorrect write to read-only register
  2014-07-03  7:14 [PATCH] drm/vmwgfx: Fix incorrect write to read-only register Thomas Hellstrom
@ 2014-07-03  9:30 ` Jakob Bornecrantz
  0 siblings, 0 replies; 2+ messages in thread
From: Jakob Bornecrantz @ 2014-07-03  9:30 UTC (permalink / raw)
  To: Thomas Hellstrom; +Cc: Christopher Friedt, stable, dri-devel



----- Original Message -----
> 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.
> 
> Cc: stable@vger.kernel.org
> Cc: Christopher Friedt <chrisfriedt@gmail.com>
> Tested-by: Christopher Friedt <chrisfriedt@gmail.com>
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>

> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> index a89ad93..b031b48 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> @@ -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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-03  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03  7:14 [PATCH] drm/vmwgfx: Fix incorrect write to read-only register Thomas Hellstrom
2014-07-03  9:30 ` Jakob Bornecrantz

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.