drm/i915: Parse VBT PSR block.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/2 drm/i915: Parse VBT PSR block.
PSR (aka SRD) block is defined at VBT and currently being used. Mainly/At-least to configure the amount of idle_frames require to get back to PSR Entry.
--- drivers/gpu/drm/i915/i915_drv.h | 16 ++++++++++++++ drivers/gpu/drm/i915/intel_bios.c | 45 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_bios.h | 22 ++++++++++++++++++- 3 files changed, 82 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +16 -0
@@ -1311,6 +1311,13 @@ enum drrs_support_type {SEAMLESS_DRRS_SUPPORT =2 }; +enum psr_lines_to_wait { +PSR_0_LINES_TO_WAIT =0 , +PSR_1_LINE_TO_WAIT , +PSR_4_LINES_TO_WAIT , +PSR_8_LINES_TO_WAIT +}; +struct intel_vbt_data {struct drm_display_mode *lfp_lvds_vbt_mode;/* if any */ struct drm_display_mode *sdvo_lvds_vbt_mode;/* if any */
@@ -1340,6 +1347,15 @@ struct intel_vbt_data {struct edp_power_seq edp_pps;struct { +bool full_link; +bool require_aux_wakeup; +int idle_frames; +enum psr_lines_to_wait lines_to_wait; +int tp1_wakeup_time; +int tp2_tp3_wakeup_time; + } psr; + +struct {u16 pwm_freq_hz;bool present;bool active_low_pwm;
drivers/gpu/drm/i915/intel_bios.c +45 -0
57 lines not on this page · raw message
drivers/gpu/drm/i915/intel_bios.h +21 -1
@@ -80,7 +80,7 @@ struct vbios_data {#define BDB_EXT_MMIO_REGS 6#define BDB_SWF_IO 7#define BDB_SWF_MMIO 8 -#define BDB_DOT_CLOCK_TABLE 9 +#define BDB_PSR 9#define BDB_MODE_REMOVAL_TABLE 10#define BDB_CHILD_DEVICE_TABLE 11#define BDB_DRIVER_FEATURES 12
@@ -556,6 +556,26 @@ struct bdb_edp {u16 edp_t3_optimization; } __packed; +struct psr_table { +/* Feature bits */ +u8 full_link:1 ; +u8 require_aux_to_wakeup:1 ; +u8 feature_bits_rsvd:6 ; + +/* Wait times */ +u8 idle_frames:4 ; +u8 lines_to_wait:3 ; +u8 wait_times_rsvd:1 ; + +/* TP wake up time in multiple of 100 */ +u16 tp1_wakeup_time; +u16 tp2_tp3_wakeup_time; +} __packed; + +struct bdb_psr { +struct psr_table psr_table[16 ]; +} __packed; +void intel_setup_bios (struct drm_device *dev);int intel_parse_bios (struct drm_device *dev);
Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 2/2 It was identified that in some cases when moving cursor Hardware can do mistake with idle_frame count. So Spec is being updated to use 2 as minimum idle_frames.
v2: Use VBT + 1 as suggested by Arthur. So this patch depends on PSR VBT block parsing.
Reference: hsdhsw/4394433
--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +6 -1
@@ -2174,7 +2174,12 @@ static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)struct drm_device *dev = dig_port->base.base.dev;struct drm_i915_private *dev_priv = dev->dev_private;uint32_t max_sleep_time =0x1f ; -uint32_t idle_frames =1 ; +/* Lately it was identified that depending on panel idle frame count +* calculated at HW can be off by 1. So let's use what came +* from VBT + 1 and at minimum 2 to be on the safe side. +*/ +uint32_t idle_frames = dev_priv->vbt.psr.idle_frames ? + dev_priv->vbt.psr.idle_frames +1 :2 ;uint32_t val =0x0 ;const uint32_t link_entry_time =EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES ;bool only_standby = false;
Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] It was identified that in some cases when moving cursor Hardware can do mistake with idle_frame count. So Spec is being updated to use 2 as minimum idle_frames.
oh! ugly!
I forgot commit subject. Please ignore these 2 patches
Quoted 36 lines · Rodrigo Vivi
v2: Use VBT + 1 as suggested by Arthur. So this patch depends on PSR VBT block parsing.
Reference: hsdhsw/4394433
Cc Arthur Runyan <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +6
-2@@ -2174,7 +2174,12 @@ static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)struct drm_device *dev = dig_port->base.base.dev;struct drm_i915_private *dev_priv = dev->dev_private;uint32_t max_sleep_time =0x1f ; -uint32_t idle_frames =1 ; +/* Lately it was identified that depending on panel idle frame count +* calculated at HW can be off by 1. So let's use what came +* from VBT + 1 and at minimum 2 to be on the safe side. +*/ +uint32_t idle_frames = dev_priv->vbt.psr.idle_frames ? + dev_priv->vbt.psr.idle_frames +1 :2 ;uint32_t val =0x0 ;const uint32_t link_entry_time =EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES ;bool only_standby = false; --1.9.3
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx