drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
According to Bspec we need to
"Poll for PORT_REF_DW3_A grc_done == 1b" only on ports B and C initialization sequence when copying rcomp from port A.
So let's follow the spec and only poll for that case and not on every port A initialization.
--- drivers/gpu/drm/i915/intel_dpio_phy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_dpio_phy.c +3 -4
@@ -367,6 +367,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,if (phy_info->rcomp_phy !=-1 ) {uint32_t grc_code; + +bxt_phy_wait_grc_done (dev_priv, phy_info->rcomp_phy); +/* * PHY0 isn't connected to an RCOMP resistor so copy over * the corresponding calibrated value from PHY1, and disable
@@ -387,10 +390,6 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv, val =I915_READ (BXT_PHY_CTL_FAMILY (phy)); val |=COMMON_RESET_DIS ;I915_WRITE (BXT_PHY_CTL_FAMILY (phy), val); - -if (phy_info->rcomp_phy ==-1 ) -bxt_phy_wait_grc_done (dev_priv, phy); - }void bxt_ddi_phy_uninit (struct drm_i915_private *dev_priv,enum dpio_phy phy)
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
== Series Details ==
== Series Details ==
Series: drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
URL : https://patchwork.freedesktop.org/series/15139/
State : failure
== Summary ==
Series 15139v1 drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
https://patchwork.freedesktop.org/api/1.0/series/15139/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2600)fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:244 pass:204 dwarn:0 dfail:0 fail:0 skip:40 fi-bxt-t5700 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-j1900 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-n2820 total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-hsw-4770 total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-hsw-4770r total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-ilk-650 total:244 pass:191 dwarn:0 dfail:0 fail:0 skip:53 fi-ivb-3520m total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-ivb-3770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-kbl-7200u total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:244 pass:223 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6700k total:244 pass:222 dwarn:1 dfail:0 fail:0 skip:21 fi-skl-6770hq total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-snb-2520m total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:207 pass:178 dwarn:0 dfail:0 fail:0 skip:28
eb88955cdc6a1f4dabff6bc27747c1c9e9a3aaef drm-intel-nightly: 2016y-11m-10d-09h-29m-41s UTC integration manifest 6c16646 drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2960/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 11 lines · Rodrigo Vivi
According to Bspec we need to
"Poll forPORT_REF_DW3_Agrc_done== 1b" only on ports B and C initialization sequence when copying rcomp from port A.So let's follow the spec and only poll for that case and not on every port A initialization.
Cc Imre Deak <[email protected]>Cc Ander Conselvan de Oliveira <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
Quoted 29 lines
--- drivers/gpu/drm/i915/intel_dpio_phy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_dpio_phy.c +3
-4@@ -367,6 +367,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,if (phy_info->rcomp_phy !=-1 ) {uint32_t grc_code; + +bxt_phy_wait_grc_done (dev_priv, phy_info->rcomp_phy); +/* * PHY0 isn't connected to an RCOMP resistor so copy over * the corresponding calibrated value from PHY1, and disable @@ -387,10 +390,6 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv, val =I915_READ (BXT_PHY_CTL_FAMILY (phy)); val |=COMMON_RESET_DIS ;I915_WRITE (BXT_PHY_CTL_FAMILY (phy), val); - -if (phy_info->rcomp_phy ==-1 ) -bxt_phy_wait_grc_done (dev_priv, phy); - }void bxt_ddi_phy_uninit (struct drm_i915_private *dev_priv,enum dpio_phy phy)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Rodrigo Vivi
According to Bspec we need to
"Poll forPORT_REF_DW3_Agrc_done== 1b" only on ports B and C initialization sequence when copying rcomp from port A.So let's follow the spec and only poll for that case and not on every port A initialization.
Cc Imre Deak <[email protected]>Cc Ander Conselvan de OliveiraSigned-off-by Rodrigo Vivi <[email protected]>
The current code isn't against the spec, we just wait for the calibration to complete earlier. This way we also wait in case only port A is enabled which is imo safer to do before a subsequent modeset on port A. But yes, the spec suggests the HW will handle the wait for this - only port A - case internally, so we can move the wait later to reduce somewhat the init time:
Quoted 27 lines
---
drivers/gpu/drm/i915/intel_dpio_phy.c | 7 +++----1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_dpio_phy.c +0
-0@@ -367,6 +367,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,
if (phy_info->rcomp_phy!= -1) {
uint32_tgrc_code;drivers/gpu/drm/i915/intel_dpio_phy.c +3
-0+ +bxt_phy_wait_grc_done (dev_priv, phy_info->rcomp_phy); +/*
* PHY0 isn't connected to an RCOMP resistor so copy over
* the corresponding calibrated value from PHY1, and disabledrivers/gpu/drm/i915/intel_dpio_phy.c +0
-4@@ -387,10 +390,6 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv, val = I915_READ(BXT_PHY_CTL_FAMILY(phy)); val |= COMMON_RESET_DIS; I915_WRITE(BXT_PHY_CTL_FAMILY(phy), val); - -if (phy_info->rcomp_phy ==-1 ) -bxt_phy_wait_grc_done (dev_priv, phy); - }
Quoted 2 lines
voidbxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Vivi, Rodrigo
maintainerQuoted 13 lines · Imre Deak
Quoted 11 lines · Rodrigo Vivi
According to Bspec we need to
"Poll forPORT_REF_DW3_Agrc_done== 1b" only on ports B and C initialization sequence when copying rcomp from port A.So let's follow the spec and only poll for that case and not on every port A initialization.
Cc Imre Deak <[email protected]>Cc Ander Conselvan de OliveiraSigned-off-by Rodrigo Vivi <[email protected]>
Quoted 8 lines
The current code isn't against the spec, we just wait for the calibration to complete earlier. This way we also wait in case only port A is enabled which is imo safer to do before a subsequent modeset on port A. But yes, the spec suggests the HW will handle the wait for this - only port A - case internally, so we can move the wait later to reduce somewhat the init time:
Reviewed-by Imre Deak <[email protected]>
Ops, actually I noticed later that I need to remove the warning block with return false from is_phy_enabled if grc isn't done. otherwise it will force a reprograming without this line there.
So, do you believe it is worth to do a v2 removing that block or better to just ignore this patch?
Quoted 29 lines
Quoted 29 lines
--- drivers/gpu/drm/i915/intel_dpio_phy.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_dpio_phy.c +3
-4@@ -367,6 +367,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,if (phy_info->rcomp_phy !=-1 ) {uint32_t grc_code; + +bxt_phy_wait_grc_done (dev_priv, phy_info->rcomp_phy); +/* * PHY0 isn't connected to an RCOMP resistor so copy over * the corresponding calibrated value from PHY1, and disable @@ -387,10 +390,6 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv, val =I915_READ (BXT_PHY_CTL_FAMILY (phy)); val |=COMMON_RESET_DIS ;I915_WRITE (BXT_PHY_CTL_FAMILY (phy), val); - -if (phy_info->rcomp_phy ==-1 ) -bxt_phy_wait_grc_done (dev_priv, phy); - }
Quoted 1 line
drivers/gpu/drm/i915/intel_dpio_phy.c static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv, · line 395
Quoted 1 line
drivers/gpu/drm/i915/intel_dpio_phy.c +0
-0void bxt_ddi_phy_uninit (struct drm_i915_private *dev_priv,enum dpio_phy phy)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 24 lines · Rodrigo
Quoted 23 lines · Imre Deak
Quoted 11 lines · Rodrigo Vivi
According to Bspec we need to
"Poll forPORT_REF_DW3_Agrc_done== 1b" only on ports B and C initialization sequence when copying rcomp from port A.So let's follow the spec and only poll for that case and not on every port A initialization.
Cc Imre Deak <[email protected]>Cc Ander Conselvan de OliveiraSigned-off-by Rodrigo Vivi <[email protected]>The current code isn't against the spec, we just wait for the calibration to complete earlier. This way we also wait in case only port A is enabled which is imo safer to do before a subsequent modeset
on port A. But yes, the spec suggests the HW will handle the wait for
this - only port A - case internally, so we can move the wait later to
reduce somewhat the init time:
Quoted 5 lines
Quoted 1 line
Reviewed-by Imre Deak <[email protected]>Ops, actually I noticed later that I need to remove the warning block with return false from
is_phy_enabledif grc isn't done. otherwise it will force a reprograming without this line there.
Yea, missed that too.
Quoted 4 lines
So, do you believe it is worth to do a v2 removing that block or better
to just ignore this patch?
The calibration takes ~2ms on my APL, so I think it's worth reducing that delay.
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
---
drivers/gpu/drm/i915/intel_dpio_phy.c | 7 +++----1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_dpio_phy.c +0
-0@@ -367,6 +367,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,
if (phy_info->rcomp_phy!= -1) {
uint32_tgrc_code;drivers/gpu/drm/i915/intel_dpio_phy.c +2
-0+ + bxt_phy_wait_grc_done(dev_priv, phy_info-Quoted 1 line
rcomp_phy);+
/*
* PHY0 isn't connected to an RCOMP resistor so copy over
* the corresponding calibrated value from PHY1, and disabledrivers/gpu/drm/i915/intel_dpio_phy.c +0
-0@@ -387,10 +390,6 @@ static void _bxt_ddi_phy_init(structdrm_i915_private *dev_priv, val = I915_READ(BXT_PHY_CTL_FAMILY(phy)); val |= COMMON_RESET_DIS; I915_WRITE(BXT_PHY_CTL_FAMILY(phy), val);
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_dpio_phy.c +0
-4- -if (phy_info->rcomp_phy ==-1 ) -bxt_phy_wait_grc_done (dev_priv, phy); - }
voidbxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
According to Bspec we need to
"Poll for PORT_REF_DW3_A grc_done == 1b" only on ports B and C initialization sequence when copying rcomp from port A.
So let's follow the spec and only poll for that case and not on every port A initialization.
v2: Also remove the grc_done check from bxt_ddi_phy_is_enabled()
otherwise it might believe it is disabled and force it to re program.
--- drivers/gpu/drm/i915/intel_dpio_phy.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/intel_dpio_phy.c +3 -12
@@ -255,14 +255,6 @@ bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv,return false; } -if (phy_info->rcomp_phy ==-1 && - !(I915_READ (BXT_PORT_REF_DW3 (phy)) &GRC_DONE )) { -DRM_DEBUG_DRIVER ("DDI PHY %d powered, but GRC isn't done\n" , - phy); - -return false; - } -if (!(I915_READ (BXT_PHY_CTL_FAMILY (phy)) &COMMON_RESET_DIS )) {DRM_DEBUG_DRIVER ("DDI PHY %d powered, but still in reset\n" , phy);
@@ -367,6 +359,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,if (phy_info->rcomp_phy !=-1 ) {uint32_t grc_code; + +bxt_phy_wait_grc_done (dev_priv, phy_info->rcomp_phy); +/* * PHY0 isn't connected to an RCOMP resistor so copy over * the corresponding calibrated value from PHY1, and disable
@@ -387,10 +382,6 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv, val =I915_READ (BXT_PHY_CTL_FAMILY (phy)); val |=COMMON_RESET_DIS ;I915_WRITE (BXT_PHY_CTL_FAMILY (phy), val); - -if (phy_info->rcomp_phy ==-1 ) -bxt_phy_wait_grc_done (dev_priv, phy); - }void bxt_ddi_phy_uninit (struct drm_i915_private *dev_priv,enum dpio_phy phy)
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Rodrigo Vivi
According to Bspec we need to
"Poll forPORT_REF_DW3_Agrc_done== 1b" only on ports B and C initialization sequence when copying rcomp from port A.So let's follow the spec and only poll for that case and not on every port A initialization.
Quoted 6 lines
v2: Also remove the
grc_donecheck frombxt_ddi_phy_is_enabled()otherwise it might believe it is disabled and force it to re program.Cc Imre Deak <[email protected]>Cc Ander Conselvan de OliveiraSigned-off-by Rodrigo Vivi <[email protected]>
Quoted 42 lines
---
drivers/gpu/drm/i915/intel_dpio_phy.c | 15 +++------------1 file changed, 3 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/intel_dpio_phy.c +0
-0@@ -255,14 +255,6 @@ bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv, return false; }drivers/gpu/drm/i915/intel_dpio_phy.c +0
-8-if (phy_info->rcomp_phy ==-1 && - !(I915_READ(BXT_PORT_REF_DW3(phy)) & GRC_DONE)) { -DRM_DEBUG_DRIVER ("DDI PHY %d powered, but GRC isn't done\n" , - phy); - -return false; - } -if (!(I915_READ(BXT_PHY_CTL_FAMILY(phy)) &
COMMON_RESET_DIS)) {DRM_DEBUG_DRIVER("DDI PHY %d powered, but still in reset\n", phy);drivers/gpu/drm/i915/intel_dpio_phy.c +0
-0@@ -367,6 +359,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,
if (phy_info->rcomp_phy!= -1) {
uint32_tgrc_code;drivers/gpu/drm/i915/intel_dpio_phy.c +3
-0+ +bxt_phy_wait_grc_done (dev_priv, phy_info->rcomp_phy); +/*
* PHY0 isn't connected to an RCOMP resistor so copy over
* the corresponding calibrated value from PHY1, and disabledrivers/gpu/drm/i915/intel_dpio_phy.c +0
-4@@ -387,10 +382,6 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv, val = I915_READ(BXT_PHY_CTL_FAMILY(phy)); val |= COMMON_RESET_DIS; I915_WRITE(BXT_PHY_CTL_FAMILY(phy), val); - -if (phy_info->rcomp_phy ==-1 ) -bxt_phy_wait_grc_done (dev_priv, phy); - }
Quoted 2 lines
voidbxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Only poll DW3_A when init DDI PHY for ports B and C. (rev2)
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915: Only poll DW3_A when init DDI PHY for ports B and C. (rev2)
URL : https://patchwork.freedesktop.org/series/15139/
State : success
== Summary ==
Series 15139v2 drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
https://patchwork.freedesktop.org/api/1.0/series/15139/revisions/2/mbox/
Test drv_module_reload_basic:
dmesg-warn -> PASS (fi-skl-6770hq)
fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:244 pass:204 dwarn:0 dfail:0 fail:0 skip:40 fi-byt-j1900 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-n2820 total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-hsw-4770 total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-hsw-4770r total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20 fi-ilk-650 total:244 pass:191 dwarn:0 dfail:0 fail:0 skip:53 fi-ivb-3520m total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-ivb-3770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-kbl-7200u total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:244 pass:223 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6700k total:244 pass:222 dwarn:1 dfail:0 fail:0 skip:21 fi-skl-6770hq total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-snb-2520m total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:244 pass:211 dwarn:0 dfail:0 fail:0 skip:33
4f5493e90cc50f1c6391c4f389f7a79c8fe52355 drm-intel-nightly: 2016y-11m-17d-15h-37m-59s UTC integration manifest f3e8782 drm/i915: Only poll DW3_A when init DDI PHY for ports B and C.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3041/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx