* [PATCHv3 0/2] DP2.0 SDP CRC16 for 128/132b link layer
@ 2023-02-14 9:34 Arun R Murthy
2023-02-14 9:34 ` [PATCHv2 1/2] drm: Add SDP Error Detection Configuration Register Arun R Murthy
2023-02-14 9:34 ` [RESEND PATCHv2 2/2] i915/display/dp: SDP CRC16 for 128b132b link layer Arun R Murthy
0 siblings, 2 replies; 6+ messages in thread
From: Arun R Murthy @ 2023-02-14 9:34 UTC (permalink / raw)
To: intel-gfx, dri-devel, jani.nikula; +Cc: Arun R Murthy
*** BLURB HERE ***
Arun R Murthy (2):
drm: Add SDP Error Detection Configuration Register
i915/display/dp: SDP CRC16 for 128b132b link layer
.../gpu/drm/i915/display/intel_dp_link_training.c | 12 ++++++++++++
include/drm/display/drm_dp.h | 3 +++
2 files changed, 15 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv2 1/2] drm: Add SDP Error Detection Configuration Register
2023-02-14 9:34 [PATCHv3 0/2] DP2.0 SDP CRC16 for 128/132b link layer Arun R Murthy
@ 2023-02-14 9:34 ` Arun R Murthy
2023-02-14 9:34 ` [RESEND PATCHv2 2/2] i915/display/dp: SDP CRC16 for 128b132b link layer Arun R Murthy
1 sibling, 0 replies; 6+ messages in thread
From: Arun R Murthy @ 2023-02-14 9:34 UTC (permalink / raw)
To: intel-gfx, dri-devel, jani.nikula; +Cc: Arun R Murthy
DP2.0 E11 defines a new register to facilitate SDP error detection by a
128B/132B capable DPRX device.
v2: Update the macro name to reflect the DP spec(Harry)
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
include/drm/display/drm_dp.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h
index 632376c291db..358db4a9f167 100644
--- a/include/drm/display/drm_dp.h
+++ b/include/drm/display/drm_dp.h
@@ -692,6 +692,9 @@
# define DP_FEC_LANE_2_SELECT (2 << 4)
# define DP_FEC_LANE_3_SELECT (3 << 4)
+#define DP_SDP_ERROR_DETECTION_CONFIGURATION 0x121 /* DP 2.0 E11 */
+#define DP_SDP_CRC16_128B132B_EN BIT(0)
+
#define DP_AUX_FRAME_SYNC_VALUE 0x15c /* eDP 1.4 */
# define DP_AUX_FRAME_SYNC_VALID (1 << 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RESEND PATCHv2 2/2] i915/display/dp: SDP CRC16 for 128b132b link layer
2023-02-14 9:34 [PATCHv3 0/2] DP2.0 SDP CRC16 for 128/132b link layer Arun R Murthy
2023-02-14 9:34 ` [PATCHv2 1/2] drm: Add SDP Error Detection Configuration Register Arun R Murthy
@ 2023-02-14 9:34 ` Arun R Murthy
2023-02-27 9:56 ` Jani Nikula
1 sibling, 1 reply; 6+ messages in thread
From: Arun R Murthy @ 2023-02-14 9:34 UTC (permalink / raw)
To: intel-gfx, dri-devel, jani.nikula; +Cc: Arun R Murthy
Enable SDP error detection configuration, this will set CRC16 in
128b/132b link layer.
For Display version 13 a hardware bit31 in register VIDEO_DIP_CTL is
added to enable/disable SDP CRC applicable for DP2.0 only, but the
default value of this bit will enable CRC16 in 128b/132b hence
skipping this write.
Corrective actions on SDP corruption is yet to be defined.
v2: Moved the CRC enable to link training init(Jani N)
v3: Moved crc enable to ddi pre enable <Jani N>
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/i915/display/intel_ddi.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 254559abedfb..fa995341614d 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -2330,6 +2330,18 @@ static void tgl_ddi_pre_enable_dp(struct intel_atomic_state *state,
crtc_state->port_clock,
crtc_state->lane_count);
+ /* DP v2.0 SCR on SDP CRC16 for 128b/132b Link Layer */
+ if (intel_dp_is_uhbr(crtc_state))
+ drm_dp_dpcd_writeb(&intel_dp->aux,
+ DP_SDP_ERROR_DETECTION_CONFIGURATION,
+ DP_SDP_CRC16_128B132B_EN);
+ /*
+ * VIDEO_DIP_CTL register bit 31 should be set to '0' to not
+ * disable SDP CRC. This is applicable for Display version 13.
+ * Default value of bit 31 is '0' hence discarding the write
+ */
+ /* TODO: Corrective actions on SDP corruption yet to be defined */
+
/*
* We only configure what the register value will be here. Actual
* enabling happens during link training farther down.
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RESEND PATCHv2 2/2] i915/display/dp: SDP CRC16 for 128b132b link layer
2023-02-14 9:34 ` [RESEND PATCHv2 2/2] i915/display/dp: SDP CRC16 for 128b132b link layer Arun R Murthy
@ 2023-02-27 9:56 ` Jani Nikula
0 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2023-02-27 9:56 UTC (permalink / raw)
To: Arun R Murthy, intel-gfx, dri-devel; +Cc: Arun R Murthy
On Tue, 14 Feb 2023, Arun R Murthy <arun.r.murthy@intel.com> wrote:
> Enable SDP error detection configuration, this will set CRC16 in
> 128b/132b link layer.
> For Display version 13 a hardware bit31 in register VIDEO_DIP_CTL is
> added to enable/disable SDP CRC applicable for DP2.0 only, but the
> default value of this bit will enable CRC16 in 128b/132b hence
> skipping this write.
> Corrective actions on SDP corruption is yet to be defined.
>
> v2: Moved the CRC enable to link training init(Jani N)
> v3: Moved crc enable to ddi pre enable <Jani N>
>
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_ddi.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 254559abedfb..fa995341614d 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -2330,6 +2330,18 @@ static void tgl_ddi_pre_enable_dp(struct intel_atomic_state *state,
> crtc_state->port_clock,
> crtc_state->lane_count);
>
> + /* DP v2.0 SCR on SDP CRC16 for 128b/132b Link Layer */
> + if (intel_dp_is_uhbr(crtc_state))
> + drm_dp_dpcd_writeb(&intel_dp->aux,
> + DP_SDP_ERROR_DETECTION_CONFIGURATION,
> + DP_SDP_CRC16_128B132B_EN);
> + /*
> + * VIDEO_DIP_CTL register bit 31 should be set to '0' to not
> + * disable SDP CRC. This is applicable for Display version 13.
> + * Default value of bit 31 is '0' hence discarding the write
> + */
> + /* TODO: Corrective actions on SDP corruption yet to be defined */
> +
So yeah, I told you to do this in this function. But look at the
surroundings, does it look like a direct drm_dp_dpcd_writeb() call fits
here?
tgl_ddi_pre_enable_dp() is a function that calls functions, and doesn't
bother with any details. No register or DPCD reads or writes.
Sure, it's a matter of style, and I hate to feel like I'm pushing you
around with this. But the above really needs to be in a separate
function when it's done in tgl_ddi_pre_enable_dp().
It'll also help with placing the comments. You can have *one* block
comment above the function with all the details, TODO notes and
everything, indented at the top level. (Above, the comments are indented
as if they were within a {} block.)
BR,
Jani.
> /*
> * We only configure what the register value will be here. Actual
> * enabling happens during link training farther down.
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv3 0/2] DP2.0 SDP CRC16 for 128/132b link layer
@ 2023-03-02 8:15 Arun R Murthy
0 siblings, 0 replies; 6+ messages in thread
From: Arun R Murthy @ 2023-03-02 8:15 UTC (permalink / raw)
To: intel-gfx, dri-devel, jani.nikula; +Cc: Arun R Murthy
*** BLURB HERE ***
Arun R Murthy (2):
drm: Add SDP Error Detection Configuration Register
i915/display/dp: SDP CRC16 for 128b132b link layer
.../gpu/drm/i915/display/intel_dp_link_training.c | 12 ++++++++++++
include/drm/display/drm_dp.h | 3 +++
2 files changed, 15 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv3 0/2] DP2.0 SDP CRC16 for 128/132b link layer
2023-01-20 6:15 [PATCHv2 " Arun R Murthy
@ 2023-02-07 5:26 ` Arun R Murthy
0 siblings, 0 replies; 6+ messages in thread
From: Arun R Murthy @ 2023-02-07 5:26 UTC (permalink / raw)
To: intel-gfx, dri-devel, jani.nikula; +Cc: Arun R Murthy
*** BLURB HERE ***
Arun R Murthy (2):
drm: Add SDP Error Detection Configuration Register
i915/display/dp: SDP CRC16 for 128b132b link layer
.../gpu/drm/i915/display/intel_dp_link_training.c | 12 ++++++++++++
include/drm/display/drm_dp.h | 3 +++
2 files changed, 15 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-02 8:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 9:34 [PATCHv3 0/2] DP2.0 SDP CRC16 for 128/132b link layer Arun R Murthy
2023-02-14 9:34 ` [PATCHv2 1/2] drm: Add SDP Error Detection Configuration Register Arun R Murthy
2023-02-14 9:34 ` [RESEND PATCHv2 2/2] i915/display/dp: SDP CRC16 for 128b132b link layer Arun R Murthy
2023-02-27 9:56 ` Jani Nikula
-- strict thread matches above, loose matches on Subject: below --
2023-03-02 8:15 [PATCHv3 0/2] DP2.0 SDP CRC16 for 128/132b " Arun R Murthy
2023-01-20 6:15 [PATCHv2 " Arun R Murthy
2023-02-07 5:26 ` [PATCHv3 " Arun R Murthy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).