summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Brace <kevinbrace@gmx.com>2017-07-07 17:45:56 -0500
committerKevin Brace <kevinbrace@gmx.com>2017-07-07 17:45:56 -0500
commite26c6bcc526929ce2a3a22c5f35423bfe8671306 (patch)
tree5336a2017e453f52e4d6292f5d4aa8b924c23a9e
parente8eb50ee77ca9295a845c1a995897a67dd4fe737 (diff)
Added via_lvds2_set_power
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r--drivers/gpu/drm/via/crtc_hw.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/via/crtc_hw.h b/drivers/gpu/drm/via/crtc_hw.h
index 20e341f55f4f..54860250f597 100644
--- a/drivers/gpu/drm/via/crtc_hw.h
+++ b/drivers/gpu/drm/via/crtc_hw.h
@@ -764,6 +764,21 @@ via_lvds1_set_display_source(void __iomem *regs, u8 display_source)
}
/*
+ * Sets CX700 / VX700 and VX800 chipset's LVDS2 power state.
+ */
+static inline void
+via_lvds2_set_power(void __iomem *regs, bool power_state)
+{
+ /* 3X5.D2[6] - Power Down (Active High) for Channel 2 LVDS
+ * 0: Power on
+ * 1: Power off */
+ svga_wcrt_mask(regs, 0xD2,
+ power_state ? 0x00 : BIT(6), BIT(6));
+ DRM_DEBUG_KMS("LVDS2 Power State: %s\n",
+ power_state ? "On" : "Off");
+}
+
+/*
* Sets LVDS2 I/O pad state.
*/
static inline void