NetBSD Problem Report #57079

From o.vd.linden@quicknet.nl  Wed Nov  9 19:56:45 2022
Return-Path: <o.vd.linden@quicknet.nl>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1BD3A1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  9 Nov 2022 19:56:45 +0000 (UTC)
Message-Id: <Y2v2RS28REiqRmCI@sheep>
Date: Wed, 9 Nov 2022 19:49:41 +0100
From: Onno van der Linden <o.vd.linden@quicknet.nl>
Reply-To:
To: gnats-bugs@netbsd.org
Subject: videcards from the radeon oland family have no VCE

>Number:         57079
>Category:       kern
>Synopsis:       videcards from the radeon oland family have no VCE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 09 20:00:00 +0000 2022
>Last-Modified:  Wed Feb 01 01:46:51 +0000 2023
>Originator:     Onno van der Linden <o.vd.linden@quicknet.nl>
>Release:        NetBSD 9.99.104
>Organization:

>Environment:
System: NetBSD sheep 9.99.104 NetBSD 9.99.104 (SHEEPRAD) #0: Tue Nov 8 19:55:36 CET 2022 root@sheep:/usr/src/sys/arch/amd64/compile/SHEEPRAD amd64
Architecture: x86_64
Machine: amd64
>Description:
Booting current with an AMD Radeon R7 240 videocard in a machine with
an Intel Haswell chipset gives me 2 errors:

[     3.686110] radeon0: autoconfiguration error: error: failed VCE resume (-60).

and

[     3.686110] [drm] radeon: irq initialized.
[     3.966110] {drm:netbsd:r600_ring_test+0x244} *ERROR* radeon: ring 0 test failed (scratch(0x850C)=0xCAFEDEAD)
[     3.966110] radeon0: autoconfiguration error: error: disabling GPU acceleration

No idea yet about the last error, fix for the first one was fairly easy to find.

>How-To-Repeat:

Boot my machine.

>Fix:
https://cgit.freedesktop.org/drm/drm-tip/patch/drivers/gpu/drm/radeon?id=7e6435c14a426ccb7bedea179fe0e8666c4ea1b8

--- /usr/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.c.orig	2021-12-19 00:45:43.000000000 +0100
+++ /usr/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.c	2022-11-09 19:30:35.964524655 +0100
@@ -2504,6 +2504,9 @@
 		if (rdev->family == CHIP_HAINAN) {
 			rdev->has_uvd = false;
 			rdev->has_vce = false;
+		} else if (rdev->family == CHIP_OLAND) {
+			rdev->has_uvd = true;
+			rdev->has_vce = false;
 		} else {
 			rdev->has_uvd = true;
 			rdev->has_vce = true;
--- /usr/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c.orig	2021-12-19 00:45:43.000000000 +0100
+++ /usr/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c	2022-11-09 19:21:19.305588662 +0100
@@ -111,7 +111,6 @@
 	case CHIP_TAHITI:
 	case CHIP_PITCAIRN:
 	case CHIP_VERDE:
-	case CHIP_OLAND:
 	case CHIP_ARUBA:
 		fw_name = FIRMWARE_TAHITI;
 		break;
--- /usr/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce_v1_0.c.orig	2021-12-19 00:45:43.000000000 +0100
+++ /usr/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce_v1_0.c	2022-11-09 19:22:02.565502470 +0100
@@ -173,7 +173,6 @@
 		chip_id = 0x01000015;
 		break;
 	case CHIP_PITCAIRN:
-	case CHIP_OLAND:
 		chip_id = 0x01000016;
 		break;
 	case CHIP_ARUBA:

>Release-Note:

>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: re: kern/57079: videcards from the radeon oland family have no VCE
Date: Thu, 10 Nov 2022 19:03:35 +1100

 > [     3.686110] [drm] radeon: irq initialized.
 > [     3.966110] {drm:netbsd:r600_ring_test+0x244} *ERROR* radeon: ring 0=
  test failed (scratch(0x850C)=3D0xCAFEDEAD)
 > [     3.966110] radeon0: autoconfiguration error: error: disabling GPU a=
 cceleration
 >
 > No idea yet about the last error, fix for the first one was fairly easy =
 to find.

 the last error is, IME, machine-specific.  there's a class
 of radeons that fail on my ryzen 5600G, but not a ryzen
 3950X or ryzen 3600.  i've seen the failure with 5450,
 6340, and an R240 (just like you :-), but all those cards
 work fine in the 3600.  the same physical card, not just
 the same model.

 eg, PR#56714 has this line in it:

 kern error: [drm:([...]radeon_r600_dma.c:274)r600_dma_ring_test] *ERROR* r=
 adeon: ring 3 test failed (0xCAFEDEAD)

 that i believe is the same error (though ring 0 above is
 less common, mostly i see ring 3, but it's the same test
 being performed.)

 fortunately, the 5600G is fast enough that most of the
 time i don't care about the lack of accel... :-)


 .mrg.

>Unformatted:
 Submitter-Id:	net
 Originator:	
 Organization:
 Confidential:	no
 Synopsis: videcards from the radeon oland family have no VCE

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.