[PATCH 20/20] drm/i915/dp: Check if force_dsc_output_format is possible

2023-07-27 Thread Ankit Nautiyal
Currently for testing an output format with DSC, we just force the output format, without checking if it can be supported. This also creates an issue where there is a PCON which might need to convert from forced output format to the format to sink format. Signed-off-by: Ankit Nautiyal

[PATCH 19/20] drm/i915/dp: Check src/sink compressed bpp limit for edp

2023-07-27 Thread Ankit Nautiyal
Use checks for src and sink limits before computing compressed bpp for eDP. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu

[PATCH 16/20] drm/i915/dp: Separate out function to get compressed bpp with joiner

2023-07-27 Thread Ankit Nautiyal
Pull the code to get joiner constraints on maximum compressed bpp into separate function. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 54 ++--- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/i915/display

[PATCH 15/20] drm/i915/dp: Add DSC BPC/BPP constraints while selecting pipe bpp with DSC

2023-07-27 Thread Ankit Nautiyal
Currently we check if the pipe_bpp selected is >= the min DSC bpc/bpp requirement. We do not check if it is <= the max DSC bpc/bpp requirement. Add checks for max DSC BPC/BPP constraints while computing the pipe_bpp when DSC is in use. v2: Fix the commit message. Signed-off-by: Ankit Na

[PATCH 17/20] drm/i915/dp: Get optimal link config to have best compressed bpp

2023-07-27 Thread Ankit Nautiyal
v8: -Separate mechanism to get compressed bpp for ICL,TGL and XELPD+. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 294 +--- 1 file changed, 261 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/i915/disp

[PATCH 18/20] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

2023-07-27 Thread Ankit Nautiyal
p and compressed bpps. v5: - Decrease step while looking for suitable compressed bpp to accommodate. v6: - Use helper for getting min and max compressed_bpp (Ankit) v7: - Fix checkpatch warning (Ankit) Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/di

[PATCH 09/20] drm/i915/dp: Avoid forcing DSC BPC for MST case

2023-07-27 Thread Ankit Nautiyal
For MST the bpc is hardcoded to 8, and pipe bpp to 24. So avoid forcing DSC bpc for MST case. v2: Warn and ignore the debug flag than to bail out. (Jani) v3: Fix dbg message to mention forced bpc instead of bpp. v4: Fix checkpatch longline warning. Signed-off-by: Ankit Nautiyal --- drivers

[PATCH 10/20] drm/i915/dp: Add functions to get min/max src input bpc with DSC

2023-08-08 Thread Ankit Nautiyal
Separate out functions for getting maximum and minimum input BPC based on platforms, when DSC is used. v2: Use HAS_DSC macro instead of platform check while getting min input bpc. (Stan) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 35 +++-- 1

[PATCH 00/20] DSC misc fixes

2023-08-10 Thread Ankit Nautiyal
d and rebased. Ankit Nautiyal (19): drm/i915/dp: Consider output_format while computing dsc bpp drm/i915/dp: Move compressed bpp check with 420 format inside the helper drm/i915/dp_mst: Use output_format to get the final link bpp drm/i915/dp: Use consistent name for link bpp and compresse

[PATCH 01/20] drm/i915/dp: Consider output_format while computing dsc bpp

2023-08-10 Thread Ankit Nautiyal
. v2: Use output_bpp instead for pipe_bpp to clamp compressed_bpp. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_dp.c | 19 +-- drivers/gpu/drm/i915/display/intel_dp.h | 1 + drivers/gpu/drm/i915/display

[PATCH 02/20] drm/i915/dp: Move compressed bpp check with 420 format inside the helper

2023-08-10 Thread Ankit Nautiyal
Move the check for limiting compressed bite_per_pixel for 420,422 formats in the helper to compute bits_per_pixel. Signed-off-by: Ankit Nautiyal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_dp.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[PATCH 07/20] drm/i915/dp: Remove extra logs for printing DSC info

2023-08-10 Thread Ankit Nautiyal
DSC compressed bpp and slice counts are already getting printed at the end of dsc compute config. Remove extra logs. Signed-off-by: Ankit Nautiyal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_dp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH 10/20] drm/i915/dp: Add functions to get min/max src input bpc with DSC

2023-08-10 Thread Ankit Nautiyal
Separate out functions for getting maximum and minimum input BPC based on platforms, when DSC is used. v2: Use HAS_DSC macro instead of platform check while getting min input bpc. (Stan) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 35 +++-- 1

[PATCH 11/20] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-08-10 Thread Ankit Nautiyal
required. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 48 - 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c

[PATCH 05/20] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-08-10 Thread Ankit Nautiyal
In Bigjoiner check for DSC, bigjoiner interface bits for DP for DISPLAY > 13 is 36 (Bspec: 49259). v2: Corrected Display ver to 13. v3: Follow convention for conditional statement. (Ville) v4: Fix check for display ver. (Ville) v5: Added note for 2 PPC. (Stan) Signed-off-by: Ankit Nauti

[PATCH 17/20] drm/i915/dp: Get optimal link config to have best compressed bpp

2023-08-10 Thread Ankit Nautiyal
v8: -Separate mechanism to get compressed bpp for ICL,TGL and XELPD+. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 294 +--- 1 file changed, 261 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/i915/disp

[PATCH 06/20] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck

2023-08-10 Thread Ankit Nautiyal
later, lets account for Bigjoiner BW check while calculating Min CDCLK. v2: Use pixel clock in the bw calculations. (Ville) v3: Use helper to account for FEC overhead. (Stan) Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_cdclk.c | 59

[PATCH 04/20] drm/i915/dp: Use consistent name for link bpp and compressed bpp

2023-08-10 Thread Ankit Nautiyal
DSC: output_bpp = pipe_bpp/2 link_bpp = compressed_bpp, computed with output_bpp Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_dp.c | 84 ++--- drivers/gpu/drm/i915/display/intel_dp.h | 14 ++-- drivers/gpu/drm/i915/display

[PATCH 13/20] drm/i915/dp: Rename helper to get DSC max pipe_bpp

2023-08-10 Thread Ankit Nautiyal
The helper intel_dp_dsc_compute_bpp gives the maximum pipe bpp that is allowed with DSC. Rename the this to reflect that it returns max pipe bpp supported with DSC. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 8

[PATCH 08/20] drm/display/dp: Fix the DP DSC Receiver cap size

2023-08-10 Thread Ankit Nautiyal
DP DSC Receiver Capabilities are exposed via DPCD 60h-6Fh. Fix the DSC RECEIVER CAP SIZE accordingly. Fixes: ffddc4363c28 ("drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT") Cc: Anusha Srivatsa Cc: Manasi Navare Cc: # v5.0+ Signed-off-by: Ankit Nautiyal R

[PATCH 09/20] drm/i915/dp: Avoid forcing DSC BPC for MST case

2023-08-10 Thread Ankit Nautiyal
For MST the bpc is hardcoded to 8, and pipe bpp to 24. So avoid forcing DSC bpc for MST case. v2: Warn and ignore the debug flag than to bail out. (Jani) v3: Fix dbg message to mention forced bpc instead of bpp. v4: Fix checkpatch longline warning. Signed-off-by: Ankit Nautiyal Reviewed-by

[PATCH 03/20] drm/i915/dp_mst: Use output_format to get the final link bpp

2023-08-10 Thread Ankit Nautiyal
The final link bpp used to calculate the m_n values depend on the output_format. Though the output_format is set to RGB for MST case and the link bpp will be same as the pipe bpp, for the sake of semantics, lets calculate the m_n values with the link bpp, instead of pipe_bpp. Signed-off-by: Ankit

[PATCH 18/20] drm/i915/dp: Check src/sink compressed bpp limit for edp

2023-08-10 Thread Ankit Nautiyal
Use checks for src and sink limits before computing compressed bpp for eDP. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH 12/20] drm/i915/dp: Avoid left shift of DSC output bpp by 4

2023-08-10 Thread Ankit Nautiyal
To make way for fractional bpp support, avoid left shifting the output_bpp by 4 in helper intel_dp_dsc_get_output_bpp. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 10 +++--- drivers/gpu/drm/i915/display/intel_dp_mst.c

[PATCH 20/20] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

2023-08-10 Thread Ankit Nautiyal
p and compressed bpps. v5: - Decrease step while looking for suitable compressed bpp to accommodate. v6: - Use helper for getting min and max compressed_bpp (Ankit) v7: - Fix checkpatch warning (Ankit) Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/di

[PATCH 19/20] drm/i915/dp: Check if force_dsc_output_format is possible

2023-08-10 Thread Ankit Nautiyal
Currently for testing an output format with DSC, we just force the output format, without checking if it can be supported. This also creates an issue where there is a PCON which might need to convert from forced output format to the format to sink format. Signed-off-by: Ankit Nautiyal Reviewed

[PATCH 16/20] drm/i915/dp: Separate out function to get compressed bpp with joiner

2023-08-10 Thread Ankit Nautiyal
Pull the code to get joiner constraints on maximum compressed bpp into separate function. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 54 ++--- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a

[PATCH 15/20] drm/i915/dp: Add DSC BPC/BPP constraints while selecting pipe bpp with DSC

2023-08-10 Thread Ankit Nautiyal
Currently we check if the pipe_bpp selected is >= the min DSC bpc/bpp requirement. We do not check if it is <= the max DSC bpc/bpp requirement. Add checks for max DSC BPC/BPP constraints while computing the pipe_bpp when DSC is in use. v2: Fix the commit message. Signed-off-by: Ankit Na

[PATCH 14/20] drm/i915/dp: Separate out functions for edp/DP for computing DSC bpp

2023-08-10 Thread Ankit Nautiyal
Refactor code to separate functions for eDP and DP for computing pipe_bpp/compressed bpp when DSC is involved. This will help to optimize the link configuration for DP later. v2: Fix checkpatch warning. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915

[PATCH 01/18] drm/i915/dp: Consider output_format while computing dsc bpp

2023-08-17 Thread Ankit Nautiyal
. v2: Use output_bpp instead for pipe_bpp to clamp compressed_bpp. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_dp.c | 19 +-- drivers/gpu/drm/i915/display/intel_dp.h | 1 + drivers/gpu/drm/i915/display

[PATCH 02/18] drm/i915/dp: Move compressed bpp check with 420 format inside the helper

2023-08-17 Thread Ankit Nautiyal
Move the check for limiting compressed bits_per_pixel for 420,422 formats in the helper to compute bits_per_pixel. v2: Fix typo in commit message. (Ankit) Signed-off-by: Ankit Nautiyal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_dp.c | 18 +- 1 file

[PATCH 03/18] drm/i915/dp_mst: Use output_format to get the final link bpp

2023-08-17 Thread Ankit Nautiyal
The final link bpp used to calculate the m_n values depend on the output_format. Though the output_format is set to RGB for MST case and the link bpp will be same as the pipe bpp, for the sake of semantics, lets calculate the m_n values with the link bpp, instead of pipe_bpp. Signed-off-by: Ankit

[PATCH 09/18] drm/i915/dp: Add functions to get min/max src input bpc with DSC

2023-08-17 Thread Ankit Nautiyal
Separate out functions for getting maximum and minimum input BPC based on platforms, when DSC is used. v2: Use HAS_DSC macro instead of platform check while getting min input bpc. (Stan) Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c

[PATCH 12/18] drm/i915/dp: Rename helper to get DSC max pipe_bpp

2023-08-17 Thread Ankit Nautiyal
The helper intel_dp_dsc_compute_bpp gives the maximum pipe bpp that is allowed with DSC. Rename the this to reflect that it returns max pipe bpp supported with DSC. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 8

[PATCH 08/18] drm/i915/dp: Avoid forcing DSC BPC for MST case

2023-08-17 Thread Ankit Nautiyal
For MST the bpc is hardcoded to 8, and pipe bpp to 24. So avoid forcing DSC bpc for MST case. v2: Warn and ignore the debug flag than to bail out. (Jani) v3: Fix dbg message to mention forced bpc instead of bpp. v4: Fix checkpatch longline warning. Signed-off-by: Ankit Nautiyal Reviewed-by

[PATCH 17/18] drm/i915/dp: Check src/sink compressed bpp limit for edp

2023-08-17 Thread Ankit Nautiyal
Use checks for src and sink limits before computing compressed bpp for eDP. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH 06/18] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck

2023-08-17 Thread Ankit Nautiyal
later, lets account for Bigjoiner BW check while calculating Min CDCLK. v2: Use pixel clock in the bw calculations. (Ville) v3: Use helper to account for FEC overhead. (Stan) Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_cdclk.c | 59

[PATCH 15/18] drm/i915/dp: Separate out function to get compressed bpp with joiner

2023-08-17 Thread Ankit Nautiyal
Pull the code to get joiner constraints on maximum compressed bpp into separate function. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 54 ++--- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a

[PATCH 00/18] DSC misc fixes

2023-08-17 Thread Ankit Nautiyal
. Ankit Nautiyal (18): drm/i915/dp: Consider output_format while computing dsc bpp drm/i915/dp: Move compressed bpp check with 420 format inside the helper drm/i915/dp_mst: Use output_format to get the final link bpp drm/i915/dp: Use consistent name for link bpp and compressed bpp drm

