[PATCH 11/11] drm/i915/dp_mst: Add support for forcing dsc fractional bpp via debugfs

2023-11-10 Thread Ankit Nautiyal
If force_dsc_fractional_bpp_en is set through debugfs allow DSC iff compressed bpp is fractional. Continue if the computed compressed bpp turns out to be a integer. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 14 +++--- 1 file changed, 11 insertions

[PATCH 08/11] drm/i915/dsc: Allow DSC only with fractional bpp when forced from debugfs

2023-11-10 Thread Ankit Nautiyal
From: Swati Sharma If force_dsc_fractional_bpp_en is set through debugfs allow DSC iff compressed bpp is fractional. Continue if the computed compressed bpp turns out to be a integer. v2: -Use helpers for fractional, integral bits of bits_per_pixel. (Suraj) -Fix comment (Suraj) Signed-off-by: S

[PATCH 10/11] drm/i916/dp_mst: Iterate over the DSC bpps as per DSC precision support

2023-11-10 Thread Ankit Nautiyal
Currently we iterate over the bpp_x16 in step of 16. Use DSC fractional bpp precision supported by the sink to compute the appropriate steps to iterate over the bpps. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 9 - 1 file changed, 8 insertions(+), 1

[PATCH 09/11] drm/i915/dp_mst: Use precision of 1/16 for computing bpp

2023-11-10 Thread Ankit Nautiyal
Modify the functions to deal with bpps with 1/16 precision. This will make way for cases when DSC with fractional bpp is used. For bpp without DSC, there is no change, as we still use whole numbers. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 56

[PATCH 06/11] drm/i915/dp: Iterate over output bpp with fractional step size

2023-11-10 Thread Ankit Nautiyal
This patch adds support to iterate over compressed output bpp as per the fractional step, supported by DP sink. v2: -Avoid ending up with compressed bpp, same as pipe bpp. (Stan) Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng --- drivers/gpu/drm/i915

[PATCH 07/11] drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp

2023-11-10 Thread Ankit Nautiyal
ue if output_bpp is computed as integer. With this approach, we will be able to validate DSC with fractional bpp. v2: Add drm_modeset_unlock to new line(Suraj) Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal Signed-off-by: Mitul Golani Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jin

[PATCH 05/11] drm/i915/dsc/mtl: Add support for fractional bpp

2023-11-10 Thread Ankit Nautiyal
From: Vandita Kulkarni Consider the fractional bpp while reading the qp values. v2: Use helpers for fractional, integral bits of bits_per_pixel. (Suraj) Signed-off-by: Vandita Kulkarni Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng --- .../gpu/drm/i915

[PATCH 04/11] drm/i915/audio: Consider fractional vdsc bpp while computing tu_data

2023-11-10 Thread Ankit Nautiyal
BPP_X16_FMT to print vdsc bpp. Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng --- drivers/gpu/drm/i915/display/intel_audio.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b

[PATCH 02/11] drm/i915/display: Store compressed bpp in U6.4 format

2023-11-10 Thread Ankit Nautiyal
point helper(Jani, Nikula) -Add comment for magic values(Suraj) v4: -Fix checkpatch warnings caused by renaming(Suraj) v5: -Rebase. -Use existing helpers for conversion of bpp_int to bpp_x16 and vice versa. Signed-off-by: Ankit Nautiyal Signed-off-by: Mitul Golani Reviewed-by: Suraj Kandpal

[PATCH 03/11] drm/i915/display: Consider fractional vdsc bpp while computing m_n values

2023-11-10 Thread Ankit Nautiyal
(Sui Jingfeng). v2: Rebase and pass bits_per_pixel in U6.4 format. Signed-off-by: Ankit Nautiyal Signed-off-by: Mitul Golani Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng --- drivers/gpu/drm/i915/display/intel_display.c | 4 ++-- drivers/gpu/drm/i915/display/intel_dp.c | 16 -

[PATCH 01/11] drm/display/dp: Add helper function to get DSC bpp precision

2023-11-10 Thread Ankit Nautiyal
Add helper to get the DSC bits_per_pixel precision for the DP sink. Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Acked-by: Maxime Ripard --- drivers/gpu/drm/display/drm_dp_helper.c | 27 + include/drm/display/drm_dp_helper.h

[PATCH 00/11] Add DSC fractional bpp support

2023-11-10 Thread Ankit Nautiyal
, 1/8, 1/4 or 1/2 as per sink support. The last 2 patches add support to depict DSC sink's fractional support, and debugfs to enforce use of fractional bpp, while choosing an appropriate compressed bpp. Rev10: Rebased and added DSC Fractional support for DP MST. Ankit Nautiyal (8): drm/displa

[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 1/2] drm/display/dp: Assume 8 bpc support when DSC is supported

2023-08-24 Thread Ankit Nautiyal
and other typos. (Jani) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/display/drm_dp_helper.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c index e6a78fd32380..8a1b64c57dfd 100644

[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: 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 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. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/display

[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] 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 14/20] drm/i915/dp: Separate out functions for edp/DP for computing DSC bpp

2023-07-27 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 08/20] drm/display/dp: Fix the DP DSC Receiver cap size

2023-07-27 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 13/20] drm/i915/dp: Rename helper to get DSC max pipe_bpp

2023-07-27 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 10/20] drm/i915/dp: Add functions to get min/max src input bpc with DSC

2023-07-27 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 11/20] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-07-27 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 f41de126a8d3..78ac8f4fd348

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

2023-07-27 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 06/20] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck

2023-07-27 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 07/20] drm/i915/dp: Remove extra logs for printing DSC info

2023-07-27 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/20] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-07-27 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 03/20] drm/i915/dp_mst: Use output_format to get the final link bpp

2023-07-27 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 04/20] drm/i915/dp: Use consistent name for link bpp and compressed bpp

2023-07-27 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 02/20] drm/i915/dp: Move compressed bpp check with 420 format inside the helper

2023-07-27 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 01/20] drm/i915/dp: Consider output_format while computing dsc bpp

2023-07-27 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 00/20] DSC misc fixes

2023-07-27 Thread Ankit Nautiyal
from Stan, Ville. Rev3: Split larger patches. Separate out common helpers. Rev4: Rebased, fixed checkpatch warnings. Rev5: Addressed review comments from Stan. Added a patch to check if forced dsc format can be used before forcing. Ankit Nautiyal (19): drm/i915/dp: Consider output_format

[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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

  1   2   3   4   >