drm/i915/psr: vbt change for psr
Subsystems (2)
PATCH 1/1 drm/i915/psr: vbt change for psr
From: Vathsala Nagaraju <[email protected]>
For psr block #9, the vbt description has moved to options [0-3] for TP1,TP2,TP3 Wakeup time from decimal value without any change to vbt structure. Since spec does not mention from which VBT version this change was added to vbt.bsf file, we cannot depend on bdb->version check to change for all the platforms.
There is RCR inplace for GOP team to provide the version number to make generic change. Since Kabylake with bdb version 209 is having this change, limiting this change to gen9_bc and version 209+ to unblock google.
Tested on skl(bdb version 203,without options) and kabylake(bdb version 209,212) having new options.
bspec 20131
v2: (Jani and Rodrigo)
move the 165 version check to intel_bios.c
v3: Jani
Move the abstraction to intel_bios.
v4: Jani
Rename tp*_wakeup_time to have "us" suffix.
For values outside range[0-3],default to max 2500us. Old decimal value was wake up time in multiples of 100us.
v5: Jani and Rodrigo
Handle option 2 in default condition.
Print oustide range value.
For negetive values default to 2500us.
v6: Jani
Handle default first and then fall through for case 2.
v7: Rodrigo
Apply this change for IS_GEN9_BC and vbt version > 209
v8: Puthik
Add new function vbt_psr_to_us.
v9: Jani
Change to v7 version as it's more readable.
DK
add comment /*fall through*/ after case2.
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 8 +++---- drivers/gpu/drm/i915/intel_bios.c | 48 +++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_psr.c | 39 +++++++++++++++---------------- 4 files changed, 72 insertions(+), 27 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -2
@@ -1078,8 +1078,8 @@ struct intel_vbt_data {bool require_aux_wakeup;int idle_frames;enum psr_lines_to_wait lines_to_wait; -int tp1_wakeup_time; -int tp2_tp3_wakeup_time; +int tp1_wakeup_time_us; +int tp2_tp3_wakeup_time_us; } psr;struct {
drivers/gpu/drm/i915/i915_reg.h +4 -4
@@ -4088,10 +4088,10 @@ enum {#define EDP_Y_COORDINATE_ENABLE (1<<25)/* GLK and CNL+ */ #define EDP_MAX_SU_DISABLE_TIME (t) ((t)<<20)#define EDP_MAX_SU_DISABLE_TIME_MASK (0x1f<<20) -#define EDP_PSR2_TP2_TIME_500 (0<<8) -#define EDP_PSR2_TP2_TIME_100 (1<<8) -#define EDP_PSR2_TP2_TIME_2500 (2<<8) -#define EDP_PSR2_TP2_TIME_50 (3<<8) +#define EDP_PSR2_TP2_TIME_500us (0<<8) +#define EDP_PSR2_TP2_TIME_100us (1<<8) +#define EDP_PSR2_TP2_TIME_2500us (2<<8) +#define EDP_PSR2_TP2_TIME_50us (3<<8)#define EDP_PSR2_TP2_TIME_MASK (3<<8)#define EDP_PSR2_FRAME_BEFORE_SU_SHIFT 4#define EDP_PSR2_FRAME_BEFORE_SU_MASK (0xf<<4)
drivers/gpu/drm/i915/intel_bios.c +46 -2
54 lines not on this page · raw message
drivers/gpu/drm/i915/intel_psr.c +20 -19
@@ -461,23 +461,23 @@ static void hsw_activate_psr1(struct intel_dp *intel_dp)if (dev_priv->psr.link_standby) val |=EDP_PSR_LINK_STANDBY ; -if (dev_priv->vbt.psr.tp1_wakeup_time >5 ) - val |= EDP_PSR_TP1_TIME_2500us; -else if (dev_priv->vbt.psr.tp1_wakeup_time >1 ) - val |= EDP_PSR_TP1_TIME_500us; -else if (dev_priv->vbt.psr.tp1_wakeup_time >0 ) +if (dev_priv->vbt.psr.tp1_wakeup_time_us ==0 ) + val |= EDP_PSR_TP1_TIME_0us; +else if (dev_priv->vbt.psr.tp1_wakeup_time_us <=100 ) val |= EDP_PSR_TP1_TIME_100us; +else if (dev_priv->vbt.psr.tp1_wakeup_time_us <=500 ) + val |= EDP_PSR_TP1_TIME_500us;else - val |= EDP_PSR_TP1_TIME_0us; + val |= EDP_PSR_TP1_TIME_2500us; -if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >5 ) - val |= EDP_PSR_TP2_TP3_TIME_2500us; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >1 ) - val |= EDP_PSR_TP2_TP3_TIME_500us; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >0 ) +if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us ==0 ) + val |= EDP_PSR_TP2_TP3_TIME_0us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=100 ) val |= EDP_PSR_TP2_TP3_TIME_100us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=500 ) + val |= EDP_PSR_TP2_TP3_TIME_500us;else - val |= EDP_PSR_TP2_TP3_TIME_0us; + val |= EDP_PSR_TP2_TP3_TIME_2500us;if (intel_dp_source_supports_hbr2 (intel_dp) &&drm_dp_tps3_supported (intel_dp->dpcd))
@@ -513,14 +513,15 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp) val |=EDP_PSR2_FRAME_BEFORE_SU (dev_priv->psr.sink_sync_latency +1 ); -if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >5 ) - val |=EDP_PSR2_TP2_TIME_2500 ; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >1 ) - val |=EDP_PSR2_TP2_TIME_500 ; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >0 ) - val |=EDP_PSR2_TP2_TIME_100 ; +if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us >=0 && + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=50 ) + val |= EDP_PSR2_TP2_TIME_50us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=100 ) + val |= EDP_PSR2_TP2_TIME_100us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=500 ) + val |= EDP_PSR2_TP2_TIME_500us;else - val |=EDP_PSR2_TP2_TIME_50 ; + val |= EDP_PSR2_TP2_TIME_2500us;I915_WRITE (EDP_PSR2_CTL , val); }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915/psr: vbt change for psr (rev9)
== Series Details ==
== Series Details ==
Series: drm/i915/psr: vbt change for psr (rev9)
URL : https://patchwork.freedesktop.org/series/41289/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
09cb51f7d1d0 drm/i915/psr: vbt change for psr
-:83: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#83: FILE: drivers/gpu/drm/i915/i915_reg.h:4091:
+#define EDP_PSR2_TP2_TIME_500us (0<<8)
^-:84: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #84: FILE: drivers/gpu/drm/i915/i915_reg.h:4092:
+#define EDP_PSR2_TP2_TIME_100us (1<<8)
^
-:85: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #85: FILE: drivers/gpu/drm/i915/i915_reg.h:4093:
+#define EDP_PSR2_TP2_TIME_2500us (2<<8)
^
-:86: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) #86: FILE: drivers/gpu/drm/i915/i915_reg.h:4094:
+#define EDP_PSR2_TP2_TIME_50us (3<<8)
^
-:117: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #117: FILE: drivers/gpu/drm/i915/intel_bios.c:708:
+ DRM_DEBUG_KMS("VBT tp1 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n",
+ psr_table->tp1_wakeup_time);
-:136: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #136: FILE: drivers/gpu/drm/i915/intel_bios.c:727:
+ DRM_DEBUG_KMS("VBT tp2_tp3 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n",
+ psr_table->tp2_tp3_wakeup_time);
total: 0 errors, 0 warnings, 6 checks, 135 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/psr: vbt change for psr (rev9)
In reply to vathsala nagaraju== Series Details ==
== Series Details ==
Series: drm/i915/psr: vbt change for psr (rev9)
URL : https://patchwork.freedesktop.org/series/41289/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4218 -> Patchwork_9077 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9077 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9077, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/41289/revisions/9/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9077:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_9077 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_chamelium@dp-crc-fast:
fi-kbl-7500u: PASS -> DMESG-FAIL (fdo#103841)
==== Possible fixes ====
igt@gem_mmap_gtt@basic-small-bo-tiledx:
fi-gdg-551: FAIL (fdo#102575) -> PASS
igt@kms_flip@basic-flip-vs-wf_vblank:
fi-cnl-psr: FAIL (fdo#100368) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-FAIL (fdo#102614, fdo#106103) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
== Participating hosts (44 -> 39) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4218 -> Patchwork_9077
CI_DRM_4218: df2fa6a1766287fc138a6088c48c306191edaf01 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4489: d8d5dde407e7f7b17850be71d24a7e679533b03d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9077: 09cb51f7d1d0561b76e4e5a8decb483b1a364557 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4489: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit
== Linux commits ==
09cb51f7d1d0 drm/i915/psr: vbt change for psr
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9077/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 40 lines · vathsala nagaraju
From: Vathsala Nagaraju <[email protected]>
For psr block #9, the vbt description has moved to options [0-3] for TP1,TP2,TP3 Wakeup time from decimal value without any change to vbt structure. Since spec does not mention from which VBT version this change was added to vbt.bsf file, we cannot depend on
bdb->versioncheck to change for all the platforms.There is RCR inplace for GOP team to provide the version number to make generic change. Since Kabylake with bdb version 209 is having this change, limiting this change to
gen9_bcand version 209+ to unblock google.Tested on
skl(bdb version 203,without options)andkabylake(bdb version 209,212)having new options.bspec 20131
v2: (Jani and Rodrigo)
move the 165 version check tointel_bios.c
v3: Jani
Move the abstraction tointel_bios.
v4: Jani
Rename tp*_wakeup_time to have "us" suffix.
For values outside range[0-3],default to max 2500us. Old decimal value was wake up time in multiples of 100us.
v5: Jani and Rodrigo
Handle option 2 in default condition.
Print oustide range value.
For negetive values default to 2500us.
v6: Jani
Handle default first and then fall through for case 2.
v7: Rodrigo
Apply this change forIS_GEN9_BCand vbt version > 209
v8: Puthik
Add new functionvbt_psr_to_us.
v9: Jani
Change to v7 version as it's more readable.
DK
add comment /*fall through*/ after case2.
Quoted 8 lines
Cc Rodrigo Vivi <[email protected]>Cc Puthikorn Voravootivat <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Cc Jani Nikula <[email protected]>Cc José Roberto de Souza <[email protected]>Signed-off-by Maulik V Vaghela <[email protected]>Signed-off-by Vathsala Nagaraju <[email protected]>
Quoted 163 lines
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 8 +++---- drivers/gpu/drm/i915/intel_bios.c | 48 +++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_psr.c | 39 +++++++++++++++---------------- 4 files changed, 72 insertions(+), 27 deletions(-)drivers/gpu/drm/i915/i915_drv.h +2
-2@@ -1078,8 +1078,8 @@ struct intel_vbt_data {bool require_aux_wakeup;int idle_frames;enum psr_lines_to_wait lines_to_wait; -int tp1_wakeup_time; -int tp2_tp3_wakeup_time; +int tp1_wakeup_time_us; +int tp2_tp3_wakeup_time_us; } psr;struct {drivers/gpu/drm/i915/i915_reg.h +4
-4@@ -4088,10 +4088,10 @@ enum {#define EDP_Y_COORDINATE_ENABLE (1<<25)/* GLK and CNL+ */ #define EDP_MAX_SU_DISABLE_TIME (t) ((t)<<20)#define EDP_MAX_SU_DISABLE_TIME_MASK (0x1f<<20) -#define EDP_PSR2_TP2_TIME_500 (0<<8) -#define EDP_PSR2_TP2_TIME_100 (1<<8) -#define EDP_PSR2_TP2_TIME_2500 (2<<8) -#define EDP_PSR2_TP2_TIME_50 (3<<8) +#define EDP_PSR2_TP2_TIME_500us (0<<8) +#define EDP_PSR2_TP2_TIME_100us (1<<8) +#define EDP_PSR2_TP2_TIME_2500us (2<<8) +#define EDP_PSR2_TP2_TIME_50us (3<<8)#define EDP_PSR2_TP2_TIME_MASK (3<<8)#define EDP_PSR2_FRAME_BEFORE_SU_SHIFT 4#define EDP_PSR2_FRAME_BEFORE_SU_MASK (0xf<<4)drivers/gpu/drm/i915/intel_bios.c +46
-2@@ -688,8 +688,52 @@ static int intel_bios_ssc_frequency(struct drm_i915_private *dev_priv,break ; } - dev_priv->vbt.psr.tp1_wakeup_time = psr_table->tp1_wakeup_time; - dev_priv->vbt.psr.tp2_tp3_wakeup_time = psr_table->tp2_tp3_wakeup_time; +/* +* New psr options 0=500us, 1=100us, 2=2500us, 3=0us +* Old decimal value is wake up time in multiples of 100 us. +*/ +if (bdb->version >=209 &&IS_GEN9_BC (dev_priv)) { +switch (psr_table->tp1_wakeup_time) { +case 0 : + dev_priv->vbt.psr.tp1_wakeup_time_us =500 ; +break ; +case 1 : + dev_priv->vbt.psr.tp1_wakeup_time_us =100 ; +break ; +case 3 : + dev_priv->vbt.psr.tp1_wakeup_time_us =0 ; +break ; +default : +DRM_DEBUG_KMS ("VBT tp1 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n" , + psr_table->tp1_wakeup_time); +/* fallthrough */ +case 2 : + dev_priv->vbt.psr.tp1_wakeup_time_us =2500 ; +break ; + } + +switch (psr_table->tp2_tp3_wakeup_time) { +case 0 : + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us =500 ; +break ; +case 1 : + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us =100 ; +break ; +case 3 : + dev_priv->vbt.psr.tp1_wakeup_time_us =0 ; +break ; +default : +DRM_DEBUG_KMS ("VBT tp2_tp3 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n" , + psr_table->tp2_tp3_wakeup_time); +/* fallthrough */ +case 2 : + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us =2500 ; +break ; + } + }else { + 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 ; + } } static void parse_dsi_backlight_ports(struct drm_i915_private *dev_priv,drivers/gpu/drm/i915/intel_psr.c +20
-19@@ -461,23 +461,23 @@ static void hsw_activate_psr1(struct intel_dp *intel_dp)if (dev_priv->psr.link_standby) val |=EDP_PSR_LINK_STANDBY ; -if (dev_priv->vbt.psr.tp1_wakeup_time >5 ) - val |= EDP_PSR_TP1_TIME_2500us; -else if (dev_priv->vbt.psr.tp1_wakeup_time >1 ) - val |= EDP_PSR_TP1_TIME_500us; -else if (dev_priv->vbt.psr.tp1_wakeup_time >0 ) +if (dev_priv->vbt.psr.tp1_wakeup_time_us ==0 ) + val |= EDP_PSR_TP1_TIME_0us; +else if (dev_priv->vbt.psr.tp1_wakeup_time_us <=100 ) val |= EDP_PSR_TP1_TIME_100us; +else if (dev_priv->vbt.psr.tp1_wakeup_time_us <=500 ) + val |= EDP_PSR_TP1_TIME_500us;else - val |= EDP_PSR_TP1_TIME_0us; + val |= EDP_PSR_TP1_TIME_2500us; -if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >5 ) - val |= EDP_PSR_TP2_TP3_TIME_2500us; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >1 ) - val |= EDP_PSR_TP2_TP3_TIME_500us; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >0 ) +if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us ==0 ) + val |= EDP_PSR_TP2_TP3_TIME_0us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=100 ) val |= EDP_PSR_TP2_TP3_TIME_100us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=500 ) + val |= EDP_PSR_TP2_TP3_TIME_500us;else - val |= EDP_PSR_TP2_TP3_TIME_0us; + val |= EDP_PSR_TP2_TP3_TIME_2500us;if (intel_dp_source_supports_hbr2 (intel_dp) &&drm_dp_tps3_supported (intel_dp->dpcd))@@ -513,14 +513,15 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp) val |=EDP_PSR2_FRAME_BEFORE_SU (dev_priv->psr.sink_sync_latency +1 ); -if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >5 ) - val |=EDP_PSR2_TP2_TIME_2500 ; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >1 ) - val |=EDP_PSR2_TP2_TIME_500 ; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >0 ) - val |=EDP_PSR2_TP2_TIME_100 ; +if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us >=0 && + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=50 ) + val |= EDP_PSR2_TP2_TIME_50us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=100 ) + val |= EDP_PSR2_TP2_TIME_100us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=500 ) + val |= EDP_PSR2_TP2_TIME_500us;else - val |=EDP_PSR2_TP2_TIME_50 ; + val |= EDP_PSR2_TP2_TIME_2500us;I915_WRITE (EDP_PSR2_CTL , val); }
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 47 lines · Jani Nikula
Quoted 46 lines · vathsala nagaraju
From: Vathsala Nagaraju <[email protected]>
For psr block #9, the vbt description has moved to options [0-3] for TP1,TP2,TP3 Wakeup time from decimal value without any change to vbt structure. Since spec does not mention from which VBT version this change was added to vbt.bsf file, we cannot depend on
bdb->versioncheck to change for all the platforms.There is RCR inplace for GOP team to provide the version number to make generic change. Since Kabylake with bdb version 209 is having this change, limiting this change to
gen9_bcand version 209+ to unblock google.Tested on
skl(bdb version 203,without options)andkabylake(bdb version 209,212)having new options.bspec 20131
v2: (Jani and Rodrigo)
move the 165 version check tointel_bios.c
v3: Jani
Move the abstraction tointel_bios.
v4: Jani
Rename tp*_wakeup_time to have "us" suffix.
For values outside range[0-3],default to max 2500us. Old decimal value was wake up time in multiples of 100us.
v5: Jani and Rodrigo
Handle option 2 in default condition.
Print oustide range value.
For negetive values default to 2500us.
v6: Jani
Handle default first and then fall through for case 2.
v7: Rodrigo
Apply this change forIS_GEN9_BCand vbt version > 209
v8: Puthik
Add new functionvbt_psr_to_us.
v9: Jani
Change to v7 version as it's more readable.
DK
add comment /*fall through*/ after case2.Cc Rodrigo Vivi <[email protected]>Cc Puthikorn Voravootivat <[email protected]>Cc Dhinakaran Pandiyan <[email protected]>Cc Jani Nikula <[email protected]>Cc José Roberto de Souza <[email protected]>
Quoted 4 lines
Quoted 2 lines
Signed-off-by Maulik V Vaghela <[email protected]>Signed-off-by Vathsala Nagaraju <[email protected]>Reviewed-by Jani Nikula <[email protected]>
And pushed to dinq. Thanks for the patch.
BR,
Jani.
Quoted 164 lines
Quoted 164 lines
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 8 +++---- drivers/gpu/drm/i915/intel_bios.c | 48 +++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_psr.c | 39 +++++++++++++++---------------- 4 files changed, 72 insertions(+), 27 deletions(-)drivers/gpu/drm/i915/i915_drv.h +2
-2@@ -1078,8 +1078,8 @@ struct intel_vbt_data {bool require_aux_wakeup;int idle_frames;enum psr_lines_to_wait lines_to_wait; -int tp1_wakeup_time; -int tp2_tp3_wakeup_time; +int tp1_wakeup_time_us; +int tp2_tp3_wakeup_time_us; } psr;struct {drivers/gpu/drm/i915/i915_reg.h +4
-4@@ -4088,10 +4088,10 @@ enum {#define EDP_Y_COORDINATE_ENABLE (1<<25)/* GLK and CNL+ */ #define EDP_MAX_SU_DISABLE_TIME (t) ((t)<<20)#define EDP_MAX_SU_DISABLE_TIME_MASK (0x1f<<20) -#define EDP_PSR2_TP2_TIME_500 (0<<8) -#define EDP_PSR2_TP2_TIME_100 (1<<8) -#define EDP_PSR2_TP2_TIME_2500 (2<<8) -#define EDP_PSR2_TP2_TIME_50 (3<<8) +#define EDP_PSR2_TP2_TIME_500us (0<<8) +#define EDP_PSR2_TP2_TIME_100us (1<<8) +#define EDP_PSR2_TP2_TIME_2500us (2<<8) +#define EDP_PSR2_TP2_TIME_50us (3<<8)#define EDP_PSR2_TP2_TIME_MASK (3<<8)#define EDP_PSR2_FRAME_BEFORE_SU_SHIFT 4#define EDP_PSR2_FRAME_BEFORE_SU_MASK (0xf<<4)drivers/gpu/drm/i915/intel_bios.c +46
-2@@ -688,8 +688,52 @@ static int intel_bios_ssc_frequency(struct drm_i915_private *dev_priv,break ; } - dev_priv->vbt.psr.tp1_wakeup_time = psr_table->tp1_wakeup_time; - dev_priv->vbt.psr.tp2_tp3_wakeup_time = psr_table->tp2_tp3_wakeup_time; +/* +* New psr options 0=500us, 1=100us, 2=2500us, 3=0us +* Old decimal value is wake up time in multiples of 100 us. +*/ +if (bdb->version >=209 &&IS_GEN9_BC (dev_priv)) { +switch (psr_table->tp1_wakeup_time) { +case 0 : + dev_priv->vbt.psr.tp1_wakeup_time_us =500 ; +break ; +case 1 : + dev_priv->vbt.psr.tp1_wakeup_time_us =100 ; +break ; +case 3 : + dev_priv->vbt.psr.tp1_wakeup_time_us =0 ; +break ; +default : +DRM_DEBUG_KMS ("VBT tp1 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n" , + psr_table->tp1_wakeup_time); +/* fallthrough */ +case 2 : + dev_priv->vbt.psr.tp1_wakeup_time_us =2500 ; +break ; + } + +switch (psr_table->tp2_tp3_wakeup_time) { +case 0 : + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us =500 ; +break ; +case 1 : + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us =100 ; +break ; +case 3 : + dev_priv->vbt.psr.tp1_wakeup_time_us =0 ; +break ; +default : +DRM_DEBUG_KMS ("VBT tp2_tp3 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n" , + psr_table->tp2_tp3_wakeup_time); +/* fallthrough */ +case 2 : + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us =2500 ; +break ; + } + }else { + 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 ; + } } static void parse_dsi_backlight_ports(struct drm_i915_private *dev_priv,drivers/gpu/drm/i915/intel_psr.c +20
-19@@ -461,23 +461,23 @@ static void hsw_activate_psr1(struct intel_dp *intel_dp)if (dev_priv->psr.link_standby) val |=EDP_PSR_LINK_STANDBY ; -if (dev_priv->vbt.psr.tp1_wakeup_time >5 ) - val |= EDP_PSR_TP1_TIME_2500us; -else if (dev_priv->vbt.psr.tp1_wakeup_time >1 ) - val |= EDP_PSR_TP1_TIME_500us; -else if (dev_priv->vbt.psr.tp1_wakeup_time >0 ) +if (dev_priv->vbt.psr.tp1_wakeup_time_us ==0 ) + val |= EDP_PSR_TP1_TIME_0us; +else if (dev_priv->vbt.psr.tp1_wakeup_time_us <=100 ) val |= EDP_PSR_TP1_TIME_100us; +else if (dev_priv->vbt.psr.tp1_wakeup_time_us <=500 ) + val |= EDP_PSR_TP1_TIME_500us;else - val |= EDP_PSR_TP1_TIME_0us; + val |= EDP_PSR_TP1_TIME_2500us; -if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >5 ) - val |= EDP_PSR_TP2_TP3_TIME_2500us; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >1 ) - val |= EDP_PSR_TP2_TP3_TIME_500us; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >0 ) +if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us ==0 ) + val |= EDP_PSR_TP2_TP3_TIME_0us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=100 ) val |= EDP_PSR_TP2_TP3_TIME_100us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=500 ) + val |= EDP_PSR_TP2_TP3_TIME_500us;else - val |= EDP_PSR_TP2_TP3_TIME_0us; + val |= EDP_PSR_TP2_TP3_TIME_2500us;if (intel_dp_source_supports_hbr2 (intel_dp) &&drm_dp_tps3_supported (intel_dp->dpcd))@@ -513,14 +513,15 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp) val |=EDP_PSR2_FRAME_BEFORE_SU (dev_priv->psr.sink_sync_latency +1 ); -if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >5 ) - val |=EDP_PSR2_TP2_TIME_2500 ; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >1 ) - val |=EDP_PSR2_TP2_TIME_500 ; -else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time >0 ) - val |=EDP_PSR2_TP2_TIME_100 ; +if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us >=0 && + dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=50 ) + val |= EDP_PSR2_TP2_TIME_50us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=100 ) + val |= EDP_PSR2_TP2_TIME_100us; +else if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <=500 ) + val |= EDP_PSR2_TP2_TIME_500us;else - val |=EDP_PSR2_TP2_TIME_50 ; + val |= EDP_PSR2_TP2_TIME_2500us;I915_WRITE (EDP_PSR2_CTL , val); }
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/psr: vbt change for psr (rev9)
In reply to vathsala nagaraju== Series Details ==
== Series Details ==
Series: drm/i915/psr: vbt change for psr (rev9)
URL : https://patchwork.freedesktop.org/series/41289/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4218_full -> Patchwork_9077_full =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/41289/revisions/9/mbox/
== Known issues ==
Here are the changes found in Patchwork_9077_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_eio@in-flight-contexts-1us:
shard-glk: PASS -> FAIL (fdo#105954)
igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
shard-glk: PASS -> FAIL (fdo#106509)
igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
shard-glk: PASS -> FAIL (fdo#100368)
==== Possible fixes ====
igt@drv_selftest@live_hangcheck:
shard-apl: DMESG-FAIL (fdo#106560) -> PASS
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
shard-glk: FAIL (fdo#105703) -> PASS
igt@kms_flip@2x-flip-vs-absolute-wf_vblank-interruptible:
shard-hsw: FAIL (fdo#103928) -> PASS
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-glk: FAIL (fdo#102887) -> PASS
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_flip@plain-flip-ts-check:
shard-hsw: FAIL (fdo#100368) -> PASS
shard-glk: FAIL (fdo#100368) -> PASS +1
igt@kms_flip_tiling@flip-to-x-tiled:
shard-glk: FAIL (fdo#104724, fdo#103822) -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-move:
shard-glk: FAIL (fdo#104724, fdo#103167) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#105954 https://bugs.freedesktop.org/show_bug.cgi?id=105954
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
== Participating hosts (9 -> 8) ==
Missing (1): shard-kbl
== Build changes ==
* Linux: CI_DRM_4218 -> Patchwork_9077
CI_DRM_4218: df2fa6a1766287fc138a6088c48c306191edaf01 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4489: d8d5dde407e7f7b17850be71d24a7e679533b03d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9077: 09cb51f7d1d0561b76e4e5a8decb483b1a364557 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4489: 6ab75f7eb5e1dccbb773e1739beeb2d7cbd6ad0d @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9077/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx