Forward Error Correction
Subsystems (2)
v6 cover Forward Error Correction
With Display Compression, the bit error in the pixel stream can turn into a significant corruption on the screen. The DP1.4 adds FEC - Forward Error Correction scheme which uses Reed-Solomon parity/correction check generated by the source and used by the sink to detect and correct small numbers of bit errors in the compressed stream.
v2: Avoid doing aux channel read everytime we check for FEC support. Instead cache the value of the DPCD registers, similar to the DSC implementaion (Jani)
v3: Add fec as a state to crtc. Move around the code. (Ville)
v4: s/can_fec/fec_enable; s/intel_dp_can_fec/intel_dp_supports_fec; Add intel_dp_source supports_fec() (Ville)
v5: Reduce unwanted checks. Pass intel_encoder to fec func instead of intel_dp. Move code around to suitable place.
v6: Remove warning. rebase.
Rebased on top of: https://patchwork.freedesktop.org/series/51986/
Anusha Srivatsa (4):
i915/dp/fec: Add fec_enable to the crtc state. drm/i915/fec: Set FEC_READY in FEC_CONFIGURATION i915/dp/fec: Configure the Forward Error Correction bits. drm/i915/fec: Disable FEC state.
drivers/gpu/drm/i915/i915_reg.h | 2 + drivers/gpu/drm/i915/intel_ddi.c | 68 ++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_dp.c | 28 +++++++++++-- drivers/gpu/drm/i915/intel_drv.h | 3 ++ 4 files changed, 94 insertions(+), 7 deletions(-)
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 1/4 i915/dp/fec: Add fec_enable to the crtc state.
For DP 1.4 and above, Display Stream compression can be enabled only if Forward Error Correctin can be performed.
Add a crtc state for FEC. Currently, the state is determined by platform, DP and DSC being enabled. Moving forward we can use the state to have error correction on other scenarios too if needed.
v2:
- Control compression_enable with the fec_enable parameter in crtc state and with intel_dp_supports_fec() (Ville)
- intel_dp_can_fec()/intel_dp_supports_fec()(manasi)
v3: Check for FEC support along with setting crtc state.
v4: add checks to intel_dp_source_supports_dsc.(manasi)
- Move intel_dp_supports_fec() closer to intel_dp_supports_dsc() (Anusha)
--- drivers/gpu/drm/i915/intel_dp.c | 28 +++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_drv.h | 3 +++ 2 files changed, 28 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +25 -3
@@ -545,7 +545,7 @@ intel_dp_mode_valid(struct drm_connector *connector, dsc_slice_count =drm_dp_dsc_sink_max_slice_count (intel_dp->dsc_dpcd, true); - }else { + }else if (drm_dp_sink_supports_fec (intel_dp->fec_capable)) { dsc_max_output_bpp = intel_dp_dsc_get_output_bpp(max_link_clock, max_lanes,
@@ -1710,13 +1710,27 @@ struct link_config_limits {int min_bpp, max_bpp; }; +static bool intel_dp_source_supports_fec (struct intel_dp *intel_dp) +{ +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =to_i915 (dig_port->base.base.dev); +enum port port = dig_port->base.port; + +return INTEL_GEN (dev_priv) >=11 && port !=PORT_A ; +} + +static bool intel_dp_supports_fec (struct intel_dp *intel_dp) +{ +return intel_dp_source_supports_fec (intel_dp) && +drm_dp_sink_supports_fec (intel_dp->fec_capable); +} +static bool intel_dp_source_supports_dsc (struct intel_dp *intel_dp,const struct intel_crtc_state *pipe_config) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -/* FIXME: FEC needed for external DP until then reject DSC on DP */ -if (!intel_dp_is_edp (intel_dp)) +if (!intel_dp_supports_fec (intel_dp) && !intel_dp_is_edp (intel_dp))return false; return INTEL_GEN(dev_priv) >= 10 &&
@@ -1886,9 +1900,17 @@ static bool intel_dp_dsc_compute_config(struct intel_dp *intel_dp,u16 dsc_max_output_bpp =0 ;u8 dsc_dp_slice_count =0 ; + pipe_config->fec_enable = !intel_dp_is_edp (intel_dp); +if (!intel_dp_supports_dsc (intel_dp, pipe_config))return false; +/* DSC not supported if external DP sink does not support FEC */ +if (pipe_config->fec_enable && !intel_dp_supports_fec (intel_dp)) { +DRM_DEBUG_KMS ("Sink does not support Forward Error Correction, disabling Display Compression\n" ); +return false; + } +/* DSC not supported for DSC sink BPC < 8 */ if (limits->max_bpp <3 *DP_DSC_MIN_SUPPORTED_BPC ) {DRM_DEBUG_KMS ("No DSC support for less than 8bpc\n" );
drivers/gpu/drm/i915/intel_drv.h +3 -0
@@ -945,6 +945,9 @@ struct intel_crtc_state {u8 slice_count; } dsc_params;struct drm_dsc_config dp_dsc_cfg; + +/* Forward Error correction State */ +bool fec_enable; };struct intel_crtc {
Signature · 6 lines
2.19.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [v6 1/4] i915/dp/fec: Add fec_enable to the crtc state.
Quoted 77 lines · Anusha Srivatsa
For DP 1.4 and above, Display Stream compression can be enabled only if Forward Error Correctin can be performed.
Add a crtc state for FEC. Currently, the state is determined by platform, DP and DSC being enabled. Moving forward we can use the state to have error correction on other scenarios too if needed.
v2:
- Controlcompression_enablewith thefec_enableparameter in crtc state and withintel_dp_supports_fec()(Ville)- intel_dp_can_fec()/intel_dp_supports_fec()(manasi)
v3: Check for FEC support along with setting crtc state.
v4: add checks to intel_dp_source_supports_dsc.(manasi)
- Moveintel_dp_supports_fec()closer tointel_dp_supports_dsc()(Anusha)Suggested-by Ville Syrjala <[email protected]>Cc Ville Syrjala <[email protected]>Cc Jani Nikula <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 28 +++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_drv.h | 3 +++ 2 files changed, 28 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +17
-3@@ -545,7 +545,7 @@ intel_dp_mode_valid(struct drm_connector *connector, dsc_slice_count =drm_dp_dsc_sink_max_slice_count (intel_dp->dsc_dpcd, true); - }else { + }else if (drm_dp_sink_supports_fec (intel_dp->fec_capable)) { dsc_max_output_bpp = intel_dp_dsc_get_output_bpp(max_link_clock, max_lanes,@@ -1710,13 +1710,27 @@ struct link_config_limits {int min_bpp, max_bpp; }; +static bool intel_dp_source_supports_fec (struct intel_dp *intel_dp) +{ +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =to_i915 (dig_port->base.base.dev); +enum port port = dig_port->base.port; + +return INTEL_GEN (dev_priv) >=11 && port !=PORT_A ; +} + +static bool intel_dp_supports_fec (struct intel_dp *intel_dp) +{ +return intel_dp_source_supports_fec (intel_dp) && +drm_dp_sink_supports_fec (intel_dp->fec_capable); +} +static bool intel_dp_source_supports_dsc (struct intel_dp *intel_dp,const struct intel_crtc_state *pipe_config) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -/* FIXME: FEC needed for external DP until then reject DSC on DP */ -if (!intel_dp_is_edp (intel_dp)) +if (!intel_dp_supports_fec (intel_dp) && !intel_dp_is_edp (intel_dp))return false; return INTEL_GEN(dev_priv) >= 10 &&
drivers/gpu/drm/i915/intel_dp.c static bool intel_dp_dsc_compute_config(struct intel_dp *intel_dp, · line 1903
Quoted 4 lines
drivers/gpu/drm/i915/intel_dp.c +1
-0@@ -1886,9 +1900,17 @@ static bool intel_dp_dsc_compute_config(struct intel_dp *intel_dp,u16 dsc_max_output_bpp =0 ;u8 dsc_dp_slice_count =0 ; + pipe_config->fec_enable = !intel_dp_is_edp (intel_dp);
fec_enable state be set based on !intel_dp_is_edp() && intel_dp_supports_fec() Because we enable fec in atomic ocmmit just based on this crtc_state->fec_enable so it should definitely be set based on intel_dp_supports_fec()
drivers/gpu/drm/i915/intel_dp.c static bool intel_dp_dsc_compute_config(struct intel_dp *intel_dp, · line 1909
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp.c +3
-0+if (!intel_dp_supports_dsc (intel_dp, pipe_config))return false; +/* DSC not supported if external DP sink does not support FEC */ +if (pipe_config->fec_enable && !intel_dp_supports_fec (intel_dp)) {
Then here just check for if (pipe_config->fec_enable)
Manasi
Quoted 24 lines
drivers/gpu/drm/i915/intel_dp.c +4
-0+DRM_DEBUG_KMS ("Sink does not support Forward Error Correction, disabling Display Compression\n" ); +return false; + } +/* DSC not supported for DSC sink BPC < 8 */ if (limits->max_bpp <3 *DP_DSC_MIN_SUPPORTED_BPC ) {DRM_DEBUG_KMS ("No DSC support for less than 8bpc\n" );drivers/gpu/drm/i915/intel_drv.h +3
-0@@ -945,6 +945,9 @@ struct intel_crtc_state {u8 slice_count; } dsc_params;struct drm_dsc_config dp_dsc_cfg; + +/* Forward Error correction State */ +bool fec_enable; };struct intel_crtc {Signature · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [v6 1/4] i915/dp/fec: Add fec_enable to the crtc state.
In reply to Anusha SrivatsaQuoted 64 lines · Anusha Srivatsa
For DP 1.4 and above, Display Stream compression can be enabled only if Forward Error Correctin can be performed.
Add a crtc state for FEC. Currently, the state is determined by platform, DP and DSC being enabled. Moving forward we can use the state to have error correction on other scenarios too if needed.
v2:
- Controlcompression_enablewith thefec_enableparameter in crtc state and withintel_dp_supports_fec()(Ville)- intel_dp_can_fec()/intel_dp_supports_fec()(manasi)
v3: Check for FEC support along with setting crtc state.
v4: add checks to intel_dp_source_supports_dsc.(manasi)
- Moveintel_dp_supports_fec()closer tointel_dp_supports_dsc()(Anusha)Suggested-by Ville Syrjala <[email protected]>Cc Ville Syrjala <[email protected]>Cc Jani Nikula <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 28 +++++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_drv.h | 3 +++ 2 files changed, 28 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +15
-1@@ -545,7 +545,7 @@ intel_dp_mode_valid(struct drm_connector *connector, dsc_slice_count =drm_dp_dsc_sink_max_slice_count (intel_dp->dsc_dpcd, true); - }else { + }else if (drm_dp_sink_supports_fec (intel_dp->fec_capable)) { dsc_max_output_bpp = intel_dp_dsc_get_output_bpp(max_link_clock, max_lanes,@@ -1710,13 +1710,27 @@ struct link_config_limits {int min_bpp, max_bpp; }; +static bool intel_dp_source_supports_fec (struct intel_dp *intel_dp) +{ +struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp); +struct drm_i915_private *dev_priv =to_i915 (dig_port->base.base.dev); +enum port port = dig_port->base.port; + +return INTEL_GEN (dev_priv) >=11 && port !=PORT_A ; +} + +static bool intel_dp_supports_fec (struct intel_dp *intel_dp) +{ +return intel_dp_source_supports_fec (intel_dp) && +drm_dp_sink_supports_fec (intel_dp->fec_capable); +}
drivers/gpu/drm/i915/intel_dp.c struct link_config_limits { · line 1734
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +2
-2+static bool intel_dp_source_supports_dsc (struct intel_dp *intel_dp,const struct intel_crtc_state *pipe_config) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -/* FIXME: FEC needed for external DP until then reject DSC on DP */ -if (!intel_dp_is_edp (intel_dp)) +if (!intel_dp_supports_fec (intel_dp) && !intel_dp_is_edp (intel_dp))return false;
Hmm. I guess we should move this whole check to intel_dp_supports_dsc() since we're now checking sink caps as well.
Quoted 36 lines
drivers/gpu/drm/i915/intel_dp.c +8
-0return INTEL_GEN(dev_priv) >= 10 &&@@ -1886,9 +1900,17 @@ static bool intel_dp_dsc_compute_config(struct intel_dp *intel_dp,u16 dsc_max_output_bpp =0 ;u8 dsc_dp_slice_count =0 ; + pipe_config->fec_enable = !intel_dp_is_edp (intel_dp); +if (!intel_dp_supports_dsc (intel_dp, pipe_config))return false; +/* DSC not supported if external DP sink does not support FEC */ +if (pipe_config->fec_enable && !intel_dp_supports_fec (intel_dp)) { +DRM_DEBUG_KMS ("Sink does not support Forward Error Correction, disabling Display Compression\n" ); +return false; + } +/* DSC not supported for DSC sink BPC < 8 */ if (limits->max_bpp <3 *DP_DSC_MIN_SUPPORTED_BPC ) {DRM_DEBUG_KMS ("No DSC support for less than 8bpc\n" );drivers/gpu/drm/i915/intel_drv.h +3
-0@@ -945,6 +945,9 @@ struct intel_crtc_state {u8 slice_count; } dsc_params;struct drm_dsc_config dp_dsc_cfg; + +/* Forward Error correction State */ +bool fec_enable; };struct intel_crtc {Signature · 1 line
2.19.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 2/4 drm/i915/fec: Set FEC_READY in FEC_CONFIGURATION
In reply to Anusha SrivatsaIf the panel supports FEC, the driver has to set the FEC_READY bit in the dpcd register:FEC_CONFIGURATION.
This has to happen before link training.
v2: s/intel_dp_set_fec_ready/intel_dp_sink_set_fec_ready
- change commit message. (Gaurav)
v3: rebased. (r-b Manasi)
v4: Use fec crtc state, before setting FEC_READY bit. (Anusha)
v5: Move to intel_ddi.c
- Make the function static (Anusha)
--- drivers/gpu/drm/i915/intel_ddi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/drm/i915/intel_ddi.c +15 -0
@@ -3051,6 +3051,20 @@ static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port)I915_WRITE (MG_DP_MODE (port,1 ), ln1); } +static void intel_dp_sink_set_fec_ready (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state, +int state) +{ +int ret; + +if (!crtc_state->fec_enable) +return ; + + ret =drm_dp_dpcd_writeb (&intel_dp->aux,DP_FEC_CONFIGURATION , state); +if (ret <0 ) +DRM_DEBUG_KMS ("Failed to get FEC enabled in sink\n" ); +} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)
@@ -3091,6 +3105,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON );intel_dp_sink_set_decompression_state (intel_dp, crtc_state, true); +intel_dp_sink_set_fec_ready (intel_dp, crtc_state,DP_FEC_READY );intel_dp_start_link_train (intel_dp);if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp);
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [v6 2/4] drm/i915/fec: Set FEC_READY in FEC_CONFIGURATION
Quoted 32 lines · Anusha Srivatsa
If the panel supports FEC, the driver has to set the
FEC_READYbit in the dpcd register:FEC_CONFIGURATION.This has to happen before link training.
v2: s/intel_dp_set_fec_ready/intel_dp_sink_set_fec_ready
- change commit message. (Gaurav)v3: rebased. (r-b Manasi)
v4: Use fec crtc state, before setting
FEC_READYbit. (Anusha)v5: Move to
intel_ddi.c
- Make the function static (Anusha)Cc Gaurav K Singh <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjala <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/gpu/drm/i915/intel_ddi.c +0
-0
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3056
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -3051,6 +3051,20 @@ static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port)I915_WRITE (MG_DP_MODE (port,1 ), ln1); } +static void intel_dp_sink_set_fec_ready (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state, +int state)
u8 state should be good enough since you are writing only a byte here
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3064
Quoted 8 lines
drivers/gpu/drm/i915/intel_ddi.c +8
-0+{ +int ret; + +if (!crtc_state->fec_enable) +return ; + + ret =drm_dp_dpcd_writeb (&intel_dp->aux,DP_FEC_CONFIGURATION , state); +if (ret <0 )
This should ret <=0 since even if it writes 0 bytes its an error. Infact you dont need ret you can just say"
if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_FEC_CONFIGURATION, state) <= 0)
After the above changes,
Manasi
Quoted 17 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-0+DRM_DEBUG_KMS ("Failed to get FEC enabled in sink\n" ); +} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)@@ -3091,6 +3105,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON );intel_dp_sink_set_decompression_state (intel_dp, crtc_state, true); +intel_dp_sink_set_fec_ready (intel_dp, crtc_state,DP_FEC_READY );intel_dp_start_link_train (intel_dp);if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp);Signature · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [v6 2/4] drm/i915/fec: Set FEC_READY in FEC_CONFIGURATION
Quoted 36 lines · Manasi Navare
Quoted 35 lines · Anusha Srivatsa
If the panel supports FEC, the driver has to set the
FEC_READYbit in the dpcd register:FEC_CONFIGURATION.This has to happen before link training.
v2: s/intel_dp_set_fec_ready/intel_dp_sink_set_fec_ready
- change commit message. (Gaurav)v3: rebased. (r-b Manasi)
v4: Use fec crtc state, before setting
FEC_READYbit. (Anusha)v5: Move to
intel_ddi.c
- Make the function static (Anusha)Cc Gaurav K Singh <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjala <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3051,6 +3051,20 @@ static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port)I915_WRITE (MG_DP_MODE (port,1 ), ln1); }
Quoted 5 lines
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3056
Quoted 3 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0+static void intel_dp_sink_set_fec_ready (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state, +int state)u8 state should be good enough since you are writing only a byte here
AFAICS this is never called with anything but DP_FEC_READY. So there is absolutely benefit in making the caller have to pass that in. Just drop the 'state' argument entirely IMO.
Quoted 14 lines
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3064
Quoted 9 lines
drivers/gpu/drm/i915/intel_ddi.c +8
-0+{ +int ret; + +if (!crtc_state->fec_enable) +return ; + + ret =drm_dp_dpcd_writeb (&intel_dp->aux,DP_FEC_CONFIGURATION , state); +if (ret <0 )This should ret <=0 since even if it writes 0 bytes its an error. Infact you dont need ret you can just say"
if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_FEC_CONFIGURATION, state)<= 0)
Quoted 6 lines
After the above changes,
Reviewed-by Manasi Navare <[email protected]>Manasi
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3065
Quoted 1 line
drivers/gpu/drm/i915/intel_ddi.c +1
-0+DRM_DEBUG_KMS ("Failed to get FEC enabled in sink\n" );
This debug msg doesn't make sense.
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0+} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)@@ -3091,6 +3105,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON );intel_dp_sink_set_decompression_state (intel_dp, crtc_state, true); +intel_dp_sink_set_fec_ready (intel_dp, crtc_state,DP_FEC_READY );intel_dp_start_link_train (intel_dp);if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp);Signature · 1 line
2.19.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [v6 2/4] drm/i915/fec: Set FEC_READY in FEC_CONFIGURATION
Quoted 43 lines · Ville Syrjälä
Quoted 36 lines · Manasi Navare
Quoted 35 lines · Anusha Srivatsa
If the panel supports FEC, the driver has to set the
FEC_READYbit in the dpcd register:FEC_CONFIGURATION.This has to happen before link training.
v2: s/intel_dp_set_fec_ready/intel_dp_sink_set_fec_ready
- change commit message. (Gaurav)v3: rebased. (r-b Manasi)
v4: Use fec crtc state, before setting
FEC_READYbit. (Anusha)v5: Move to
intel_ddi.c
- Make the function static (Anusha)Cc Gaurav K Singh <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjala <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3051,6 +3051,20 @@ static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port)I915_WRITE (MG_DP_MODE (port,1 ), ln1); }Quoted 5 lines
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3056
Quoted 3 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0+static void intel_dp_sink_set_fec_ready (struct intel_dp *intel_dp, +const struct intel_crtc_state *crtc_state, +int state)u8 state should be good enough since you are writing only a byte here
Quoted 3 lines
AFAICS this is never called with anything but
DP_FEC_READY. So there is absolutely benefit in making the caller have to pass that in. Just drop the 'state' argument entirely IMO.
Oh yes thats correct, its a constant at DRM level and can be used directly since state never really gets set to DP_FEC_NOT_READy.
Manasi
Quoted 24 lines
Quoted 15 lines
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3064
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +8
-0+{ +int ret; + +if (!crtc_state->fec_enable) +return ; + + ret =drm_dp_dpcd_writeb (&intel_dp->aux,DP_FEC_CONFIGURATION , state); +if (ret <0 )This should ret <=0 since even if it writes 0 bytes its an error. Infact you dont need ret you can just say"
if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_FEC_CONFIGURATION, state)<= 0)Quoted 6 lines
After the above changes,
Reviewed-by Manasi Navare <[email protected]>Manasi
drivers/gpu/drm/i915/intel_ddi.c static void icl_program_mg_dp_mode(struct intel_digital_port *intel_dig_port) · line 3065
Quoted 1 line
drivers/gpu/drm/i915/intel_ddi.c +1
-0+DRM_DEBUG_KMS ("Failed to get FEC enabled in sink\n" );This debug msg doesn't make sense.
Quoted 20 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0+} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)@@ -3091,6 +3105,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON );intel_dp_sink_set_decompression_state (intel_dp, crtc_state, true); +intel_dp_sink_set_fec_ready (intel_dp, crtc_state,DP_FEC_READY );intel_dp_start_link_train (intel_dp);if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp);Signature · 1 line
2.19.1Signature · 2 lines
Ville Syrjälä Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v6 3/4 i915/dp/fec: Configure the Forward Error Correction bits.
In reply to Anusha SrivatsaIf FEC is supported, the correspondingDP_TP_CTL register bits have to be configured.
The driver has to program the FEC_ENABLE in DP_TP_CTL[30] register and wait till FEC_STATUS in DP_TP_CTL[28] is 1.
Also add the warn message to make sure that the control register is already active while enabling FEC.
v2:
- Change commit message. Configure fec state after link training (Manasi, Gaurav)
- Remove redundent checks (Manasi)
- Remove the registers that get added automagically (Anusha)
v3: s/intel_dp_set_fec_state()/intel_dp_enable_fec_state() (Gaurav)
v4: rebased.
v5:
- Move the code to the proper spot, according to spec.(Ville)
- Use fec state as a check too.
v6: Pass intel_encoder, instead of intel_dp. (Ville)
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -9148,6 +9148,7 @@ enum skl_power_gate {#define _DP_TP_CTL_B 0x64140#define DP_TP_CTL (port) _MMIO_PORT(port, _DP_TP_CTL_A, _DP_TP_CTL_B)#define DP_TP_CTL_ENABLE (1 << 31) +#define DP_TP_CTL_FEC_ENABLE (1 << 30)#define DP_TP_CTL_MODE_SST (0 << 27)#define DP_TP_CTL_MODE_MST (1 << 27)#define DP_TP_CTL_FORCE_ACT (1 << 25)
@@ -9166,6 +9167,7 @@ enum skl_power_gate {#define _DP_TP_STATUS_A 0x64044#define _DP_TP_STATUS_B 0x64144#define DP_TP_STATUS (port) _MMIO_PORT(port, _DP_TP_STATUS_A, _DP_TP_STATUS_B) +#define DP_TP_STATUS_FEC_ENABLE_LIVE (1 << 28)#define DP_TP_STATUS_IDLE_DONE (1 << 25)#define DP_TP_STATUS_ACT_SENT (1 << 24)#define DP_TP_STATUS_MODE_STATUS_MST (1 << 23)
drivers/gpu/drm/i915/intel_ddi.c +24 -0
@@ -3065,6 +3065,28 @@ static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp,DRM_DEBUG_KMS ("Failed to get FEC enabled in sink\n" ); } +static void intel_ddi_enable_fec (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port; +u32 val; + +/* FEC support exists for DP 1.4 only */ +if (!crtc_state->fec_enable) +return ; + + val =I915_READ (DP_TP_CTL (port)); + val |=DP_TP_CTL_FEC_ENABLE ; +I915_WRITE (DP_TP_CTL (port), val); + +if (intel_wait_for_register (dev_priv,DP_TP_STATUS (port), +DP_TP_STATUS_FEC_ENABLE_LIVE , +DP_TP_STATUS_FEC_ENABLE_LIVE , +1 )) +DRM_ERROR ("Timed out waiting for FEC Enable Status\n" ); +} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)
@@ -3110,6 +3132,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp); +intel_ddi_enable_fec (encoder, crtc_state); +icl_enable_phy_clock_gating (dig_port);if (!is_mst)
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [v6 3/4] i915/dp/fec: Configure the Forward Error Correction bits.
Quoted 61 lines · Anusha Srivatsa
If FEC is supported, the corresponding
DP_TP_CTLregister bits have to be configured.The driver has to program the
FEC_ENABLEin DP_TP_CTL[30] register and wait tillFEC_STATUSin DP_TP_CTL[28] is 1.
Also add the warn message to make sure that the control register is already active while enabling FEC.v2:
- Change commit message. Configure fec state after link training (Manasi, Gaurav)
- Remove redundent checks (Manasi)
- Remove the registers that get added automagically (Anusha)v3: s/intel_dp_set_fec_state()/intel_dp_enable_fec_state() (Gaurav)
v4: rebased.
v5:
- Move the code to the proper spot, according to spec.(Ville)
- Use fec state as a check too.v6: Pass
intel_encoder, instead ofintel_dp. (Ville)Cc Gaurav K Singh <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjala <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -9148,6 +9148,7 @@ enum skl_power_gate {#define _DP_TP_CTL_B 0x64140#define DP_TP_CTL (port) _MMIO_PORT(port, _DP_TP_CTL_A, _DP_TP_CTL_B)#define DP_TP_CTL_ENABLE (1 << 31) +#define DP_TP_CTL_FEC_ENABLE (1 << 30)#define DP_TP_CTL_MODE_SST (0 << 27)#define DP_TP_CTL_MODE_MST (1 << 27)#define DP_TP_CTL_FORCE_ACT (1 << 25)@@ -9166,6 +9167,7 @@ enum skl_power_gate {#define _DP_TP_STATUS_A 0x64044#define _DP_TP_STATUS_B 0x64144#define DP_TP_STATUS (port) _MMIO_PORT(port, _DP_TP_STATUS_A, _DP_TP_STATUS_B) +#define DP_TP_STATUS_FEC_ENABLE_LIVE (1 << 28)#define DP_TP_STATUS_IDLE_DONE (1 << 25)#define DP_TP_STATUS_ACT_SENT (1 << 24)#define DP_TP_STATUS_MODE_STATUS_MST (1 << 23)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3065,6 +3065,28 @@ static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp,DRM_DEBUG_KMS ("Failed to get FEC enabled in sink\n" );
drivers/gpu/drm/i915/intel_ddi.c static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp, · line 3075
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +8
-0} +static void intel_ddi_enable_fec (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port; +u32 val; + +/* FEC support exists for DP 1.4 only */
No need for this comment here now since all the platform and sink checks already done while setting the the fec state.
drivers/gpu/drm/i915/intel_ddi.c static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp, · line 3081
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +6
-0+if (!crtc_state->fec_enable) +return ; + + val =I915_READ (DP_TP_CTL (port)); + val |=DP_TP_CTL_FEC_ENABLE ; +I915_WRITE (DP_TP_CTL (port), val);
Do we need a POSTING_READ() here as well? Its used in case of disable fec in DP_TP_CTL. May be double check when we need it and when we dont.
Manasi
Quoted 23 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-0+ +if (intel_wait_for_register (dev_priv,DP_TP_STATUS (port), +DP_TP_STATUS_FEC_ENABLE_LIVE , +DP_TP_STATUS_FEC_ENABLE_LIVE , +1 )) +DRM_ERROR ("Timed out waiting for FEC Enable Status\n" ); +} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)@@ -3110,6 +3132,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp); +intel_ddi_enable_fec (encoder, crtc_state); +icl_enable_phy_clock_gating (dig_port);if (!is_mst)Signature · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
RE: [v6 3/4] i915/dp/fec: Configure the Forward Error Correction bits.
Quoted 78 lines
-----Original Message-----
From: Navare, Manasi D
Sent: Tuesday, November 6, 2018 2:42 PM
To: Srivatsa, Anusha <[email protected]>
Cc: [email protected]; [email protected]; Singh, Gaurav K <[email protected]>; Jani Nikula <[email protected]>; Ville Syrjala <[email protected]>
Subject: Re: [v6 3/4] i915/dp/fec: Configure the Forward Error Correction bits.drivers/gpu/drm/i915/intel_ddi.c static void intel_dp_sink_set_fec_ready(struct
Quoted 63 lines · Anusha Srivatsa
If FEC is supported, the corresponding
DP_TP_CTLregister bits have to be configured.The driver has to program the
FEC_ENABLEin DP_TP_CTL[30] register and wait tillFEC_STATUSin DP_TP_CTL[28] is 1.
Also add the warn message to make sure that the control register is already active while enabling FEC.v2:
- Change commit message. Configure fec state after link training (Manasi, Gaurav)
- Remove redundent checks (Manasi)
- Remove the registers that get added automagically (Anusha)v3: s/intel_dp_set_fec_state()/intel_dp_enable_fec_state() (Gaurav)
v4: rebased.
v5:
- Move the code to the proper spot, according to spec.(Ville)
- Use fec state as a check too.v6: Pass
intel_encoder, instead ofintel_dp. (Ville)Cc Gaurav K Singh <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjala <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex1a84e8f98e66..209b64d2f27a100644drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -9148,6 +9148,7 @@ enum skl_power_gate {#define _DP_TP_CTL_B 0x64140#define DP_TP_CTL (port) _MMIO_PORT(port, _DP_TP_CTL_A, _DP_TP_CTL_B)#define DP_TP_CTL_ENABLE (1 << 31) +#define DP_TP_CTL_FEC_ENABLE (1 << 30)#define DP_TP_CTL_MODE_SST (0 << 27)#define DP_TP_CTL_MODE_MST (1 << 27)#define DP_TP_CTL_FORCE_ACT (1 << 25)@@ -9166,6 +9167,7 @@ enum skl_power_gate {#define _DP_TP_STATUS_A 0x64044#define _DP_TP_STATUS_B 0x64144#define DP_TP_STATUS (port) _MMIO_PORT(port, _DP_TP_STATUS_A, _DP_TP_STATUS_B) +#define DP_TP_STATUS_FEC_ENABLE_LIVE (1 << 28)#define DP_TP_STATUS_IDLE_DONE (1 << 25)#define DP_TP_STATUS_ACT_SENT (1 << 24)#define
DP_TP_STATUS_MODE_STATUS_MST(1 << 23)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3065,6 +3065,28 @@ static void intel_dp_sink_set_fec_ready(struct
intel_dp*intel_dp,Quoted 2 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0DRM_DEBUG_KMS ("Failed to get FEC enabled in sink\n" ); }
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp, · line 3075
Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c +7
-0+static void intel_ddi_enable_fec (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) { +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port; +u32 val; + +/* FEC support exists for DP 1.4 only */ No need for this comment here now since all the platform and sink checks already done while setting the the fec state.
Agreed.
Quoted 11 lines
drivers/gpu/drm/i915/intel_ddi.c static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp, · line 3081
Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c +6
-0+if (!crtc_state->fec_enable) +return ; + + val =I915_READ (DP_TP_CTL (port)); + val |=DP_TP_CTL_FEC_ENABLE ; +I915_WRITE (DP_TP_CTL (port), val);Do we need a
POSTING_READ()here as well? It's used in case of disable fec inDP_TP_CTL.
May be double check when we need it and when we don't.
I don't think we need POSTING_READ, the spec says "wait for FEC_STATUS in DP_TP_CTL[28] is 1. That is why after the i915_WRITE above, I am using intel_Wait_for_register().
Anusha
Quoted 18 lines
Manasi
drivers/gpu/drm/i915/intel_ddi.c static void intel_dp_sink_set_fec_ready(struct intel_dp *intel_dp,
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +7
-0+ +if (intel_wait_for_register (dev_priv,DP_TP_STATUS (port), +DP_TP_STATUS_FEC_ENABLE_LIVE , +DP_TP_STATUS_FEC_ENABLE_LIVE , +1 )) +DRM_ERROR ("Timed out waiting for FEC Enable Status\n" ); } +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state, const struct drm_connector_state
*conn_state) @@ -3110,6drivers/gpu/drm/i915/intel_ddi.c static void intel_dp_sink_set_fec_ready(struct · line 3090
Quoted 1 line
drivers/gpu/drm/i915/intel_ddi.c +1
-0+3132,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder*encoder,
Quoted 3 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 )intel_dp_stop_link_train (intel_dp);
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_ddi.c +2
-1+intel_ddi_enable_fec (encoder, crtc_state); +icl_enable_phy_clock_gating (dig_port);if (!is_mst) --2.19.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v6 4/4 drm/i915/fec: Disable FEC state.
In reply to Anusha SrivatsaSet the suitable bits in DP_TP_CTL to stop bit correction when DSC is disabled.
v2:
- rebased.
- Add additional check for compression state. (Gaurav)
v3: rebased.
v4:
- Move the code to the proper spot according to spec (Ville)
- Use proper checks (manasi)
v5: Remove unnecessary checks (Ville)
v6: Resolve warnings. Add crtc_state as an argument to intel_disable_ddi_buf(). (Manasi)
--- drivers/gpu/drm/i915/intel_ddi.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +25 -4
@@ -3087,6 +3087,22 @@ static void intel_ddi_enable_fec(struct intel_encoder *encoder,DRM_ERROR ("Timed out waiting for FEC Enable Status\n" ); } +static void intel_ddi_disable_fec_state (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port; +u32 val; + +if (!crtc_state->fec_enable) +return ; + + val =I915_READ (DP_TP_CTL (port)); + val &= ~DP_TP_CTL_FEC_ENABLE ; +I915_WRITE (DP_TP_CTL (port), val); +POSTING_READ (DP_TP_CTL (port)); +} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)
@@ -3230,10 +3246,12 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder, } } -static void intel_disable_ddi_buf (struct intel_encoder *encoder) +static void intel_disable_ddi_buf (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);enum port port = encoder->port; +bool wait = false;u32 val;
@@ -3249,6 +3267,9 @@ static void intel_disable_ddi_buf(struct intel_encoder *encoder) val |=DP_TP_CTL_LINK_TRAIN_PAT1 ;I915_WRITE (DP_TP_CTL (port), val); +/* Disable FEC in DP Sink */ +intel_ddi_disable_fec_state (encoder, crtc_state); +if (wait)intel_wait_ddi_buf_idle (dev_priv, port); }
@@ -3272,7 +3293,7 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); } -intel_disable_ddi_buf (encoder); +intel_disable_ddi_buf (encoder, old_crtc_state);intel_edp_panel_vdd_on (intel_dp);intel_edp_panel_off (intel_dp);
@@ -3295,7 +3316,7 @@ static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,intel_ddi_disable_pipe_clock (old_crtc_state); -intel_disable_ddi_buf (encoder); +intel_disable_ddi_buf (encoder, old_crtc_state);intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain);
@@ -3346,7 +3367,7 @@ void intel_ddi_fdi_post_disable(struct intel_encoder *encoder, val &= ~FDI_RX_ENABLE ;I915_WRITE (FDI_RX_CTL (PIPE_A ), val); -intel_disable_ddi_buf (encoder); +intel_disable_ddi_buf (encoder, old_crtc_state);intel_ddi_clk_disable (encoder); val =I915_READ (FDI_RX_MISC (PIPE_A ));
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [v6 4/4] drm/i915/fec: Disable FEC state.
Quoted 56 lines · Anusha Srivatsa
Set the suitable bits in
DP_TP_CTLto stop bit correction when DSC is disabled.v2:
- rebased.
- Add additional check for compression state. (Gaurav)v3: rebased.
v4:
- Move the code to the proper spot according to spec (Ville)
- Use proper checks (manasi)v5: Remove unnecessary checks (Ville)
v6: Resolve warnings. Add
crtc_stateas an argument tointel_disable_ddi_buf(). (Manasi)Cc Gaurav K Singh <[email protected]>Cc Jani Nikula <[email protected]>Cc Ville Syrjala <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +16
-0@@ -3087,6 +3087,22 @@ static void intel_ddi_enable_fec(struct intel_encoder *encoder,DRM_ERROR ("Timed out waiting for FEC Enable Status\n" ); } +static void intel_ddi_disable_fec_state (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port; +u32 val; + +if (!crtc_state->fec_enable) +return ; + + val =I915_READ (DP_TP_CTL (port)); + val &= ~DP_TP_CTL_FEC_ENABLE ; +I915_WRITE (DP_TP_CTL (port), val); +POSTING_READ (DP_TP_CTL (port)); +} +static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state)
drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_pre_enable(struct intel_encoder *encoder, · line 3254
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-1@@ -3230,10 +3246,12 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder, } } -static void intel_disable_ddi_buf (struct intel_encoder *encoder) +static void intel_disable_ddi_buf (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);enum port port = encoder->port; +
unnecessary change , bogus blank line.
With that fix,
Manasi
Quoted 43 lines
drivers/gpu/drm/i915/intel_ddi.c +6
-3bool wait = false;u32 val;@@ -3249,6 +3267,9 @@ static void intel_disable_ddi_buf(struct intel_encoder *encoder) val |=DP_TP_CTL_LINK_TRAIN_PAT1 ;I915_WRITE (DP_TP_CTL (port), val); +/* Disable FEC in DP Sink */ +intel_ddi_disable_fec_state (encoder, crtc_state); +if (wait)intel_wait_ddi_buf_idle (dev_priv, port); }@@ -3272,7 +3293,7 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); } -intel_disable_ddi_buf (encoder); +intel_disable_ddi_buf (encoder, old_crtc_state);intel_edp_panel_vdd_on (intel_dp);intel_edp_panel_off (intel_dp);@@ -3295,7 +3316,7 @@ static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,intel_ddi_disable_pipe_clock (old_crtc_state); -intel_disable_ddi_buf (encoder); +intel_disable_ddi_buf (encoder, old_crtc_state);intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain);@@ -3346,7 +3367,7 @@ void intel_ddi_fdi_post_disable(struct intel_encoder *encoder, val &= ~FDI_RX_ENABLE ;I915_WRITE (FDI_RX_CTL (PIPE_A ), val); -intel_disable_ddi_buf (encoder); +intel_disable_ddi_buf (encoder, old_crtc_state);intel_ddi_clk_disable (encoder); val =I915_READ (FDI_RX_MISC (PIPE_A ));Signature · 1 line
2.19.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: failure for Forward Error Correction (rev6)
In reply to Anusha Srivatsa== Series Details ==
== Series Details ==
Series: Forward Error Correction (rev6)
URL : https://patchwork.freedesktop.org/series/47848/
State : failure
== Summary ==
Applying: i915/dp/fec: Add fec_enable to the crtc state.
error: sha1 information is lacking or useless (drivers/gpu/drm/i915/intel_dp.c).
error: could not build fake ancestor
Patch failed at 0001 i915/dp/fec: Add fec_enable to the crtc state. Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx