drm/i915/skl: Support for edp low_vswing param in vbt
authorSonika Jindal <sonika.jindal@intel.com>
Wed, 25 Feb 2015 04:59:11 +0000 (10:29 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 25 Feb 2015 15:06:00 +0000 (16:06 +0100)
v2: Adding VBT version check for low_vswing field, and correcting parsing

v3: (Damien)
 - Restrain the scope of the 'vswing' variable
 - Use the more idiomatic "ev_priv->vbt.edp_low_vswing = vswing == 0;"
  instead of if (foo) var = true; else var = false;
 - Shorten edp_vswing_premph_setting to edp_vswing_premph to fit in 80 chars
 - Add the version from which the edp_vswing_premph field is valid in the
  struct definition

Reviewed-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> (v2)
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_bios.c
drivers/gpu/drm/i915/intel_bios.h

index 4280d0b292da26dbbf76215fc1390f876deab52e..ba0f5b690291e7ad31f397c8cf8945b23f256fe4 100644 (file)
@@ -1466,6 +1466,7 @@ struct intel_vbt_data {
        bool edp_initialized;
        bool edp_support;
        int edp_bpp;
+       bool edp_low_vswing;
        struct edp_power_seq edp_pps;
 
        struct {
index 3f178258d9f9ce679044d2775b66359297d68623..c684085cb56ac0d3001ded0c81cbe72da4341a28 100644 (file)
@@ -662,6 +662,13 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb)
                              edp_link_params->vswing);
                break;
        }
+
+       if (bdb->version >= 173) {
+               uint8_t vswing;
+
+               vswing = (edp->edp_vswing_preemph >> (panel_type * 4)) & 0xF;
+               dev_priv->vbt.edp_low_vswing = vswing == 0;
+       }
 }
 
 static void
index a6a8710f665f5c8b37c28fd3b62ad7d0593a00b4..6afd5be33367615899403892cb9c3626ada051bb 100644 (file)
@@ -554,6 +554,7 @@ struct bdb_edp {
        /* ith bit indicates enabled/disabled for (i+1)th panel */
        u16 edp_s3d_feature;
        u16 edp_t3_optimization;
+       u64 edp_vswing_preemph;         /* v173 */
 } __packed;
 
 struct psr_table {