drm/i915: Enable PSR for Baytrail and Braswell.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 20 Nov 2014 11:44:37 +0000 (03:44 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Dec 2014 08:35:10 +0000 (09:35 +0100)
This patch is the last in series of VLV/CHV PSR,
that finally enable PSR by adding it to HAS_PSR
and calling the proper enable and disable
functions on the right places.

Although it is still disabled by default.

v2: Rebase over intel_psr and merge Durgadoss's fixes.
v3: Fix typo.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_dp.c

index c7f00a452f5599394578bb8d1394260fa01772d6..f6f92f16c2cf7174b7e6c6e5177ff12a4bbcfd85 100644 (file)
@@ -2257,7 +2257,8 @@ struct drm_i915_cmd_table {
 
 #define HAS_DDI(dev)           (INTEL_INFO(dev)->has_ddi)
 #define HAS_FPGA_DBG_UNCLAIMED(dev)    (INTEL_INFO(dev)->has_fpga_dbg)
-#define HAS_PSR(dev)           (IS_HASWELL(dev) || IS_BROADWELL(dev))
+#define HAS_PSR(dev)           (IS_HASWELL(dev) || IS_BROADWELL(dev) || \
+                                IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
 #define HAS_RUNTIME_PM(dev)    (IS_GEN6(dev) || IS_HASWELL(dev) || \
                                 IS_BROADWELL(dev) || IS_VALLEYVIEW(dev))
 #define HAS_RC6(dev)           (INTEL_INFO(dev)->gen >= 6)
index fa509db3e1f9283fd6249c0e299cd388ba6b6ed9..3fc32968252762c52f15a043bae719aa27e692e7 100644 (file)
@@ -2105,6 +2105,9 @@ static void intel_disable_dp(struct intel_encoder *encoder)
        if (crtc->config.has_audio)
                intel_audio_codec_disable(encoder);
 
+       if (HAS_PSR(dev) && !HAS_DDI(dev))
+               intel_psr_disable(intel_dp);
+
        /* Make sure the panel is off before trying to change the mode. But also
         * ensure that we have vdd while we switch off the panel. */
        intel_edp_panel_vdd_on(intel_dp);
@@ -2329,6 +2332,7 @@ static void vlv_enable_dp(struct intel_encoder *encoder)
        struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
 
        intel_edp_backlight_on(intel_dp);
+       intel_psr_enable(intel_dp);
 }
 
 static void g4x_pre_enable_dp(struct intel_encoder *encoder)