[PATCH 07/18] drm/i915/dp: Remove extra logs for printing DSC info

2023-08-17 Thread Ankit Nautiyal
DSC compressed bpp and slice counts are already getting printed at the end of dsc compute config. Remove extra logs. Signed-off-by: Ankit Nautiyal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_dp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH 05/18] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-08-17 Thread Ankit Nautiyal
In Bigjoiner check for DSC, bigjoiner interface bits for DP for DISPLAY > 13 is 36 (Bspec: 49259). v2: Corrected Display ver to 13. v3: Follow convention for conditional statement. (Ville) v4: Fix check for display ver. (Ville) v5: Added note for 2 PPC. (Stan) Signed-off-by: Ankit Nauti

[PATCH 10/18] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-08-17 Thread Ankit Nautiyal
required. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 48 - 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c

[PATCH 04/18] drm/i915/dp: Use consistent name for link bpp and compressed bpp

2023-08-17 Thread Ankit Nautiyal
DSC: output_bpp = pipe_bpp/2 link_bpp = compressed_bpp, computed with output_bpp Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_dp.c | 84 ++--- drivers/gpu/drm/i915/display/intel_dp.h | 14 ++-- drivers/gpu/drm/i915/display

[PATCH 14/18] drm/i915/dp: Add DSC BPC/BPP constraints while selecting pipe bpp with DSC

2023-08-17 Thread Ankit Nautiyal
Currently we check if the pipe_bpp selected is >= the min DSC bpc/bpp requirement. We do not check if it is <= the max DSC bpc/bpp requirement. Add checks for max DSC BPC/BPP constraints while computing the pipe_bpp when DSC is in use. v2: Fix the commit message. Signed-off-by: Ankit Na

[PATCH 11/18] drm/i915/dp: Avoid left shift of DSC output bpp by 4

2023-08-17 Thread Ankit Nautiyal
To make way for fractional bpp support, avoid left shifting the output_bpp by 4 in helper intel_dp_dsc_get_output_bpp. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 10 +++--- drivers/gpu/drm/i915/display/intel_dp_mst.c

[PATCH 18/18] drm/i915/dp: Check if force_dsc_output_format is possible

2023-08-17 Thread Ankit Nautiyal
Currently for testing an output format with DSC, we just force the output format, without checking if it can be supported. This also creates an issue where there is a PCON which might need to convert from forced output format to the format to sink format. Signed-off-by: Ankit Nautiyal Reviewed

[PATCH 13/18] drm/i915/dp: Separate out functions for edp/DP for computing DSC bpp

2023-08-17 Thread Ankit Nautiyal
Refactor code to separate functions for eDP and DP for computing pipe_bpp/compressed bpp when DSC is involved. This will help to optimize the link configuration for DP later. v2: Fix checkpatch warning. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915

[PATCH 16/18] drm/i915/dp: Get optimal link config to have best compressed bpp

2023-08-17 Thread Ankit Nautiyal
v8: -Separate mechanism to get compressed bpp for ICL,TGL and XELPD+. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 294 +--- 1 file changed, 261 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/i915/disp

[PATCH] drm/display/dp: Fix the DP DSC Receiver cap size

2023-08-17 Thread Ankit Nautiyal
DP DSC Receiver Capabilities are exposed via DPCD 60h-6Fh. Fix the DSC RECEIVER CAP SIZE accordingly. Fixes: ffddc4363c28 ("drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT") Cc: Anusha Srivatsa Cc: Manasi Navare Cc: # v5.0+ Signed-off-by: Ankit Nautiyal R

[PATCH 0/2] eDP DSC fixes

2023-08-23 Thread Ankit Nautiyal
Assume 8bpc is supported if Sink claims DSC support. Also consider bpc constraint coming from EDID while computing input BPC for DSC. Ankit Nautiyal (2): drm/display/dp: Default 8 bpc support when DSC is supported drivers/drm/i915: Honor limits->max_bpp while computing DSC max input

[PATCH 1/2] drm/display/dp: Default 8 bpc support when DSC is supported

2023-08-23 Thread Ankit Nautiyal
As per DP v1.4, a DP DSC Sink device shall support 8bpc in DPCD 6Ah. Apparently some panels that do support DSC, are not setting the bit for 8bpc. So always assume 8bpc support by DSC decoder, when DSC is claimed to be supported. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/display

[PATCH 2/2] drivers/drm/i915: Honor limits->max_bpp while computing DSC max input bpp

2023-08-23 Thread Ankit Nautiyal
Edid specific BPC constraints are stored in limits->max_bpp. Honor these limits while computing the input bpp for DSC. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/disp

[PATCH 1/2] drm/display/dp: Default 8 bpc support when DSC is supported

2023-08-23 Thread Ankit Nautiyal
As per DP v1.4, a DP DSC Sink device shall support 8bpc in DPCD 6Ah. Apparently some panels that do support DSC, are not setting the bit for 8bpc. So always assume 8bpc support by DSC decoder, when DSC is claimed to be supported. v2: Use helper to check dsc support. (Ankit) Signed-off-by: Ankit

[PATCH 0/2] eDP DSC fixes

2023-08-24 Thread Ankit Nautiyal
Assume 8bpc is supported if Sink claims DSC support. Also consider bpc constraint coming from EDID while computing input BPC for DSC. Rev2: Fix check for dsc support. Rev3: Minor styling and typos fix. Ankit Nautiyal (2): drm/display/dp: Assume 8 bpc support when DSC is supported drivers/drm

[PATCH 1/2] drm/display/dp: Assume 8 bpc support when DSC is supported

2023-08-24 Thread Ankit Nautiyal
As per DP v1.4, a DP DSC Sink device shall support 8bpc in DPCD 6Ah. Apparently some panels that do support DSC, are not setting the bit for 8bpc. So always assume 8bpc support by DSC decoder, when DSC is claimed to be supported. v2: Use helper to get check dsc support. (Ankit) v3: Fix styling

[PATCH 2/2] drivers/drm/i915: Honor limits->max_bpp while computing DSC max input bpp

2023-08-24 Thread Ankit Nautiyal
Edid specific BPC constraints are stored in limits->max_bpp. Honor these limits while computing the input bpp for DSC. v2: Use int instead of u8 for computations. (Jani) Add closes tag. (Ankit) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9161 Signed-off-by: Ankit Nautiyal Revie

[PATCH 00/19] DSC misc fixes

2023-07-13 Thread Ankit Nautiyal
Stan, Ville. Rev3: Split larger patches. Separate out common helpers. Rev4: Rebased, fixed checkpatch warnings. Ankit Nautiyal (18): drm/i915/dp: Consider output_format while computing dsc bpp drm/i915/dp: Move compressed bpp check with 420 format inside the helper drm/i915/dp_mst

[PATCH 01/19] drm/i915/dp: Consider output_format while computing dsc bpp

2023-07-13 Thread Ankit Nautiyal
. v2: Use output_bpp instead for pipe_bpp to clamp compressed_bpp. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_dp.c | 19 +-- drivers/gpu/drm/i915/display/intel_dp.h | 1 + drivers/gpu/drm/i915/display

[PATCH 02/19] drm/i915/dp: Move compressed bpp check with 420 format inside the helper

2023-07-13 Thread Ankit Nautiyal
Move the check for limiting compressed bite_per_pixel for 420,422 formats in the helper to compute bits_per_pixel. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 03/19] drm/i915/dp_mst: Use output_format to get the final link bpp

2023-07-13 Thread Ankit Nautiyal
The final link bpp used to calculate the m_n values depend on the output_format. Though the output_format is set to RGB for MST case and the link bpp will be same as the pipe bpp, for the sake of semantics, lets calculate the m_n values with the link bpp, instead of pipe_bpp. Signed-off-by: Ankit

[PATCH 05/19] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-07-13 Thread Ankit Nautiyal
In Bigjoiner check for DSC, bigjoiner interface bits for DP for DISPLAY > 13 is 36 (Bspec: 49259). v2: Corrected Display ver to 13. v3: Follow convention for conditional statement. (Ville) v4: Fix check for display ver. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrj

[PATCH 04/19] drm/i915/dp: Use consistent name for link bpp and compressed bpp

2023-07-13 Thread Ankit Nautiyal
DSC: output_bpp = pipe_bpp/2 link_bpp = compressed_bpp, computed with output_bpp Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_dp.c | 84 ++--- drivers/gpu/drm/i915/display/intel_dp.h | 14 ++-- drivers/gpu/drm/i915/display

[PATCH 06/19] drm/i915/display: Account for DSC not split case while computing cdclk

2023-07-13 Thread Ankit Nautiyal
Currently we assume 2 Pixels Per Clock (PPC) while computing plane cdclk and min_cdlck. In cases where DSC single engine is used the throughput is 1 PPC. So account for the above case, while computing cdclk. v2: Use helper to get the adjusted pixel rate. Signed-off-by: Ankit Nautiyal

[PATCH 09/19] drm/display/dp: Fix the DP DSC Receiver cap size

2023-07-13 Thread Ankit Nautiyal
DP DSC Receiver Capabilities are exposed via DPCD 60h-6Fh. Fix the DSC RECEIVER CAP SIZE accordingly. Fixes: ffddc4363c28 ("drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT") Cc: Anusha Srivatsa Cc: Manasi Navare Cc: # v5.0+ Signed-off-by: Anki

[PATCH 11/19] drm/i915/dp: Add functions to get min/max src input bpc with DSC

2023-07-13 Thread Ankit Nautiyal
Separate out functions for getting maximum and minimum input BPC based on platforms, when DSC is used. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 38 +++-- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH 07/19] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck

2023-07-13 Thread Ankit Nautiyal
later, lets account for Bigjoiner BW check while calculating Min CDCLK. v2: Use pixel clock in the bw calculations. (Ville) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_cdclk.c | 61 +- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a

[PATCH 12/19] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-07-13 Thread Ankit Nautiyal
required. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 48 - 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 5cc62c51372d..9d2d05da594b

[PATCH 08/19] drm/i915/dp: Remove extra logs for printing DSC info

2023-07-13 Thread Ankit Nautiyal
DSC compressed bpp and slice counts are already getting printed at the end of dsc compute config. Remove extra logs. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers

[PATCH 15/19] drm/i915/dp: Separate out functions for edp/DP for computing DSC bpp

2023-07-13 Thread Ankit Nautiyal
Refactor code to separate functions for eDP and DP for computing pipe_bpp/compressed bpp when DSC is involved. This will help to optimize the link configuration for DP later. v2: Fix checkpatch warning. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 191

[PATCH 13/19] drm/i915/dp: Avoid left shift of DSC output bpp by 4

2023-07-13 Thread Ankit Nautiyal
To make way for fractional bpp support, avoid left shifting the output_bpp by 4 in helper intel_dp_dsc_get_output_bpp. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 10 +++--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- 2 files changed, 4

[PATCH 10/19] drm/i915/dp: Avoid forcing DSC BPC for MST case

2023-07-13 Thread Ankit Nautiyal
For MST the bpc is hardcoded to 8, and pipe bpp to 24. So avoid forcing DSC bpc for MST case. v2: Warn and ignore the debug flag than to bail out. (Jani) v3: Fix dbg message to mention forced bpc instead of bpp. v4: Fix checkpatch longline warning. Signed-off-by: Ankit Nautiyal --- drivers

[PATCH 14/19] drm/i915/dp: Rename helper to get DSC max pipe_bpp

2023-07-13 Thread Ankit Nautiyal
The helper intel_dp_dsc_compute_bpp gives the maximum pipe bpp that is allowed with DSC. Rename the this to reflect that it returns max pipe bpp supported with DSC. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 8 drivers/gpu/drm/i915/display

[PATCH 18/19] drm/i915/dp: Get optimal link config to have best compressed bpp

2023-07-13 Thread Ankit Nautiyal
v8: -Separate mechanism to get compressed bpp for ICL,TGL and XELPD+. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 294 +--- 1 file changed, 261 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/i915/disp

[PATCH 16/19] drm/i915/dp: Add DSC BPC/BPP constraints while selecting pipe bpp with DSC

2023-07-13 Thread Ankit Nautiyal
Currently we check if the pipe_bpp selected is >= the min DSC bpc/bpp requirement. We do not check if it is <= the max DSC bpc/bpp requirement. Add checks for max DSC BPC/BPP constraints while computing the pipe_bpp when DSC is in use. v2: Fix the commit message. Signed-off-by: Ankit Na

[PATCH 17/19] drm/i915/dp: Separate out function to get compressed bpp with joiner

2023-07-13 Thread Ankit Nautiyal
Pull the code to get joiner constraints on maximum compressed bpp into separate function. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 49 ++--- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/display

[PATCH 19/19] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

2023-07-13 Thread Ankit Nautiyal
p and compressed bpps. v5: - Decrease step while looking for suitable compressed bpp to accommodate. v6: - Use helper for getting min and max compressed_bpp (Ankit) v7: - Fix checkpatch warning (Ankit) Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/di

