From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 66932] Screen corruption on Cayman with dpm enabled Date: Wed, 17 Jul 2013 11:09:00 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0186506160==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E74FE674D for ; Wed, 17 Jul 2013 04:09:00 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0186506160== Content-Type: multipart/alternative; boundary="1374059340.4060F40.16233"; charset="us-ascii" --1374059340.4060F40.16233 Date: Wed, 17 Jul 2013 11:09:00 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=66932 --- Comment #12 from Martin Andersson --- Take this information with a grain of salt, since I'm testing stuff without really knowing whats going on. I found it interesting that the dmesg with the mc dump didn't print anything from the first for loop in the patch, so I did some testing. I added a bunch of debug printks to radeon_atom_init_mc_reg_table to see what was happening. I found that num_entries is 13, but what was more interesting was that some printks was skipped and now I got a kernel oops (NULL pointer dereference). It looked like this while loop was executed once (without problems), then strange things happended: while (!(reg_block->asRegIndexBuf[i].ucPreRegDataLength & ACCESS_PLACEHOLDER)... So I added this printk before and after "i++;" in that while loop: printk(KERN_INFO "debug=%u", reg_block->asRegIndexBuf[i].ucPreRegDataLength); gcc didn't complain about the first printk but for the second it said this: drivers/gpu/drm/radeon/radeon_atombios.c:3741:60: warning: array subscript is above array bounds [-Warray-bounds] It might be a false positive but it matches with my debug printks, everything is fine until the second iteration in that while loop. After that the execution jumps further down in the function and crashes. -- You are receiving this mail because: You are the assignee for the bug. --1374059340.4060F40.16233 Date: Wed, 17 Jul 2013 11:09:00 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 12 on bug 66932 from
Take this information with a grain of salt, since I'm testing stuff without
really knowing whats going on.

I found it interesting that the dmesg with the mc dump didn't print anything
from the first for loop in the patch, so I did some testing.

I added a bunch of debug printks to radeon_atom_init_mc_reg_table to see what
was happening. I found that num_entries is 13, but what was more interesting
was that some printks was skipped and now I got a kernel oops (NULL pointer
dereference).

It looked like this while loop was executed once (without problems), then
strange things happended:
while (!(reg_block->asRegIndexBuf[i].ucPreRegDataLength &
ACCESS_PLACEHOLDER)...

So I added this printk before and after "i++;" in that while loop:
printk(KERN_INFO "debug=%u", reg_block->asRegIndexBuf[i].ucPreRegDataLength);

gcc didn't complain about the first printk but for the second it said this:
drivers/gpu/drm/radeon/radeon_atombios.c:3741:60: warning: array subscript is
above array bounds [-Warray-bounds]

It might be a false positive but it matches with my debug printks, everything
is fine until the second iteration in that while loop. After that the execution
jumps further down in the function and crashes.


You are receiving this mail because:
  • You are the assignee for the bug.
--1374059340.4060F40.16233-- --===============0186506160== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0186506160==--