Source-Changes-D archive

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

Re: CVS commit: src/sys/arch/arm/allwinner



On Mon, Oct 05, 2015 at 05:28:50PM +0200, Manuel Bouyer wrote:
> On Mon, Oct 05, 2015 at 12:20:57PM -0300, Jared McNeill wrote:
> > Not sure I like this. Disabling TCON interferes with HDMI audio (and this is
> > why the code was the way that it was) and I'm not aware of any "blank screen
> > but keep audio active" mechanism for HDMI displays.
> 
> So you say we should also disable HDMI audio ?
> Maybe we could add a callback in awin_hdmi.c to turn on/off HDMI completely ?

What about the attached patch then ?
it should allow hdmi audio to still work, while turning off the display.
It looks even better, my display goes to sleep immediately with this
patch, while with the previous one it did look for a signal on other
inputs for a few minutes before sleeping ...

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: awin_debe.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_debe.c,v
retrieving revision 1.6.2.6
diff -u -p -u -r1.6.2.6 awin_debe.c
--- awin_debe.c	9 Dec 2014 19:21:09 -0000	1.6.2.6
+++ awin_debe.c	5 Oct 2015 17:06:22 -0000
@@ -526,6 +526,7 @@ awin_debe_ioctl(device_t self, u_long cm
 			val &= ~AWIN_DEBE_MODCTL_HWC_EN;
 		}
 		DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, val);
+		awin_hdmi_enable_video(enable);
 		return 0;
 	case WSDISPLAYIO_GVIDEO:
 		val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
Index: awin_hdmi.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_hdmi.c,v
retrieving revision 1.4.2.5
diff -u -p -u -r1.4.2.5 awin_hdmi.c
--- awin_hdmi.c	18 Nov 2014 18:19:09 -0000	1.4.2.5
+++ awin_hdmi.c	5 Oct 2015 17:06:22 -0000
@@ -662,6 +662,21 @@ awin_hdmi_video_enable(struct awin_hdmi_
 #endif
 }
 
+void
+awin_hdmi_enable_video(bool enable)
+{
+	struct awin_hdmi_softc *sc;
+	device_t dev;
+
+	dev = device_find_by_driver_unit("awinhdmi", 0);
+	if (dev == NULL) {
+		printf("HDMI: no driver found\n");
+		return;
+	}
+	sc = device_private(dev);
+	awin_hdmi_video_enable(sc, enable);
+}
+
 static void
 awin_hdmi_set_videomode(struct awin_hdmi_softc *sc,
     const struct videomode *mode, u_int display_mode)
Index: awin_var.h
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_var.h,v
retrieving revision 1.10.2.6
diff -u -p -u -r1.10.2.6 awin_var.h
--- awin_var.h	25 Nov 2014 08:03:06 -0000	1.10.2.6
+++ awin_var.h	5 Oct 2015 17:06:22 -0000
@@ -141,6 +141,7 @@ struct awin_hdmi_info {
 	bool	display_hdmimode;
 };
 void	awin_hdmi_get_info(struct awin_hdmi_info *);
+void	awin_hdmi_enable_video(bool);
 
 void	awin_fb_set_videomode(device_t, u_int, u_int);
 void	awin_fb_ddb_trap_callback(int);


Home | Main Index | Thread Index | Old Index