CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: jmcneill Date: Fri Jan 24 11:44:27 UTC 2020 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_pci.c Log Message: If radeon attaches, prevent simplefb from claiming the console To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/radeon/radeon_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.13 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.14 --- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.13 Mon Aug 27 14:12:14 2018 +++ src/sys/external/bsd/drm2/radeon/radeon_pci.c Fri Jan 24 11:44:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_pci.c,v 1.13 2018/08/27 14:12:14 riastradh Exp $ */ +/* $NetBSD: radeon_pci.c,v 1.14 2020/01/24 11:44:27 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,10 +30,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.13 2018/08/27 14:12:14 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.14 2020/01/24 11:44:27 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "vga.h" +#if defined(__arm__) || defined(__aarch64__) +#include "opt_fdt.h" +#endif #endif #include @@ -60,6 +63,10 @@ __KERNEL_RCSID(0, "$NetBSD: radeon_pci.c #include #endif +#ifdef FDT +#include +#endif + #include #include @@ -201,6 +208,15 @@ radeon_attach(device_t parent, device_t "i386 radeondrmkms hack\n"); #endif +#ifdef FDT + /* + * XXX Remove the simple framebuffer, assuming that this device + * will take over. + */ + const char *fb_compatible[] = { "simple-framebuffer", NULL }; + fdt_remove_bycompat(fb_compatible); +#endif + config_mountroot(self, &radeon_attach_real); }
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: kre Date: Sun Jan 27 05:05:37 UTC 2019 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Fix merge botch To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.23 src/sys/external/bsd/drm2/radeon/files.radeon:1.24 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.23 Sun Jan 27 02:08:43 2019 +++ src/sys/external/bsd/drm2/radeon/files.radeon Sun Jan 27 05:05:37 2019 @@ -1,6 +1,4 @@ -# $NetBSD: files.radeon,v 1.23 2019/01/27 02:08:43 pgoyette Exp $ - -version 20180827 +# $NetBSD: files.radeon,v 1.24 2019/01/27 05:05:37 kre Exp $ version 20180827
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: kamil Date: Fri Sep 21 11:31:50 UTC 2018 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Appease GCC with a kernel sanitizer Add -Wno-maybe-uninitialized for radeon, a compiler warning is triggered by a false positive. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.21 src/sys/external/bsd/drm2/radeon/files.radeon:1.22 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.21 Mon Aug 27 16:06:01 2018 +++ src/sys/external/bsd/drm2/radeon/files.radeon Fri Sep 21 11:31:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.21 2018/08/27 16:06:01 riastradh Exp $ +# $NetBSD: files.radeon,v 1.22 2018/09/21 11:31:50 kamil Exp $ version 20180827 @@ -23,6 +23,8 @@ makeoptions radeon "CWARNFLAGS.radeon"+= makeoptions radeon "CWARNFLAGS.radeon"+="-Wno-shadow" makeoptions radeon "CWARNFLAGS.radeon"+="-Wno-unused-const-variable" +makeoptions radeon "CWARNFLAGS.radeon"+="${${ACTIVE_CC} == gcc:? -Wno-maybe-uninitialized :}" + file external/bsd/drm2/radeon/radeon_module.c radeon file external/bsd/drm2/radeon/radeon_pci.c radeon
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: mrg Date: Thu Nov 5 20:52:46 UTC 2015 Modified Files: src/sys/external/bsd/drm2/radeon: radeondrmkmsfb.c Log Message: set the "width" and "height" parameters from the surface_width and surface_height members. idea from the intel code and jmcneill@. this makes the fb on my RV370 use the full display size, not the (not actually connected) 800x600 the svideo output supports. X still starts up at 800x600 mode, but xrandr can fix that. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c diff -u src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.5 src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.6 --- src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.5 Tue Nov 18 09:28:36 2014 +++ src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c Thu Nov 5 20:52:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: radeondrmkmsfb.c,v 1.5 2014/11/18 09:28:36 nonaka Exp $ */ +/* $NetBSD: radeondrmkmsfb.c,v 1.6 2015/11/05 20:52:46 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.5 2014/11/18 09:28:36 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.6 2015/11/05 20:52:46 mrg Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -168,8 +168,8 @@ radeonfb_setconfig_task(struct radeon_ta KASSERT(sc->sc_scheduled); /* XXX Ugh... Pass these parameters some other way! */ - prop_dictionary_set_uint32(dict, "width", sizes->fb_width); - prop_dictionary_set_uint32(dict, "height", sizes->fb_height); + prop_dictionary_set_uint32(dict, "width", sizes->surface_width); + prop_dictionary_set_uint32(dict, "height", sizes->surface_height); prop_dictionary_set_uint8(dict, "depth", sizes->surface_bpp); prop_dictionary_set_uint16(dict, "linebytes", rfa->rfa_fb_linebytes); prop_dictionary_set_uint32(dict, "address", 0); /* XXX >32-bit */
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Mon Aug 27 05:35:31 UTC 2018 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Move autogenerated files from dist/ to end of files.radeon. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.12 src/sys/external/bsd/drm2/radeon/files.radeon:1.13 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.12 Thu Oct 2 12:25:14 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Mon Aug 27 05:35:31 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.12 2014/10/02 12:25:14 riastradh Exp $ +# $NetBSD: files.radeon,v 1.13 2018/08/27 05:35:31 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -61,6 +61,11 @@ makeoptions radeon"CWARNFLAGS.trinit makeoptions radeon"CWARNFLAGS.trinity_dpm.c"+="-Wno-unused-const-variable" makeoptions radeon"CWARNFLAGS.vce_v2_0.c"+="-Wno-missing-prototypes" +file external/bsd/drm2/radeon/radeon_module.c radeon +file external/bsd/drm2/radeon/radeon_pci.c radeon + +file external/bsd/drm2/radeon/radeondrmkmsfb.c radeondrmkmsfb + file external/bsd/drm2/dist/drm/radeon/atom.c radeon file external/bsd/drm2/dist/drm/radeon/atombios_crtc.c radeon file external/bsd/drm2/dist/drm/radeon/atombios_dp.c radeon @@ -160,8 +165,3 @@ file external/bsd/drm2/dist/drm/radeon/u file external/bsd/drm2/dist/drm/radeon/uvd_v4_2.c radeon file external/bsd/drm2/dist/drm/radeon/vce_v1_0.c radeon file external/bsd/drm2/dist/drm/radeon/vce_v2_0.c radeon - -file external/bsd/drm2/radeon/radeon_module.c radeon -file external/bsd/drm2/radeon/radeon_pci.c radeon - -file external/bsd/drm2/radeon/radeondrmkmsfb.c radeondrmkmsfb
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Mon Aug 27 05:35:54 UTC 2018 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Replace per-file warning options in radeon by radeon-wide options. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.13 src/sys/external/bsd/drm2/radeon/files.radeon:1.14 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.13 Mon Aug 27 05:35:31 2018 +++ src/sys/external/bsd/drm2/radeon/files.radeon Mon Aug 27 05:35:53 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.13 2018/08/27 05:35:31 riastradh Exp $ +# $NetBSD: files.radeon,v 1.14 2018/08/27 05:35:53 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -12,54 +12,10 @@ makeoptions radeon CPPFLAGS+="-I$S/exter makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/include/radeon" makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/radeon" -makeoptions radeon "CWARNFLAGS.atombios_encoders.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.atombios_i2c.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.btc_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.ci_dpm.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.cik.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.cik_sdma.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.cypress_dpm.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.dce6_afmt.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.evergreen.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.evergreen_cs.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-shadow" -makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-type-limits -Wno-unused-const-variable" -makeoptions radeon "CWARNFLAGS.ni.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.ni_dpm.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.r600.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.r600_cs.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.r600_cs.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.r600_cs.c"+="-Wno-shadow" -makeoptions radeon "CWARNFLAGS.r600_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.radeon_atombios.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.radeon_atombios.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.radeon_clocks.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.radeon_combios.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.radeon_combios.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.radeon_drv.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.radeon_gem.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.radeon_irq_kms.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.radeon_kms.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.radeon_legacy_crtc.c"+="-Wno-shadow" -makeoptions radeon"CWARNFLAGS.radeon_legacy_encoders.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.radeon_pm.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.radeon_ttm.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.radeon_vce.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.rs780_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-shadow" -makeoptions radeon"CWARNFLAGS.rv770.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" -makeoptions radeon"CWARNFLAGS.rv770_dpm.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" -makeoptions radeon"CWARNFLAGS.si.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-missing-field-initializers" -makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-unused-const-variable" -makeoptions radeon"CWARNFLAGS.sumo_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.trinity_dpm.c"+="-Wno-missing-prototypes" -makeoptions radeon"CWARNFLAGS.trinity_dpm.c"+="-Wno-unused-const-variable" -makeoptions radeon"CWARNFLAGS.vce_v2_0.c"+="-Wno-missing-prototypes" +makeoptions radeon "CWARNFLAGS.radeon"+="-Wno-missing-field-ini
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Mon Aug 27 05:45:28 UTC 2018 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: regen files.radeon To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.14 src/sys/external/bsd/drm2/radeon/files.radeon:1.15 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.14 Mon Aug 27 05:35:53 2018 +++ src/sys/external/bsd/drm2/radeon/files.radeon Mon Aug 27 05:45:28 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.14 2018/08/27 05:35:53 riastradh Exp $ +# $NetBSD: files.radeon,v 1.15 2018/08/27 05:45:28 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -22,102 +22,110 @@ file external/bsd/drm2/radeon/radeon_pci file external/bsd/drm2/radeon/radeondrmkmsfb.c radeondrmkmsfb -file external/bsd/drm2/dist/drm/radeon/atom.c radeon +file external/bsd/drm2/dist/drm/radeon/atom.c radeon file external/bsd/drm2/dist/drm/radeon/atombios_crtc.c radeon -file external/bsd/drm2/dist/drm/radeon/atombios_dp.c radeon +file external/bsd/drm2/dist/drm/radeon/atombios_dp.c radeon file external/bsd/drm2/dist/drm/radeon/atombios_encoders.c radeon file external/bsd/drm2/dist/drm/radeon/atombios_i2c.c radeon -file external/bsd/drm2/dist/drm/radeon/btc_dpm.c radeon +file external/bsd/drm2/dist/drm/radeon/btc_dpm.c radeon file external/bsd/drm2/dist/drm/radeon/cayman_blit_shaders.c radeon -file external/bsd/drm2/dist/drm/radeon/ci_dpm.c radeon -file external/bsd/drm2/dist/drm/radeon/ci_smc.c radeon -file external/bsd/drm2/dist/drm/radeon/cik.c radeon +file external/bsd/drm2/dist/drm/radeon/ci_dpm.c radeon +file external/bsd/drm2/dist/drm/radeon/ci_smc.c radeon +file external/bsd/drm2/dist/drm/radeon/cik.c radeon file external/bsd/drm2/dist/drm/radeon/cik_blit_shaders.c radeon -file external/bsd/drm2/dist/drm/radeon/cik_sdma.c radeon -file external/bsd/drm2/dist/drm/radeon/cypress_dpm.c radeon -file external/bsd/drm2/dist/drm/radeon/dce6_afmt.c radeon -file external/bsd/drm2/dist/drm/radeon/evergreen.c radeon -file external/bsd/drm2/dist/drm/radeon/evergreen_blit_shaders.c radeon +file external/bsd/drm2/dist/drm/radeon/cik_sdma.c radeon +file external/bsd/drm2/dist/drm/radeon/cypress_dpm.c radeon +file external/bsd/drm2/dist/drm/radeon/dce3_1_afmt.c radeon +file external/bsd/drm2/dist/drm/radeon/dce6_afmt.c radeon +file external/bsd/drm2/dist/drm/radeon/evergreen.c radeon +file external/bsd/drm2/dist/drm/radeon/evergreen_blit_shaders.c radeon file external/bsd/drm2/dist/drm/radeon/evergreen_cs.c radeon file external/bsd/drm2/dist/drm/radeon/evergreen_dma.c radeon file external/bsd/drm2/dist/drm/radeon/evergreen_hdmi.c radeon -file external/bsd/drm2/dist/drm/radeon/kv_dpm.c radeon -file external/bsd/drm2/dist/drm/radeon/kv_smc.c radeon -file external/bsd/drm2/dist/drm/radeon/ni.c radeon -file external/bsd/drm2/dist/drm/radeon/ni_dma.c radeon -file external/bsd/drm2/dist/drm/radeon/ni_dpm.c radeon -file external/bsd/drm2/dist/drm/radeon/r100.c radeon -file external/bsd/drm2/dist/drm/radeon/r200.c radeon -file external/bsd/drm2/dist/drm/radeon/r300.c radeon -file external/bsd/drm2/dist/drm/radeon/r420.c radeon -file external/bsd/drm2/dist/drm/radeon/r520.c radeon -file external/bsd/drm2/dist/drm/radeon/r600.c radeon -file external/bsd/drm2/dist/drm/radeon/r600_audio.c radeon +file external/bsd/drm2/dist/drm/radeon/kv_dpm.c radeon +file external/bsd/drm2/dist/drm/radeon/kv_smc.c radeon +file external/bsd/drm2/dist/drm/radeon/ni.c radeon +file external/bsd/drm2/dist/drm/radeon/ni_dma.c radeon +file external/bsd/drm2/dist/drm/radeon/ni_dpm.c radeon +file external/bsd/drm2/dist/drm/radeon/r100.c radeon +file external/bsd/drm2/dist/drm/radeon/r200.c radeon +file external/bsd/drm2/dist/drm/radeon/r300.c radeon +file external/bsd/drm2/dist/drm/radeon/r420.c radeon +file external/bsd/drm2/dist/drm/radeon/r520.c radeon +file external/bsd/drm2/dist/drm/radeon/r600.c radeon file external/bsd/drm2/dist/drm/radeon/r600_blit_shaders.c radeon -file external/bsd/drm2/dist/drm/radeon/r600_cs.c radeon -file external/bsd/drm2/dist/drm/radeon/r600_dma.c radeon -file external/bsd/drm2/dist/drm/radeon/r600_dpm.c radeon -file external/bsd/drm2/dist/drm/radeon/r600_hdmi.c radeon -file external/bsd/drm2/dist/drm/radeon/radeon_agp.c radeon -file external/bsd/drm2/dist/drm/radeon/radeon_asic.c radeon +file external/bsd/drm2/dist/drm/radeon/r600_cs.c radeon +file external/bsd/drm2/dist/drm/radeon/r600_dma.c radeon +file external/bsd/drm2/dist/drm/radeon/r600_dpm.c radeon +file external/bsd/drm2/dist/drm/radeon/r600_hdmi.c radeon +file external/bsd/drm2/dist/drm/radeon/radeon_acpi.c r
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Mon Aug 27 06:32:44 UTC 2018 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: radeon wants amd includes. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.15 src/sys/external/bsd/drm2/radeon/files.radeon:1.16 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.15 Mon Aug 27 05:45:28 2018 +++ src/sys/external/bsd/drm2/radeon/files.radeon Mon Aug 27 06:32:44 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.15 2018/08/27 05:45:28 riastradh Exp $ +# $NetBSD: files.radeon,v 1.16 2018/08/27 06:32:44 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -9,6 +9,7 @@ device radeondrmkmsfb: radeonfbbus, genf attach radeondrmkmsfb at radeonfbbus makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/radeon" +makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/include" makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/include/radeon" makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/radeon"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Mon Aug 27 06:39:51 UTC 2018 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Fix radeon include order. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.16 src/sys/external/bsd/drm2/radeon/files.radeon:1.17 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.16 Mon Aug 27 06:32:44 2018 +++ src/sys/external/bsd/drm2/radeon/files.radeon Mon Aug 27 06:39:51 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.16 2018/08/27 06:32:44 riastradh Exp $ +# $NetBSD: files.radeon,v 1.17 2018/08/27 06:39:51 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -8,11 +8,14 @@ attach radeon at pci device radeondrmkmsfb: radeonfbbus, genfb, wsemuldisplaydev attach radeondrmkmsfb at radeonfbbus -makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/radeon" -makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/include" +# Our overrides first. makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/include/radeon" makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/radeon" +# Then their header files. +makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/include" +makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/radeon" + makeoptions radeon "CWARNFLAGS.radeon"+="-Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.radeon"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.radeon"+="-Wno-shadow"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Mon Aug 27 07:46:48 UTC 2018 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Disable radeon_acpi.c for now. Need to figure out how to get AC adapter events and stuff to us. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.17 src/sys/external/bsd/drm2/radeon/files.radeon:1.18 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.17 Mon Aug 27 06:39:51 2018 +++ src/sys/external/bsd/drm2/radeon/files.radeon Mon Aug 27 07:46:48 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.17 2018/08/27 06:39:51 riastradh Exp $ +# $NetBSD: files.radeon,v 1.18 2018/08/27 07:46:48 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -62,7 +62,7 @@ file external/bsd/drm2/dist/drm/radeon/r file external/bsd/drm2/dist/drm/radeon/r600_dma.c radeon file external/bsd/drm2/dist/drm/radeon/r600_dpm.c radeon file external/bsd/drm2/dist/drm/radeon/r600_hdmi.c radeon -file external/bsd/drm2/dist/drm/radeon/radeon_acpi.c radeon +#file external/bsd/drm2/dist/drm/radeon/radeon_acpi.c radeon file external/bsd/drm2/dist/drm/radeon/radeon_agp.c radeon file external/bsd/drm2/dist/drm/radeon/radeon_asic.c radeon file external/bsd/drm2/dist/drm/radeon/radeon_atombios.c radeon
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Thu Jul 17 14:05:12 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Push -Wno-missing-prototypes into specific radeon source files. Don't apply it willy-nilly to the whole kernel! To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.1 src/sys/external/bsd/drm2/radeon/files.radeon:1.2 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.1 Wed Jul 16 20:59:58 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Thu Jul 17 14:05:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.1 2014/07/16 20:59:58 riastradh Exp $ +# $NetBSD: files.radeon,v 1.2 2014/07/17 14:05:12 riastradh Exp $ device radeondrmkms: drmkms, drmkms_pci, drmkms_ttm, genfb, wsemuldisplaydev attach radeondrmkms at pci @@ -6,22 +6,51 @@ attach radeondrmkms at pci makeoptions radeondrmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/radeon" makeoptions radeondrmkms CPPFLAGS+="-I$S/external/bsd/drm2/include/radeon" -# Apparently the radeon authors don't believe in declaring functions in -# header files. -makeoptions radeondrmkms CWARNFLAGS+="-Wno-missing-prototypes" - +makeoptions radeondrmkms "CWARNFLAGS.atombios_encoders.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.atombios_i2c.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.btc_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.ci_dpm.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.cik.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.cik_sdma.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.dce6_afmt.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.evergreen.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.evergreen_cs.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-shadow" makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-type-limits" +makeoptions radeondrmkms "CWARNFLAGS.ni.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.ni_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.r600.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.r600_cs.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.r600_cs.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.r600_cs.c"+="-Wno-shadow" +makeoptions radeondrmkms "CWARNFLAGS.r600_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.radeon_atombios.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.radeon_atombios.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.radeon_clocks.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.radeon_combios.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.radeon_combios.c"+="-Wno-prototypes-field-initializers" makeoptions radeondrmkms "CWARNFLAGS.radeon_drv.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.radeon_gem.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.radeon_irq_kms.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.radeon_kms.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms"CWARNFLAGS.radeon_legacy_crtc.c"+="-Wno-shadow" +makeoptions radeondrmkms"CWARNFLAGS.radeon_legacy_encoders.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.radeon_pm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.radeon_ttm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.radeon_vce.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.rs780_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-shadow" +makeoptions radeondrmkms"CWARNFLAGS.rv770.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.rv770_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.si.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms"CWARNFLAGS.si_dpm.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms"CWARNFLAGS.si_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.sumo_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.trinity_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.vc
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Sat Jul 26 07:02:13 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: radeondrmkmsfb.c Log Message: Fix radeon framebuffer mmapping. The framebuffer is not a system-RAM-backed, TTM-managed object; rather, it is a VRAM-backed object. So we have to use its bus address, which is a little less sketchy with bus_space_mmap anyway. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c diff -u src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.2 src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.3 --- src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.2 Fri Jul 25 16:35:43 2014 +++ src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c Sat Jul 26 07:02:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: radeondrmkmsfb.c,v 1.2 2014/07/25 16:35:43 riastradh Exp $ */ +/* $NetBSD: radeondrmkmsfb.c,v 1.3 2014/07/26 07:02:13 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.2 2014/07/25 16:35:43 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.3 2014/07/26 07:02:13 riastradh Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -273,21 +273,17 @@ radeonfb_genfb_mmap(void *v, void *vs, o /* Treat low memory as the framebuffer itself. */ if (offset < genfb->sc_fbsize) { const unsigned num_pages __diagused = rbo->tbo.num_pages; - bus_addr_t addr; int flags = 0; KASSERT(genfb->sc_fbsize == (num_pages << PAGE_SHIFT)); - KASSERT(num_pages == rbo->tbo.ttm->num_pages); - addr = page_to_phys(rbo->tbo.ttm->pages[offset >> PAGE_SHIFT]); - /* XXX CACHEABLE/ PREFETCHABLE? WC? WB? */ - if (ISSET(rbo->tbo.mem.placement, TTM_PL_FLAG_CACHED)) + KASSERT(rbo->tbo.mem.bus.is_iomem); + + if (ISSET(rbo->tbo.mem.placement, TTM_PL_FLAG_WC)) flags |= BUS_SPACE_MAP_PREFETCHABLE; - /* - * XXX Urk. We assume bus_space_mmap can cope with - * normal system RAM addresses. - */ - return bus_space_mmap(rbo->tbo.bdev->memt, addr, 0, prot, - flags); + + return bus_space_mmap(rbo->tbo.bdev->memt, + rbo->tbo.mem.bus.base, rbo->tbo.mem.bus.offset + offset, + prot, flags); } /* XXX Cargo-culted from genfb_pci. */
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Sat Jul 26 07:32:18 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_pci.c Log Message: Defer real radeon attachment until mountroot so we can load firmware. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/radeon/radeon_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.2 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.3 --- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.2 Fri Jul 25 12:35:03 2014 +++ src/sys/external/bsd/drm2/radeon/radeon_pci.c Sat Jul 26 07:32:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_pci.c,v 1.2 2014/07/25 12:35:03 riastradh Exp $ */ +/* $NetBSD: radeon_pci.c,v 1.3 2014/07/26 07:32:18 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.2 2014/07/25 12:35:03 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.3 2014/07/26 07:32:18 riastradh Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -71,6 +71,7 @@ SIMPLEQ_HEAD(radeon_task_head, radeon_ta struct radeon_softc { device_t sc_dev; + struct pci_attach_args sc_pa; enum { RADEON_TASK_ATTACH, RADEON_TASK_WORKQUEUE, @@ -96,6 +97,7 @@ static bool radeon_pci_lookup(const stru static int radeon_match(device_t, cfdata_t, void *); static void radeon_attach(device_t, device_t, void *); +static void radeon_attach_real(device_t); static int radeon_detach(device_t, int); static void radeon_task_work(struct work *, void *); @@ -152,6 +154,25 @@ radeon_attach(device_t parent, device_t { struct radeon_softc *const sc = device_private(self); const struct pci_attach_args *const pa = aux; + + pci_aprint_devinfo(pa, NULL); + + /* + * Trivial initialization first; the rest will come after we + * have mounted the root file system and can load firmware + * images. + */ + sc->sc_dev = NULL; + sc->sc_pa = *pa; + + config_mountroot(self, &radeon_attach_real); +} + +static void +radeon_attach_real(device_t self) +{ + struct radeon_softc *const sc = device_private(self); + const struct pci_attach_args *const pa = &sc->sc_pa; bool ok __diagused; unsigned long flags; int error; @@ -159,10 +180,6 @@ radeon_attach(device_t parent, device_t ok = radeon_pci_lookup(pa, &flags); KASSERT(ok); - sc->sc_dev = self; - - pci_aprint_devinfo(pa, NULL); - sc->sc_task_state = RADEON_TASK_ATTACH; SIMPLEQ_INIT(&sc->sc_task_u.attach); @@ -171,7 +188,7 @@ radeon_attach(device_t parent, device_t flags, &sc->sc_drm_dev); if (error) { aprint_error_dev(self, "unable to attach drm: %d\n", error); - return; + goto out; } while (!SIMPLEQ_EMPTY(&sc->sc_task_u.attach)) { @@ -189,8 +206,10 @@ radeon_attach(device_t parent, device_t aprint_error_dev(self, "unable to create workqueue: %d\n", error); sc->sc_task_u.workqueue = NULL; - return; + goto out; } + +out: sc->sc_dev = self; } static int @@ -199,6 +218,10 @@ radeon_detach(device_t self, int flags) struct radeon_softc *const sc = device_private(self); int error; + if (sc->sc_dev == NULL) + /* Not done attaching. */ + return EBUSY; + /* XXX Check for in-use before tearing it all down... */ error = config_detach_children(self, flags); if (error)
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Sat Jul 26 21:12:43 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_module.c Log Message: drmkms_ttm is not split into a module (yet). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/radeon/radeon_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_module.c diff -u src/sys/external/bsd/drm2/radeon/radeon_module.c:1.1 src/sys/external/bsd/drm2/radeon/radeon_module.c:1.2 --- src/sys/external/bsd/drm2/radeon/radeon_module.c:1.1 Wed Jul 16 20:59:58 2014 +++ src/sys/external/bsd/drm2/radeon/radeon_module.c Sat Jul 26 21:12:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_module.c,v 1.1 2014/07/16 20:59:58 riastradh Exp $ */ +/* $NetBSD: radeon_module.c,v 1.2 2014/07/26 21:12:43 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_module.c,v 1.1 2014/07/16 20:59:58 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_module.c,v 1.2 2014/07/26 21:12:43 riastradh Exp $"); #include #include @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: radeon_modul #include "radeon_drv.h" -MODULE(MODULE_CLASS_DRIVER, radeon, "drmkms,drmkms_pci,drmkms_ttm"); /* XXX drmkms_i2c */ +MODULE(MODULE_CLASS_DRIVER, radeon, "drmkms,drmkms_pci"); /* XXX drmkms_i2c, drmkms_ttm */ #ifdef _MODULE #include "ioconf.c"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Mon Jul 28 00:02:50 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: radeon depends on firmload. Noted by rjs@. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.4 src/sys/external/bsd/drm2/radeon/files.radeon:1.5 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.4 Sat Jul 26 07:36:09 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Mon Jul 28 00:02:50 2014 @@ -1,7 +1,7 @@ -# $NetBSD: files.radeon,v 1.4 2014/07/26 07:36:09 riastradh Exp $ +# $NetBSD: files.radeon,v 1.5 2014/07/28 00:02:50 riastradh Exp $ define radeonfbbus { } -device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus +device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload attach radeon at pci # XXX Rename this to radeonfb when the legacy radeonfb(4) is gone.
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: chs Date: Wed Nov 12 16:07:17 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: radeondrmkmsfb.c Log Message: apply several changes from intelfb.c revs 1.7 through 1.9: - provide a setmode callback for genfb - add a pmf shutdown handler to switch genfb into polling mode - no need to call drm_fb_helper_set_config after genfb attaches, as the setmode callback is called by genfb_attach To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c diff -u src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.3 src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.4 --- src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c:1.3 Sat Jul 26 07:02:13 2014 +++ src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c Wed Nov 12 16:07:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: radeondrmkmsfb.c,v 1.3 2014/07/26 07:02:13 riastradh Exp $ */ +/* $NetBSD: radeondrmkmsfb.c,v 1.4 2014/11/12 16:07:17 chs Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.3 2014/07/26 07:02:13 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.4 2014/11/12 16:07:17 chs Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -88,6 +88,12 @@ static int radeonfb_genfb_ioctl(void *, static paddr_t radeonfb_genfb_mmap(void *, void *, off_t, int); static int radeonfb_genfb_enable_polling(void *); static int radeonfb_genfb_disable_polling(void *); +static bool radeonfb_genfb_shutdown(device_t, int); +static bool radeonfb_genfb_setmode(struct genfb_softc *, int); + +static const struct genfb_mode_callback radeonfb_genfb_mode_callback = { + .gmc_setmode = radeonfb_genfb_setmode, +}; CFATTACH_DECL_NEW(radeondrmkmsfb, sizeof(struct radeonfb_softc), radeonfb_match, radeonfb_attach, radeonfb_detach, NULL); @@ -172,6 +178,9 @@ radeonfb_setconfig_task(struct radeon_ta prop_dictionary_set_uint64(dict, "virtual_address", (uint64_t)(uintptr_t)rfa->rfa_fb_ptr); + prop_dictionary_set_uint64(dict, "mode_callback", + (uint64_t)(uintptr_t)&radeonfb_genfb_mode_callback); + /* XXX Whattakludge! */ #if NVGA > 0 if (vga_is_console(rfa->rfa_fb_helper->dev->pdev->pd_pa.pa_iot, -1)) { @@ -203,7 +212,8 @@ radeonfb_setconfig_task(struct radeon_ta } sc->sc_attached = true; - drm_fb_helper_set_config(sc->sc_rfa.rfa_fb_helper); + pmf_device_register1(sc->sc_dev, NULL, NULL, + radeonfb_genfb_shutdown); /* Success! */ sc->sc_scheduled = false; @@ -344,3 +354,22 @@ radeonfb_genfb_disable_polling(void *coo return drm_fb_helper_debug_leave_fb(sc->sc_rfa.rfa_fb_helper); } + +static bool +radeonfb_genfb_shutdown(device_t self, int flags) +{ + genfb_enable_polling(self); + return true; +} + +static bool +radeonfb_genfb_setmode(struct genfb_softc *genfb, int mode) +{ + struct radeonfb_softc *sc = (struct radeonfb_softc *)genfb; + + if (mode == WSDISPLAYIO_MODE_EMUL) { + drm_fb_helper_set_config(sc->sc_rfa.rfa_fb_helper); + } + + return true; +}
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: mrg Date: Sat Feb 14 06:58:12 UTC 2015 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_pci.c Log Message: add a ugly hack to avoid difficult to understand failures with radeondrmkms on i386. the problem is that the pcdisplay@isa and vga@isa drivers rely on some other driver having already mapped the vga registers to know they should not attach, but radeondrmkms attaches late as it needs rootfs access, and it does not map these registers, and either of vga or pcdisplay will attach, and then attach wsdisplay0, and then getty and X11 will fail and you shake a tiny fist at the computer. so, for i386, map and unmap the VGA register space between the normal attach and the mountroot attach. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/radeon/radeon_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.4 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.5 --- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.4 Sat Jul 26 07:36:09 2014 +++ src/sys/external/bsd/drm2/radeon/radeon_pci.c Sat Feb 14 06:58:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_pci.c,v 1.4 2014/07/26 07:36:09 riastradh Exp $ */ +/* $NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.4 2014/07/26 07:36:09 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -82,6 +82,12 @@ struct radeon_softc { }sc_task_u; struct drm_device *sc_drm_dev; struct pci_dev sc_pci_dev; +#ifdef __i386__ +#define RADEON_PCI_UGLY_MAP_HACK + /* XXX Used to claim the VGA device before attach_real */ + bus_space_handle_t sc_temp_memh; + boolsc_temp_set; +#endif }; struct radeon_device * @@ -165,6 +171,17 @@ radeon_attach(device_t parent, device_t sc->sc_dev = NULL; sc->sc_pa = *pa; +#ifdef RADEON_PCI_UGLY_MAP_HACK + /* + * XXX + * We map the VGA registers, so that other driver don't + * think they can. This stops vga@isa or pcdisplay@isa + * attaching, and stealing wsdisplay0. Yuck. + */ + sc->sc_temp_set = bus_space_map(pa->pa_memt, 0xb, 0x1, 0, + &sc->sc_temp_memh); +#endif + config_mountroot(self, &radeon_attach_real); } @@ -180,6 +197,15 @@ radeon_attach_real(device_t self) ok = radeon_pci_lookup(pa, &flags); KASSERT(ok); +#ifdef RADEON_PCI_UGLY_MAP_HACK + /* + * XXX + * Unmap the VGA registers so the DRM code can map them. + */ + if (sc->sc_temp_set) + bus_space_unmap(pa->pa_memt, sc->sc_temp_memh, 0x1); +#endif + sc->sc_task_state = RADEON_TASK_ATTACH; SIMPLEQ_INIT(&sc->sc_task_u.attach);
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: mrg Date: Mon Feb 16 12:17:57 UTC 2015 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_pci.c Log Message: fix the previous. bus_space_map() returns *zero* on success. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/radeon/radeon_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.5 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.6 --- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.5 Sat Feb 14 06:58:12 2015 +++ src/sys/external/bsd/drm2/radeon/radeon_pci.c Mon Feb 16 12:17:57 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $ */ +/* $NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -178,8 +178,12 @@ radeon_attach(device_t parent, device_t * think they can. This stops vga@isa or pcdisplay@isa * attaching, and stealing wsdisplay0. Yuck. */ - sc->sc_temp_set = bus_space_map(pa->pa_memt, 0xb, 0x1, 0, - &sc->sc_temp_memh); + int rv = bus_space_map(pa->pa_memt, 0xb, 0x1, 0, + &sc->sc_temp_memh); + sc->sc_temp_set = rv == 0; + if (rv != 0) + aprint_error_dev(self, "unable to reserve VGA registers for " + "i386 radeondrmkms hack\n"); #endif config_mountroot(self, &radeon_attach_real);
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: mrg Date: Sun Mar 1 10:07:01 UTC 2015 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_pci.c Log Message: fix some comments about the half-working i386 hack. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/radeon/radeon_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.6 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.7 --- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.6 Mon Feb 16 12:17:57 2015 +++ src/sys/external/bsd/drm2/radeon/radeon_pci.c Sun Mar 1 10:07:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $ */ +/* $NetBSD: radeon_pci.c,v 1.7 2015/03/01 10:07:01 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.7 2015/03/01 10:07:01 mrg Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -82,7 +82,7 @@ struct radeon_softc { }sc_task_u; struct drm_device *sc_drm_dev; struct pci_dev sc_pci_dev; -#ifdef __i386__ +#if defined(__i386__) #define RADEON_PCI_UGLY_MAP_HACK /* XXX Used to claim the VGA device before attach_real */ bus_space_handle_t sc_temp_memh; @@ -174,9 +174,10 @@ radeon_attach(device_t parent, device_t #ifdef RADEON_PCI_UGLY_MAP_HACK /* * XXX - * We map the VGA registers, so that other driver don't - * think they can. This stops vga@isa or pcdisplay@isa - * attaching, and stealing wsdisplay0. Yuck. + * We try to map the VGA registers, in case we can prevent vga@isa or + * pcdisplay@isa attaching, and stealing wsdisplay0. This only works + * with serial console, as actual VGA console has already mapped them. + * The only way to handle that is for vga@isa to not attach. */ int rv = bus_space_map(pa->pa_memt, 0xb, 0x1, 0, &sc->sc_temp_memh); @@ -204,7 +205,7 @@ radeon_attach_real(device_t self) #ifdef RADEON_PCI_UGLY_MAP_HACK /* * XXX - * Unmap the VGA registers so the DRM code can map them. + * Unmap the VGA registers. */ if (sc->sc_temp_set) bus_space_unmap(pa->pa_memt, sc->sc_temp_memh, 0x1);
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Wed Sep 17 15:53:15 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Suppress clang warning about `= {0}'. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.5 src/sys/external/bsd/drm2/radeon/files.radeon:1.6 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.5 Mon Jul 28 00:02:50 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Wed Sep 17 15:53:15 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.5 2014/07/28 00:02:50 riastradh Exp $ +# $NetBSD: files.radeon,v 1.6 2014/09/17 15:53:15 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -16,7 +16,7 @@ makeoptions radeon "CWARNFLAGS.atombios_ makeoptions radeon "CWARNFLAGS.atombios_i2c.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.btc_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.ci_dpm.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.cik.c"+="-Wno-missing-prototypes" +makeoptions radeon "CWARNFLAGS.cik.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.cik_sdma.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.dce6_afmt.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.evergreen.c"+="-Wno-missing-prototypes"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Wed Sep 17 15:59:53 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Suppress some more missing field initializer warnings from Clang. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.6 src/sys/external/bsd/drm2/radeon/files.radeon:1.7 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.6 Wed Sep 17 15:53:15 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Wed Sep 17 15:59:53 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.6 2014/09/17 15:53:15 riastradh Exp $ +# $NetBSD: files.radeon,v 1.7 2014/09/17 15:59:53 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -18,6 +18,7 @@ makeoptions radeon "CWARNFLAGS.btc_dpm.c makeoptions radeon "CWARNFLAGS.ci_dpm.c"+="-Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.cik.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.cik_sdma.c"+="-Wno-missing-prototypes" +makeoptions radeon "CWARNFLAGS.cypress_dpm.c"+="-Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.dce6_afmt.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.evergreen.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.evergreen_cs.c"+="-Wno-missing-prototypes" @@ -26,7 +27,7 @@ makeoptions radeon "CWARNFLAGS.kv_dpm.c" makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-shadow" makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-type-limits" makeoptions radeon "CWARNFLAGS.ni.c"+="-Wno-missing-prototypes" -makeoptions radeon "CWARNFLAGS.ni_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeon "CWARNFLAGS.ni_dpm.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.r600.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.r600_cs.c"+="-Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.r600_cs.c"+="-Wno-missing-prototypes" @@ -49,7 +50,7 @@ makeoptions radeon"CWARNFLAGS.radeon makeoptions radeon"CWARNFLAGS.rs780_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-shadow" -makeoptions radeon"CWARNFLAGS.rv770.c"+="-Wno-missing-prototypes" +makeoptions radeon"CWARNFLAGS.rv770.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" makeoptions radeon"CWARNFLAGS.rv770_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.si.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-missing-field-initializers"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Thu Oct 2 10:17:53 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: -Wno-unused-const-variable for radeon kv_dpm.c. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.7 src/sys/external/bsd/drm2/radeon/files.radeon:1.8 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.7 Wed Sep 17 15:59:53 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Thu Oct 2 10:17:53 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.7 2014/09/17 15:59:53 riastradh Exp $ +# $NetBSD: files.radeon,v 1.8 2014/10/02 10:17:53 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -25,7 +25,7 @@ makeoptions radeon "CWARNFLAGS.evergreen makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-shadow" -makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-type-limits" +makeoptions radeon "CWARNFLAGS.kv_dpm.c"+="-Wno-type-limits -Wno-unused-const-variable" makeoptions radeon "CWARNFLAGS.ni.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.ni_dpm.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.r600.c"+="-Wno-missing-prototypes"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Thu Oct 2 10:56:09 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Spell -Wno-missing-prototypes correctly. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.8 src/sys/external/bsd/drm2/radeon/files.radeon:1.9 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.8 Thu Oct 2 10:17:53 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Thu Oct 2 10:56:09 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.8 2014/10/02 10:17:53 riastradh Exp $ +# $NetBSD: files.radeon,v 1.9 2014/10/02 10:56:09 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -37,7 +37,7 @@ makeoptions radeon "CWARNFLAGS.radeon_at makeoptions radeon "CWARNFLAGS.radeon_atombios.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.radeon_clocks.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.radeon_combios.c"+="-Wno-missing-field-initializers" -makeoptions radeon "CWARNFLAGS.radeon_combios.c"+="-Wno-prototypes-field-initializers" +makeoptions radeon "CWARNFLAGS.radeon_combios.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.radeon_drv.c"+="-Wno-missing-field-initializers" makeoptions radeon "CWARNFLAGS.radeon_gem.c"+="-Wno-missing-prototypes" makeoptions radeon "CWARNFLAGS.radeon_irq_kms.c"+="-Wno-missing-prototypes"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Thu Oct 2 11:15:07 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: rv770_dpm.c needs -Wno-missing-field-initializers. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.9 src/sys/external/bsd/drm2/radeon/files.radeon:1.10 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.9 Thu Oct 2 10:56:09 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Thu Oct 2 11:15:07 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.9 2014/10/02 10:56:09 riastradh Exp $ +# $NetBSD: files.radeon,v 1.10 2014/10/02 11:15:07 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -51,7 +51,7 @@ makeoptions radeon"CWARNFLAGS.rs780_ makeoptions radeon"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-shadow" makeoptions radeon"CWARNFLAGS.rv770.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" -makeoptions radeon"CWARNFLAGS.rv770_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeon"CWARNFLAGS.rv770_dpm.c"+="-Wno-missing-prototypes -Wno-missing-field-initializers" makeoptions radeon"CWARNFLAGS.si.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-missing-field-initializers" makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-missing-prototypes"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Thu Oct 2 12:17:59 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: si_dpm.c needs -Wno-unused-const-variable. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.10 src/sys/external/bsd/drm2/radeon/files.radeon:1.11 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.10 Thu Oct 2 11:15:07 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Thu Oct 2 12:17:59 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.10 2014/10/02 11:15:07 riastradh Exp $ +# $NetBSD: files.radeon,v 1.11 2014/10/02 12:17:59 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -55,6 +55,7 @@ makeoptions radeon"CWARNFLAGS.rv770_ makeoptions radeon"CWARNFLAGS.si.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-missing-field-initializers" makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-unused-const-variable" makeoptions radeon"CWARNFLAGS.sumo_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.trinity_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.vce_v2_0.c"+="-Wno-missing-prototypes"
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Thu Oct 2 12:25:15 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: trinity_dpm.c needs -Wno-unused-const-variable. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.11 src/sys/external/bsd/drm2/radeon/files.radeon:1.12 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.11 Thu Oct 2 12:17:59 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Thu Oct 2 12:25:14 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.11 2014/10/02 12:17:59 riastradh Exp $ +# $NetBSD: files.radeon,v 1.12 2014/10/02 12:25:14 riastradh Exp $ define radeonfbbus { } device radeon: drmkms, drmkms_pci, drmkms_ttm, radeonfbbus, firmload @@ -58,6 +58,7 @@ makeoptions radeon"CWARNFLAGS.si_dpm makeoptions radeon"CWARNFLAGS.si_dpm.c"+="-Wno-unused-const-variable" makeoptions radeon"CWARNFLAGS.sumo_dpm.c"+="-Wno-missing-prototypes" makeoptions radeon"CWARNFLAGS.trinity_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeon"CWARNFLAGS.trinity_dpm.c"+="-Wno-unused-const-variable" makeoptions radeon"CWARNFLAGS.vce_v2_0.c"+="-Wno-missing-prototypes" file external/bsd/drm2/dist/drm/radeon/atom.c radeon
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: mrg Date: Sun Apr 19 01:08:56 UTC 2015 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_pci.c Log Message: apply some of the additional changes from Arto Huusko in PR#49645: - call pmf_device_deregister on detach. i've kept the "resume = true" for radeon_resume_kms() call as it seems to work for me (indeed, code inspection shows it is unused on netbsd :-) my old nforce4 box that can resume old drm (or could, last i tried several years ago) while X and GL apps were running, can at least survive a resume if X hasn't started. my one attempt so far with X exited, but having run, did not work. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/radeon/radeon_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.8 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.9 --- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.8 Fri Apr 10 02:03:14 2015 +++ src/sys/external/bsd/drm2/radeon/radeon_pci.c Sun Apr 19 01:08:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_pci.c,v 1.8 2015/04/10 02:03:14 mrg Exp $ */ +/* $NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.8 2015/04/10 02:03:14 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -264,14 +264,14 @@ radeon_detach(device_t self, int flags) return error; if (sc->sc_task_state == RADEON_TASK_ATTACH) - return 0; + goto out; if (sc->sc_task_u.workqueue != NULL) { workqueue_destroy(sc->sc_task_u.workqueue); sc->sc_task_u.workqueue = NULL; } if (sc->sc_drm_dev == NULL) - return 0; + goto out; /* XXX errno Linux->NetBSD */ error = -drm_pci_detach(sc->sc_drm_dev, flags); if (error) @@ -279,6 +279,8 @@ radeon_detach(device_t self, int flags) return error; sc->sc_drm_dev = NULL; +out: pmf_device_deregister(self); + return 0; } @@ -288,11 +290,12 @@ radeon_do_suspend(device_t self, const p struct radeon_softc *const sc = device_private(self); struct drm_device *const dev = sc->sc_drm_dev; int ret; + bool is_console = true; /* XXX */ if (dev == NULL) return true; - ret = radeon_suspend_kms(dev, true, true); + ret = radeon_suspend_kms(dev, true, is_console); if (ret) return false; @@ -305,11 +308,12 @@ radeon_do_resume(device_t self, const pm struct radeon_softc *const sc = device_private(self); struct drm_device *const dev = sc->sc_drm_dev; int ret; + bool is_console = true; /* XXX */ if (dev == NULL) return true; - ret = radeon_resume_kms(dev, true, true); + ret = radeon_resume_kms(dev, true, is_console); if (ret) return false;
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: mrg Date: Fri May 29 05:48:46 UTC 2015 Modified Files: src/sys/external/bsd/drm2/radeon: radeon_pci.c Log Message: disable drmkms on r100 and most r200. works around PR#49744, etc. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/radeon/radeon_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.9 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.10 --- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.9 Sun Apr 19 01:08:56 2015 +++ src/sys/external/bsd/drm2/radeon/radeon_pci.c Fri May 29 05:48:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $ */ +/* $NetBSD: radeon_pci.c,v 1.10 2015/05/29 05:48:46 mrg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.9 2015/04/19 01:08:56 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.10 2015/05/29 05:48:46 mrg Exp $"); #ifdef _KERNEL_OPT #include "vga.h" @@ -118,10 +118,14 @@ extern struct drm_driver *const radeon_d extern const struct pci_device_id *const radeon_device_ids; extern const size_t radeon_n_device_ids; +/* Set this to false if you want to match R100/R200 */ +bool radeon_pci_ignore_r100_r200 = true; + static bool radeon_pci_lookup(const struct pci_attach_args *pa, unsigned long *flags) { size_t i; + enum radeon_family fam; for (i = 0; i < radeon_n_device_ids; i++) { if ((PCI_VENDOR(pa->pa_id) == radeon_device_ids[i].vendor) && @@ -133,6 +137,11 @@ radeon_pci_lookup(const struct pci_attac if (i == radeon_n_device_ids) return false; + /* NetBSD drm2 fails on R100 and many R200 chipsets, disable for now */ + fam = radeon_device_ids[i].driver_data & RADEON_FAMILY_MASK; + if (radeon_pci_ignore_r100_r200 && fam < CHIP_RV280) + return false; + if (flags) *flags = radeon_device_ids[i].driver_data; return true;