From 1010e0fc75cd1bc152de0a9b01d0e4d8f83d67f4 Mon Sep 17 00:00:00 2001 From: Kevin Brace Date: Thu, 6 Jul 2017 23:17:20 -0500 Subject: Added via_fp_set_secondary_soft_back_light This is an inline function. Signed-off-by: Kevin Brace --- drivers/gpu/drm/via/crtc_hw.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/via/crtc_hw.h b/drivers/gpu/drm/via/crtc_hw.h index 0e7850e317ec..9e411cc42201 100644 --- a/drivers/gpu/drm/via/crtc_hw.h +++ b/drivers/gpu/drm/via/crtc_hw.h @@ -453,6 +453,23 @@ via_fp_set_secondary_power_seq_type(void __iomem *regs, ctrl_type ? "Hardware" : "Software"); } +/* + * Sets CX700 / VX700 or later chipset's FP secondary + * software controlled back light. + */ +static inline void +via_fp_set_secondary_soft_back_light(void __iomem *regs, + bool soft_on) +{ + /* 3X5.D3[1] - FP Secondary Software Back Light On + * 0: Off + * 1: On */ + svga_wcrt_mask(regs, 0xD3, + soft_on ? BIT(1) : 0x00, BIT(1)); + DRM_DEBUG_KMS("FP Secondary Software Controlled Back Light: " + "%s\n", soft_on ? "On" : "Off"); +} + /* * Sets FPDP (Flat Panel Display Port) Low I/O pad state. */ -- cgit v1.2.3