drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time
A new field with the training pattern(TP) wakeup time for PSR2 was added to VBT, so lets use it when available otherwise it will fallback to PSR1 wakeup time. v2: replacing enum to numerical usec time (Jani) BSpec: 20131 Cc: Jani Nikula <jani.nikula@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190312195743.8829-1-jose.souza@intel.com
This commit is contained in:
@@ -760,6 +760,31 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
|
||||
dev_priv->vbt.psr.tp1_wakeup_time_us = psr_table->tp1_wakeup_time * 100;
|
||||
dev_priv->vbt.psr.tp2_tp3_wakeup_time_us = psr_table->tp2_tp3_wakeup_time * 100;
|
||||
}
|
||||
|
||||
if (bdb->version >= 226) {
|
||||
u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
|
||||
|
||||
wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
|
||||
switch (wakeup_time) {
|
||||
case 0:
|
||||
wakeup_time = 500;
|
||||
break;
|
||||
case 1:
|
||||
wakeup_time = 100;
|
||||
break;
|
||||
case 3:
|
||||
wakeup_time = 50;
|
||||
break;
|
||||
default:
|
||||
case 2:
|
||||
wakeup_time = 2500;
|
||||
break;
|
||||
}
|
||||
dev_priv->vbt.psr.psr2_tp2_tp3_wakeup_time_us = wakeup_time;
|
||||
} else {
|
||||
/* Reusing PSR1 wakeup time for PSR2 in older VBTs */
|
||||
dev_priv->vbt.psr.psr2_tp2_tp3_wakeup_time_us = dev_priv->vbt.psr.tp2_tp3_wakeup_time_us;
|
||||
}
|
||||
}
|
||||
|
||||
static void parse_dsi_backlight_ports(struct drm_i915_private *dev_priv,
|
||||
|
Reference in New Issue
Block a user