public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: Mayank Rungta <mr.mynk@gmail.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	yakui.zhao@intel.com, "A.R Karthick" <a.r.karthick@gmail.com>,
	karthick.linuxdreamer@gmail.com
Subject: Re: [PATCH 2.6.38-10-generic] device driver: fix oops in radeon driver due to incorrect value from hardware
Date: Wed, 10 Aug 2011 11:24:31 +0200	[thread overview]
Message-ID: <1312968271.14630.189.camel@thor.local> (raw)
In-Reply-To: <4E417AF8.7090202@gmail.com>

On Die, 2011-08-09 at 23:52 +0530, Mayank Rungta wrote: 
> Added a check for the radeon ring buffer write index in r600.c which 
> reads 0xffffffff on resume. This results in an Oops during 
> radeon_ring_write. Masking the value averts this.
> 
> This problem is not seen to be fixed in 3.0 r600.c as well.
> 
> Detailed analysis of the problem can be found at -
> 
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/820746/
> 
> ---
> 
> BUG: unable to handle kernel paging request at fa501ffc - Oops at 
> r600_cp_start+0x48/0x380 in r600_cp_resume+0x345/0x580 [radeon]
> 
> drivers/gpu/drm/radeon/r600.c
> 
> 
> 
> --- linux-2.6.38/drivers/gpu/drm/radeon/r600.c.orig    2011-08-05 
> 15:39:40.824612700 +0530
> +++ linux-2.6.38/drivers/gpu/drm/radeon/r600.c    2011-08-08 
> 05:29:21.744417857 +0530
> @@ -2218,6 +2218,8 @@ int r600_cp_resume(struct radeon_device
> 
>       rdev->cp.rptr = RREG32(CP_RB_RPTR);
>       rdev->cp.wptr = RREG32(CP_RB_WPTR);
> +    /* protect against crazy HW on resume */
> +    rdev->cp.wptr &= rdev->cp.ptr_mask;

The indentation of the lines you're adding doesn't match the surrounding
lines.


Although the same workaround is already in r100.c, I wonder if we
shouldn't rather try and eliminate all reads from the CP_RB_WPTR
register, at least other than for debugging purposes. Alex, what do you
think?

Otherwise, this should probably be added in evergreen.c as well.


>          Developer's Certificate of Origin 1.1
> 
>          [...]

No need to include all this text, just the *-by: tags are enough.


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer

  reply	other threads:[~2011-08-10  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 18:22 [PATCH 2.6.38-10-generic] device driver: fix oops in radeon driver due to incorrect value from hardware Mayank Rungta
2011-08-10  9:24 ` Michel Dänzer [this message]
2011-08-10  9:46   ` Mayank Rungta
2011-08-10 13:27   ` Alex Deucher
2011-09-08 13:50     ` Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1312968271.14630.189.camel@thor.local \
    --to=michel@daenzer.net \
    --cc=a.r.karthick@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=karthick.linuxdreamer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mr.mynk@gmail.com \
    --cc=yakui.zhao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox