Bug 33851 - [KMS Evergreen bisected] Crash on modeset on HP dv6-3050eo laptop
Summary: [KMS Evergreen bisected] Crash on modeset on HP dv6-3050eo laptop
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 13:44 UTC by Antti Lahtinen
Modified: 2011-02-02 16:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Hack that allows me to boot on recent kernels. (2.77 KB, patch)
2011-02-02 13:44 UTC, Antti Lahtinen
no flags Details | Splinter Review
dmesg on latest kernel with my patch (37.14 KB, text/plain)
2011-02-02 13:48 UTC, Antti Lahtinen
no flags Details
lspci -vvv (27.20 KB, text/plain)
2011-02-02 13:50 UTC, Antti Lahtinen
no flags Details
vbios (64.00 KB, application/octet-stream)
2011-02-02 15:07 UTC, Antti Lahtinen
no flags Details
dynamically allocate power state space (6.12 KB, patch)
2011-02-02 15:40 UTC, Alex Deucher
no flags Details | Splinter Review
Here is another vbios if still needed (64.00 KB, application/octet-stream)
2011-02-02 15:46 UTC, Antti Lahtinen
no flags Details

Description Antti Lahtinen 2011-02-02 13:44:04 UTC
Created attachment 42866 [details] [review]
Hack that allows me to boot on recent kernels.

My HP Pavilion dv6-3050eo laptop does not boot anymore with 2.6.38-rc1 or 2.6.38-rc3 kernels. It freezes when doing modeset. It only boots without KMS. I bisected the problem to this commit:

commit 9ace9f7b168fef492f731ba60da5c76bc0776e6d
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Thu Jan 6 21:19:26 2011 -0500

drm/radeon/kms: adjust default clock/vddc tracking for pm on DCE5


Partially reverting this patch allows me to boot with KMS on 2.6.38-rc3. I'm attaching a patch that fixes the problem for me and it also adds some printks.

Here are the results of those printks:

radeon_pm_init clock.default_sclk 10000
radeon_pm_init clock.default_mclk 15700
radeon_set_power_state sclk 10000
radeon_set_power_state clock.default_sclk 10000
radeon_set_power_state pm.default_sclk 900
radeon_set_power_state mclk 15700
radeon_set_power_state clock.default_mclk 15700
radeon_set_power_state pm.default_mclk 15701

I suppose that number 900 (9 MHz?) is causing the lockup, but I couldn't figure out where it comes from. (And apparently radeon_pm_resume is never called so that part of the patch may be just noise.)

This laptop is equipped with Intel+Evergreen switchable graphics and there is
no BIOS option to turn off GPU switching. The attached patch allows me to boot
with 2.6.38-rc3 KMS enabled but if I start Xorg and Radeon GPU is active the
system seems to freeze again. (But this might be a different problem.) If Intel
GPU is active Xorg starts just fine.

With kernel 2.6.37 (-rc8?) modesettings works AND Xorg works with both Intel
and Radeon GPUs.

I suppose I also need to add that Linux Radeon 3D has never worked properly on
this laptop. 3D works only on Win 7. R600c can sometimes run glxgears if I'm
careful. R600g usually hard locks the computer right away. But again, this
might be a different problem and I haven't been able to test this recently.
Comment 1 Antti Lahtinen 2011-02-02 13:48:46 UTC
Created attachment 42867 [details]
dmesg on latest kernel with my patch
Comment 2 Antti Lahtinen 2011-02-02 13:50:10 UTC
Created attachment 42868 [details]
lspci -vvv
Comment 3 Alex Deucher 2011-02-02 14:44:08 UTC
Please attach a copy of your vbios:

(as root)
(use lspci to get the bus id)
cd /sys/bus/pci/devices/<pci bus id>
echo 1 > rom
cat rom > /tmp/vbios.rom
echo 0 > rom
Comment 4 Antti Lahtinen 2011-02-02 15:07:08 UTC
Created attachment 42875 [details]
vbios
Comment 5 Alex Deucher 2011-02-02 15:23:23 UTC
I see the problem, you have more power modes than space allocated to hold them.  This patch should fix the issue:

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 49a6890..59750dc 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -815,7 +815,7 @@ struct radeon_pm {
        fixed20_12              mclk;
        fixed20_12              needed_bandwidth;
        /* XXX: use a define for num power modes */
-       struct radeon_power_state power_state[8];
+       struct radeon_power_state power_state[16];
        /* number of valid power states */
        int                     num_power_states;
        int                     current_power_state_index;


I'll write up a better one to dynamically allocate space depending on the number of tables.
Comment 6 Alex Deucher 2011-02-02 15:25:55 UTC
(In reply to comment #4)
> Created an attachment (id=42875) [details]
> vbios

This looks like the intel vbios unfortunately.
Comment 7 Alex Deucher 2011-02-02 15:40:30 UTC
Created attachment 42878 [details] [review]
dynamically allocate power state space

This patch should fix the issue.
Comment 8 Antti Lahtinen 2011-02-02 15:46:59 UTC
Created attachment 42879 [details]
Here is another vbios if still needed
Comment 9 Antti Lahtinen 2011-02-02 16:07:51 UTC
Thank you! You were right. I tested both patches and they both seem to work. Even Xorg and OpenGL seem to work now. --> FIXED
Comment 10 Alex Deucher 2011-02-02 16:11:36 UTC
I've sent the patch to Dave for 2.6.38 and stable.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.