Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/nvidia support disabling the HDMI output
details: https://anonhg.NetBSD.org/src/rev/2385dd3fd5ce
branches: trunk
changeset: 341523:2385dd3fd5ce
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Nov 10 00:33:39 2015 +0000
description:
support disabling the HDMI output
diffstat:
sys/arch/arm/nvidia/tegra_drm_mode.c | 21 +++++++++++++++++++--
sys/arch/arm/nvidia/tegra_hdmireg.h | 6 +++++-
2 files changed, 24 insertions(+), 3 deletions(-)
diffs (63 lines):
diff -r 50b463d7fadf -r 2385dd3fd5ce sys/arch/arm/nvidia/tegra_drm_mode.c
--- a/sys/arch/arm/nvidia/tegra_drm_mode.c Tue Nov 10 00:04:04 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_drm_mode.c Tue Nov 10 00:33:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm_mode.c,v 1.2 2015/11/10 00:04:04 jmcneill Exp $ */
+/* $NetBSD: tegra_drm_mode.c,v 1.3 2015/11/10 00:33:39 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.2 2015/11/10 00:04:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.3 2015/11/10 00:33:39 jmcneill Exp $");
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
@@ -548,6 +548,23 @@
static void
tegra_encoder_dpms(struct drm_encoder *encoder, int mode)
{
+ struct tegra_encoder *tegra_encoder = to_tegra_encoder(encoder);
+
+ if (encoder->crtc == NULL)
+ return;
+
+ switch (mode) {
+ case DRM_MODE_DPMS_ON:
+ case DRM_MODE_DPMS_STANDBY:
+ case DRM_MODE_DPMS_SUSPEND:
+ HDMI_SET_CLEAR(tegra_encoder, HDMI_NV_PDISP_SOR_BLANK_REG,
+ 0, HDMI_NV_PDISP_SOR_BLANK_OVERRIDE);
+ break;
+ case DRM_MODE_DPMS_OFF:
+ HDMI_SET_CLEAR(tegra_encoder, HDMI_NV_PDISP_SOR_BLANK_REG,
+ HDMI_NV_PDISP_SOR_BLANK_OVERRIDE, 0);
+ break;
+ }
}
static bool
diff -r 50b463d7fadf -r 2385dd3fd5ce sys/arch/arm/nvidia/tegra_hdmireg.h
--- a/sys/arch/arm/nvidia/tegra_hdmireg.h Tue Nov 10 00:04:04 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_hdmireg.h Tue Nov 10 00:33:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_hdmireg.h,v 1.4 2015/07/25 15:50:42 jmcneill Exp $ */
+/* $NetBSD: tegra_hdmireg.h,v 1.5 2015/11/10 00:33:46 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -239,7 +239,11 @@
#define HDMI_NV_PDISP_SOR_LVDS_REG 0x16c
#define HDMI_NV_PDISP_SOR_CRCA_REG 0x170
#define HDMI_NV_PDISP_SOR_CRCB_REG 0x174
+
#define HDMI_NV_PDISP_SOR_BLANK_REG 0x178
+#define HDMI_NV_PDISP_SOR_BLANK_STATUS __BIT(2)
+#define HDMI_NV_PDISP_SOR_BLANK_TRANSITION __BIT(1)
+#define HDMI_NV_PDISP_SOR_BLANK_OVERRIDE __BIT(0)
#define HDMI_NV_PDISP_SOR_SEQ_CTL_REG 0x17c
#define HDMI_NV_PDISP_SOR_SEQ_CTL_SWITCH __BIT(30)
Home |
Main Index |
Thread Index |
Old Index