Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci support screen blanking of r5xx
details: https://anonhg.NetBSD.org/src/rev/e29443ed519f
branches: trunk
changeset: 945437:e29443ed519f
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Oct 30 15:30:43 2020 +0000
description:
support screen blanking of r5xx
somewhat crude but works
diffstat:
sys/dev/pci/radeonfb.c | 29 ++++++++++++++++++++++++-----
1 files changed, 24 insertions(+), 5 deletions(-)
diffs (64 lines):
diff -r 8623e8513ab8 -r e29443ed519f sys/dev/pci/radeonfb.c
--- a/sys/dev/pci/radeonfb.c Fri Oct 30 15:28:38 2020 +0000
+++ b/sys/dev/pci/radeonfb.c Fri Oct 30 15:30:43 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeonfb.c,v 1.111 2020/10/11 21:41:57 jdc Exp $ */
+/* $NetBSD: radeonfb.c,v 1.112 2020/10/30 15:30:43 macallan Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.111 2020/10/11 21:41:57 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.112 2020/10/30 15:30:43 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2558,11 +2558,14 @@
struct radeonfb_softc *sc = dp->rd_softc;
uint32_t reg, mask;
- if (IS_AVIVO(sc)) return 0;
-
if(!dp->rd_softc->sc_mapped)
return 1;
+ if (IS_AVIVO(sc)) {
+ reg = GET32(sc, AVIVO_D1CRTC_CONTROL);
+ return ((reg & AVIVO_CRTC_EN) == 0);
+ }
+
if (dp->rd_crtcs[0].rc_number) {
reg = RADEON_CRTC2_GEN_CNTL;
mask = RADEON_CRTC2_DISP_DIS;
@@ -2581,11 +2584,27 @@
uint32_t fpreg, fpval;
int i;
- if(IS_AVIVO(sc)) return;
if (!sc->sc_mapped)
return;
+ if(IS_AVIVO(sc)) {
+
+ /*
+ * XXX
+ * I don't know how to turn the sunc outputs off for DPMS
+ * power control, so for now just turn the entire CRTC off
+ */
+ if (blank) {
+ CLR32(sc, AVIVO_D1CRTC_CONTROL, AVIVO_CRTC_EN);
+ CLR32(sc, AVIVO_D2CRTC_CONTROL, AVIVO_CRTC_EN);
+ } else {
+ SET32(sc, AVIVO_D1CRTC_CONTROL, AVIVO_CRTC_EN);
+ SET32(sc, AVIVO_D2CRTC_CONTROL, AVIVO_CRTC_EN);
+ }
+ return;
+ }
+ /* non-AVIVO case */
for (i = 0; i < dp->rd_ncrtcs; i++) {
if (dp->rd_crtcs[i].rc_number) {
Home |
Main Index |
Thread Index |
Old Index