[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 00/19] DSC misc fixes

2023-07-13 Thread Ankit Nautiyal
, 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: Use

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

2023-06-30 Thread Ankit Nautiyal
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) Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 12 +++--- drivers/gpu

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

2023-06-30 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-06-30 Thread Ankit Nautiyal
Currently we check if pipe_bpp is max the min DSC bpc requirements. Add checks for max DSC BPC/BPP constraints while computing the pipe_bpp when DSC is in use. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 34 + 1 file changed, 24 insertions

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

2023-06-30 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 15/19] drm/i915/dp: Separate out functions for edp/DP for computing DSC bpp

2023-06-30 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. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 189 1 file

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

2023-06-30 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 11/19] drm/i915/dp: Add functions to get min/max src input bpc with DSC

2023-06-30 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 12/19] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-06-30 Thread Ankit Nautiyal
is not required. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 46 - 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 1abcdf42e408..9e815408c0d9

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

2023-06-30 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. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c

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

2023-06-30 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 09/19] drm/display/dp: Fix the DP DSC Receiver cap size

2023-06-30 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 08/19] drm/i915/dp: Remove extra logs for printing DSC info

2023-06-30 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 06/19] drm/i915/display: Account for DSC not split case while computing cdclk

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

2023-06-30 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 | 51 +++--- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git

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

2023-06-30 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-06-30 Thread Ankit Nautiyal
with 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/19] drm/i915/dp: Move compressed bpp check with 420 format inside the helper

2023-06-30 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-06-30 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 01/19] drm/i915/dp: Consider output_format while computing dsc bpp

2023-06-30 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/19] DSC misc fixes

2023-06-30 Thread Ankit Nautiyal
, Ville. Rev3: Split larger patches. Separate out common helpers. 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

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

2023-05-24 Thread Ankit Nautiyal
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) Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 12 +++--- drivers/gpu

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

2023-05-24 Thread Ankit Nautiyal
v5: -Get rid of magic numbers for max and min bpp, and improve documentation. (Stan). -Use functions for {src_sink}_{min_max}_compressed_bpp (Ville). Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 331 +++- 1 f

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

2023-05-24 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 | 12 drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- 2 files changed, 5

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

2023-05-24 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/14] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-05-24 Thread Ankit Nautiyal
is not 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 c060e6cb042e..9d5da49f1180

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

2023-05-24 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 05/14] drm/i915/display: Account for DSC not split case while computing cdclk

2023-05-24 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. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_cdclk.c

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

2023-05-24 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) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 11 +-- drivers/gpu/drm/i915/display/intel_dp_mst.c

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

2023-05-24 Thread Ankit Nautiyal
with 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 | 88 +++-- drivers/gpu/drm/i915/display/intel_dp.h | 14 ++-- drivers/gpu/drm/i915/display

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

2023-05-24 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 06/14] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck

2023-05-24 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 | 51 +++--- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git

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

2023-05-24 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/14] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-05-24 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 00/14] DSC misc fixes

2023-05-24 Thread Ankit Nautiyal
, Ville. Ankit Nautiyal (13): drm/i915/dp: Consider output_format while computing dsc bpp 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/i915/dp: Update Bigjoiner interface bits for computing compressed

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

2023-05-24 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 09/13] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-05-12 Thread Ankit Nautiyal
is not 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 7ea4f27a4bf5..83fb198fcdae

[PATCH 11/13] drm/i915/dp: Rename helpers to get DSC max pipe_bpp/output_bpp

2023-05-12 Thread Ankit Nautiyal
, the helper intel_dp_dsc_compute_bpp gives the maximum pipe bpp that is allowed with DSC. Rename the functions to reflect that these return max DSC input and output bpps. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 8 drivers/gpu/drm/i915/display/intel_dp.h

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

2023-05-12 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) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 11 +-- drivers/gpu/drm/i915/display/intel_dp_mst.c

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

2023-05-12 Thread Ankit Nautiyal
DP. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 305 +++- 1 file changed, 245 insertions(+), 60 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 39e2bf3d738d..578320220c9a 100

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

2023-05-12 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 | 12 drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- 2 files changed, 5

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

2023-05-12 Thread Ankit Nautiyal
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) Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 3 +- drivers/gpu/drm

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

2023-05-12 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/13] drm/i915/dp: Remove extra logs for printing DSC info

2023-05-12 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 03/13] drm/i915/dp: Use consistent name for link bpp and compressed bpp

2023-05-12 Thread Ankit Nautiyal
with 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 | 88 +++-- drivers/gpu/drm/i915/display/intel_dp.h | 14 ++-- drivers/gpu/drm/i915/display

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

2023-05-12 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) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 3 ++- 1 file changed

[PATCH 05/13] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck

2023-05-12 Thread Ankit Nautiyal
later, lets account for Bigjoiner BW check while calculating Min CDCLK. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_cdclk.c | 49 ++ 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers

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

2023-05-12 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 01/13] drm/i915/dp: Consider output_format while computing dsc bpp

2023-05-12 Thread Ankit Nautiyal
. v2: Use output_bpp instead for pipe_bpp to clamp compressed_bpp. (Ville) Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 19 +-- drivers/gpu/drm/i915/display/intel_dp.h | 1 + drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 + 3 files changed

[PATCH 00/13] DSC misc fixes

2023-05-12 Thread Ankit Nautiyal
://patchwork.freedesktop.org/series/115773/ Patches 6-12 are from series to add DSC fractional BPP support: https://patchwork.freedesktop.org/series/111391/ Patch 13 is to fix compressed bpc for MST DSC, from Stan's series : https://patchwork.freedesktop.org/series/116179/ Ankit Nautiyal (12): drm/i915/dp

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

2023-01-19 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 --- drivers/gpu/drm/i915/display/intel_dp.c | 47 +++-- 1 file

[PATCH 12/16] drm/display/dp: Add helper function to get DSC bpp prescision

2023-01-19 Thread Ankit Nautiyal
Add helper to get the DSC bits_per_pixel precision for the DP sink. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/display/drm_dp_helper.c | 27 + include/drm/display/drm_dp_helper.h | 1 + 2 files changed, 28 insertions(+) diff --git a/drivers/gpu/drm/display

[PATCH 13/16] drm/i915/dsc/mtl: Add support for fractional bpp

2023-01-19 Thread Ankit Nautiyal
From: Vandita Kulkarni Consider the fractional bpp while reading the qp values. Signed-off-by: Vandita Kulkarni Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_qp_tables.c | 3 --- drivers/gpu/drm/i915/display/intel_vdsc.c | 12 +--- 2 files changed, 9

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

2023-01-19 Thread Ankit Nautiyal
if output_bpp is computed as integer. With this approach, we will be able to validate DSC with fractional bpp. Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal --- .../drm/i915/display/intel_display_debugfs.c | 84 +++ .../drm/i915/display/intel_display_types.h| 1

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

2023-01-19 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 we computed compressed bpp is computed as integer. Signed-off-by: Swati Sharma --- drivers/gpu/drm/i915/display/intel_dp.c | 6 ++ 1 file changed, 6

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

2023-01-19 Thread Ankit Nautiyal
Signed-off-by: Ankit Nautiyal --- include/drm/display/drm_dp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index 632376c291db..bdc05593f462 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/displa

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

2023-01-19 Thread Ankit Nautiyal
MTL+ supports fractional compressed bits_per_pixel, with precision of 1/16. This compressed bpp is stored in U6.4 format. Accommodate this precision while computing m_n values. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_display.c | 6 +- drivers/gpu/drm/i915

[PATCH 10/16] drm/i915/audio : Consider fractional vdsc bpp while computing tu_data

2023-01-19 Thread Ankit Nautiyal
-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_audio.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c index a73cf477b5e6..30d75f637793 100644 --- a/drivers

[PATCH 06/16] drm/i915/dp: Rename helpers to get DSC max pipe_bpp/output_bpp

2023-01-19 Thread Ankit Nautiyal
, the helper intel_dp_dsc_compute_bpp gives the maximum pipe bpp that is allowed with DSC. Rename the functions to reflect that these return max DSC input and output bpps. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 48 ++--- drivers/gpu/drm/i915

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

2023-01-19 Thread Ankit Nautiyal
as pipe bpp. (Stan) -Fix the checks for limits->max/min_bpp while iterating over list of valid DSC bpcs. (Stan) v3: -Refactor the code to have pipe bpp/compressed bpp computation and slice count calculation separately for different cases. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i

[PATCH 04/16] drm/i915/dp: Check if dsc forced bpc is in allowed limits

2023-01-19 Thread Ankit Nautiyal
Add a check to use force DSC bpc only if it, along with the corresponding bpp are within allowed limits. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display

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

2023-01-19 Thread Ankit Nautiyal
is changed to store bpp in U6.4 formats. Intergral part is retrieved by simply right shifting the member compressed_bpp by 4. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/icl_dsi.c| 10 drivers/gpu/drm/i915/display/intel_audio.c| 2 +- drivers/gpu/drm/i915

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

2023-01-19 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 03/16] drm/i915/dp: Do not check for min DSC BPC for MST case

2023-01-19 Thread Ankit Nautiyal
For DSC the min BPC is 8 for ICL+ and so the min pipe_bpp is 24. Check this condition for cases only where pipe_bpp is to be computed. For MST case the pipe_bpp is already computed (hardcoded to be 24), and this check is not required. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915

[PATCH 01/16] drm/i915/dp: Remove extra logs for printing DSC info

2023-01-19 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 02/16] drm/i915/dp: Avoid forcing DSC BPC for MST case

2023-01-19 Thread Ankit Nautiyal
For MST the bpc is hardcoded to 8, and pipe bpp to 24. So avoid forcing DSC bpc for MST case. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 11 +-- drivers/gpu/drm/i915/display/intel_dp_mst.c | 8 2 files changed, 13 insertions(+), 6 deletions

[PATCH 00/16] Add DSC fractional bpp support

2023-01-19 Thread Ankit Nautiyal
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. Ankit Nautiyal (13): drm/i915/dp: Remove extra logs for printing DSC info drm/i915/dp: Avoid forcing DSC BPC

[RFC 15/15] drm/i915/display/mtl: Add functions for FRL trainining state machine

2022-11-06 Thread Ankit Nautiyal
Add support for FRL Link training state and transition to different states during FRL Link training. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_ddi.c | 2 + drivers/gpu/drm/i915/display/intel_hdmi.c | 383 ++ drivers/gpu/drm/i915/display

[RFC 12/15] drm/i915/display/mtl: Reset FRL Transcoder config while disabling HDMI

2022-11-06 Thread Ankit Nautiyal
While disabling HDMI, reset the FRL transcoder config if FRL mode was used. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_ddi.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display

[RFC 09/15] drm/i915/mtl: Add port_data/data width for TRANS_DDI_FUNC and DDI_BUF_CTL

2022-11-06 Thread Ankit Nautiyal
This patch adds the bits for port width for TRANS_DDI_FUNC_CTL and port data width for DDI_BUF_CTL. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/i915_reg.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm

[RFC 06/15] drm/drm_scdc_helper: Add SCDC helper funcs for HDMI2.1

2022-11-06 Thread Ankit Nautiyal
HDMI2.1 specifies new SCDC registers to configure FRL Training between source and sink and get the FRL Training updated from and HDMI2.1 sink. This patch adds new SCDC registers and helper functions to read and configure these registers. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm

[RFC 14/15] drm/i915/hdmi21/mtl: Add support for sending uevent to user for FRL training failure

2022-11-06 Thread Ankit Nautiyal
In case of HDMI2.1 FRL training failure for a given mode, the user should be sent a uevent signalling Link failure. This patch adds support for sending uevent to userspace in case of link training failure. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_hdmi.c | 30

[RFC 13/15] drm/i915/hdmi21/mtl: Enable Scrambling only for FRL mode

2022-11-06 Thread Ankit Nautiyal
In FRL mode, the Scrambling is always enabled by the HW. The High TMDS Char Rate and Scrambing Enable bit of reg TRANS_DDI_FUNC_CTRL are only set in TMDS mode and not in FRL mode. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_hdmi.c | 8 +++- 1 file changed, 7

[RFC 08/15] drm/i915/mtl: Add HDMI2.1 bits in PORT_BUF_CTL_1

2022-11-06 Thread Ankit Nautiyal
This patch adds bits related to HDMI2.1 in PORT_BUF_CTL_1 that is needed to be programmed for D2D Interface for Ports in IO expansion Die. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_cx0_reg_defs.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu

[RFC 10/15] drm/i915/display/mtl: Add new members in crtc_state for FRL configuration

2022-11-06 Thread Ankit Nautiyal
Add new struture to store FRL related configurations for a pipe. These members to be calculated during compute config phase, when FRL mode is to be used. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display/intel_display_types.h| 23 +++ 1 file changed, 23 insertions

[RFC 07/15] drm/i915/mtl: Add registers for FRL Link Training

2022-11-06 Thread Ankit Nautiyal
Add registers for FRL configuration. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/i915_reg.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 765a10e0de88..b50e1349d22c 100644

[RFC 11/15] drm/i915/display/mtl: Update Transcoder/DDI registers with the frl bits

2022-11-06 Thread Ankit Nautiyal
For platforms supporting HDMI2.1 we need to fill the lane count in Transcoder and DDI/PORT registers for FRL mode. Similarly, FRL SHIFTER ENABLE, and DATA_WIDTH bits are to be set in FRL mode. These bits are written in both the DDI_BUF_CTL and PORT_BUF_CTL registers. Signed-off-by: Ankit Nautiyal

[RFC 05/15] drm/i915/hdmi21/mtl: Add new data members for FRL configuration

2022-11-06 Thread Ankit Nautiyal
successful training. Signed-off-by: Ankit Nautiyal --- .../drm/i915/display/intel_display_types.h| 9 drivers/gpu/drm/i915/display/intel_hdmi.c | 22 +++ 2 files changed, 31 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b

[RFC 03/15] drm/i915/mtl: Create separate reg file for PICA registers

2022-11-06 Thread Ankit Nautiyal
From: Mika Kahola (Patch is part of the series to add C10/C20 PHY support, which is in review : https://patchwork.freedesktop.org/series/109714/) Create a separate file to store registers for PICA chips C10 and C20. Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola ---

[RFC 04/15] drm/i915/hdmi21/mtl: Parse frl max link rate from vbt

2022-11-06 Thread Ankit Nautiyal
From: Vandita Kulkarni >From the max_frl_rate field of vbt parse the maxfrl_rate. Signed-off-by: Vandita Kulkarni Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_bios.c | 51 +++ drivers/gpu/drm/i915/display/intel_bios.h | 1 + drivers/gpu/

[RFC 01/15] drm/edid: Add helper to get max FRL rate for an HDMI sink

2022-11-06 Thread Ankit Nautiyal
Add the helpers for getting the max FRL rate with and without DSC for an HDMI sink. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 38 ++ include/drm/drm_edid.h | 2 ++ 2 files changed, 40 insertions(+) diff --git a/drivers/gpu/drm

[RFC 00/15] Add support for HDMI2.1 FRL

2022-11-06 Thread Ankit Nautiyal
are added on top of that. Ankit Nautiyal (13): drm/edid: Add helper to get max FRL rate for an HDMI sink drm/i915/dp: Use the drm helpers for getting max FRL rate drm/i915/hdmi21/mtl: Add new data members for FRL configuration drm/drm_scdc_helper: Add SCDC helper funcs for HDMI2.1 drm/i915/mtl

[RFC 02/15] drm/i915/dp: Use the drm helpers for getting max FRL rate

2022-11-06 Thread Ankit Nautiyal
Re-use the drm helpers for getting max FRL rate for an HDMI sink. This patch removes the duplicate code and calls the already defined drm helpers for the task. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 17 - 1 file changed, 4 insertions(+), 13

[PATCH] drm/edid: Parse VRR cap fields from HFVSDB block

2022-10-17 Thread Ankit Nautiyal
This patch parses HFVSDB fields for VRR capabilities of an HDMI2.1 sink and stores the VRR caps in a new structure in drm_hdmi_info. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 26 -- include/drm/drm_connector.h | 27 +++ 2

[PATCH v2 2/4] drm/edid: Split DSC parsing into separate function

2022-09-16 Thread Ankit Nautiyal
Move the DSC parsing logic into separate function. v2: Rebase. Signed-off-by: Ankit Nautiyal Reviewed-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 128 - 1 file changed, 69 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b

[PATCH v2 1/4] drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink

2022-09-16 Thread Ankit Nautiyal
HF-VSDB/SCDB has bits to advertise support for 16, 12 and 10 bpc. If none of the bits are set, the minimum bpc supported with DSC is 8. This patch corrects the min bpc supported to be 8, instead of 0. Fixes: 76ee7b905678 ("drm/edid: Parse DSC1.2 cap fields from HFVSDB block") Cc: Anki

[PATCH v2 3/4] drm/edid: Refactor HFVSDB parsing for DSC1.2

2022-09-16 Thread Ankit Nautiyal
-by: Ankit Nautiyal Reviewed-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 93 -- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 92c9c2e28902..27bdbdf6d345 100644 --- a/drivers/gpu

[PATCH v2 4/4] drm/edid: Avoid multiple log lines for HFVSDB parsing

2022-09-16 Thread Ankit Nautiyal
Replace multiple log lines with a single log line at the end of parsing HF-VSDB. Also use drm_dbg_kms instead of DRM_DBG_KMS, and add log for DSC1.2 support. v2: Fixed the formatting issues in the logging (Jani). Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 21

[PATCH v2 0/4] Fix HFVSDB parsing

2022-09-16 Thread Ankit Nautiyal
Fix issues in HFVSDB parsing for DSC support. Also minor refactoring in Logging. Split from original patch into a new series. https://patchwork.freedesktop.org/patch/495193/ v2: Minor styling fixes. Ankit Nautiyal (4): drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink drm/edid

[PATCH 4/4] drm/edid: Avoid multiple log lines for HFVSDB parsing

2022-08-10 Thread Ankit Nautiyal
Replace multiple log lines with a single log line at the end of parsing HF-VSDB. Also use drm_dbg_kms instead of DRM_DBG_KMS, and add log for DSC1.2 support. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 21 + 1 file changed, 13 insertions(+), 8 deletions

[PATCH 3/4] drm/edid: Refactor HFVSDB parsing for DSC1.2

2022-08-10 Thread Ankit Nautiyal
-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 93 -- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 1d08b3a4..c9c3a9c8fa26 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b

[PATCH 1/4] drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink

2022-08-10 Thread Ankit Nautiyal
HF-VSDB/SCDB has bits to advertise support for 16, 12 and 10 bpc. If none of the bits are set, the minimum bpc supported with DSC is 8. This patch corrects the min bpc supported to be 8, instead of 0. Fixes: 76ee7b905678 ("drm/edid: Parse DSC1.2 cap fields from HFVSDB block") Cc: Anki

[PATCH 2/4] drm/edid: Split DSC parsing into separate function

2022-08-10 Thread Ankit Nautiyal
Move the DSC parsing logic into separate function. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 128 - 1 file changed, 69 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index cdf10279e1bd

[PATCH 0/4] Fix HFVSDB parsing

2022-08-10 Thread Ankit Nautiyal
Fix issues in HFVSDB parsing for DSC support. Also minor refactoring in Logging. Split from original patch into a new series. https://patchwork.freedesktop.org/patch/495193/ Ankit Nautiyal (4): drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink drm/edid: Split DSC parsing

[PATCH] drm/drm_edid: Refactor HFVSDB parsing for DSC1.2

2022-07-21 Thread Ankit Nautiyal
corrects min DSC BPC to 8, and minor refactoring for better readability, and proper log messages. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/drm_edid.c | 124 +++-- 1 file changed, 77 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b

[PATCH 2/2] drm/i915/hdmi: Prune unsupported modes as per HDMI2.1 spec

2022-05-09 Thread Ankit Nautiyal
. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_hdmi.c | 48 +++ 1 file changed, 48 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index 1ae09431f53a..2ee1262f6427 100644 --- a/drivers/gpu

[PATCH 0/2] Prune unsupported modes as per HDMI2.1 spec

2022-05-09 Thread Ankit Nautiyal
timings, I have used the check for clock >= 2376 MHz (or 1188 MHz with 420 format), instead of using individual VICs. While at it, fix a bug while parsing the compressed bpc supported from edid. Ankit Nautiyal (2): drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink drm/i915/h

[PATCH 1/2] drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink

2022-05-09 Thread Ankit Nautiyal
HF-VSDB/SCDB has bits to advertise support for 16, 12 and 10 bpc. If none of the bits are set, the minimum bpc supported with DSC is 8. This patch corrects the min bpc supported to be 8, instead of 0. Fixes: 76ee7b905678 ("drm/edid: Parse DSC1.2 cap fields from HFVSDB block") Cc: Anki

[RFC v3 4/5] drm/hdmi21: Add support for DFM calculation with DSC

2022-02-16 Thread Ankit Nautiyal
Add helper functions for calculating FRL capacity and DFM requirements with given compressed bpp. v2: Fixed: -Build warnings/errors: Removed unused variables. -Checkpatch warnings. Signed-off-by: Ankit Nautiyal Signed-off-by: Vandita Kulkarni --- drivers/gpu/drm/drm_frl_dfm_helper.c | 303

<    1   2   3   4   >