Patchwork [LUCID,BUG#,507148,2/2] drm/radeon/kms: don't print error on -ERESTARTSYS.

login
register
mail settings
Submitter Manoj Iyer
Date March 30, 2010, 3:13 p.m.
Message ID <alpine.DEB.2.00.1003301013010.15378@hungry>
Download mbox | patch
Permalink /patch/48978/
State Accepted
Delegated to: Andy Whitcroft
Headers show

Comments

Manoj Iyer - March 30, 2010, 3:13 p.m.
Updated patch with information requested.

The following changes since commit 
c2b3a0b3ccb3b114c7e22117cb1fd23f63068bea:
   JosephChan@via.com.tw (1):
         (pre-stable) pata_via: Add VIA VX900 support

are available in the git repository at:

   git://kernel.ubuntu.com/manjo/ubuntu-lucid.git lp507148upstream

Dave Airlie (2): 
drm/radeon/bo: add some fallback placements for VRAM only objects.
       drm/radeon/kms: don't print error on -ERESTARTSYS.

drivers/gpu/drm/radeon/radeon.h        |    2 ++
  drivers/gpu/drm/radeon/radeon_cs.c     |    3 ++-
  drivers/gpu/drm/radeon/radeon_object.c |   10 +++++++---
  3 files changed, 11 insertions(+), 4 deletions(-)

From 78f0533f3905dd1b986c58b595185fd63eb6dd93 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 19 Mar 2010 10:33:44 +1000
Subject: [PATCH 2/2] drm/radeon/kms: don't print error on -ERESTARTSYS.

We can get this if the user moves the mouse when we are waiting to move
some stuff around in the validate. Don't fail.

Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit aa98c7cc9153b07d652257149f158c953d15de02)

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>

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

Cherry-picked from git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
---
  drivers/gpu/drm/radeon/radeon_cs.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
Stefan Bader - March 30, 2010, 5:31 p.m.
manoj.iyer@canonical.com wrote:
> 
> Updated patch with information requested.
> 
> The following changes since commit
> c2b3a0b3ccb3b114c7e22117cb1fd23f63068bea:
>   JosephChan@via.com.tw (1):
>         (pre-stable) pata_via: Add VIA VX900 support
> 
> are available in the git repository at:
> 
>   git://kernel.ubuntu.com/manjo/ubuntu-lucid.git lp507148upstream
> 
> Dave Airlie (2): drm/radeon/bo: add some fallback placements for VRAM
> only objects.
>       drm/radeon/kms: don't print error on -ERESTARTSYS.
> 
> drivers/gpu/drm/radeon/radeon.h        |    2 ++
>  drivers/gpu/drm/radeon/radeon_cs.c     |    3 ++-
>  drivers/gpu/drm/radeon/radeon_object.c |   10 +++++++---
>  3 files changed, 11 insertions(+), 4 deletions(-)
> 
> From 78f0533f3905dd1b986c58b595185fd63eb6dd93 Mon Sep 17 00:00:00 2001
> From: Dave Airlie <airlied@redhat.com>
> Date: Fri, 19 Mar 2010 10:33:44 +1000
> Subject: [PATCH 2/2] drm/radeon/kms: don't print error on -ERESTARTSYS.
> 
> We can get this if the user moves the mouse when we are waiting to move
> some stuff around in the validate. Don't fail.
> 
BugLink: http://launchpad.net/bugs/507148

> Cc: stable@kernel.org
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> (cherry picked from commit aa98c7cc9153b07d652257149f158c953d15de02 drm-2.6)
> Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/gpu/drm/radeon/radeon_cs.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c
> b/drivers/gpu/drm/radeon/radeon_cs.c
> index e9d0850..de5b7b4 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -246,7 +246,8 @@ int radeon_cs_ioctl(struct drm_device *dev, void
> *data, struct drm_file *filp)
>      }
>      r = radeon_cs_parser_relocs(&parser);
>      if (r) {
> -        DRM_ERROR("Failed to parse relocation !\n");
> +        if (r != -ERESTARTSYS)
> +            DRM_ERROR("Failed to parse relocation %d!\n", r);
>          radeon_cs_parser_fini(&parser, r);
>          mutex_unlock(&rdev->cs_mutex);
>          return r;
Andy Whitcroft - March 30, 2010, 6:05 p.m.
On Tue, Mar 30, 2010 at 10:13:35AM -0500, manoj.iyer@canonical.com wrote:
> 
> Updated patch with information requested.
> 
> The following changes since commit 
> c2b3a0b3ccb3b114c7e22117cb1fd23f63068bea:
>    JosephChan@via.com.tw (1):
>          (pre-stable) pata_via: Add VIA VX900 support
> 
> are available in the git repository at:
> 
>    git://kernel.ubuntu.com/manjo/ubuntu-lucid.git lp507148upstream
> 
> Dave Airlie (2): 
> drm/radeon/bo: add some fallback placements for VRAM only objects.
>        drm/radeon/kms: don't print error on -ERESTARTSYS.
> 
> drivers/gpu/drm/radeon/radeon.h        |    2 ++
>   drivers/gpu/drm/radeon/radeon_cs.c     |    3 ++-
>   drivers/gpu/drm/radeon/radeon_object.c |   10 +++++++---
>   3 files changed, 11 insertions(+), 4 deletions(-)
> 
> From 78f0533f3905dd1b986c58b595185fd63eb6dd93 Mon Sep 17 00:00:00 2001
> From: Dave Airlie <airlied@redhat.com>
> Date: Fri, 19 Mar 2010 10:33:44 +1000
> Subject: [PATCH 2/2] drm/radeon/kms: don't print error on -ERESTARTSYS.
> 
> We can get this if the user moves the mouse when we are waiting to move
> some stuff around in the validate. Don't fail.
> 
> Cc: stable@kernel.org
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> (cherry picked from commit aa98c7cc9153b07d652257149f158c953d15de02)
> 
> Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
> 
> BugLink: http://launchpad.net/bugs/507148
> 
> Cherry-picked from git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
> ---
>   drivers/gpu/drm/radeon/radeon_cs.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index e9d0850..de5b7b4 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -246,7 +246,8 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
>   	}
>   	r = radeon_cs_parser_relocs(&parser);
>   	if (r) {
> -		DRM_ERROR("Failed to parse relocation !\n");
> +		if (r != -ERESTARTSYS)
> +			DRM_ERROR("Failed to parse relocation %d!\n", r);
>   		radeon_cs_parser_fini(&parser, r);
>   		mutex_unlock(&rdev->cs_mutex);
>   		return r;

Works for me:

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

-apw

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index e9d0850..de5b7b4 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -246,7 +246,8 @@  int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
  	}
  	r = radeon_cs_parser_relocs(&parser);
  	if (r) {
-		DRM_ERROR("Failed to parse relocation !\n");
+		if (r != -ERESTARTSYS)
+			DRM_ERROR("Failed to parse relocation %d!\n", r);
  		radeon_cs_parser_fini(&parser, r);
  		mutex_unlock(&rdev->cs_mutex);
  		return r;