[RFC 00/13] Add support for DP-HDMI2.1 PCON

2020-10-15 Thread Ankit Nautiyal
ties of the PCON DSC encoder and HDMI decoder. Added support to configure PCON for DSC1.1 decoding and DSC1.2 encoding. Ankit Nautiyal (9): drm/dp_helper: Add FRL training support for a DP-HDMI2.1 PCON drm/i915: Capture max frl rate for PCON in dfp cap structure drm/i915: Add support for star

[RFC 13/13] drm/i915: Configure PCON for DSC1.1 to DSC1.2 encoding

2020-10-15 Thread Ankit Nautiyal
encoding, based on the PCON's DSC encoder capablities and HDMI2.1 sink's DSC decoder capabilities. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 120 ++- drivers/gpu/drm/i915/display/

[RFC 08/13] drm/i915: Add support for enabling link status and recovery

2020-10-15 Thread Ankit Nautiyal
is off; reinitiate frl link training to recover. Also, HDMI FRL link error count range for each individual FRL active lane is indicated by DOWNSTREAM_HDMI_ERROR_STATUS_LN registers. Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 47

[RFC 05/13] drm/i915: Add support for starting FRL training for HDMI2.1 via PCON

2020-10-15 Thread Ankit Nautiyal
This patch adds functions to start FRL training for an HDMI2.1 sink, connected via a PCON as a DP branch device. This patch also adds a new structure for storing frl training related data, when FRL training is completed. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display

[RFC 06/13] drm/i915: Check for FRL training before DP Link training

2020-10-15 Thread Ankit Nautiyal
This patch calls functions to check FRL training requirements for an HDMI2.1 sink, when connected through PCON. The call is made before the DP link training. In case FRL is not required or failure during FRL training, the TMDS mode is selected for the pcon. Signed-off-by: Ankit Nautiyal

[RFC 02/13] drm/edid: Parse MAX_FRL field from HFVSDB block

2020-10-15 Thread Ankit Nautiyal
From: Swati Sharma This patch parses MAX_FRL field to get the MAX rate in Gbps that the HDMI 2.1 panel can support in FRL mode. Source need this field to determine the optimal rate between the source and sink during FRL training. Signed-off-by: Sharma, Swati2 Signed-off-by: Ankit Nautiyal

[RFC 10/13] drm/dp_helper: Add support for Configuring DSC for HDMI2.1 Pcon

2020-10-15 Thread Ankit Nautiyal
This patch adds registers for getting DSC encoder capability for a HDMI2.1 PCon. It also addes helper functions to configure DSC between the PCON and HDMI2.1 sink. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_dp_helper.c | 93 +++ include/drm/drm_dp_helper.h

[RFC 03/13] drm/dp_helper: Add FRL training support for a DP-HDMI2.1 PCON

2020-10-15 Thread Ankit Nautiyal
This patch adds support for configuring a PCON device, connected as a DP branched device to enable FRL Link training with a HDMI2.1 + sink. v2: Minor changes: -removed unnecessary argument supplied to a drm helper function. -fixed return value for max frl read from pcon. Signed-off-by: Ankit

[RFC 04/13] drm/i915: Capture max frl rate for PCON in dfp cap structure

2020-10-15 Thread Ankit Nautiyal
HDMI2.1 PCON advertises Max FRL bandwidth supported by the PCON and by the sink. This patch captures these in dfp cap structure in intel_dp and uses these to prune connector modes that cannot be supported by the PCON and sink FRL bandwidth. Signed-off-by: Ankit Nautiyal --- .../drm/i915

[RFC 01/13] drm/edid: Add additional HFVSDB fields for HDMI2.1

2020-10-15 Thread Ankit Nautiyal
that are required for HDMI2.1. Signed-off-by: Sharma, Swati2 Signed-off-by: Ankit Nautiyal --- include/drm/drm_edid.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index b27a0e2169c8..1cc5c2c73282 100644 --- a

[RFC 07/13] drm/dp_helper: Add support for link status and link recovery

2020-10-15 Thread Ankit Nautiyal
interrupt mechanism. While source can always read final HDMI sink’s status using I2C over AUX, it’s easier and faster to read the PCON’s already read HDMI sink’s status registers. Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_dp_helper.c | 33

[RFC 12/13] drm/i915: Add helper functions for calculating DSC parameters for HDMI2.1

2020-10-15 Thread Ankit Nautiyal
calculate these PPS paremeters as per the HDMI2.1 specification. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_hdmi.c | 171 ++ drivers/gpu/drm/i915/display/intel_hdmi.h | 7 + 2 files changed, 178 insertions(+) diff --git a/drivers/gpu/drm/i915/display

[RFC 09/13] drm/edid: Parse DSC1.2 cap fields from HFVSDB block

2020-10-15 Thread Ankit Nautiyal
This patch parses HFVSDB fields for DSC1.2 capabilities of an HDMI2.1 sink. These fields are required by a source to understand the DSC capability of the sink, to set appropriate PPS parameters, before transmitting compressed data stream. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm

[RFC 11/13] drm/i915: Read DSC capabilities of the HDMI2.1 PCON encoder

2020-10-15 Thread Ankit Nautiyal
, by either writing the entire new PPS metadata, or by writing only the PPS override parameters. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display/intel_display_types.h| 16 ++ drivers/gpu/drm/i915/display/intel_dp.c | 178 ++ 2 files changed, 194 insertions

[PATCH v2 02/13] drm/edid: Parse MAX_FRL field from HFVSDB block

2020-11-01 Thread Ankit Nautiyal
Shankar) Signed-off-by: Sharma, Swati2 Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 44 + include/drm/drm_connector.h | 6 + 2 files changed, 50 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index

[PATCH v2 01/13] drm/edid: Add additional HFVSDB fields for HDMI2.1

2020-11-01 Thread Ankit Nautiyal
that are required for HDMI2.1. v2: Minor fixes + consistent naming for DPCD register masks (Uma Shankar) Signed-off-by: Sharma, Swati2 Signed-off-by: Ankit Nautiyal --- include/drm/drm_edid.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/drm

[PATCH v2 03/13] drm/edid: Parse DSC1.2 cap fields from HFVSDB block

2020-11-01 Thread Ankit Nautiyal
: -Added a new struct for hdmi dsc cap -Fixed bugs in macros usage. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 59 + include/drm/drm_connector.h | 43 +++ 2 files changed, 102 insertions(+) diff --git a/drivers/gpu

[PATCH v2 00/13] Add support for DP-HDMI2.1 PCON

2020-11-01 Thread Ankit Nautiyal
s re-attempted. Currently, we have tested the FRL training and are able to enable 4K display with TGL Platform + Realtek PCON RTD2173 with HDMI2.1 supporting panel. v2: Addressed review comments and re-organized patches as suggested in comments on RFC patches. Ankit Nautiyal (9): drm/edid: P

[PATCH v2 13/13] drm/i915: Configure PCON for DSC1.1 to DSC1.2 encoding

2020-11-01 Thread Ankit Nautiyal
encoding, based on the PCON's DSC encoder capablities and HDMI2.1 sink's DSC decoder capabilities. v2: Rebase Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_ddi.c | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 128 ++- drivers/gpu/drm/i9

[PATCH v2 08/13] drm/i915: Add support for starting FRL training for HDMI2.1 via PCON

2020-11-01 Thread Ankit Nautiyal
clarity -tweaked the macros used for correct semantics for true/false -fixed other styling issues. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display/intel_display_types.h| 7 + drivers/gpu/drm/i915/display/intel_dp.c | 189 ++ drivers/gpu/drm/i915/display/intel_dp.h

[PATCH v2 11/13] drm/i915: Read DSC capabilities of the HDMI2.1 PCON encoder

2020-11-01 Thread Ankit Nautiyal
override the existing PPS-metadata, by either writing the entire new PPS metadata, or by writing only the PPS override parameters. v2: Restructured the code to read all capability DPCDs at once and store in an array in intel_dp structure. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display

[PATCH v2 05/13] drm/dp_helper: Add support for link failure detection

2020-11-01 Thread Ankit Nautiyal
might help in debugging the link failure issues. v2: Addressed comments from Uma Shankar: -rephrased the commit message, as per the code. -fixed styling issues -added documentation for the helper function. Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_dp_hel

[PATCH v2 10/13] drm/i915: Add support for enabling link status and recovery

2020-11-01 Thread Ankit Nautiyal
) Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 56 +++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index

[PATCH v2 09/13] drm/i915: Check for FRL training before DP Link training

2020-11-01 Thread Ankit Nautiyal
after FEC READY, before starting DP link training. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_ddi.c | 2 ++ drivers/gpu/drm/i915/display/intel_dp.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915

<    1   2   3   4   5   6   7   >