From owner-svn-src-all@FreeBSD.ORG Sat Sep 14 17:22:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C1C72ADF; Sat, 14 Sep 2013 17:22:34 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A491C20AC; Sat, 14 Sep 2013 17:22:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8EHMYvc060570; Sat, 14 Sep 2013 17:22:34 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8EHMYcX060569; Sat, 14 Sep 2013 17:22:34 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201309141722.r8EHMYcX060569@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sat, 14 Sep 2013 17:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255572 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Sep 2013 17:22:34 -0000 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; }