Re: [Intel-gfx] [PATCH 2/2] drm/i915: Require FEC for DSC on DP-MST

2023-09-20 Thread Ville Syrjälä
On Wed, Sep 20, 2023 at 12:20:51PM +0300, Jani Nikula wrote:
> On Wed, 13 Sep 2023, Ville Syrjala  wrote:
> > From: Ville Syrjälä 
> >
> > The current check just asserts that we need FEC to use DSC
> > with (non-eDP) DP-SST. But MST also needs FEC for DSC. Just
> > check for !eDP instead to cover all the cases correctly.
> 
> 128b/132b won't have crtc->fec_enable set, as it's part of channel
> encoding. We don't need to explicitly enable it in hardware, the
> 128b/132b bandwidth computations take it into account in the equation,
> but we can't skip DSC based on !crtc_state->fec_enable either.

Hmm. Right. I suppose we need a uhbr check here as well then.

> 
> BR,
> Jani.
> 
> 
> >
> > Cc: Luca Coelho 
> > Signed-off-by: Ville Syrjälä 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> > b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 2cde8ac513bb..41f180f2879e 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -1380,7 +1380,7 @@ static bool intel_dp_supports_fec(struct intel_dp 
> > *intel_dp,
> >  static bool intel_dp_supports_dsc(struct intel_dp *intel_dp,
> >   const struct intel_crtc_state *crtc_state)
> >  {
> > -   if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && 
> > !crtc_state->fec_enable)
> > +   if (!intel_dp_is_edp(intel_dp) && !crtc_state->fec_enable)
> > return false;
> >  
> > return intel_dsc_source_support(crtc_state) &&
> 
> -- 
> Jani Nikula, Intel

-- 
Ville Syrjälä
Intel


Re: [Intel-gfx] [PATCH 2/2] drm/i915: Require FEC for DSC on DP-MST

2023-09-20 Thread Jani Nikula
On Wed, 13 Sep 2023, Ville Syrjala  wrote:
> From: Ville Syrjälä 
>
> The current check just asserts that we need FEC to use DSC
> with (non-eDP) DP-SST. But MST also needs FEC for DSC. Just
> check for !eDP instead to cover all the cases correctly.

128b/132b won't have crtc->fec_enable set, as it's part of channel
encoding. We don't need to explicitly enable it in hardware, the
128b/132b bandwidth computations take it into account in the equation,
but we can't skip DSC based on !crtc_state->fec_enable either.

BR,
Jani.


>
> Cc: Luca Coelho 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 2cde8ac513bb..41f180f2879e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1380,7 +1380,7 @@ static bool intel_dp_supports_fec(struct intel_dp 
> *intel_dp,
>  static bool intel_dp_supports_dsc(struct intel_dp *intel_dp,
> const struct intel_crtc_state *crtc_state)
>  {
> - if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && 
> !crtc_state->fec_enable)
> + if (!intel_dp_is_edp(intel_dp) && !crtc_state->fec_enable)
>   return false;
>  
>   return intel_dsc_source_support(crtc_state) &&

-- 
Jani Nikula, Intel


[Intel-gfx] [PATCH 2/2] drm/i915: Require FEC for DSC on DP-MST

2023-09-13 Thread Ville Syrjala
From: Ville Syrjälä 

The current check just asserts that we need FEC to use DSC
with (non-eDP) DP-SST. But MST also needs FEC for DSC. Just
check for !eDP instead to cover all the cases correctly.

Cc: Luca Coelho 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 2cde8ac513bb..41f180f2879e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1380,7 +1380,7 @@ static bool intel_dp_supports_fec(struct intel_dp 
*intel_dp,
 static bool intel_dp_supports_dsc(struct intel_dp *intel_dp,
  const struct intel_crtc_state *crtc_state)
 {
-   if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && 
!crtc_state->fec_enable)
+   if (!intel_dp_is_edp(intel_dp) && !crtc_state->fec_enable)
return false;
 
return intel_dsc_source_support(crtc_state) &&
-- 
2.41.0