Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon get pd_rom_bst and pd_...



details:   https://anonhg.NetBSD.org/src/rev/ddde2ea8ce7a
branches:  trunk
changeset: 992909:ddde2ea8ce7a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 13:55:59 2018 +0000

description:
get pd_rom_bst and pd_rom_found_bsh _after_ pci_map_rom

fixes early attach panic.


Author: coypu <coypu%sdf.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r 9975b95160c4 -r ddde2ea8ce7a sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c       Mon Aug 27 13:55:46 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c       Mon Aug 27 13:55:59 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_bios.c,v 1.5 2018/08/27 04:58:36 riastradh Exp $        */
+/*     $NetBSD: radeon_bios.c,v 1.6 2018/08/27 13:55:59 riastradh Exp $        */
 
 /*
  * Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *          Jerome Glisse
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_bios.c,v 1.5 2018/08/27 04:58:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_bios.c,v 1.6 2018/08/27 13:55:59 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include "radeon_reg.h"
@@ -110,10 +110,6 @@
 
 static bool radeon_read_bios(struct radeon_device *rdev)
 {
-#ifdef __NetBSD__
-       const bus_space_tag_t bst = rdev->pdev->pd_rom_bst;
-       const bus_space_handle_t bsh = rdev->pdev->pd_rom_found_bsh;
-#endif
        uint8_t __iomem *bios, val1, val2;
        size_t size;
 
@@ -125,6 +121,9 @@
        }
 
 #ifdef __NetBSD__
+       const bus_space_tag_t bst = rdev->pdev->pd_rom_bst;
+       const bus_space_handle_t bsh = rdev->pdev->pd_rom_found_bsh;
+
        val1 = bus_space_read_1(bst, bsh, 0);
        val2 = bus_space_read_1(bst, bsh, 1);
 #else



Home | Main Index | Thread Index | Old Index