drm/i915/dp: aux and dpcd fixes
Subsystems (2)
cover drm/i915/dp: aux and dpcd fixes
I haven't received confirmation from various bug reporters whether these actually fix any issues, but here goes anyway.
We may want to revisit patch 2/4 in a future patch, adding some heuristic to increase delay with each retry, and maybe taking into account i2c bit rate capabilities if reported in dpcd.
BR,
Jani.
Jani Nikula (4):
drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER drm/i915/dp: downstream port capabilities are not present in DPCD 1.0 drm/i915/dp: read DPCD PSR capability only on eDP
drivers/gpu/drm/i915/intel_dp.c | 52 +++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/4 drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER
Per DP1.2 spec.
--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +6 -1
@@ -654,7 +654,12 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,break ; } -for (retry =0 ; retry <5 ; retry++) { +/* +* DP1.2 sections 2.7.7.1.5.6.1 and 2.7.7.1.6.6.1: A DP Source device is +* required to retry at least seven times upon receiving AUX_DEFER +* before giving up the AUX transaction. +*/ +for (retry =0 ; retry <7 ; retry++) { ret =intel_dp_aux_ch (intel_dp, msg, msg_bytes, reply, reply_bytes);
Signature · 1 line
1.7.9.5
Re: [PATCH 1/4] drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER
Quoted 16 lines · Jani Nikula
Per DP1.2 spec.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -654,7 +654,12 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,break ; }
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · line 665
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +6
-1-for (retry =0 ; retry <5 ; retry++) { +/* +* DP1.2 sections 2.7.7.1.5.6.1 and 2.7.7.1.6.6.1: A DP Source device is +* required to retry at least seven times upon receiving AUX_DEFER +* before giving up the AUX transaction. +*/ +for (retry =0 ; retry <7 ; retry++) { ret =intel_dp_aux_ch (intel_dp, msg, msg_bytes, reply, reply_bytes);
Hey Jani,
Although it's not explicitly stated in the specification (I went through both the 1.1a and 1.2a specifications and couldn't find it), I think the the retry count of 7 applies to all AUX transactions, both native and I2C. That's alluded to in the description of the link training sequence (pg 382, 2nd paragraph from the bottom) where the sink may defer up to seven times before the source can abort training.
With that in mind, it might be a good idea to use a defined constant for the retry count for both native and I2C AUX transactions. That would keep it consistent throughout the code and be easier to update moving forward should the specification change.
-T
Jani Nikula
maintainerRe: [PATCH 1/4] drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER
Hi Todd -
Quoted 36 lines · Todd Previte
Quoted 16 lines · Jani Nikula
Per DP1.2 spec.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -654,7 +654,12 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,break ; }drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · line 665
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +6
-1-for (retry =0 ; retry <5 ; retry++) { +/* +* DP1.2 sections 2.7.7.1.5.6.1 and 2.7.7.1.6.6.1: A DP Source device is +* required to retry at least seven times upon receiving AUX_DEFER +* before giving up the AUX transaction. +*/ +for (retry =0 ; retry <7 ; retry++) { ret =intel_dp_aux_ch (intel_dp, msg, msg_bytes, reply, reply_bytes);Hey Jani,
Although it's not explicitly stated in the specification (I went through both the 1.1a and 1.2a specifications and couldn't find it), I think the the retry count of 7 applies to all AUX transactions, both native and I2C. That's alluded to in the description of the link training sequence (pg 382, 2nd paragraph from the bottom) where the sink may defer up to seven times before the source can abort training.
Quoted 4 lines
With that in mind, it might be a good idea to use a defined constant for the retry count for both native and I2C AUX transactions. That would keep it consistent throughout the code and be easier to update moving forward should the specification change.
I agree in principle; defines good, magic values bad.
However we don't currently have a retry max for AUX DEFER in native transactions. Maybe we should. But I'm wary of adding 7 there, because we don't have a max now, and the spec is vague on this. It just might break stuff.
Also, for i2c over AUX the retry count of 7 is the minimum by the spec. And it goes on to say that depending on the moon position and some other variables, like i2c bit rate, it is recommended the source adjusts the retry count and interval.
So the retry count currently isn't the same in our code, and I don't think it's reasonable to force them to be the same either.
BR,
Jani.
Quoted 8 lines
-T
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Jani Nikula
maintainerRe: [PATCH 1/4] drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER
In reply to Todd PreviteQuoted 36 lines · Todd Previte
Quoted 16 lines · Jani Nikula
Per DP1.2 spec.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -654,7 +654,12 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,break ; }drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · line 665
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +6
-1-for (retry =0 ; retry <5 ; retry++) { +/* +* DP1.2 sections 2.7.7.1.5.6.1 and 2.7.7.1.6.6.1: A DP Source device is +* required to retry at least seven times upon receiving AUX_DEFER +* before giving up the AUX transaction. +*/ +for (retry =0 ; retry <7 ; retry++) { ret =intel_dp_aux_ch (intel_dp, msg, msg_bytes, reply, reply_bytes);Hey Jani,
Although it's not explicitly stated in the specification (I went through both the 1.1a and 1.2a specifications and couldn't find it), I think the the retry count of 7 applies to all AUX transactions, both native and I2C. That's alluded to in the description of the link training sequence (pg 382, 2nd paragraph from the bottom) where the sink may defer up to seven times before the source can abort training.
Quoted 4 lines
With that in mind, it might be a good idea to use a defined constant for the retry count for both native and I2C AUX transactions. That would keep it consistent throughout the code and be easier to update moving forward should the specification change.
Todd, are you willing to give your reviewed-by on this one patch per our irc discussion? We can do further cleanups later.
I've sent a new version of 3/4 with the #defines separately.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Todd Previte
Reviewed-byRe: [PATCH 1/4] drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER
Yep. Good to go.
Quoted 51 lines · Jani Nikula
Quoted 9 lines · Todd Previte
Review
Quoted 8 lines · Jani Nikula
Per DP1.2 spec.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_dp.cQuoted 4 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter,
Quoted 4 lines
index 9770160..6626514 100644
drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -654,7 +654,12 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter,int mode,
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c +2
-1break ; } -for (retry =0 ; retry <5 ; retry++) { +/* +* DP1.2 sections 2.7.7.1.5.6.1 and 2.7.7.1.6.6.1: A DP Source device is
Quoted 17 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · line 665
Quoted 8 lines
drivers/gpu/drm/i915/intel_dp.c +4
-0+* required to retry at least seven times upon receiving AUX_DEFER +* before giving up the AUX transaction. +*/ +for (retry =0 ; retry <7 ; retry++) { ret =intel_dp_aux_ch (intel_dp, msg, msg_bytes, reply, reply_bytes);Hey Jani,
Although it's not explicitly stated in the specification (I went through both the 1.1a and 1.2a specifications and couldn't find it), I think the the retry count of 7 applies to all AUX transactions, both native and I2C. That's alluded to in the description of the link training sequence (pg 382, 2nd paragraph from the bottom) where the sink may defer up to seven times before the source can abort training.
Quoted 4 lines
With that in mind, it might be a good idea to use a defined constant for the retry count for both native and I2C AUX transactions. That would keep it consistent throughout the code and be easier to update moving forward should the specification change.
Todd, are you willing to give your reviewed-by on this one patch per our irc discussion? We can do further cleanups later.
I've sent a new version of 3/4 with the #defines separately.
Quoted 8 lines
BR,
Jani.--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedRe: [PATCH 1/4] drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER
Quoted 3 lines · Todd Previte
Yep. Good to go.
Reviewed-by Todd Previte <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 68 lines · Jani Nikula
Quoted 52 lines · Todd Previte
Quoted 9 lines · Jani Nikula
Review
Quoted 8 lines
Per DP1.2 spec.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_dp.cQuoted 4 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter,
Quoted 4 lines
index 9770160..6626514 100644
drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -654,7 +654,12 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter,int mode,
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c +2
-1break ; } -for (retry =0 ; retry <5 ; retry++) { +/* +* DP1.2 sections 2.7.7.1.5.6.1 and 2.7.7.1.6.6.1: A DP Source device is
Quoted 17 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · line 665
Quoted 8 lines
drivers/gpu/drm/i915/intel_dp.c +4
-0+* required to retry at least seven times upon receiving AUX_DEFER +* before giving up the AUX transaction. +*/ +for (retry =0 ; retry <7 ; retry++) { ret =intel_dp_aux_ch (intel_dp, msg, msg_bytes, reply, reply_bytes);Hey Jani,
Although it's not explicitly stated in the specification (I went through both the 1.1a and 1.2a specifications and couldn't find it), I think the the retry count of 7 applies to all AUX transactions, both native and I2C. That's alluded to in the description of the link training sequence (pg 382, 2nd paragraph from the bottom) where the sink may defer up to seven times before the source can abort training.
Quoted 4 lines
With that in mind, it might be a good idea to use a defined constant for the retry count for both native and I2C AUX transactions. That would keep it consistent throughout the code and be easier to update moving forward should the specification change.
Todd, are you willing to give your reviewed-by on this one patch per our irc discussion? We can do further cleanups later.
I've sent a new version of 3/4 with the #defines separately.
Quoted 8 lines
BR,
Jani.--
Jani Nikula, Intel Open Source Technology Center_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 2/4 drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
In reply to Jani NikulaThere is no clear cut rules or specs for the retry interval, as there are many factors that affect overall response time. Increase the interval, and even more so on branch devices which may have limited i2c bit rates.
--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +12 -1
@@ -678,7 +678,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,DRM_DEBUG_KMS ("aux_ch native nack\n" );return -EREMOTEIO ;case AUX_NATIVE_REPLY_DEFER : -udelay (100 ); +/* +* For now, just give more slack to branch devices. We +* could check the DPCD for I2C bit rate capabilities, +* and if available, adjust the interval. We could also +* be more careful with DP-to-Legacy adapters where a +* long legacy cable may force very low I2C bit rates. +*/ +if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] & +DP_DWN_STRM_PORT_PRESENT ) +usleep_range (500 ,600 ); +else +usleep_range (300 ,400 );continue ;default : DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
Signature · 1 line
1.7.9.5
Re: [PATCH 2/4] drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
Quoted 24 lines · Jani Nikula
There is no clear cut rules or specs for the retry interval, as there are many factors that affect overall response time. Increase the interval, and even more so on branch devices which may have limited i2c bit rates.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +5
-1@@ -678,7 +678,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,DRM_DEBUG_KMS ("aux_ch native nack\n" );return -EREMOTEIO ;case AUX_NATIVE_REPLY_DEFER : -udelay (100 ); +/* +* For now, just give more slack to branch devices. We +* could check the DPCD for I2C bit rate capabilities, +* and if available, adjust the interval. We could also +* be more careful with DP-to-Legacy adapters where a
drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · line 695
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* long legacy cable may force very low I2C bit rates. +*/ +if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] & +DP_DWN_STRM_PORT_PRESENT ) +usleep_range (500 ,600 ); +else +usleep_range (300 ,400 );continue ;default : DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
Those look like reasonable values to me.
[Reviewed-by]: Todd Previte <[email protected] <mailto:[email protected]>>
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/4] drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
Quoted 38 lines · Todd Previte
Quoted 24 lines · Jani Nikula
There is no clear cut rules or specs for the retry interval, as there are many factors that affect overall response time. Increase the interval, and even more so on branch devices which may have limited i2c bit rates.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +5
-1@@ -678,7 +678,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,DRM_DEBUG_KMS ("aux_ch native nack\n" );return -EREMOTEIO ;case AUX_NATIVE_REPLY_DEFER : -udelay (100 ); +/* +* For now, just give more slack to branch devices. We +* could check the DPCD for I2C bit rate capabilities, +* and if available, adjust the interval. We could also +* be more careful with DP-to-Legacy adapters where a drivers/gpu/drm/i915/intel_dp.c intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · line 695
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* long legacy cable may force very low I2C bit rates. +*/ +if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] & +DP_DWN_STRM_PORT_PRESENT ) +usleep_range (500 ,600 ); +else +usleep_range (300 ,400 );continue ;default : DRM_ERROR("aux_ch invalid native reply 0x%02x\n",Those look like reasonable values to me.
Quoted 2 lines
[Reviewed-by]: Todd Previte <[email protected]
<mailto:[email protected]>>
Your mailer sends out html+plaintext multipart mails and in the plaintext section your r-b tags look rather funny. Can you please fix that?
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 3/4 drm/i915/dp: downstream port capabilities are not present in DPCD 1.0
In reply to Jani NikulaWe haven't read the downstream port caps for DPCD 1.0, so don't use them.
--- drivers/gpu/drm/i915/intel_dp.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +13 -6
@@ -2815,7 +2815,6 @@ static enum drm_connector_status intel_dp_detect_dpcd(struct intel_dp *intel_dp) {uint8_t *dpcd = intel_dp->dpcd; -bool hpd;uint8_t type;if (!intel_dp_get_dpcd (intel_dp))
@@ -2826,8 +2825,8 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)return connector_status_connected;/* If we're HPD-aware, SINK_COUNT changes dynamically */ - hpd = !!(intel_dp->downstream_ports[0 ] &DP_DS_PORT_HPD ); -if (hpd) { +if (intel_dp->dpcd[DP_DPCD_REV ] >=0x11 && + intel_dp->downstream_ports[0 ] &DP_DS_PORT_HPD ) {uint8_t reg;if (!intel_dp_aux_native_read_retry (intel_dp,DP_SINK_COUNT , ®,1 ))
@@ -2841,9 +2840,17 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)return connector_status_connected;/* Well we tried, say unknown for unreliable port types */ - type = intel_dp->downstream_ports[0 ] &DP_DS_PORT_TYPE_MASK ; -if (type ==DP_DS_PORT_TYPE_VGA || type ==DP_DS_PORT_TYPE_NON_EDID ) -return connector_status_unknown; +if (intel_dp->dpcd[DP_DPCD_REV ] >=0x11 ) { + type = intel_dp->downstream_ports[0 ] &DP_DS_PORT_TYPE_MASK ; +if (type ==DP_DS_PORT_TYPE_VGA || + type ==DP_DS_PORT_TYPE_NON_EDID ) +return connector_status_unknown; + }else { + type = intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] & +DP_DWN_STRM_PORT_TYPE_MASK ; +if (type == (1 <<1 ) || type == (3 <<1 )) +return connector_status_unknown; + }/* Anything else is out of spec, warn and ignore */ DRM_DEBUG_KMS ("Broken DP branch device, ignoring\n" );
Signature · 1 line
1.7.9.5
PATCH 4/4 drm/i915/dp: read DPCD PSR capability only on eDP
In reply to Jani NikulaReduce AUX transactions for non-eDP.
--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +8 -5
@@ -2691,11 +2691,14 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)/* Check if the panel supports PSR */ memset (intel_dp->psr_dpcd,0 ,sizeof (intel_dp->psr_dpcd)); -intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , - intel_dp->psr_dpcd, -sizeof (intel_dp->psr_dpcd)); -if (is_edp_psr (intel_dp)) -DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); +if (is_edp (intel_dp)) { +intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , + intel_dp->psr_dpcd, +sizeof (intel_dp->psr_dpcd)); +if (is_edp_psr (intel_dp)) +DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); + } +if (!(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] &DP_DWN_STRM_PORT_PRESENT ))return true;/* native DP sink */
Signature · 1 line
1.7.9.5
Re: [PATCH 4/4] drm/i915/dp: read DPCD PSR capability only on eDP
Quoted 21 lines · Jani Nikula
Reduce AUX transactions for non-eDP.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_dp.c +1
-5@@ -2691,11 +2691,14 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)/* Check if the panel supports PSR */ memset (intel_dp->psr_dpcd,0 ,sizeof (intel_dp->psr_dpcd)); -intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , - intel_dp->psr_dpcd, -sizeof (intel_dp->psr_dpcd)); -if (is_edp_psr (intel_dp)) -DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); +if (is_edp (intel_dp)) {
drivers/gpu/drm/i915/intel_dp.c intel_dp_get_dpcd(struct intel_dp *intel_dp) · line 2704
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , + intel_dp->psr_dpcd, +sizeof (intel_dp->psr_dpcd)); +if (is_edp_psr (intel_dp)) +DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); + } +if (!(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] &DP_DWN_STRM_PORT_PRESENT ))return true;/* native DP sink */
Couldn't you just use is_edp_psr() at the top and not need the second is_edp() inside the if() statement? As in:
+ if (is_edp_psr(intel_dp)) {
+ intel_dp_aux_native_read_retry(intel_dp, DP_PSR_SUPPORT,
+ intel_dp->psr_dpcd,
+ sizeof(intel_dp->psr_dpcd));
+ DRM_DEBUG_KMS("Detected EDP PSR Panel.\n");
+ }
-T
Re: [PATCH 4/4] drm/i915/dp: read DPCD PSR capability only on eDP
2013/9/20 Todd Previte <[email protected]>:
Quoted 30 lines · Jani Nikula
Quoted 29 lines
Reduce AUX transactions for non-eDP.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_dp.c +7
-5@@ -2691,11 +2691,14 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)/* Check if the panel supports PSR */ memset (intel_dp->psr_dpcd,0 ,sizeof (intel_dp->psr_dpcd)); -intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , - intel_dp->psr_dpcd, -sizeof (intel_dp->psr_dpcd)); -if (is_edp_psr (intel_dp)) -DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); +if (is_edp (intel_dp)) { +intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , + intel_dp->psr_dpcd, +sizeof (intel_dp->psr_dpcd)); +if (is_edp_psr (intel_dp)) +DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); + }
Quoted 8 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_get_dpcd(struct intel_dp *intel_dp) · line 2704
Quoted 4 lines
drivers/gpu/drm/i915/intel_dp.c +1
-0+if (!(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] &DP_DWN_STRM_PORT_PRESENT ))return true;/* native DP sink */ Couldn't you just use
is_edp_psr()at the top and not need the secondis_edp()inside theif()statement? As in:
No, because is_edp_psr() only makes sense after we do the DPCD read that checks the PSR bit.
Quoted 18 lines
drivers/gpu/drm/i915/intel_dp.c +6
-1+if (is_edp_psr (intel_dp)) { +intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , + intel_dp->psr_dpcd, +sizeof (intel_dp->psr_dpcd)); +DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); + } -T _______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Paulo Zanoni
Re: [PATCH 4/4] drm/i915/dp: read DPCD PSR capability only on eDP
Quoted 37 lines · Paulo Zanoni
2013/9/20 Todd Previte <[email protected]>:
Quoted 28 lines · Jani Nikula
Quoted 27 lines
Reduce AUX transactions for non-eDP.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_dp.c +6
-5@@ -2691,11 +2691,14 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)/* Check if the panel supports PSR */ memset (intel_dp->psr_dpcd,0 ,sizeof (intel_dp->psr_dpcd)); -intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , - intel_dp->psr_dpcd, -sizeof (intel_dp->psr_dpcd)); -if (is_edp_psr (intel_dp)) -DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); +if (is_edp (intel_dp)) { +intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , + intel_dp->psr_dpcd, +sizeof (intel_dp->psr_dpcd)); +if (is_edp_psr (intel_dp)) +DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" );Quoted 8 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_get_dpcd(struct intel_dp *intel_dp) · line 2704
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp.c +2
-0+ } +if (!(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] &DP_DWN_STRM_PORT_PRESENT ))return true;/* native DP sink */ Couldn't you just use
is_edp_psr()at the top and not need the secondis_edp()inside theif()statement? As in:
Quoted 2 lines
No, because
is_edp_psr()only makes sense after we do the DPCD read that checks the PSR bit.
Yep, I see that now. And thus...
[Reviewed-by]: Todd Previte <[email protected]>
Quoted 20 lines
Quoted 18 lines
drivers/gpu/drm/i915/intel_dp.c +6
-1+if (is_edp_psr (intel_dp)) { +intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , + intel_dp->psr_dpcd, +sizeof (intel_dp->psr_dpcd)); +DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); + } -T _______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedRe: [PATCH 4/4] drm/i915/dp: read DPCD PSR capability only on eDP
Quoted 38 lines · Todd Previte
Quoted 37 lines · Paulo Zanoni
2013/9/20 Todd Previte <[email protected]>:
Quoted 36 lines · Jani Nikula
Quoted 22 lines
Reduce AUX transactions for non-eDP.
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_dp.c +2
-5@@ -2691,11 +2691,14 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)/* Check if the panel supports PSR */ memset (intel_dp->psr_dpcd,0 ,sizeof (intel_dp->psr_dpcd)); -intel_dp_aux_native_read_retry (intel_dp,DP_PSR_SUPPORT , - intel_dp->psr_dpcd, -sizeof (intel_dp->psr_dpcd)); -if (is_edp_psr (intel_dp)) -DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); +if (is_edp (intel_dp)) { + intel_dp_aux_native_read_retry(intel_dp, DP_PSR_SUPPORT,drivers/gpu/drm/i915/intel_dp.c intel_dp_get_dpcd(struct intel_dp *intel_dp) · line 2704
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +6
-0+ intel_dp->psr_dpcd, + sizeof(intel_dp->psr_dpcd)); +if (is_edp_psr (intel_dp)) +DRM_DEBUG_KMS ("Detected EDP PSR Panel.\n" ); + } +if (!(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] &DP_DWN_STRM_PORT_PRESENT ))return true;/* native DP sink */ Couldn't you just use
is_edp_psr()at the top and not need the secondis_edp()inside theif()statement? As in:
Quoted 6 lines
Quoted 2 lines
No, because
is_edp_psr()only makes sense after we do the DPCD read that checks the PSR bit.Yep, I see that now. And thus...
[Reviewed-by]: Todd Previte <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 2 lines · Jani Nikula
I haven't received confirmation from various bug reporters whether these actually fix any issues, but here goes anyway.
These are on the series, but I bet it's patch 2/4 that does the trick.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=60263
Quoted 20 lines
We may want to revisit patch 2/4 in a future patch, adding some heuristic to increase delay with each retry, and maybe taking into account i2c bit rate capabilities if reported in dpcd.
BR,
Jani.Jani Nikula (4):
drm/i915/dp: retry i2c-over-aux seven times on AUX DEFER drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER drm/i915/dp: downstream port capabilities are not present in DPCD 1.0 drm/i915/dp: read DPCD PSR capability only on eDPdrivers/gpu/drm/i915/intel_dp.c | 52 +++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 13 deletions(-)Signature · 1 line
1.7.9.5
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Quoted 8 lines · Jani Nikula
Quoted 2 lines · Jani Nikula
I haven't received confirmation from various bug reporters whether these actually fix any issues, but here goes anyway.
These are on the series, but I bet it's patch 2/4 that does the trick.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=60263
Tested-by Nicolas Suzor <[email protected]>
I've picked up patch 2 from this series for -fixes, 4 for dinq (the other two lack r-bs).
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch