NetBSD-Bugs archive

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

Re: kern/49964: DRM/KMS panic with Radeon hardware



The following reply was made to PR kern/49964; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost
Cc: 
Subject: Re: kern/49964: DRM/KMS panic with Radeon hardware
Date: Tue, 13 Oct 2015 00:20:46 +0000

 This is a multi-part message in MIME format.
 --=_G90APvgBkR83Vn9vjF6aFMoy/cVA3JYh
 
 The relevant part of the error is that the radeon driver was unable to
 read the video bios.  I asked asau@ privately to try to dump it from
 [0xc0000, 0xe0000), and it looked like a plausible video bios to me --
 so the next step is to try to find why every way radeon_get_bios tries
 to get it fails.
 
 First: can you send the output of `pcictl pci0 dump -b <bus> -d <dev>
 -f <func>', where <bus>/<dev>/<func> are whatever locators the radeon
 device is at?
 
 Second: can you apply the attached patch to instrument the attempts to
 read the video bios with debug prints, and try again?
 
 --=_G90APvgBkR83Vn9vjF6aFMoy/cVA3JYh
 Content-Type: text/plain; charset="ISO-8859-1"; name="radeon"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="radeon.patch"
 
 Index: sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c,v
 retrieving revision 1.4
 diff -p -u -r1.4 radeon_bios.c
 --- sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c	24 Jun 2015 18:23:2=
 3 -0000	1.4
 +++ sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c	13 Oct 2015 00:20:0=
 9 -0000
 @@ -56,9 +56,13 @@ static bool igp_read_bios_from_vram(stru
  	resource_size_t size =3D 256 * 1024; /* ??? */
  #endif
 =20
 +	DRM_ERROR("\n");
 +
  	if (!(rdev->flags & RADEON_IS_IGP))
 -		if (!radeon_card_posted(rdev))
 +		if (!radeon_card_posted(rdev)) {
 +			DRM_ERROR("card not posted\n");
  			return false;
 +		}
 =20
  	rdev->bios =3D NULL;
  #ifdef __NetBSD__
 @@ -66,13 +70,16 @@ static bool igp_read_bios_from_vram(stru
  		/* XXX Dunno what type to expect here; fill me in...  */
  		pci_mapreg_type(rdev->pdev->pd_pa.pa_pc,
  		    rdev->pdev->pd_pa.pa_tag, PCI_BAR(0)),
 -		0, &bst, &bsh, NULL, &size))
 +		0, &bst, &bsh, NULL, &size)) {
 +		DRM_ERROR("failed to map PCI BAR 0\n");
  		return false;
 +	}
  	if ((size =3D=3D 0) ||
  	    (size < 256 * 1024) ||
  	    (bus_space_read_1(bst, bsh, 0) !=3D 0x55) ||
  	    (bus_space_read_1(bst, bsh, 1) !=3D 0xaa) ||
  	    ((rdev->bios =3D kmalloc(size, GFP_KERNEL)) =3D=3D NULL)) {
 +		DRM_ERROR("bad-looking vbios or allocation failed\n");
  		bus_space_unmap(bst, bsh, size);
  		return false;
  	}
 @@ -113,6 +120,7 @@ static bool radeon_read_bios(struct rade
  	/* XXX: some cards may return 0 for rom size? ddx has a workaround */
  	bios =3D pci_map_rom(rdev->pdev, &size);
  	if (!bios) {
 +		DRM_ERROR("pci_map_rom failed\n");
  		return false;
  	}
 =20
 @@ -130,11 +138,13 @@ static bool radeon_read_bios(struct rade
  	if (size =3D=3D 0 ||
  	    bus_space_read_1(bst, bsh, 0) !=3D 0x55 ||
  	    bus_space_read_1(bst, bsh, 1) !=3D 0xaa) {
 +		DRM_ERROR("bad-looking vbios\n");
  		pci_unmap_rom(rdev->pdev, bios);
  		return false;
  	}
  	rdev->bios =3D kmalloc(size, GFP_KERNEL);
  	if (rdev->bios =3D=3D NULL) {
 +		DRM_ERROR("allocation failed\n");
  		pci_unmap_rom(rdev->pdev, bios);
  		return false;
  	}
 
 --=_G90APvgBkR83Vn9vjF6aFMoy/cVA3JYh--
 


Home | Main Index | Thread Index | Old Index