Date: Sat, 14 Sep 2013 17:22:34 +0000 (UTC) From: Jean-Sebastien Pedron <dumbbell@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255572 - head/sys/dev/drm2/radeon Message-ID: <201309141722.r8EHMYcX060569@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dumbbell Date: Sat Sep 14 17:22:34 2013 New Revision: 255572 URL: http://svnweb.freebsd.org/changeset/base/255572 Log: drm/radeon: Fix usage of vga_pci_map_bios() vga_pci_(un)map_bios() takes a vgapci device as argument, not a drmn one. This fixes a bug where the BIOS couldn't be mapped if the device wasn't the boot display. Approved by: re (kib; blanket for following drm2/radeon commits) Modified: head/sys/dev/drm2/radeon/radeon_bios.c Modified: head/sys/dev/drm2/radeon/radeon_bios.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_bios.c Sat Sep 14 17:17:32 2013 (r255571) +++ head/sys/dev/drm2/radeon/radeon_bios.c Sat Sep 14 17:22:34 2013 (r255572) @@ -100,14 +100,16 @@ static bool igp_read_bios_from_vram(stru static bool radeon_read_bios(struct radeon_device *rdev) { + device_t vga_dev; uint8_t __iomem *bios; size_t size; DRM_INFO("%s: ===> Try PCI Expansion ROM...\n", __func__); + vga_dev = device_get_parent(rdev->dev); rdev->bios = NULL; /* XXX: some cards may return 0 for rom size? ddx has a workaround */ - bios = vga_pci_map_bios(rdev->dev, &size); + bios = vga_pci_map_bios(vga_dev, &size); if (!bios) { return false; } @@ -120,11 +122,11 @@ static bool radeon_read_bios(struct rade DRM_INFO("%s: Incorrect BIOS signature: 0x%02X%02X\n", __func__, bios[0], bios[1]); } - vga_pci_unmap_bios(rdev->dev, bios); + vga_pci_unmap_bios(vga_dev, bios); } rdev->bios = malloc(size, DRM_MEM_DRIVER, M_WAITOK); memcpy(rdev->bios, bios, size); - vga_pci_unmap_bios(rdev->dev, bios); + vga_pci_unmap_bios(vga_dev, bios); return true; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309141722.r8EHMYcX060569>