diff mbox

[SRU,Wily] drm/vmwgfx: Fix an fb unlocking bug

Message ID 1456423051-2725-1-git-send-email-kamal@whence.com
State New
Headers show

Commit Message

Kamal Mostafa Feb. 25, 2016, 5:57 p.m. UTC
From: Thomas Hellstrom <thellstrom@vmware.com>

BugLink: http://bugs.launchpad.net/bugs/1548587

commit 12617971c443c50750a12a77ea0e08319d161975 upstream.

A regression introduced when the master ttm lock was split into two.

Reported-and-tested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Brad Figg Feb. 25, 2016, 6:04 p.m. UTC | #1
On Thu, Feb 25, 2016 at 09:57:31AM -0800, Kamal Mostafa wrote:
> From: Thomas Hellstrom <thellstrom@vmware.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1548587
> 
> commit 12617971c443c50750a12a77ea0e08319d161975 upstream.
> 
> A regression introduced when the master ttm lock was split into two.
> 
> Reported-and-tested-by: Brian Paul <brianp@vmware.com>
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> Reviewed-by: Brian Paul <brianp@vmware.com>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> index 0a474f3..e2d40eb 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> @@ -402,12 +402,12 @@ static int vmw_fb_create_bo(struct vmw_private *vmw_priv,
>  
>  	*out = vmw_bo;
>  
> -	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
> +	ttm_write_unlock(&vmw_priv->reservation_sem);
>  
>  	return 0;
>  
>  err_unlock:
> -	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
> +	ttm_write_unlock(&vmw_priv->reservation_sem);
>  	return ret;
>  }
>  
> -- 
> 2.7.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Valid cherrypick, good testing.
Brad Figg Feb. 25, 2016, 6:04 p.m. UTC | #2
On Thu, Feb 25, 2016 at 09:57:31AM -0800, Kamal Mostafa wrote:
> From: Thomas Hellstrom <thellstrom@vmware.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1548587
> 
> commit 12617971c443c50750a12a77ea0e08319d161975 upstream.
> 
> A regression introduced when the master ttm lock was split into two.
> 
> Reported-and-tested-by: Brian Paul <brianp@vmware.com>
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> Reviewed-by: Brian Paul <brianp@vmware.com>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> index 0a474f3..e2d40eb 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> @@ -402,12 +402,12 @@ static int vmw_fb_create_bo(struct vmw_private *vmw_priv,
>  
>  	*out = vmw_bo;
>  
> -	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
> +	ttm_write_unlock(&vmw_priv->reservation_sem);
>  
>  	return 0;
>  
>  err_unlock:
> -	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
> +	ttm_write_unlock(&vmw_priv->reservation_sem);
>  	return ret;
>  }
>  
> -- 
> 2.7.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Forgot the ACK
Luis Henriques Feb. 25, 2016, 6:15 p.m. UTC | #3
Looks ok to me, and there's also positive testing so:

Acked-by: Luis Henriques <luis.henriques@canonical.com>

Cheers,
--
Luís
Andy Whitcroft Feb. 25, 2016, 6:15 p.m. UTC | #4
On Thu, Feb 25, 2016 at 09:57:31AM -0800, Kamal Mostafa wrote:
> From: Thomas Hellstrom <thellstrom@vmware.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1548587
> 
> commit 12617971c443c50750a12a77ea0e08319d161975 upstream.
> 
> A regression introduced when the master ttm lock was split into two.
> 
> Reported-and-tested-by: Brian Paul <brianp@vmware.com>
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> Reviewed-by: Brian Paul <brianp@vmware.com>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> index 0a474f3..e2d40eb 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> @@ -402,12 +402,12 @@ static int vmw_fb_create_bo(struct vmw_private *vmw_priv,
>  
>  	*out = vmw_bo;
>  
> -	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
> +	ttm_write_unlock(&vmw_priv->reservation_sem);
>  
>  	return 0;
>  
>  err_unlock:
> -	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
> +	ttm_write_unlock(&vmw_priv->reservation_sem);
>  	return ret;
>  }
>  

Clean cherry-pick, tested to fix the underlying issue.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
Kamal Mostafa Feb. 25, 2016, 6:43 p.m. UTC | #5

diff mbox

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index 0a474f3..e2d40eb 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -402,12 +402,12 @@  static int vmw_fb_create_bo(struct vmw_private *vmw_priv,
 
 	*out = vmw_bo;
 
-	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
+	ttm_write_unlock(&vmw_priv->reservation_sem);
 
 	return 0;
 
 err_unlock:
-	ttm_write_unlock(&vmw_priv->fbdev_master.lock);
+	ttm_write_unlock(&vmw_priv->reservation_sem);
 	return ret;
 }