[PATCH 2/2] drm/i915/edp: Force pps t12 value
Manasi Navare
manasi.d.navare at intel.com
Tue Jun 27 16:21:24 UTC 2017
Signed-off-by: Manasi Navare <manasi.d.navare at intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 21 ++++++++++++++++++++-
drivers/gpu/drm/i915/intel_drv.h | 1 +
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 67bc8a7a..0f11691 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -49,6 +49,9 @@
#define INTEL_DP_RESOLUTION_STANDARD (2 << INTEL_DP_RESOLUTION_SHIFT_MASK)
#define INTEL_DP_RESOLUTION_FAILSAFE (3 << INTEL_DP_RESOLUTION_SHIFT_MASK)
+/* Quirk for specific eDP panels for PPS T12 value */
+#define PPS_T11_T12_800MS 800
+
struct dp_link_dpll {
int clock;
struct dpll dpll;
@@ -5222,7 +5225,7 @@ intel_dp_init_panel_power_sequencer(struct drm_device *dev,
lockdep_assert_held(&dev_priv->pps_mutex);
/* already initialized? */
- if (final->t11_t12 != 0)
+ if (final->t11_t12 != 0 && !intel_dp->force_pps_t12)
return;
intel_pps_readout_hw_state(dev_priv, intel_dp, &cur);
@@ -5230,6 +5233,11 @@ intel_dp_init_panel_power_sequencer(struct drm_device *dev,
intel_pps_dump_state("cur", &cur);
vbt = dev_priv->vbt.edp.pps;
+ /* Force the t11_t12 value to 800ms as a quirk */
+ if (intel_dp->force_pps_t12) {
+ u16 pps_t11_t12_quirk = PPS_T11_T12_800MS;
+ vbt.t11_t12 = max(vbt.t11_t12, pps_t11_t12_quirk);
+ }
/* T11_T12 delay is special and actually in units of 100ms, but zero
* based in the hw (so we need to add 100 ms). But the sw vbt
* table multiplies it with 1000 to make it in units of 100usec,
@@ -5827,6 +5835,17 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
}
intel_connector->edid = edid;
+ /* Add the PPS T12 fix for specific eDP panel */
+ if (connector->display_info.force_pps_t12) {
+ intel_dp->force_pps_t12 = true;
+ pps_lock(intel_dp);
+ intel_dp_init_panel_power_timestamps(intel_dp);
+ intel_dp_pps_init(dev, intel_dp);
+ intel_edp_panel_vdd_sanitize(intel_dp);
+ pps_unlock(intel_dp);
+ } else
+ intel_dp->force_pps_t12 = false;
+
/* prefer fixed mode from EDID if available */
list_for_each_entry(scan, &connector->probed_modes, head) {
if ((scan->type & DRM_MODE_TYPE_PREFERRED)) {
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index d93efb4..5b52a9b 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1005,6 +1005,7 @@ struct intel_dp {
unsigned long last_power_on;
unsigned long last_backlight_off;
ktime_t panel_power_off_time;
+ bool force_pps_t12;
struct notifier_block edp_notifier;
--
2.1.4
More information about the Intel-gfx-trybot
mailing list