From ff311da0f99217bf67e9fbca7fe729de3467555c Mon Sep 17 00:00:00 2001 From: Kevin Brace Date: Fri, 7 Jul 2017 15:03:27 -0500 Subject: Added via_fp_primary_hard_power_seq Signed-off-by: Kevin Brace --- drivers/gpu/drm/via/via_fp.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/via/via_fp.c b/drivers/gpu/drm/via/via_fp.c index 20b494234c55..17655593568e 100644 --- a/drivers/gpu/drm/via/via_fp.c +++ b/drivers/gpu/drm/via/via_fp.c @@ -364,6 +364,37 @@ via_fp_secondary_soft_power_seq(struct via_device *dev_priv, bool power_state) DRM_DEBUG_KMS("Exiting via_fp_secondary_soft_power_seq.\n"); } +static void +via_fp_primary_hard_power_seq(struct via_device *dev_priv, bool power_state) +{ + DRM_DEBUG_KMS("Entered via_fp_primary_hard_power_seq.\n"); + + /* Use hardware FP power sequence control. */ + via_fp_set_primary_power_seq_type(VGABASE, true); + + if (power_state) { + /* Turn on FP Display Period. */ + via_fp_set_primary_direct_display_period(VGABASE, true); + + /* Turn on FP hardware power sequence. */ + via_fp_set_primary_hard_power(VGABASE, true); + + /* Turn on FP back light. */ + via_fp_set_primary_direct_back_light_ctrl(VGABASE, true); + } else { + /* Turn off FP back light. */ + via_fp_set_primary_direct_back_light_ctrl(VGABASE, false); + + /* Turn off FP hardware power sequence. */ + via_fp_set_primary_hard_power(VGABASE, false); + + /* Turn on FP Display Period. */ + via_fp_set_primary_direct_display_period(VGABASE, false); + } + + DRM_DEBUG_KMS("Entered via_fp_primary_hard_power_seq.\n"); +} + /* * Sets flat panel I/O pad state. */ -- cgit v1.2.3