Re: [BUG/REGRESSION] Radeon HDMI casuses oops on Acube Sam460ex amcc 460ex power board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 17, 2015 at 7:20 PM, Julian Margetson <runaway@xxxxxxxx> wrote:
> Kernels 4.03 and 4.04  oops with HDMI connection on Acube Sam460ex amcc
> 460ex powerpc  board.
>
> 016a255b7835ee7e49a3eba3c14ba0bc0221a4f8 is the first bad commit
>
> commit 016a255b7835ee7e49a3eba3c14ba0bc0221a4f8
> Author: Alex Deucher <alexander.deucher@xxxxxxx>
> Date:   Tue Apr 7 09:52:42 2015 -0400
>
>     drm/radeon: only mark audio as connected if the monitor supports it (v3)
>
>     commit 0f55db36d49d45b80eff0c0a2a498766016f458b upstream.
>
>     Otherwise the driver may try and send audio which may confuse the
>     monitor.
>
>     v2: set pin to NULL if no audio
>     v3: avoid crash with analog encoders
>
>     Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
>     Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> :040000 040000 de0366a6790f5c91d175bcb89cb34956bbe72b26
> bbdb5734961f824558152c7c34a840c78bc3a9a9 M drivers
>

The attached patch should fix it up.

Alex


>
>
> [    2.587570] Linux agpgart interface v0.103
> [    2.591997] [drm] Initialized drm 1.1.0 20060810
> [    2.596892] [drm] radeon kernel modesetting enabled.
> [    2.602989] [drm] initializing kernel modesetting (VERDE 0x1002:0x683F
> 0x1545:0x7750).
> [    2.611161] [drm] register mmio base: 0xe90000000
> [    2.615935] [drm] register mmio size: 262144
> [    2.952043] ATOM BIOS: C44501
> [    2.955323] radeon 0001:81:00.0: VRAM: 1024M 0x0000000000000000 -
> 0x000000003FFFFFFF (1024M used)
> [    2.964253] radeon 0001:81:00.0: GTT: 1024M 0x0000000040000000 -
> 0x000000007FFFFFFF
> [    2.971938] [drm] Detected VRAM RAM=1024M, BAR=256M
> [    2.976840] [drm] RAM width 128bits DDR
> [    2.980898] [TTM] Zone  kernel: Available graphics memory: 379358 kiB
> [    2.987383] [TTM] Zone highmem: Available graphics memory: 1034718 kiB
> [    2.993934] [TTM] Initializing pool allocator
> [    2.998331] [TTM] Initializing DMA pool allocator
> [    3.003153] [drm] radeon: 1024M of VRAM memory ready
> [    3.008162] [drm] radeon: 1024M of GTT memory ready.
> [    3.013203] [drm] Loading verde Microcode
> [    3.017266] [drm] Internal thermal controller with fan control
> [    3.023437] [drm] probing gen 2 caps for device aaa1:bed1 = 18cc41/0
> [    3.077284] [drm] radeon: dpm initialized
> [    3.081503] [drm] GART: num cpu pages 262144, num gpu pages 262144
> [    3.093142] [drm] probing gen 2 caps for device aaa1:bed1 = 18cc41/0
> [    3.125984] [drm] PCIE GART of 1024M enabled (table at
> 0x0000000000277000).
> [    3.133327] radeon 0001:81:00.0: WB enabled
> [    3.137565] radeon 0001:81:00.0: fence driver on ring 0 use gpu addr
> 0x0000000040000c00 and cpu addr 0xffc01c00
> [    3.147697] radeon 0001:81:00.0: fence driver on ring 1 use gpu addr
> 0x0000000040000c04 and cpu addr 0xffc01c04
> [    3.157827] radeon 0001:81:00.0: fence driver on ring 2 use gpu addr
> 0x0000000040000c08 and cpu addr 0xffc01c08
> [    3.167957] radeon 0001:81:00.0: fence driver on ring 3 use gpu addr
> 0x0000000040000c0c and cpu addr 0xffc01c0c
> [    3.178078] radeon 0001:81:00.0: fence driver on ring 4 use gpu addr
> 0x0000000040000c10 and cpu addr 0xffc01c10
> [    3.209673] radeon 0001:81:00.0: fence driver on ring 5 use gpu addr
> 0x0000000000075a18 and cpu addr 0xf90b5a18
> [    3.219822] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
> [    3.226457] [drm] Driver supports precise vblank timestamp query.
> [    3.232584] radeon 0001:81:00.0: radeon: MSI limited to 32-bit
> [    3.238466] ppc4xx_setup_msi_irqs: fail allocating msi interrupt
> [    3.244586] [drm] radeon: irq initialized.
> [    4.006339] [drm:r600_ring_test] *ERROR* radeon: ring 0 test failed
> (scratch(0x850C)=0xCAFEDEAD)
> [    4.015198] radeon 0001:81:00.0: disabling GPU acceleration
> [    4.220071] [drm] Radeon Display Connectors
> [    4.224651] [drm] Connector 0:
> [    4.227787] [drm]   HDMI-A-1
> [    4.230754] [drm]   HPD4
> [    4.233328] [drm]   DDC: 0x6570 0x6570 0x6574 0x6574 0x6578 0x6578 0x657c
> 0x657c
> [    4.240806] [drm]   Encoders:
> [    4.243815] [drm]     DFP1: INTERNAL_UNIPHY2
> [    4.248131] [drm] Connector 1:
> [    4.251227] [drm]   DVI-I-1
> [    4.254051] [drm]   HPD2
> [    4.256608] [drm]   DDC: 0x6560 0x6560 0x6564 0x6564 0x6568 0x6568 0x656c
> 0x656c
> [    4.264034] [drm]   Encoders:
> [    4.267021] [drm]     DFP2: INTERNAL_UNIPHY
> [    4.271223] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
> [    4.390562] [drm] fb mappable at 0x80478000
> [    4.394789] [drm] vram apper at 0x80000000
> [    4.398905] [drm] size 8294400
> [    4.401978] [drm] fb depth is 24
> [    4.405225] [drm]    pitch is 7680
> [    4.700581] Console: switching to colour frame buffer device 240x67
> [    4.779669] radeon 0001:81:00.0: fb0: radeondrmfb frame buffer device
> [    4.786489] radeon 0001:81:00.0: registered panic notifier
> [    4.796803] [drm] Initialized radeon 2.41.0 20080528 for 0001:81:00.0 on
> minor 0
>
> [   31.191562] Unable to handle kernel paging request for data at address
> 0x00000008
> [   31.258832] Faulting instruction address: 0xc04a51bc
> [   34.049506] Oops: Kernel access of bad area, sig: 11 [#1]
> [   34.055246] PREEMPT Canyonlands
> [   34.058586] Modules linked in:
> [   34.061830] CPU: 0 PID: 1998 Comm: Xorg Not tainted 4.0.3-Sam460ex #2
> [   34.068633] task: edee4c60 ti: ede8a000 task.ti: ede8a000
> [   34.074334] NIP: c04a51bc LR: c04a546c CTR: c03e5050
> [   34.079578] REGS: ede8bc30 TRAP: 0300   Not tainted  (4.0.3-Sam460ex)
> [   34.086381] MSR: 00029000 <CE,EE,ME>  CR: 20004422  XER: 00000000
> [   34.092944] DEAR: 00000008 ESR: 00000000
> GPR00: c04a5438 ede8bce0 edee4c60 eea84000 00000000 00000000 c0710000
> 00000000
> GPR08: 00000000 00000000 eeac0400 ede8bce0 20004444 b7a55afc b80efab0
> b80ee530
> GPR16: 00000000 ffffffff 6f23c730 ede8be18 c03add44 eeac0578 00000001
> 00004000
> GPR24: 00004000 c0719b98 fffffff2 00000001 eeb61200 eea84000 eea8df00
> 00000000
> [   34.127485] NIP [c04a51bc] radeon_audio_enable+0x4/0x18
> [   34.133000] LR [c04a546c] radeon_audio_detect+0xd4/0x104
> [   34.138604] Call Trace:
> [   34.141185] [ede8bce0] [c04a5438] radeon_audio_detect+0xa0/0x104
> (unreliable)
> [   34.148771] [ede8bd00] [c03e6958] radeon_dvi_detect+0x390/0x3b4
> [   34.155046] [ede8bd30] [c0391cec]
> drm_helper_probe_single_connector_modes_merge_bits+0xf4/0x448
> [   34.164253] [ede8bd70] [c03ade28] drm_mode_getconnector+0xe4/0x334
> [   34.170796] [ede8be10] [c03a0be8] drm_ioctl+0x348/0x464
> [   34.176343] [ede8bed0] [c00ce2e8] do_vfs_ioctl+0x52c/0x6e8
> [   34.182158] [ede8bf20] [c00ce4e4] SyS_ioctl+0x40/0x68
> [   34.187515] [ede8bf40] [c000ab1c] ret_from_syscall+0x0/0x3c
> [   34.193417] --- interrupt: c01 at 0x6fb001dc
> [   34.193417]     LR = 0x6fb00100
> [   34.201216] Instruction dump:
> [   34.204368] 8129012c 806a0018 2f890000 419e0018 81290004 2f890000
> 419e000c 7d2903a6
> [   34.212674] 4e800420 38600000 4e800020 81231cd8 <81290008> 2f890000
> 4d9e0020 7d2903a6
> [   34.376219] ---[ end trace 803e15e46b991816 ]---
> [   34.380843]
>  * Starting Mount filesystems on boot[ OK ]
>  *
>
>
>
From 0907a035e67344d2a1f3a840599bb9e298092a9d Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@xxxxxxx>
Date: Mon, 18 May 2015 12:04:02 -0400
Subject: [PATCH] drm/radeon: properly select encoder in radeon_audio_detect

Need to handle DVI where we way end up with an analog encoder
in some cases.

Reported-by: Julian Margetson <runaway@xxxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
 drivers/gpu/drm/radeon/radeon_audio.c      | 18 ++++++++++--------
 drivers/gpu/drm/radeon/radeon_connectors.c |  2 +-
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index dcb7796..31b60f6 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -453,22 +453,24 @@ void radeon_audio_enable(struct radeon_device *rdev,
 void radeon_audio_detect(struct drm_connector *connector,
 			 enum drm_connector_status status)
 {
-	struct radeon_device *rdev;
-	struct radeon_encoder *radeon_encoder;
+	struct drm_device *dev = connector->dev;
+	struct radeon_device *rdev = dev->dev_private;
 	struct radeon_encoder_atom_dig *dig;
+	const struct drm_connector_helper_funcs *connector_funcs =
+		connector->helper_private;
+	struct drm_encoder *encoder = connector_funcs->best_encoder(connector);
+	struct radeon_encoder *radeon_encoder;
 
-	if (!connector || !connector->encoder)
+	if (!connector || !encoder)
 		return;
 
-	if (!radeon_encoder_is_digital(connector->encoder))
+	if (!radeon_encoder_is_digital(encoder))
 		return;
 
-	rdev = connector->encoder->dev->dev_private;
-
 	if (!radeon_audio_chipset_supported(rdev))
 		return;
 
-	radeon_encoder = to_radeon_encoder(connector->encoder);
+	radeon_encoder = to_radeon_encoder(encoder);
 	dig = radeon_encoder->enc_priv;
 
 	if (!dig->afmt)
@@ -484,7 +486,7 @@ void radeon_audio_detect(struct drm_connector *connector,
 		else
 			radeon_encoder->audio = rdev->audio.hdmi_funcs;
 
-		dig->afmt->pin = radeon_audio_get_pin(connector->encoder);
+		dig->afmt->pin = radeon_audio_get_pin(encoder);
 		if (drm_detect_monitor_audio(radeon_connector_edid(connector))) {
 			radeon_audio_enable(rdev, dig->afmt->pin, 0xf);
 		} else {
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index d17d251..c251eac 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1379,7 +1379,7 @@ out:
 	/* updated in get modes as well since we need to know if it's analog or digital */
 	radeon_connector_update_scratch_regs(connector, ret);
 
-	if (radeon_audio != 0) {
+	if ((radeon_audio != 0) && (radeon_connector->use_digital)) {
 		radeon_connector_get_edid(connector);
 		radeon_audio_detect(connector, ret);
 	}
-- 
1.8.3.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux