Bug 97460 - [drm][amdgpu][CIK] drm_sysfs_connector - BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
Summary: [drm][amdgpu][CIK] drm_sysfs_connector - BUG: unable to handle kernel NULL po...
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-24 05:04 UTC by Shawn Starr
Modified: 2016-08-31 13:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Dmesg of kernel bootup - 4.7.0 kernel (71.54 KB, text/plain)
2016-08-24 05:04 UTC, Shawn Starr
no flags Details
workaround (1.24 KB, patch)
2016-08-24 16:50 UTC, Alex Deucher
no flags Details | Splinter Review
additional workaround (1.31 KB, patch)
2016-08-24 17:08 UTC, Alex Deucher
no flags Details | Splinter Review

Description Shawn Starr 2016-08-24 05:04:56 UTC
Created attachment 125990 [details]
Dmesg of kernel bootup - 4.7.0 kernel

When trying to enable Switchable Graphics, I am unable to bootup.

With 4.7.0 it booted but no X display could start
With 4.8-rcX it deadlocks on bootup now.

1) If the LCD (LVDS) display lid is open, no such kernel panic message is displayed and deadlocks bootup.
2) It the lid is closed, a panic message is shown (and deadlocks bootup).

Trying to enable PRIME on AMDGPU with CIK experimental enabled fails. attached to this BZ is dmesg of oops from 4.7.0 kernel, the stack is the same for 4.8-rcX.

PRIME has never worked for me on AMDGPU it has worked on regular radeon however.
Comment 1 Shawn Starr 2016-08-24 15:16:32 UTC
Adding some debug when not using Switchable Graphics:

[   10.048669] [drm] amdgpu_connector_add(): dp bridge encoder name: 0x1e
[   10.048672] [drm] amdgpu_connector_add() no dp_bridge: connecter_type found: 7
[   10.048684] [drm] forcing LVDS-1 connector OFF
[   10.048721] [drm] amdgpu_connector_add(): dp bridge encoder name: 0x20
[   10.048724] [drm] amdgpu_connector_add() no dp_bridge: connecter_type found: 10
[   10.048811] [drm] amdgpu_connector_add(): dp bridge encoder name: 0x20
[   10.048814] [drm] amdgpu_connector_add() no dp_bridge: connecter_type found: 10
[   10.048877] [drm] amdgpu_connector_add(): dp bridge encoder name: 0x21
[   10.048880] [drm] amdgpu_connector_add() no dp_bridge: connecter_type found: 10
[   10.048933] [drm] amdgpu_connector_add(): dp bridge encoder name: 0x15
[   10.048937] [drm] amdgpu_connector_add() no dp_bridge: connecter_type found: 1

When using Switchable Graphics:

[   X.XXXXXXX] [drm] amdgpu_connector_add(): dp bridge encoder name: 0x1e
[   X.XXXXXXX] [drm] amdgpu_connector_add() no dp_bridge: connecter_type found: -16345243

Then we panic/deadlock.

amdgpu_atombios_get_connector_info_from_object_table() vs radeon_get_atom_connector_info_from_object_table()

Perhaps there's a bug in the parsing? This works fine with radeon.ko.
Comment 2 Alex Deucher 2016-08-24 16:50:49 UTC
Created attachment 126010 [details] [review]
workaround

This patch should work around the crash.  No idea why the bios is broken in amdgpu and fine on radeon in the switchable gfx case.
Comment 3 Alex Deucher 2016-08-24 17:08:17 UTC
Created attachment 126011 [details] [review]
additional workaround

Skip analog TV and CV connectors as the hw doesn't support them.
Comment 4 Shawn Starr 2016-08-24 17:58:28 UTC
This patch worksaround issue for me thank you Alex for your help on IRC debugging this today
Comment 5 Shawn Starr 2016-08-31 03:29:23 UTC
*** Bug 96470 has been marked as a duplicate of this bug. ***
Comment 6 Alex Deucher 2016-08-31 13:34:21 UTC
Workaround committed.


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.