From 69888e5b0301de2234f38d5266233e85a3e1e0bc Mon Sep 17 00:00:00 2001 From: Kevin Brace Date: Thu, 6 Jul 2017 22:02:57 -0500 Subject: Added via_fp_set_primary_direct_display_period This is an inline function. Signed-off-by: Kevin Brace --- drivers/gpu/drm/via/crtc_hw.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/via/crtc_hw.h b/drivers/gpu/drm/via/crtc_hw.h index 4c8378cdffce..8786840fdf49 100644 --- a/drivers/gpu/drm/via/crtc_hw.h +++ b/drivers/gpu/drm/via/crtc_hw.h @@ -403,6 +403,22 @@ via_fp_set_primary_direct_back_light_ctrl(void __iomem *regs, bool direct_on) direct_on ? "On" : "Off"); } +/* + * Sets KM400 or later chipset's FP primary direct display + * period control. + */ +static inline void +via_fp_set_primary_direct_display_period(void __iomem *regs, bool direct_on) +{ + /* 3X5.91[7] - FP Primary Direct Display Period Control + * 0: On + * 1: Off */ + svga_wcrt_mask(regs, 0x91, + direct_on ? 0x00 : BIT(7), BIT(7)); + DRM_DEBUG_KMS("FP Primary Direct Display Period Control: %s\n", + direct_on ? "On" : "Off"); +} + /* * Sets FPDP (Flat Panel Display Port) Low I/O pad state. */ -- cgit v1.2.3