drm/dp: add extended receiver capability field present bit
Subsystems (3)
PATCH 1/2 drm/dp: add extended receiver capability field present bit
From: Matt Atwood <[email protected]>
This bit was added to DP Training Aux RD interval with DP 1.3. Via descriptiion of the spec this field indicates the panels true capabilities are described in DPCD address space 02200h through 022FFh.
v2: version comment update
v3: version comment correction, commit message update
--- include/drm/drm_dp_helper.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/drm/drm_dp_helper.h +3 -2
@@ -123,8 +123,9 @@# define DP_FRAMING_CHANGE_CAP (1 << 1)# define DP_DPCD_DISPLAY_CONTROL_CAPABLE (1 << 3)/* edp v1.2 or higher */ -#define DP_TRAINING_AUX_RD_INTERVAL 0x00e/* XXX 1.2? */ -# define DP_TRAINING_AUX_RD_MASK 0x7F/* XXX 1.2? */ +#define DP_TRAINING_AUX_RD_INTERVAL 0x00e/* XXX 1.2? */ +# define DP_TRAINING_AUX_RD_MASK 0x7F/* DP 1.3 */ +# define DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT (1 << 7)/* DP 1.3 */ #define DP_ADAPTER_CAP 0x00f/* 1.2 */ # define DP_FORCE_LOAD_SENSE_CAP (1 << 0)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: implement EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT
From: Matt Atwood <[email protected]>
According to DP spec (2.9.3.1 of DP 1.4) if EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT is set the addresses in DPCD 02200h through 0220Fh shall contain the DPRX's true capability. These values will match 00000h through 0000Fh, except for DPCD_REV, MAX_LINK_RATE, DOWN_STREAM_PORT_PRESENT.
Read from DPCD once for all 3 values as this is an expensive operation. Spec mentions that all of address space 02200h through 0220Fh should contain the right information however currently only 3 values can differ.
There is no address space in the intel_dp->dpcd struct for addresses 02200h through 0220Fh, and since so much of the data is a identical, simply overwrite the values stored in 00000h through 0000Fh with the values that can be overwritten from addresses 02200h through 0220Fh.
This patch helps with backward compatibility for devices pre DP1.3.
v2: read only dpcd values which can be affected, remove incorrect check, split into drm include changes into separate patch, commit message, verbose debugging statements during overwrite.
v3: white space fixes
v4: make path dependent on DPCD revision > 1.2
--- drivers/gpu/drm/i915/intel_dp.c | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +38 -0
@@ -3738,6 +3738,44 @@ intel_dp_read_dpcd(struct intel_dp *intel_dp) sizeof(intel_dp->dpcd)) < 0)return false;/* aux transfer failed */ +if (intel_dp->dpcd[DP_TRAINING_AUX_RD_INTERVAL ] & +DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT && + intel_dp->dpcd[DP_DPCD_REV ] >=DP_DPCD_REV_13 ) { +uint8_t dpcd_ext[6 ]; + +DRM_DEBUG_KMS ("DPCD: Extended Receiver Capability Field Present, accessing 02200h through 022FFh\n" ); + +if (drm_dp_dpcd_read (&intel_dp->aux,DP_DP13_DPCD_REV , + &dpcd_ext,sizeof (dpcd_ext)) <0 ) +return false;/* aux transfer failed */ + +if (memcmp (&intel_dp->dpcd[DP_DPCD_REV ], &dpcd_ext[DP_DPCD_REV ], +sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Revision previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_DPCD_REV ], + dpcd_ext[DP_DPCD_REV ]); +memcpy (&intel_dp->dpcd[DP_DPCD_REV ], + &dpcd_ext[DP_DPCD_REV ], +sizeof (u8)); + } +if (memcmp (&intel_dp->dpcd[DP_MAX_LINK_RATE ], + &dpcd_ext[DP_MAX_LINK_RATE ],sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Max Link Rate previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_MAX_LINK_RATE ], + dpcd_ext[DP_MAX_LINK_RATE ]); +memcpy (&intel_dp->dpcd[DP_MAX_LINK_RATE ], + &dpcd_ext[DP_MAX_LINK_RATE ],sizeof (u8)); + } +if (memcmp (&intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + &dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ],sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Downstream Port Present previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ]); +memcpy (&intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + &dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ], +sizeof (u8)); + } + }DRM_DEBUG_KMS ("DPCD: %*ph\n" , (int )sizeof (intel_dp->dpcd), intel_dp->dpcd);return intel_dp->dpcd[DP_DPCD_REV ] !=0 ;
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rodrigo Vivi
maintainerRe: [PATCH 2/2] drm/i915: implement EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT
Quoted 36 lines · On Fri, Jul 20, 2018 at 09:18:12AM -0700, [email protected] wrote:
From: Matt Atwood <[email protected]>
According to DP spec (2.9.3.1 of DP 1.4) if
EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENTis set the addresses in DPCD 02200h through 0220Fh shall contain the DPRX's true capability. These values will match 00000h through 0000Fh, except forDPCD_REV,MAX_LINK_RATE,DOWN_STREAM_PORT_PRESENT.Read from DPCD once for all 3 values as this is an expensive operation. Spec mentions that all of address space 02200h through 0220Fh should contain the right information however currently only 3 values can differ.
There is no address space in the
intel_dp->dpcdstruct for addresses 02200h through 0220Fh, and since so much of the data is a identical, simply overwrite the values stored in 00000h through 0000Fh with the values that can be overwritten from addresses 02200h through 0220Fh.This patch helps with backward compatibility for devices pre DP1.3.
v2: read only dpcd values which can be affected, remove incorrect check, split into drm include changes into separate patch, commit message, verbose debugging statements during overwrite.
v3: white space fixes
v4: make path dependent on DPCD revision > 1.2Signed-off-by Matt Atwood <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0
drivers/gpu/drm/i915/intel_dp.c intel_dp_read_dpcd(struct intel_dp *intel_dp) · line 3743
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c +3
-0@@ -3738,6 +3738,44 @@ intel_dp_read_dpcd(struct intel_dp *intel_dp) sizeof(intel_dp->dpcd)) < 0)return false;/* aux transfer failed */ +if (intel_dp->dpcd[DP_TRAINING_AUX_RD_INTERVAL ] & +DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT && + intel_dp->dpcd[DP_DPCD_REV ] >=DP_DPCD_REV_13 ) {
wrong order... you don't need to read those bits if ! rev >= 1.3
Quoted 41 lines
drivers/gpu/drm/i915/intel_dp.c +35
-0+uint8_t dpcd_ext[6 ]; + +DRM_DEBUG_KMS ("DPCD: Extended Receiver Capability Field Present, accessing 02200h through 022FFh\n" ); + +if (drm_dp_dpcd_read (&intel_dp->aux,DP_DP13_DPCD_REV , + &dpcd_ext,sizeof (dpcd_ext)) <0 ) +return false;/* aux transfer failed */ + +if (memcmp (&intel_dp->dpcd[DP_DPCD_REV ], &dpcd_ext[DP_DPCD_REV ], +sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Revision previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_DPCD_REV ], + dpcd_ext[DP_DPCD_REV ]); +memcpy (&intel_dp->dpcd[DP_DPCD_REV ], + &dpcd_ext[DP_DPCD_REV ], +sizeof (u8)); + } +if (memcmp (&intel_dp->dpcd[DP_MAX_LINK_RATE ], + &dpcd_ext[DP_MAX_LINK_RATE ],sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Max Link Rate previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_MAX_LINK_RATE ], + dpcd_ext[DP_MAX_LINK_RATE ]); +memcpy (&intel_dp->dpcd[DP_MAX_LINK_RATE ], + &dpcd_ext[DP_MAX_LINK_RATE ],sizeof (u8)); + } +if (memcmp (&intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + &dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ],sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Downstream Port Present previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ]); +memcpy (&intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + &dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ], +sizeof (u8)); + } + }DRM_DEBUG_KMS ("DPCD: %*ph\n" , (int )sizeof (intel_dp->dpcd), intel_dp->dpcd);return intel_dp->dpcd[DP_DPCD_REV ] !=0 ;Signature · 1 line
2.17.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: implement EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT
In reply to [email protected]Quoted 36 lines · On Fri, Jul 20, 2018 at 09:18:12AM -0700, [email protected] wrote:
From: Matt Atwood <[email protected]>
According to DP spec (2.9.3.1 of DP 1.4) if
EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENTis set the addresses in DPCD 02200h through 0220Fh shall contain the DPRX's true capability. These values will match 00000h through 0000Fh, except forDPCD_REV,MAX_LINK_RATE,DOWN_STREAM_PORT_PRESENT.Read from DPCD once for all 3 values as this is an expensive operation. Spec mentions that all of address space 02200h through 0220Fh should contain the right information however currently only 3 values can differ.
There is no address space in the
intel_dp->dpcdstruct for addresses 02200h through 0220Fh, and since so much of the data is a identical, simply overwrite the values stored in 00000h through 0000Fh with the values that can be overwritten from addresses 02200h through 0220Fh.This patch helps with backward compatibility for devices pre DP1.3.
v2: read only dpcd values which can be affected, remove incorrect check, split into drm include changes into separate patch, commit message, verbose debugging statements during overwrite.
v3: white space fixes
v4: make path dependent on DPCD revision > 1.2Signed-off-by Matt Atwood <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)drivers/gpu/drm/i915/intel_dp.c +0
-0
drivers/gpu/drm/i915/intel_dp.c intel_dp_read_dpcd(struct intel_dp *intel_dp) · line 3743
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c +3
-0@@ -3738,6 +3738,44 @@ intel_dp_read_dpcd(struct intel_dp *intel_dp) sizeof(intel_dp->dpcd)) < 0)return false;/* aux transfer failed */ +if (intel_dp->dpcd[DP_TRAINING_AUX_RD_INTERVAL ] & +DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT && + intel_dp->dpcd[DP_DPCD_REV ] >=DP_DPCD_REV_13 ) {
Like I had mentioned earlier, this check for DP_DPCD_REV is not required infact
if the extended reciever cap field is present its likely that the correct REV is present in the different offset and the original DP_DPCD_REV indicates the legacy or older REV number. This is waht i observed when I tested this earlier on DP 1.4 sink and had to remove this REV check since the original REV register was advertising it as DP 1.1 sink.
Manasi
Quoted 41 lines
drivers/gpu/drm/i915/intel_dp.c +35
-0+uint8_t dpcd_ext[6 ]; + +DRM_DEBUG_KMS ("DPCD: Extended Receiver Capability Field Present, accessing 02200h through 022FFh\n" ); + +if (drm_dp_dpcd_read (&intel_dp->aux,DP_DP13_DPCD_REV , + &dpcd_ext,sizeof (dpcd_ext)) <0 ) +return false;/* aux transfer failed */ + +if (memcmp (&intel_dp->dpcd[DP_DPCD_REV ], &dpcd_ext[DP_DPCD_REV ], +sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Revision previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_DPCD_REV ], + dpcd_ext[DP_DPCD_REV ]); +memcpy (&intel_dp->dpcd[DP_DPCD_REV ], + &dpcd_ext[DP_DPCD_REV ], +sizeof (u8)); + } +if (memcmp (&intel_dp->dpcd[DP_MAX_LINK_RATE ], + &dpcd_ext[DP_MAX_LINK_RATE ],sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Max Link Rate previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_MAX_LINK_RATE ], + dpcd_ext[DP_MAX_LINK_RATE ]); +memcpy (&intel_dp->dpcd[DP_MAX_LINK_RATE ], + &dpcd_ext[DP_MAX_LINK_RATE ],sizeof (u8)); + } +if (memcmp (&intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + &dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ],sizeof (u8))) { +DRM_DEBUG_KMS ("DPCD: new value for DPCD Downstream Port Present previous value %2x new value %2x\n" , + intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ]); +memcpy (&intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ], + &dpcd_ext[DP_DOWNSTREAMPORT_PRESENT ], +sizeof (u8)); + } + }DRM_DEBUG_KMS ("DPCD: %*ph\n" , (int )sizeof (intel_dp->dpcd), intel_dp->dpcd);return intel_dp->dpcd[DP_DPCD_REV ] !=0 ;Signature · 1 line
2.17.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rodrigo Vivi
maintainerQuoted 19 lines · On Fri, Jul 20, 2018 at 09:18:11AM -0700, [email protected] wrote:
From: Matt Atwood <[email protected]>
This bit was added to DP Training Aux RD interval with DP 1.3. Via descriptiion of the spec this field indicates the panels true capabilities are described in DPCD address space 02200h through 022FFh.
v2: version comment update
v3: version comment correction, commit message updateSigned-off-by Matt Atwood <[email protected]>--- include/drm/drm_dp_helper.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)include/drm/drm_dp_helper.h +0
-0
include/drm/drm_dp_helper.h line 128
Quoted 8 lines
include/drm/drm_dp_helper.h +3
-2@@ -123,8 +123,9 @@# define DP_FRAMING_CHANGE_CAP (1 << 1)# define DP_DPCD_DISPLAY_CONTROL_CAPABLE (1 << 3)/* edp v1.2 or higher */ -#define DP_TRAINING_AUX_RD_INTERVAL 0x00e/* XXX 1.2? */ -# define DP_TRAINING_AUX_RD_MASK 0x7F/* XXX 1.2? */ +#define DP_TRAINING_AUX_RD_INTERVAL 0x00e/* XXX 1.2? */ +# define DP_TRAINING_AUX_RD_MASK 0x7F/* DP 1.3 */ +# define DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT (1 << 7)/* DP 1.3 */
^ missing a space here
Quoted 6 lines
include/drm/drm_dp_helper.h +0
-0#define DP_ADAPTER_CAP 0x00f/* 1.2 */ # define DP_FORCE_LOAD_SENSE_CAP (1 << 0)Signature · 1 line
2.17.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/2] drm/dp: add extended receiver capability field present bit
In reply to [email protected]== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/dp: add extended receiver capability field present bit
URL : https://patchwork.freedesktop.org/series/46965/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4521 -> Patchwork_9736 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46965/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9736 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL (fdo#107174)
igt@drv_selftest@live_workarounds:
{fi-cfl-8109u}: PASS -> DMESG-FAIL (fdo#107292)
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
== Participating hosts (47 -> 42) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4521 -> Patchwork_9736
CI_DRM_4521: a4ebbd84c682fd30edbde6ac0e48d150d4c5c066 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4570: 65cdccdc7bcbb791d791aeeeecb784a382110a3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9736: d20291854091a3f766dd98b37460faf57ef2b30e @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
d20291854091 drm/i915: implement EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT f12f0082792a drm/dp: add extended receiver capability field present bit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9736/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/2] drm/dp: add extended receiver capability field present bit
In reply to [email protected]== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/dp: add extended receiver capability field present bit
URL : https://patchwork.freedesktop.org/series/46965/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4521_full -> Patchwork_9736_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9736_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9736_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9736_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_9736_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#106023)
{igt@gem_userptr_blits@readonly-unsync}:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-hsw: PASS -> FAIL (fdo#102887)
igt@perf_pmu@multi-client-vcs1:
shard-snb: SKIP -> INCOMPLETE (fdo#105411)
==== Possible fixes ====
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
shard-hsw: FAIL (fdo#105767) -> PASS
igt@kms_flip@dpms-vs-vblank-race:
shard-glk: FAIL (fdo#103060) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4521 -> Patchwork_9736
CI_DRM_4521: a4ebbd84c682fd30edbde6ac0e48d150d4c5c066 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4570: 65cdccdc7bcbb791d791aeeeecb784a382110a3c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9736: d20291854091a3f766dd98b37460faf57ef2b30e @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9736/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx