drm/i915/dp: Clean up link BW/DSC slice config computation
cover drm/i915/dp: Clean up link BW/DSC slice config computation
This patchset cleans up the DP link BW and the DSC slice config computation with the following aims:
- Fix the BW calculation taking into account all the MST,DSC,SSC,FEC related overhead and use the proper UHBR/non-UHBR BW utilization factor (which depends on the symbol size vs. effective data size ratio).
- Unify the BW calculation during mode validation and state computation.
- Unify the BW calculation for eDP / DP-SST / DP-MST.
- Compute the DSC slice configuration in a way better reflecting the pipe/DSC stream engine/slice parameters of the config.
Imre Deak (50):
drm/dp: Parse all DSC slice count caps for eDP 1.5
drm/dp: Add drm_dp_dsc_sink_slice_count_mask() drm/i915/dp: Fix DSC sink's slice count capability check drm/i915/dp: Return a fixed point BPP value from intel_dp_output_bpp() drm/i915/dp: Use a mode's crtc_clock vs. clock during state
computation
drm/i915/dp: Factor out intel_dp_link_bw_overhead() drm/i915/dp: Fix BW check in is_bw_sufficient_for_dsc_config() drm/i915/dp: Use the effective data rate for DP BW calculation drm/i915/dp: Use the effective data rate for DP compressed BW
calculation
drm/i915/dp: Account with MST,SSC BW overhead for uncompressed DP-MST
stream BW
drm/i915/dp: Account with DSC BW overhead for compressed DP-SST stream
BW
drm/i915/dp: Account with pipe joiner max compressed BPP limit for
DP-MST and eDP
drm/i915/dp: Drop unused timeslots param from
dsc_compute_link_config()
drm/i915/dp: Factor out align_max_sink_dsc_input_bpp() drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16() drm/i915/dp: Fail state computation for invalid min/max link BPP
values
drm/i915/dp: Fail state computation for invalid max throughput BPP
value
drm/i915/dp: Fail state computation for invalid max sink compressed
BPP value
drm/i915/dp: Fail state computation for invalid DSC source input BPP
values
drm/i915/dp: Align min/max DSC input BPPs to sink caps drm/i915/dp: Align min/max compressed BPPs when calculating BPP limits drm/i915/dp: Drop intel_dp parameter from
intel_dp_compute_config_link_bpp_limits()
drm/i915/dp: Pass intel_output_format to
intel_dp_dsc_sink_{min_max}_compressed_bpp()
drm/i915/dp: Pass mode clock to dsc_throughput_quirk_max_bpp_x16() drm/i915/dp: Factor out compute_min_compressed_bpp_x16() drm/i915/dp: Factor out compute_max_compressed_bpp_x16() drm/i915/dp: Add intel_dp_mode_valid_with_dsc() drm/i915/dp: Unify detect and compute time DSC mode BW validation drm/i915/dp: Use helpers to align min/max compressed BPPs drm/i915/dp: Simplify computing DSC BPPs for eDP drm/i915/dp: Simplify computing DSC BPPs for DP-SST drm/i915/dp: Simplify computing forced DSC BPP for DP-SST drm/i915/dp: Unify computing compressed BPP for DP-SST and eDP drm/i915/dp: Simplify eDP vs. DP compressed BPP computation drm/i915/dp: Simplify computing the DSC compressed BPP for DP-MST drm/i915/dsc: Track the detaild DSC slice configuration drm/i915/dsc: Track the DSC stream count in the DSC slice config state drm/i915/dsi: Move initialization of DSI DSC streams-per-pipe to
fill_dsc()
drm/i915/dsi: Track the detailed DSC slice configuration drm/i915/dp: Track the detailed DSC slice configuration drm/i915/dsc: Switch to using intel_dsc_line_slice_count() drm/i915/dp: Factor out intel_dp_dsc_min_slice_count() drm/i915/dp: Use int for DSC slice count variables drm/i915/dp: Rename test_slice_count to slices_per_line drm/i915/dp: Simplify the DSC slice config loop's slices-per-pipe
iteration
drm/i915/dsc: Add intel_dsc_get_slice_config() drm/i915/dsi: Use intel_dsc_get_slice_config() drm/i915/dp: Unify DP and eDP slice count computation drm/i915/dp: Add intel_dp_dsc_get_slice_config() drm/i915/dp: Use intel_dp_dsc_get_slice_config()
drivers/gpu/drm/display/drm_dp_helper.c | 103 ++- drivers/gpu/drm/i915/display/icl_dsi.c | 6 - drivers/gpu/drm/i915/display/intel_bios.c | 27 +- drivers/gpu/drm/i915/display/intel_display.c | 2 +- .../drm/i915/display/intel_display_types.h | 7 +- drivers/gpu/drm/i915/display/intel_dp.c | 868 +++++++++--------- drivers/gpu/drm/i915/display/intel_dp.h | 26 +- .../drm/i915/display/intel_dp_link_training.c | 4 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 110 +-- drivers/gpu/drm/i915/display/intel_vdsc.c | 71 +- drivers/gpu/drm/i915/display/intel_vdsc.h | 6 + include/drm/display/drm_dp_helper.h | 3 + 12 files changed, 658 insertions(+), 575 deletions(-)
Signature · 1 line
2.49.1
PATCH 1/50 drm/dp: Parse all DSC slice count caps for eDP 1.5
eDP 1.5 supports all the slice counts reported via DP_DSC_SLICE_CAP_1, so adjust drm_dp_dsc_sink_max_slice_count() accordingly.
--- drivers/gpu/drm/display/drm_dp_helper.c | 41 +++++++++++-------------- 1 file changed, 18 insertions(+), 23 deletions(-)
drivers/gpu/drm/display/drm_dp_helper.c +18 -23
@@ -2725,15 +2725,7 @@ u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], {u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 -DP_DSC_SUPPORT ]; -if (is_edp) { -/* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count */ -if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; -if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; -if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; - }else { +if (!is_edp) {/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */ u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 -DP_DSC_SUPPORT ];
@@ -2743,22 +2735,25 @@ u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],return 20 ;if (slice_cap2 &DP_DSC_16_PER_DP_DSC_SINK )return 16 ; -if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) -return 12 ; -if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) -return 10 ; -if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) -return 8 ; -if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) -return 6 ; -if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; -if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; -if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; } +/* DP, eDP v1.5+ */ +if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) +return 12 ; +if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) +return 10 ; +if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) +return 8 ; +if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) +return 6 ; +/* DP, eDP v1.4+ */ +if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) +return 4 ; +if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) +return 2 ; +if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) +return 1 ; +return 0 ; }EXPORT_SYMBOL (drm_dp_dsc_sink_max_slice_count);
Signature · 1 line
2.49.1
Re: [PATCH 01/50] drm/dp: Parse all DSC slice count caps for eDP 1.5
Quoted 60 lines · Imre Deak
eDP 1.5 supports all the slice counts reported via
DP_DSC_SLICE_CAP_1, so adjustdrm_dp_dsc_sink_max_slice_count()accordingly.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/display/drm_dp_helper.c | 41 +++++++++++-------------- 1 file changed, 18 insertions(+), 23 deletions(-)drivers/gpu/drm/display/drm_dp_helper.c +11
-23@@ -2725,15 +2725,7 @@ u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], {u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 -DP_DSC_SUPPORT ]; -if (is_edp) { -/* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count */ -if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; -if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; -if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; - }else { +if (!is_edp) {/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */ u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 -DP_DSC_SUPPORT ];@@ -2743,22 +2735,25 @@ u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],return 20 ;if (slice_cap2 &DP_DSC_16_PER_DP_DSC_SINK )return 16 ; -if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) -return 12 ; -if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) -return 10 ; -if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) -return 8 ; -if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) -return 6 ; -if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; -if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; -if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; } +/* DP, eDP v1.5+ */ +if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) +return 12 ; +if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) +return 10 ; +if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) +return 8 ; +if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) +return 6 ; +/* DP, eDP v1.4+ */
drivers/gpu/drm/display/drm_dp_helper.c u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], · line 2759
Quoted 10 lines
drivers/gpu/drm/display/drm_dp_helper.c +7
-0+if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) +return 4 ; +if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) +return 2 ; +if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) +return 1 ; +return 0 ; }EXPORT_SYMBOL (drm_dp_dsc_sink_max_slice_count);
I'm assuming you decided to ignore cases where, for instance, DP_DSC_12_PER_DP_DSC_SINK would be set even though we're using eDP < 1.5, right?
The change looks good to me, I'm just wondering what would happen in this case.
--
Cheers,
Luca.
Re: [PATCH 01/50] drm/dp: Parse all DSC slice count caps for eDP 1.5
Quoted 67 lines · Luca Coelho
Quoted 66 lines · Imre Deak
eDP 1.5 supports all the slice counts reported via
DP_DSC_SLICE_CAP_1, so adjustdrm_dp_dsc_sink_max_slice_count()accordingly.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/display/drm_dp_helper.c | 41 +++++++++++-------------- 1 file changed, 18 insertions(+), 23 deletions(-)drivers/gpu/drm/display/drm_dp_helper.c +17
-23@@ -2725,15 +2725,7 @@ u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], {u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 -DP_DSC_SUPPORT ]; -if (is_edp) { -/* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count */ -if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; -if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; -if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; - }else { +if (!is_edp) {/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */ u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 -DP_DSC_SUPPORT ];@@ -2743,22 +2735,25 @@ u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],return 20 ;if (slice_cap2 &DP_DSC_16_PER_DP_DSC_SINK )return 16 ; -if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) -return 12 ; -if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) -return 10 ; -if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) -return 8 ; -if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) -return 6 ; -if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; -if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; -if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; } +/* DP, eDP v1.5+ */ +if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) +return 12 ; +if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) +return 10 ; +if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) +return 8 ; +if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) +return 6 ; +/* DP, eDP v1.4+ */ +if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) +return 4 ; +if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) +return 2 ; +if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) +return 1 ;
Quoted 8 lines
drivers/gpu/drm/display/drm_dp_helper.c u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], · line 2759
Quoted 4 lines
drivers/gpu/drm/display/drm_dp_helper.c +1
-0+return 0 ; }EXPORT_SYMBOL (drm_dp_dsc_sink_max_slice_count);I'm assuming you decided to ignore cases where, for instance,
DP_DSC_12_PER_DP_DSC_SINKwould be set even though we're using eDP < 1.5, right?
An eDP sink with a DPCD_REV version less than 1.5 may support slice counts added by the eDP 1.5 Standard only, but still not indicate that it's fully compliant with the 1.5 Standard by setting its DPCD_REV register to 1.5 (since for instance it doesn't support some other feature mandated by 1.5).
This also matches what the Windows driver does, i.e. it parses all the slice counts in the DP_DSC_SLICE_CAP_1 register for an eDP panel with 1.4 in the panel's DPCD_REV register.
Quoted 8 lines
The change looks good to me, I'm just wondering what would happen in this case.
Reviewed-by Luca Coelho <[email protected]>--
Cheers,
Luca.
PATCH 2/50 drm/dp: Add drm_dp_dsc_sink_slice_count_mask()
In reply to Imre DeakA DSC sink supporting DSC slice count N, not necessarily supports slice counts less than N. Hence the driver should check the sink's support for a particular slice count before using that slice count. Add the helper functions required for this.
--- drivers/gpu/drm/display/drm_dp_helper.c | 82 +++++++++++++++++-------- include/drm/display/drm_dp_helper.h | 3 + 2 files changed, 61 insertions(+), 24 deletions(-)
drivers/gpu/drm/display/drm_dp_helper.c +58 -24
@@ -2705,56 +2705,90 @@ u8 drm_dp_dsc_sink_bpp_incr(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])EXPORT_SYMBOL (drm_dp_dsc_sink_bpp_incr);/** -* drm_dp_dsc_sink_max_slice_count() - Get the max slice count -* supported by the DSC sink. -* @dsc_dpcd: DSC capabilities from DPCD -* @is_edp: true if its eDP, false for DP +* drm_dp_dsc_slice_count_to_mask() - Convert a slice count to a slice count mask +* @slice_count: slice count * -* Read the slice capabilities DPCD register from DSC sink to get -* the maximum slice count supported. This is used to populate -* the DSC parameters in the &struct drm_dsc_config by the driver. -* Driver creates an infoframe using these parameters to populate -* &struct drm_dsc_pps_infoframe. These are sent to the sink using DSC -* infoframe using the helper function drm_dsc_pps_infoframe_pack() +* Convert @slice_count to a slice count mask. +* +* Returns the slice count mask. +*/ +u32 drm_dp_dsc_slice_count_to_mask (int slice_count) +{ +return BIT (slice_count -1 ); +} +EXPORT_SYMBOL (drm_dp_dsc_slice_count_to_mask); + +/** +* drm_dp_dsc_sink_slice_count_mask() - Get the mask of valid DSC sink slice counts +* @dsc_dpcd: the sink's DSC DPCD capabilities +* @is_edp: %true for an eDP sink +* +* Get the mask of supported slice counts from the sink's DSC DPCD register. * * Returns: -* Maximum slice count supported by DSC sink or 0 its invalid +* Mask of slice counts supported by the DSC sink: +* - > 0: bit#0,1,3,5..,23 set if the sink supports 1,2,4,6..,24 slices +* - 0: if the sink doesn't support any slices */ -u8 drm_dp_dsc_sink_max_slice_count (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], -bool is_edp) +u32 drm_dp_dsc_sink_slice_count_mask (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], +bool is_edp) {u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 -DP_DSC_SUPPORT ]; +u32 mask =0 ;if (!is_edp) {/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */ u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 -DP_DSC_SUPPORT ];if (slice_cap2 &DP_DSC_24_PER_DP_DSC_SINK ) -return 24 ; + mask |=drm_dp_dsc_slice_count_to_mask (24 );if (slice_cap2 &DP_DSC_20_PER_DP_DSC_SINK ) -return 20 ; + mask |=drm_dp_dsc_slice_count_to_mask (20 );if (slice_cap2 &DP_DSC_16_PER_DP_DSC_SINK ) -return 16 ; + mask |=drm_dp_dsc_slice_count_to_mask (16 ); }/* DP, eDP v1.5+ */ if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) -return 12 ; + mask |=drm_dp_dsc_slice_count_to_mask (12 );if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) -return 10 ; + mask |=drm_dp_dsc_slice_count_to_mask (10 );if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) -return 8 ; + mask |=drm_dp_dsc_slice_count_to_mask (8 );if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) -return 6 ; + mask |=drm_dp_dsc_slice_count_to_mask (6 );/* DP, eDP v1.4+ */ if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; + mask |=drm_dp_dsc_slice_count_to_mask (4 );if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; + mask |=drm_dp_dsc_slice_count_to_mask (2 );if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; + mask |=drm_dp_dsc_slice_count_to_mask (1 ); -return 0 ; +return mask; +} +EXPORT_SYMBOL (drm_dp_dsc_sink_slice_count_mask); + +/** +* drm_dp_dsc_sink_max_slice_count() - Get the max slice count +* supported by the DSC sink. +* @dsc_dpcd: DSC capabilities from DPCD +* @is_edp: true if its eDP, false for DP +* +* Read the slice capabilities DPCD register from DSC sink to get +* the maximum slice count supported. This is used to populate +* the DSC parameters in the &struct drm_dsc_config by the driver. +* Driver creates an infoframe using these parameters to populate +* &struct drm_dsc_pps_infoframe. These are sent to the sink using DSC +* infoframe using the helper function drm_dsc_pps_infoframe_pack() +* +* Returns: +* Maximum slice count supported by DSC sink or 0 its invalid +*/ +u8 drm_dp_dsc_sink_max_slice_count (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], +bool is_edp) +{ +return fls (drm_dp_dsc_sink_slice_count_mask (dsc_dpcd, is_edp)); }EXPORT_SYMBOL (drm_dp_dsc_sink_max_slice_count);
include/drm/display/drm_dp_helper.h +3 -0
@@ -206,6 +206,9 @@ drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE])/* DP/eDP DSC support */ u8 drm_dp_dsc_sink_bpp_incr (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ]); +u32 drm_dp_dsc_slice_count_to_mask (int slice_count); +u32 drm_dp_dsc_sink_slice_count_mask (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], +bool is_edp);u8 drm_dp_dsc_sink_max_slice_count (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ],bool is_edp);u8 drm_dp_dsc_sink_line_buf_depth (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ]);
Signature · 1 line
2.49.1
Re: [PATCH 02/50] drm/dp: Add drm_dp_dsc_sink_slice_count_mask()
Quoted 136 lines · Imre Deak
A DSC sink supporting DSC slice count N, not necessarily supports slice counts less than N. Hence the driver should check the sink's support for a particular slice count before using that slice count. Add the helper functions required for this.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/display/drm_dp_helper.c | 82 +++++++++++++++++-------- include/drm/display/drm_dp_helper.h | 3 + 2 files changed, 61 insertions(+), 24 deletions(-)drivers/gpu/drm/display/drm_dp_helper.c +58
-24@@ -2705,56 +2705,90 @@ u8 drm_dp_dsc_sink_bpp_incr(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])EXPORT_SYMBOL (drm_dp_dsc_sink_bpp_incr);/** -* drm_dp_dsc_sink_max_slice_count() - Get the max slice count -* supported by the DSC sink. -* @dsc_dpcd: DSC capabilities from DPCD -* @is_edp: true if its eDP, false for DP +* drm_dp_dsc_slice_count_to_mask() - Convert a slice count to a slice count mask +* @slice_count: slice count * -* Read the slice capabilities DPCD register from DSC sink to get -* the maximum slice count supported. This is used to populate -* the DSC parameters in the &struct drm_dsc_config by the driver. -* Driver creates an infoframe using these parameters to populate -* &struct drm_dsc_pps_infoframe. These are sent to the sink using DSC -* infoframe using the helper function drm_dsc_pps_infoframe_pack() +* Convert @slice_count to a slice count mask. +* +* Returns the slice count mask. +*/ +u32 drm_dp_dsc_slice_count_to_mask (int slice_count) +{ +return BIT (slice_count -1 ); +} +EXPORT_SYMBOL (drm_dp_dsc_slice_count_to_mask); + +/** +* drm_dp_dsc_sink_slice_count_mask() - Get the mask of valid DSC sink slice counts +* @dsc_dpcd: the sink's DSC DPCD capabilities +* @is_edp: %true for an eDP sink +* +* Get the mask of supported slice counts from the sink's DSC DPCD register. * * Returns: -* Maximum slice count supported by DSC sink or 0 its invalid +* Mask of slice counts supported by the DSC sink: +* - > 0: bit#0,1,3,5..,23 set if the sink supports 1,2,4,6..,24 slices +* - 0: if the sink doesn't support any slices */ -u8 drm_dp_dsc_sink_max_slice_count (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], -bool is_edp) +u32 drm_dp_dsc_sink_slice_count_mask (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], +bool is_edp) {u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 -DP_DSC_SUPPORT ]; +u32 mask =0 ;if (!is_edp) {/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */ u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 -DP_DSC_SUPPORT ];if (slice_cap2 &DP_DSC_24_PER_DP_DSC_SINK ) -return 24 ; + mask |=drm_dp_dsc_slice_count_to_mask (24 );if (slice_cap2 &DP_DSC_20_PER_DP_DSC_SINK ) -return 20 ; + mask |=drm_dp_dsc_slice_count_to_mask (20 );if (slice_cap2 &DP_DSC_16_PER_DP_DSC_SINK ) -return 16 ; + mask |=drm_dp_dsc_slice_count_to_mask (16 ); }/* DP, eDP v1.5+ */ if (slice_cap1 &DP_DSC_12_PER_DP_DSC_SINK ) -return 12 ; + mask |=drm_dp_dsc_slice_count_to_mask (12 );if (slice_cap1 &DP_DSC_10_PER_DP_DSC_SINK ) -return 10 ; + mask |=drm_dp_dsc_slice_count_to_mask (10 );if (slice_cap1 &DP_DSC_8_PER_DP_DSC_SINK ) -return 8 ; + mask |=drm_dp_dsc_slice_count_to_mask (8 );if (slice_cap1 &DP_DSC_6_PER_DP_DSC_SINK ) -return 6 ; + mask |=drm_dp_dsc_slice_count_to_mask (6 );/* DP, eDP v1.4+ */ if (slice_cap1 &DP_DSC_4_PER_DP_DSC_SINK ) -return 4 ; + mask |=drm_dp_dsc_slice_count_to_mask (4 );if (slice_cap1 &DP_DSC_2_PER_DP_DSC_SINK ) -return 2 ; + mask |=drm_dp_dsc_slice_count_to_mask (2 );if (slice_cap1 &DP_DSC_1_PER_DP_DSC_SINK ) -return 1 ; + mask |=drm_dp_dsc_slice_count_to_mask (1 ); -return 0 ; +return mask; +} +EXPORT_SYMBOL (drm_dp_dsc_sink_slice_count_mask); + +/** +* drm_dp_dsc_sink_max_slice_count() - Get the max slice count +* supported by the DSC sink. +* @dsc_dpcd: DSC capabilities from DPCD +* @is_edp: true if its eDP, false for DP +* +* Read the slice capabilities DPCD register from DSC sink to get +* the maximum slice count supported. This is used to populate +* the DSC parameters in the &struct drm_dsc_config by the driver. +* Driver creates an infoframe using these parameters to populate +* &struct drm_dsc_pps_infoframe. These are sent to the sink using DSC +* infoframe using the helper function drm_dsc_pps_infoframe_pack() +* +* Returns: +* Maximum slice count supported by DSC sink or 0 its invalid +*/ +u8 drm_dp_dsc_sink_max_slice_count (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], +bool is_edp) +{ +return fls (drm_dp_dsc_sink_slice_count_mask (dsc_dpcd, is_edp)); }EXPORT_SYMBOL (drm_dp_dsc_sink_max_slice_count);include/drm/display/drm_dp_helper.h +0
-0
include/drm/display/drm_dp_helper.h drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) · line 214
Quoted 9 lines
include/drm/display/drm_dp_helper.h +3
-0@@ -206,6 +206,9 @@ drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE])/* DP/eDP DSC support */ u8 drm_dp_dsc_sink_bpp_incr (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ]); +u32 drm_dp_dsc_slice_count_to_mask (int slice_count); +u32 drm_dp_dsc_sink_slice_count_mask (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ], +bool is_edp);u8 drm_dp_dsc_sink_max_slice_count (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ],bool is_edp);u8 drm_dp_dsc_sink_line_buf_depth (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ]);
--
Cheers,
Luca.
PATCH 3/50 drm/i915/dp: Fix DSC sink's slice count capability check
In reply to Imre DeakA DSC sink supporting DSC slice count N, not necessarily supports slice counts less than N. Hence the driver should check the sink's support for a particular slice count before using that slice count, fix intel_dp_dsc_get_slice_count() accordingly.
--- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +13 -5
@@ -1013,6 +1013,8 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, int num_joined_pipes) {struct intel_display *display =to_intel_display (connector); +u32 sink_slice_count_mask = +drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false);u8 min_slice_count, i;int max_slice_width;int tp_rgb_yuv444;
@@ -1084,9 +1086,9 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, (!HAS_DSC_3ENGINES(display) || num_joined_pipes != 4)) continue; -if (test_slice_count > -drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, false)) -break ; +if (!(drm_dp_dsc_slice_count_to_mask (test_slice_count) & + sink_slice_count_mask)) +continue ;/* * Bigjoiner needs small joiner to be enabled.
@@ -1103,8 +1105,14 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,return test_slice_count; } -drm_dbg_kms (display->drm,"Unsupported Slice Count %d\n" , - min_slice_count); +/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */ + sink_slice_count_mask <<=1 ; +drm_dbg_kms (display->drm, +"[CONNECTOR:%d:%s] Unsupported slice count (min: %d, sink supported: %*pbl)\n" , + connector->base.base.id, connector->base.name, + min_slice_count, + (int )BITS_PER_TYPE (sink_slice_count_mask), &sink_slice_count_mask); +return 0 ; }
Signature · 1 line
2.49.1
Re: [PATCH 03/50] drm/i915/dp: Fix DSC sink's slice count capability check
Quoted 44 lines · Imre Deak
A DSC sink supporting DSC slice count N, not necessarily supports slice counts less than N. Hence the driver should check the sink's support for a particular slice count before using that slice count, fix
intel_dp_dsc_get_slice_count()accordingly.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +6
-5@@ -1013,6 +1013,8 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, int num_joined_pipes) {struct intel_display *display =to_intel_display (connector); +u32 sink_slice_count_mask = +drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false);u8 min_slice_count, i;int max_slice_width;int tp_rgb_yuv444;@@ -1084,9 +1086,9 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, (!HAS_DSC_3ENGINES(display) || num_joined_pipes != 4)) continue; -if (test_slice_count > -drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, false)) -break ; +if (!(drm_dp_dsc_slice_count_to_mask (test_slice_count) & + sink_slice_count_mask)) +continue ;/* * Bigjoiner needs small joiner to be enabled. @@ -1103,8 +1105,14 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,return test_slice_count; } -drm_dbg_kms (display->drm,"Unsupported Slice Count %d\n" , - min_slice_count); +/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */
drivers/gpu/drm/i915/display/intel_dp.c u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, · line 1118
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +7
-0+ sink_slice_count_mask <<=1 ; +drm_dbg_kms (display->drm, +"[CONNECTOR:%d:%s] Unsupported slice count (min: %d, sink supported: %*pbl)\n" , + connector->base.base.id, connector->base.name, + min_slice_count, + (int )BITS_PER_TYPE (sink_slice_count_mask), &sink_slice_count_mask); +return 0 ; }
I think this patch could be squashed into the previous one. IMHO it makes it a bit easier to see how those functions defined in the previous patch would be used.
But nevertheless:
--
Cheers,
Luca.
Re: [PATCH 03/50] drm/i915/dp: Fix DSC sink's slice count capability check
Quoted 51 lines · Luca Coelho
Quoted 50 lines · Imre Deak
A DSC sink supporting DSC slice count N, not necessarily supports slice counts less than N. Hence the driver should check the sink's support for a particular slice count before using that slice count, fix
intel_dp_dsc_get_slice_count()accordingly.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +12
-5@@ -1013,6 +1013,8 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, int num_joined_pipes) {struct intel_display *display =to_intel_display (connector); +u32 sink_slice_count_mask = +drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false);u8 min_slice_count, i;int max_slice_width;int tp_rgb_yuv444;@@ -1084,9 +1086,9 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, (!HAS_DSC_3ENGINES(display) || num_joined_pipes != 4)) continue; -if (test_slice_count > -drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, false)) -break ; +if (!(drm_dp_dsc_slice_count_to_mask (test_slice_count) & + sink_slice_count_mask)) +continue ;/* * Bigjoiner needs small joiner to be enabled. @@ -1103,8 +1105,14 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,return test_slice_count; } -drm_dbg_kms (display->drm,"Unsupported Slice Count %d\n" , - min_slice_count); +/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */ + sink_slice_count_mask <<=1 ; +drm_dbg_kms (display->drm, +"[CONNECTOR:%d:%s] Unsupported slice count (min: %d, sink supported: %*pbl)\n" , + connector->base.base.id, connector->base.name, + min_slice_count, + (int )BITS_PER_TYPE (sink_slice_count_mask), &sink_slice_count_mask);
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, · line 1118
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+return 0 ; }I think this patch could be squashed into the previous one. IMHO it makes it a bit easier to see how those functions defined in the previous patch would be used.
The practice I follow is to keep the DRM core and driver changes in separate patches. At least one reason for that is that the DRM core patches may need to be applied to the DRM core trees separately.
Quoted 7 lines
But nevertheless:
Reviewed-by Luca Coelho <[email protected]>--
Cheers,
Luca.
Re: [PATCH 03/50] drm/i915/dp: Fix DSC sink's slice count capability check
Quoted 61 lines · Imre Deak
Quoted 51 lines · Luca Coelho
Quoted 50 lines · Imre Deak
A DSC sink supporting DSC slice count N, not necessarily supports slice counts less than N. Hence the driver should check the sink's support for a particular slice count before using that slice count, fix
intel_dp_dsc_get_slice_count()accordingly.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +12
-5@@ -1013,6 +1013,8 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, int num_joined_pipes) {struct intel_display *display =to_intel_display (connector); +u32 sink_slice_count_mask = +drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false);u8 min_slice_count, i;int max_slice_width;int tp_rgb_yuv444;@@ -1084,9 +1086,9 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, (!HAS_DSC_3ENGINES(display) || num_joined_pipes != 4)) continue; -if (test_slice_count > -drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, false)) -break ; +if (!(drm_dp_dsc_slice_count_to_mask (test_slice_count) & + sink_slice_count_mask)) +continue ;/* * Bigjoiner needs small joiner to be enabled. @@ -1103,8 +1105,14 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,return test_slice_count; } -drm_dbg_kms (display->drm,"Unsupported Slice Count %d\n" , - min_slice_count); +/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */ + sink_slice_count_mask <<=1 ; +drm_dbg_kms (display->drm, +"[CONNECTOR:%d:%s] Unsupported slice count (min: %d, sink supported: %*pbl)\n" , + connector->base.base.id, connector->base.name, + min_slice_count, + (int )BITS_PER_TYPE (sink_slice_count_mask), &sink_slice_count_mask);Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, · line 1118
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+return 0 ; }I think this patch could be squashed into the previous one. IMHO it makes it a bit easier to see how those functions defined in the previous patch would be used.
Quoted 3 lines
The practice I follow is to keep the DRM core and driver changes in separate patches. At least one reason for that is that the DRM core patches may need to be applied to the DRM core trees separately.
Oh, of course, makes 100% sense. I overlooked this point.
--
Cheers,
Luca.
PATCH 4/50 drm/i915/dp: Return a fixed point BPP value from intel_dp_output_bpp()
In reply to Imre DeakConvert intel_dp_output_bpp() and intel_dp_mode_min_output_bpp() to return an x16 fixed point bpp value, as this value will be always the link BPP (either compressed or uncompressed) tracked in the same x16 fixed point format.
While at it renameintel_dp_output_bpp() to intel_dp_output_format_link_bpp_x16() and intel_dp_mode_min_output_bpp() to intel_dp_mode_min_link_bpp_x16() to better reflect that these functions return an x16 link BPP value specific to a particular output format or mode.
Also rename intel_dp_output_bpp()'s bpp parameter to pipe_bpp, to clarify which kind of (pipe vs. link) BPP the parameter is.
--- drivers/gpu/drm/i915/display/intel_dp.c | 41 +++++++++++---------- drivers/gpu/drm/i915/display/intel_dp.h | 3 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +- 3 files changed, 26 insertions(+), 22 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +22 -19
@@ -1234,7 +1234,7 @@ int intel_dp_min_bpp(enum intel_output_format output_format)return 8 *3 ; } -int intel_dp_output_bpp (enum intel_output_format output_format,int bpp) +int intel_dp_output_format_link_bpp_x16 (enum intel_output_format output_format,int pipe_bpp) {/* * bpp value was assumed to RGB format. And YCbCr 4:2:0 output
@@ -1242,9 +1242,9 @@ int intel_dp_output_bpp(enum intel_output_format output_format, int bpp)* of bytes of RGB pixel. */ if (output_format ==INTEL_OUTPUT_FORMAT_YCBCR420 ) - bpp /=2 ; + pipe_bpp /=2 ; -return bpp; +return fxp_q4_from_int (pipe_bpp); } static enum intel_output_format
@@ -1260,8 +1260,8 @@ intel_dp_sink_format(struct intel_connector *connector, }static int -intel_dp_mode_min_output_bpp (struct intel_connector *connector, -const struct drm_display_mode *mode) +intel_dp_mode_min_link_bpp_x16 (struct intel_connector *connector, +const struct drm_display_mode *mode) {enum intel_output_format output_format, sink_format;
@@ -1269,7 +1269,8 @@ intel_dp_mode_min_output_bpp(struct intel_connector *connector, output_format =intel_dp_output_format (connector, sink_format); -return intel_dp_output_bpp (output_format,intel_dp_min_bpp (output_format)); +return intel_dp_output_format_link_bpp_x16 (output_format, +intel_dp_min_bpp (output_format)); } static bool intel_dp_hdisplay_bad(struct intel_display *display,
@@ -1341,11 +1342,11 @@ intel_dp_mode_valid_downstream(struct intel_connector *connector,/* If PCON supports FRL MODE, check FRL bandwidth constraints */ if (intel_dp->dfp.pcon_max_frl_bw) { +int link_bpp_x16 =intel_dp_mode_min_link_bpp_x16 (connector, mode);int target_bw;int max_frl_bw; -int bpp =intel_dp_mode_min_output_bpp (connector, mode); - target_bw = bpp * target_clock; + target_bw =fxp_q4_to_int_roundup (link_bpp_x16) * target_clock; max_frl_bw = intel_dp->dfp.pcon_max_frl_bw;
@@ -1460,6 +1461,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,enum drm_mode_status status;bool dsc = false;int num_joined_pipes; +int link_bpp_x16; status =intel_cpu_transcoder_mode_valid (display, mode);if (status !=MODE_OK )
@@ -1502,8 +1504,8 @@ intel_dp_mode_valid(struct drm_connector *_connector, max_rate =intel_dp_max_link_data_rate (intel_dp, max_link_clock, max_lanes); - mode_rate =intel_dp_link_required (target_clock, -intel_dp_mode_min_output_bpp (connector, mode)); + link_bpp_x16 =intel_dp_mode_min_link_bpp_x16 (connector, mode); + mode_rate =intel_dp_link_required (target_clock,fxp_q4_to_int_roundup (link_bpp_x16));if (intel_dp_has_dsc (connector)) {int pipe_bpp;
@@ -1815,9 +1817,10 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,for (bpp =fxp_q4_to_int (limits->link.max_bpp_x16); bpp >=fxp_q4_to_int (limits->link.min_bpp_x16); bpp -=2 *3 ) { -int link_bpp =intel_dp_output_bpp (pipe_config->output_format, bpp); +int link_bpp_x16 = +intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, bpp); - mode_rate =intel_dp_link_required (clock, link_bpp); + mode_rate =intel_dp_link_required (clock,fxp_q4_to_int_roundup (link_bpp_x16));for (i =0 ; i < intel_dp->num_common_rates; i++) { link_rate =intel_dp_common_rate (intel_dp, i);
@@ -2201,10 +2204,10 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,struct intel_display *display =to_intel_display (intel_dp);const struct intel_connector *connector =to_intel_connector (conn_state->connector);const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; -int output_bpp;int min_bpp_x16, max_bpp_x16, bpp_step_x16;int dsc_joiner_max_bpp;int num_joined_pipes =intel_crtc_num_joined_pipes (pipe_config); +int link_bpp_x16;int bpp_x16;int ret;
@@ -2216,8 +2219,8 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector);/* Compressed BPP should be less than the Input DSC bpp */ - output_bpp =intel_dp_output_bpp (pipe_config->output_format, pipe_bpp); - max_bpp_x16 =min (max_bpp_x16,fxp_q4_from_int (output_bpp) - bpp_step_x16); + link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, pipe_bpp); + max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16);drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); min_bpp_x16 =round_up (limits->link.min_bpp_x16, bpp_step_x16);
@@ -3267,8 +3270,8 @@ int intel_dp_compute_min_hblank(struct intel_crtc_state *crtc_state,if (crtc_state->dsc.compression_enable) link_bpp_x16 = crtc_state->dsc.compressed_bpp_x16;else - link_bpp_x16 =fxp_q4_from_int (intel_dp_output_bpp (crtc_state->output_format, - crtc_state->pipe_bpp)); + link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (crtc_state->output_format, + crtc_state->pipe_bpp);/* Calculate min Hblank Link Layer Symbol Cycle Count for 8b/10b MST & 128b/132b */ hactive_sym_cycles = drm_dp_link_symbol_cycles(max_lane_count,
@@ -3378,8 +3381,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,if (pipe_config->dsc.compression_enable) link_bpp_x16 = pipe_config->dsc.compressed_bpp_x16;else - link_bpp_x16 =fxp_q4_from_int (intel_dp_output_bpp (pipe_config->output_format, - pipe_config->pipe_bpp)); + link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, + pipe_config->pipe_bpp);if (intel_dp->mso_link_count) {int n = intel_dp->mso_link_count;
drivers/gpu/drm/i915/display/intel_dp.h +2 -1
@@ -193,7 +193,8 @@ void intel_dp_pcon_dsc_configure(struct intel_dp *intel_dp,void intel_dp_invalidate_source_oui (struct intel_dp *intel_dp);void intel_dp_wait_source_oui (struct intel_dp *intel_dp); -int intel_dp_output_bpp (enum intel_output_format output_format,int bpp); +int intel_dp_output_format_link_bpp_x16 (enum intel_output_format output_format, +int pipe_bpp); bool intel_dp_compute_config_limits(struct intel_dp *intel_dp, struct drm_connector_state *conn_state,
drivers/gpu/drm/i915/display/intel_dp_mst.c +2 -2
@@ -344,8 +344,8 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp, } link_bpp_x16 = dsc ? bpp_x16 : -fxp_q4_from_int (intel_dp_output_bpp (crtc_state->output_format, -fxp_q4_to_int (bpp_x16))); +intel_dp_output_format_link_bpp_x16 (crtc_state->output_format, +fxp_q4_to_int (bpp_x16)); local_bw_overhead =intel_dp_mst_bw_overhead (crtc_state, false, dsc_slice_count, link_bpp_x16);
Signature · 1 line
2.49.1
Re: [PATCH 04/50] drm/i915/dp: Return a fixed point BPP value from intel_dp_output_bpp()
Quoted 6 lines · Imre Deak
Convert
intel_dp_output_bpp()andintel_dp_mode_min_output_bpp()to return an x16 fixed point bpp value, as this value will be always the link BPP (either compressed or uncompressed) tracked in the same x16 fixed point format.While at it rename
This line break can be avoided.
Quoted 157 lines
intel_dp_output_bpp()tointel_dp_output_format_link_bpp_x16()andintel_dp_mode_min_output_bpp()tointel_dp_mode_min_link_bpp_x16()to better reflect that these functions return an x16 link BPP value specific to a particular output format or mode.Also rename intel_dp_output_bpp()'s bpp parameter to
pipe_bpp, to clarify which kind of (pipe vs. link) BPP the parameter is.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 41 +++++++++++---------- drivers/gpu/drm/i915/display/intel_dp.h | 3 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +- 3 files changed, 26 insertions(+), 22 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +22
-19@@ -1234,7 +1234,7 @@ int intel_dp_min_bpp(enum intel_output_format output_format)return 8 *3 ; } -int intel_dp_output_bpp (enum intel_output_format output_format,int bpp) +int intel_dp_output_format_link_bpp_x16 (enum intel_output_format output_format,int pipe_bpp) {/* * bpp value was assumed to RGB format. And YCbCr 4:2:0 output @@ -1242,9 +1242,9 @@ int intel_dp_output_bpp(enum intel_output_format output_format, int bpp)* of bytes of RGB pixel. */ if (output_format ==INTEL_OUTPUT_FORMAT_YCBCR420 ) - bpp /=2 ; + pipe_bpp /=2 ; -return bpp; +return fxp_q4_from_int (pipe_bpp); } static enum intel_output_format@@ -1260,8 +1260,8 @@ intel_dp_sink_format(struct intel_connector *connector, }static int -intel_dp_mode_min_output_bpp (struct intel_connector *connector, -const struct drm_display_mode *mode) +intel_dp_mode_min_link_bpp_x16 (struct intel_connector *connector, +const struct drm_display_mode *mode) {enum intel_output_format output_format, sink_format;@@ -1269,7 +1269,8 @@ intel_dp_mode_min_output_bpp(struct intel_connector *connector, output_format =intel_dp_output_format (connector, sink_format); -return intel_dp_output_bpp (output_format,intel_dp_min_bpp (output_format)); +return intel_dp_output_format_link_bpp_x16 (output_format, +intel_dp_min_bpp (output_format)); } static bool intel_dp_hdisplay_bad(struct intel_display *display,@@ -1341,11 +1342,11 @@ intel_dp_mode_valid_downstream(struct intel_connector *connector,/* If PCON supports FRL MODE, check FRL bandwidth constraints */ if (intel_dp->dfp.pcon_max_frl_bw) { +int link_bpp_x16 =intel_dp_mode_min_link_bpp_x16 (connector, mode);int target_bw;int max_frl_bw; -int bpp =intel_dp_mode_min_output_bpp (connector, mode); - target_bw = bpp * target_clock; + target_bw =fxp_q4_to_int_roundup (link_bpp_x16) * target_clock; max_frl_bw = intel_dp->dfp.pcon_max_frl_bw;@@ -1460,6 +1461,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,enum drm_mode_status status;bool dsc = false;int num_joined_pipes; +int link_bpp_x16; status =intel_cpu_transcoder_mode_valid (display, mode);if (status !=MODE_OK )@@ -1502,8 +1504,8 @@ intel_dp_mode_valid(struct drm_connector *_connector, max_rate =intel_dp_max_link_data_rate (intel_dp, max_link_clock, max_lanes); - mode_rate =intel_dp_link_required (target_clock, -intel_dp_mode_min_output_bpp (connector, mode)); + link_bpp_x16 =intel_dp_mode_min_link_bpp_x16 (connector, mode); + mode_rate =intel_dp_link_required (target_clock,fxp_q4_to_int_roundup (link_bpp_x16));if (intel_dp_has_dsc (connector)) {int pipe_bpp;@@ -1815,9 +1817,10 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,for (bpp =fxp_q4_to_int (limits->link.max_bpp_x16); bpp >=fxp_q4_to_int (limits->link.min_bpp_x16); bpp -=2 *3 ) { -int link_bpp =intel_dp_output_bpp (pipe_config->output_format, bpp); +int link_bpp_x16 = +intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, bpp); - mode_rate =intel_dp_link_required (clock, link_bpp); + mode_rate =intel_dp_link_required (clock,fxp_q4_to_int_roundup (link_bpp_x16));for (i =0 ; i < intel_dp->num_common_rates; i++) { link_rate =intel_dp_common_rate (intel_dp, i);@@ -2201,10 +2204,10 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,struct intel_display *display =to_intel_display (intel_dp);const struct intel_connector *connector =to_intel_connector (conn_state->connector);const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; -int output_bpp;int min_bpp_x16, max_bpp_x16, bpp_step_x16;int dsc_joiner_max_bpp;int num_joined_pipes =intel_crtc_num_joined_pipes (pipe_config); +int link_bpp_x16;int bpp_x16;int ret;@@ -2216,8 +2219,8 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector);/* Compressed BPP should be less than the Input DSC bpp */ - output_bpp =intel_dp_output_bpp (pipe_config->output_format, pipe_bpp); - max_bpp_x16 =min (max_bpp_x16,fxp_q4_from_int (output_bpp) - bpp_step_x16); + link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, pipe_bpp); + max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16);drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); min_bpp_x16 =round_up (limits->link.min_bpp_x16, bpp_step_x16);@@ -3267,8 +3270,8 @@ int intel_dp_compute_min_hblank(struct intel_crtc_state *crtc_state,if (crtc_state->dsc.compression_enable) link_bpp_x16 = crtc_state->dsc.compressed_bpp_x16;else - link_bpp_x16 =fxp_q4_from_int (intel_dp_output_bpp (crtc_state->output_format, - crtc_state->pipe_bpp)); + link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (crtc_state->output_format, + crtc_state->pipe_bpp);/* Calculate min Hblank Link Layer Symbol Cycle Count for 8b/10b MST & 128b/132b */ hactive_sym_cycles = drm_dp_link_symbol_cycles(max_lane_count,@@ -3378,8 +3381,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,if (pipe_config->dsc.compression_enable) link_bpp_x16 = pipe_config->dsc.compressed_bpp_x16;else - link_bpp_x16 =fxp_q4_from_int (intel_dp_output_bpp (pipe_config->output_format, - pipe_config->pipe_bpp)); + link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, + pipe_config->pipe_bpp);if (intel_dp->mso_link_count) {int n = intel_dp->mso_link_count;drivers/gpu/drm/i915/display/intel_dp.h +0
-0
drivers/gpu/drm/i915/display/intel_dp.h void intel_dp_pcon_dsc_configure(struct intel_dp *intel_dp, · line 197
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.h +2
-1@@ -193,7 +193,8 @@ void intel_dp_pcon_dsc_configure(struct intel_dp *intel_dp,void intel_dp_invalidate_source_oui (struct intel_dp *intel_dp);void intel_dp_wait_source_oui (struct intel_dp *intel_dp); -int intel_dp_output_bpp (enum intel_output_format output_format,int bpp); +int intel_dp_output_format_link_bpp_x16 (enum intel_output_format output_format, +int pipe_bpp);
I'm not the biggest fan of very long function names like this, but I can't come up with anything better...
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.h +0
-0bool intel_dp_compute_config_limits(struct intel_dp *intel_dp, struct drm_connector_state *conn_state,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0
drivers/gpu/drm/i915/display/intel_dp_mst.c int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp, · line 351
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-2@@ -344,8 +344,8 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp, } link_bpp_x16 = dsc ? bpp_x16 : -fxp_q4_from_int (intel_dp_output_bpp (crtc_state->output_format, -fxp_q4_to_int (bpp_x16))); +intel_dp_output_format_link_bpp_x16 (crtc_state->output_format, +fxp_q4_to_int (bpp_x16)); local_bw_overhead =intel_dp_mst_bw_overhead (crtc_state, false, dsc_slice_count, link_bpp_x16);
--
Cheers,
Luca.
PATCH 5/50 drm/i915/dp: Use a mode's crtc_clock vs. clock during state computation
In reply to Imre DeakThe encoder state computation should use the drm_display_mode::crtc_clock member, instead of the clock member, the former one possibly having a necessary adjustment wrt. to the latter due to driver specific constraints. In practice the two values should not differ at spots changed in this patch, since only MSO and 3D modes would make them different, neither MSO or 3D relevant here, but still use the expected crtc_clock version for consistency.
--- drivers/gpu/drm/i915/display/intel_dp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +3 -2
@@ -2050,7 +2050,8 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,continue ; }else {if (!is_bw_sufficient_for_dsc_config (dsc_bpp_x16, link_rate, - lane_count, adjusted_mode->clock, + lane_count, + adjusted_mode->crtc_clock, pipe_config->output_format, timeslots))continue ;
@@ -2211,7 +2212,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,int bpp_x16;int ret; - dsc_joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, adjusted_mode->clock, + dsc_joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, adjusted_mode->crtc_clock, adjusted_mode->hdisplay, num_joined_pipes); max_bpp_x16 =min (fxp_q4_from_int (dsc_joiner_max_bpp), limits->link.max_bpp_x16);
Signature · 1 line
2.49.1
Re: [PATCH 05/50] drm/i915/dp: Use a mode's crtc_clock vs. clock during state computation
Quoted 28 lines · Imre Deak
The encoder state computation should use the
drm_display_mode::crtc_clockmember, instead of the clock member, the former one possibly having a necessary adjustment wrt. to the latter due to driver specific constraints. In practice the two values should not differ at spots changed in this patch, since only MSO and 3D modes would make them different, neither MSO or 3D relevant here, but still use the expectedcrtc_clockversion for consistency.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +2
-1@@ -2050,7 +2050,8 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,continue ; }else {if (!is_bw_sufficient_for_dsc_config (dsc_bpp_x16, link_rate, - lane_count, adjusted_mode->clock, + lane_count, + adjusted_mode->crtc_clock, pipe_config->output_format, timeslots))continue ;
drivers/gpu/drm/i915/display/intel_dp.c static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, · line 2218
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -2211,7 +2212,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,int bpp_x16;int ret; - dsc_joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, adjusted_mode->clock, + dsc_joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, adjusted_mode->crtc_clock, adjusted_mode->hdisplay, num_joined_pipes); max_bpp_x16 =min (fxp_q4_from_int (dsc_joiner_max_bpp), limits->link.max_bpp_x16);
--
Cheers,
Luca.
PATCH 6/50 drm/i915/dp: Factor out intel_dp_link_bw_overhead()
In reply to Imre DeakFactor out intel_dp_link_bw_overhead(), used later for BW calculation during DP SST mode validation and state computation.
--- drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp.h | 2 ++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 22 +++++------------ 3 files changed, 34 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +26 -0
@@ -424,6 +424,32 @@ static int intel_dp_min_lane_count(struct intel_dp *intel_dp)return 1 ; } +int intel_dp_link_bw_overhead (int link_clock,int lane_count,int hdisplay, +int dsc_slice_count,int bpp_x16,unsigned long flags) +{ +int overhead; + +WARN_ON (flags & ~(DRM_DP_BW_OVERHEAD_MST |DRM_DP_BW_OVERHEAD_SSC_REF_CLK | +DRM_DP_BW_OVERHEAD_FEC )); + +if (drm_dp_is_uhbr_rate (link_clock)) + flags |=DRM_DP_BW_OVERHEAD_UHBR ; + +if (dsc_slice_count) + flags |=DRM_DP_BW_OVERHEAD_DSC ; + + overhead =drm_dp_bw_overhead (lane_count, hdisplay, + dsc_slice_count, + bpp_x16, + flags); + +/* +* TODO: clarify whether a minimum required by the fixed FEC overhead +* in the bspec audio programming sequence is required here. +*/ +return max (overhead,intel_dp_bw_fec_overhead (flags &DRM_DP_BW_OVERHEAD_FEC )); +} +/* * The required data bandwidth for a mode with given pixel clock and bpp. This * is the required net bandwidth independent of the data bandwidth efficiency.
drivers/gpu/drm/i915/display/intel_dp.h +2 -0
@@ -117,6 +117,8 @@ void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,bool intel_dp_source_supports_tps3 (struct intel_display *display);bool intel_dp_source_supports_tps4 (struct intel_display *display); +int intel_dp_link_bw_overhead (int link_clock,int lane_count,int hdisplay, +int dsc_slice_count,int bpp_x16,unsigned long flags);int intel_dp_link_required (int pixel_clock,int bpp);int intel_dp_effective_data_rate (int pixel_clock,int bpp_x16,int bw_overhead);
drivers/gpu/drm/i915/display/intel_dp_mst.c +6 -16
@@ -180,26 +180,16 @@ static int intel_dp_mst_bw_overhead(const struct intel_crtc_state *crtc_state,const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;unsigned long flags =DRM_DP_BW_OVERHEAD_MST ; -int overhead; - flags |=intel_dp_is_uhbr (crtc_state) ?DRM_DP_BW_OVERHEAD_UHBR :0 ; flags |= ssc ?DRM_DP_BW_OVERHEAD_SSC_REF_CLK :0 ; flags |= crtc_state->fec_enable ?DRM_DP_BW_OVERHEAD_FEC :0 ; -if (dsc_slice_count) - flags |=DRM_DP_BW_OVERHEAD_DSC ; - - overhead =drm_dp_bw_overhead (crtc_state->lane_count, - adjusted_mode->hdisplay, - dsc_slice_count, - bpp_x16, - flags); - -/* -* TODO: clarify whether a minimum required by the fixed FEC overhead -* in the bspec audio programming sequence is required here. -*/ -return max (overhead,intel_dp_bw_fec_overhead (crtc_state->fec_enable)); +return intel_dp_link_bw_overhead (crtc_state->port_clock, + crtc_state->lane_count, + adjusted_mode->hdisplay, + dsc_slice_count, + bpp_x16, + flags); } static void intel_dp_mst_compute_m_n(const struct intel_crtc_state *crtc_state,
Signature · 1 line
2.49.1
Re: [PATCH 06/50] drm/i915/dp: Factor out intel_dp_link_bw_overhead()
Quoted 87 lines · Imre Deak
Factor out
intel_dp_link_bw_overhead(), used later for BW calculation during DP SST mode validation and state computation.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp.h | 2 ++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 22 +++++------------ 3 files changed, 34 insertions(+), 16 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +26
-0@@ -424,6 +424,32 @@ static int intel_dp_min_lane_count(struct intel_dp *intel_dp)return 1 ; } +int intel_dp_link_bw_overhead (int link_clock,int lane_count,int hdisplay, +int dsc_slice_count,int bpp_x16,unsigned long flags) +{ +int overhead; + +WARN_ON (flags & ~(DRM_DP_BW_OVERHEAD_MST |DRM_DP_BW_OVERHEAD_SSC_REF_CLK | +DRM_DP_BW_OVERHEAD_FEC )); + +if (drm_dp_is_uhbr_rate (link_clock)) + flags |=DRM_DP_BW_OVERHEAD_UHBR ; + +if (dsc_slice_count) + flags |=DRM_DP_BW_OVERHEAD_DSC ; + + overhead =drm_dp_bw_overhead (lane_count, hdisplay, + dsc_slice_count, + bpp_x16, + flags); + +/* +* TODO: clarify whether a minimum required by the fixed FEC overhead +* in the bspec audio programming sequence is required here. +*/ +return max (overhead,intel_dp_bw_fec_overhead (flags &DRM_DP_BW_OVERHEAD_FEC )); +} +/* * The required data bandwidth for a mode with given pixel clock and bpp. This * is the required net bandwidth independent of the data bandwidth efficiency. drivers/gpu/drm/i915/display/intel_dp.h +2
-0@@ -117,6 +117,8 @@ void intel_dp_compute_rate(struct intel_dp *intel_dp, int port_clock,bool intel_dp_source_supports_tps3 (struct intel_display *display);bool intel_dp_source_supports_tps4 (struct intel_display *display); +int intel_dp_link_bw_overhead (int link_clock,int lane_count,int hdisplay, +int dsc_slice_count,int bpp_x16,unsigned long flags);int intel_dp_link_required (int pixel_clock,int bpp);int intel_dp_effective_data_rate (int pixel_clock,int bpp_x16,int bw_overhead);drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-15@@ -180,26 +180,16 @@ static int intel_dp_mst_bw_overhead(const struct intel_crtc_state *crtc_state,const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;unsigned long flags =DRM_DP_BW_OVERHEAD_MST ; -int overhead; - flags |=intel_dp_is_uhbr (crtc_state) ?DRM_DP_BW_OVERHEAD_UHBR :0 ; flags |= ssc ?DRM_DP_BW_OVERHEAD_SSC_REF_CLK :0 ; flags |= crtc_state->fec_enable ?DRM_DP_BW_OVERHEAD_FEC :0 ; -if (dsc_slice_count) - flags |=DRM_DP_BW_OVERHEAD_DSC ; - - overhead =drm_dp_bw_overhead (crtc_state->lane_count, - adjusted_mode->hdisplay, - dsc_slice_count, - bpp_x16, - flags); - -/* -* TODO: clarify whether a minimum required by the fixed FEC overhead -* in the bspec audio programming sequence is required here. -*/
drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_bw_overhead(const struct intel_crtc_state *crtc_state, · line 195
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +6
-1-return max (overhead,intel_dp_bw_fec_overhead (crtc_state->fec_enable)); +return intel_dp_link_bw_overhead (crtc_state->port_clock, + crtc_state->lane_count, + adjusted_mode->hdisplay, + dsc_slice_count, + bpp_x16, + flags); } static void intel_dp_mst_compute_m_n(const struct intel_crtc_state *crtc_state,
--
Cheers,
Luca.
PATCH 7/50 drm/i915/dp: Fix BW check in is_bw_sufficient_for_dsc_config()
In reply to Imre Deakis_bw_sufficient_for_dsc_config() should return true if the required BW equals the available BW, make it so.
--- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
@@ -2029,7 +2029,7 @@ static bool is_bw_sufficient_for_dsc_config(int dsc_bpp_x16, u32 link_clock, available_bw = (link_clock * lane_count * timeslots *16 ) /8 ; required_bw = dsc_bpp_x16 * (intel_dp_mode_to_fec_clock (mode_clock)); -return available_bw > required_bw; +return available_bw >= required_bw; } static int dsc_compute_link_config(struct intel_dp *intel_dp,
Signature · 1 line
2.49.1
Re: [PATCH 07/50] drm/i915/dp: Fix BW check in is_bw_sufficient_for_dsc_config()
Quoted 13 lines · Imre Deak
is_bw_sufficient_for_dsc_config()should return true if the required BW equals the available BW, make it so.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c static bool is_bw_sufficient_for_dsc_config(int dsc_bpp_x16, u32 link_clock, · line 2035
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -2029,7 +2029,7 @@ static bool is_bw_sufficient_for_dsc_config(int dsc_bpp_x16, u32 link_clock, available_bw = (link_clock * lane_count * timeslots *16 ) /8 ; required_bw = dsc_bpp_x16 * (intel_dp_mode_to_fec_clock (mode_clock)); -return available_bw > required_bw; +return available_bw >= required_bw; } static int dsc_compute_link_config(struct intel_dp *intel_dp,
--
Cheers,
Luca.
PATCH 8/50 drm/i915/dp: Use the effective data rate for DP BW calculation
In reply to Imre DeakUse intel_dp_effective_data_rate() to calculate the required link BW for eDP, DP-SST and MST links. This ensures that the BW is calculated the same way for all DP output types, during mode validation as well as during state computation. This approach also allows for accounting with BW overheads due to the SSC, DSC, FEC being enabled on a link, as well as due to the MST symbol alignment on the link. Accounting for these overheads will be added by follow-up changes.
This way also computes the stream BW on a UHBR link correctly, using the corresponding symbol size to effective data size ratio (i.e. ~97% link BW utilization for UHBR vs. only ~80% for non-UHBR).
--- drivers/gpu/drm/i915/display/intel_dp.c | 40 +++++++++++-------- drivers/gpu/drm/i915/display/intel_dp.h | 4 +- .../drm/i915/display/intel_dp_link_training.c | 4 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +- 4 files changed, 33 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +24 -16
@@ -453,15 +453,15 @@ int intel_dp_link_bw_overhead(int link_clock, int lane_count, int hdisplay,/* * The required data bandwidth for a mode with given pixel clock and bpp. This * is the required net bandwidth independent of the data bandwidth efficiency. -* -* TODO: check if callers of this functions should use -* intel_dp_effective_data_rate() instead. */ -int -intel_dp_link_required (int pixel_clock,int bpp) +int intel_dp_link_required (int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int link_bpp_x16,unsigned long bw_overhead_flags) { -/* pixel_clock is in kHz, divide bpp by 8 for bit to Byte conversion */ -return DIV_ROUND_UP (pixel_clock * bpp,8 ); +int bw_overhead =intel_dp_link_bw_overhead (link_clock, lane_count, mode_hdisplay, +0 , link_bpp_x16, bw_overhead_flags); + +return intel_dp_effective_data_rate (mode_clock, link_bpp_x16, bw_overhead); }/**
@@ -1531,7 +1531,9 @@ intel_dp_mode_valid(struct drm_connector *_connector, max_rate =intel_dp_max_link_data_rate (intel_dp, max_link_clock, max_lanes); link_bpp_x16 =intel_dp_mode_min_link_bpp_x16 (connector, mode); - mode_rate =intel_dp_link_required (target_clock,fxp_q4_to_int_roundup (link_bpp_x16)); + mode_rate =intel_dp_link_required (max_link_clock, max_lanes, + target_clock, mode->hdisplay, + link_bpp_x16,0 );if (intel_dp_has_dsc (connector)) {int pipe_bpp;
@@ -1838,7 +1840,7 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp, const struct link_config_limits *limits) {int bpp, i, lane_count, clock =intel_dp_mode_clock (pipe_config, conn_state); -int mode_rate, link_rate, link_avail; +int link_rate, link_avail; for (bpp = fxp_q4_to_int(limits->link.max_bpp_x16); bpp >= fxp_q4_to_int(limits->link.min_bpp_x16);
@@ -1846,8 +1848,6 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,int link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, bpp); - mode_rate =intel_dp_link_required (clock,fxp_q4_to_int_roundup (link_bpp_x16)); -for (i =0 ; i < intel_dp->num_common_rates; i++) { link_rate =intel_dp_common_rate (intel_dp, i); if (link_rate < limits->min_rate ||
@@ -1857,11 +1857,17 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,for (lane_count = limits->min_lane_count; lane_count <= limits->max_lane_count; lane_count <<=1 ) { +const struct drm_display_mode *adjusted_mode = + &pipe_config->hw.adjusted_mode; +int mode_rate = +intel_dp_link_required (link_rate, lane_count, + clock, adjusted_mode->hdisplay, + link_bpp_x16,0 ); + link_avail =intel_dp_max_link_data_rate (intel_dp, link_rate, lane_count); -if (mode_rate <= link_avail) { pipe_config->lane_count = lane_count; pipe_config->pipe_bpp = bpp;
@@ -2724,11 +2730,13 @@ int intel_dp_config_required_rate(const struct intel_crtc_state *crtc_state) {const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; -int bpp = crtc_state->dsc.compression_enable ? -fxp_q4_to_int_roundup (crtc_state->dsc.compressed_bpp_x16) : - crtc_state->pipe_bpp; +int link_bpp_x16 = crtc_state->dsc.compression_enable ? + crtc_state->dsc.compressed_bpp_x16 : +fxp_q4_from_int (crtc_state->pipe_bpp); -return intel_dp_link_required (adjusted_mode->crtc_clock, bpp); +return intel_dp_link_required (crtc_state->port_clock, crtc_state->lane_count, + adjusted_mode->crtc_clock, adjusted_mode->hdisplay, + link_bpp_x16,0 ); } bool intel_dp_joiner_needs_dsc(struct intel_display *display,
drivers/gpu/drm/i915/display/intel_dp.h +3 -1
@@ -119,7 +119,9 @@ bool intel_dp_source_supports_tps4(struct intel_display *display);int intel_dp_link_bw_overhead (int link_clock,int lane_count,int hdisplay,int dsc_slice_count,int bpp_x16,unsigned long flags); -int intel_dp_link_required (int pixel_clock,int bpp); +int intel_dp_link_required (int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int link_bpp_x16,unsigned long bw_overhead_flags);int intel_dp_effective_data_rate (int pixel_clock,int bpp_x16,int bw_overhead); int intel_dp_max_link_data_rate(struct intel_dp *intel_dp,
drivers/gpu/drm/i915/display/intel_dp_link_training.c +3 -1
@@ -1195,7 +1195,9 @@ static bool intel_dp_can_link_train_fallback_for_edp(struct intel_dp *intel_dp,intel_panel_preferred_fixed_mode (intel_dp->attached_connector);int mode_rate, max_rate; - mode_rate =intel_dp_link_required (fixed_mode->clock,18 ); + mode_rate =intel_dp_link_required (link_rate, lane_count, + fixed_mode->clock, fixed_mode->hdisplay, +fxp_q4_from_int (18 ),0 ); max_rate =intel_dp_max_link_data_rate (intel_dp, link_rate, lane_count);if (mode_rate > max_rate)return false;
drivers/gpu/drm/i915/display/intel_dp_mst.c +3 -1
@@ -1489,7 +1489,9 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector, max_rate =intel_dp_max_link_data_rate (intel_dp, max_link_clock, max_lanes); - mode_rate =intel_dp_link_required (mode->clock, min_bpp); + mode_rate =intel_dp_link_required (max_link_clock, max_lanes, + mode->clock, mode->hdisplay, +fxp_q4_from_int (min_bpp),0 );/* * TODO:
Signature · 1 line
2.49.1
Re: [PATCH 08/50] drm/i915/dp: Use the effective data rate for DP BW calculation
Quoted 148 lines · Imre Deak
Use
intel_dp_effective_data_rate()to calculate the required link BW for eDP, DP-SST and MST links. This ensures that the BW is calculated the same way for all DP output types, during mode validation as well as during state computation. This approach also allows for accounting with BW overheads due to the SSC, DSC, FEC being enabled on a link, as well as due to the MST symbol alignment on the link. Accounting for these overheads will be added by follow-up changes.This way also computes the stream BW on a UHBR link correctly, using the corresponding symbol size to effective data size ratio (i.e. ~97% link BW utilization for UHBR vs. only ~80% for non-UHBR).
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 40 +++++++++++-------- drivers/gpu/drm/i915/display/intel_dp.h | 4 +- .../drm/i915/display/intel_dp_link_training.c | 4 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +- 4 files changed, 33 insertions(+), 19 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +24
-16@@ -453,15 +453,15 @@ int intel_dp_link_bw_overhead(int link_clock, int lane_count, int hdisplay,/* * The required data bandwidth for a mode with given pixel clock and bpp. This * is the required net bandwidth independent of the data bandwidth efficiency. -* -* TODO: check if callers of this functions should use -* intel_dp_effective_data_rate() instead. */ -int -intel_dp_link_required (int pixel_clock,int bpp) +int intel_dp_link_required (int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int link_bpp_x16,unsigned long bw_overhead_flags) { -/* pixel_clock is in kHz, divide bpp by 8 for bit to Byte conversion */ -return DIV_ROUND_UP (pixel_clock * bpp,8 ); +int bw_overhead =intel_dp_link_bw_overhead (link_clock, lane_count, mode_hdisplay, +0 , link_bpp_x16, bw_overhead_flags); + +return intel_dp_effective_data_rate (mode_clock, link_bpp_x16, bw_overhead); }/** @@ -1531,7 +1531,9 @@ intel_dp_mode_valid(struct drm_connector *_connector, max_rate =intel_dp_max_link_data_rate (intel_dp, max_link_clock, max_lanes); link_bpp_x16 =intel_dp_mode_min_link_bpp_x16 (connector, mode); - mode_rate =intel_dp_link_required (target_clock,fxp_q4_to_int_roundup (link_bpp_x16)); + mode_rate =intel_dp_link_required (max_link_clock, max_lanes, + target_clock, mode->hdisplay, + link_bpp_x16,0 );if (intel_dp_has_dsc (connector)) {int pipe_bpp;@@ -1838,7 +1840,7 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp, const struct link_config_limits *limits) {int bpp, i, lane_count, clock =intel_dp_mode_clock (pipe_config, conn_state); -int mode_rate, link_rate, link_avail; +int link_rate, link_avail; for (bpp = fxp_q4_to_int(limits->link.max_bpp_x16); bpp >= fxp_q4_to_int(limits->link.min_bpp_x16);@@ -1846,8 +1848,6 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,int link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, bpp); - mode_rate =intel_dp_link_required (clock,fxp_q4_to_int_roundup (link_bpp_x16)); -for (i =0 ; i < intel_dp->num_common_rates; i++) { link_rate =intel_dp_common_rate (intel_dp, i); if (link_rate < limits->min_rate ||@@ -1857,11 +1857,17 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,for (lane_count = limits->min_lane_count; lane_count <= limits->max_lane_count; lane_count <<=1 ) { +const struct drm_display_mode *adjusted_mode = + &pipe_config->hw.adjusted_mode; +int mode_rate = +intel_dp_link_required (link_rate, lane_count, + clock, adjusted_mode->hdisplay, + link_bpp_x16,0 ); + link_avail =intel_dp_max_link_data_rate (intel_dp, link_rate, lane_count); -if (mode_rate <= link_avail) { pipe_config->lane_count = lane_count; pipe_config->pipe_bpp = bpp;@@ -2724,11 +2730,13 @@ int intel_dp_config_required_rate(const struct intel_crtc_state *crtc_state) {const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; -int bpp = crtc_state->dsc.compression_enable ? -fxp_q4_to_int_roundup (crtc_state->dsc.compressed_bpp_x16) : - crtc_state->pipe_bpp; +int link_bpp_x16 = crtc_state->dsc.compression_enable ? + crtc_state->dsc.compressed_bpp_x16 : +fxp_q4_from_int (crtc_state->pipe_bpp); -return intel_dp_link_required (adjusted_mode->crtc_clock, bpp); +return intel_dp_link_required (crtc_state->port_clock, crtc_state->lane_count, + adjusted_mode->crtc_clock, adjusted_mode->hdisplay, + link_bpp_x16,0 ); } bool intel_dp_joiner_needs_dsc(struct intel_display *display,drivers/gpu/drm/i915/display/intel_dp.h +3
-1@@ -119,7 +119,9 @@ bool intel_dp_source_supports_tps4(struct intel_display *display);int intel_dp_link_bw_overhead (int link_clock,int lane_count,int hdisplay,int dsc_slice_count,int bpp_x16,unsigned long flags); -int intel_dp_link_required (int pixel_clock,int bpp); +int intel_dp_link_required (int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int link_bpp_x16,unsigned long bw_overhead_flags);int intel_dp_effective_data_rate (int pixel_clock,int bpp_x16,int bw_overhead); int intel_dp_max_link_data_rate(struct intel_dp *intel_dp,drivers/gpu/drm/i915/display/intel_dp_link_training.c +3
-1@@ -1195,7 +1195,9 @@ static bool intel_dp_can_link_train_fallback_for_edp(struct intel_dp *intel_dp,intel_panel_preferred_fixed_mode (intel_dp->attached_connector);int mode_rate, max_rate; - mode_rate =intel_dp_link_required (fixed_mode->clock,18 ); + mode_rate =intel_dp_link_required (link_rate, lane_count, + fixed_mode->clock, fixed_mode->hdisplay, +fxp_q4_from_int (18 ),0 ); max_rate =intel_dp_max_link_data_rate (intel_dp, link_rate, lane_count);if (mode_rate > max_rate)return false;drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0
drivers/gpu/drm/i915/display/intel_dp_mst.c mst_connector_mode_valid_ctx(struct drm_connector *_connector, · line 1497
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +3
-1@@ -1489,7 +1489,9 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector, max_rate =intel_dp_max_link_data_rate (intel_dp, max_link_clock, max_lanes); - mode_rate =intel_dp_link_required (mode->clock, min_bpp); + mode_rate =intel_dp_link_required (max_link_clock, max_lanes, + mode->clock, mode->hdisplay, +fxp_q4_from_int (min_bpp),0 );/* * TODO:
--
Cheers,
Luca.
PATCH 9/50 drm/i915/dp: Use the effective data rate for DP compressed BW calculation
In reply to Imre DeakUse intel_dp_effective_data_rate() to calculate the required link BW for compressed streams on non-UHBR DP-SST links. This ensures that the BW is calculated the same way for all DP output types and DSC/non-DSC modes, during mode validation as well as during state computation.
This approach also allows for accounting with BW overhead due to DSC, FEC being enabled on a link. Acounting for these will be added by follow-up changes.
--- drivers/gpu/drm/i915/display/intel_dp.c | 27 +++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +16 -11
@@ -2025,15 +2025,19 @@ static bool intel_dp_dsc_supports_format(const struct intel_connector *connectorreturn drm_dp_dsc_sink_supports_format (connector->dp.dsc_dpcd, sink_dsc_format); } -static bool is_bw_sufficient_for_dsc_config (int dsc_bpp_x16,u32 link_clock, -u32 lane_count,u32 mode_clock, -enum intel_output_format output_format, -int timeslots) +static bool is_bw_sufficient_for_dsc_config (struct intel_dp *intel_dp, +int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int dsc_slice_count,int link_bpp_x16, +unsigned long bw_overhead_flags) { -u32 available_bw, required_bw; +int available_bw; +int required_bw; - available_bw = (link_clock * lane_count * timeslots *16 ) /8 ; - required_bw = dsc_bpp_x16 * (intel_dp_mode_to_fec_clock (mode_clock)); + available_bw =intel_dp_max_link_data_rate (intel_dp, link_clock, lane_count); + required_bw =intel_dp_link_required (link_clock, lane_count, + mode_clock, mode_hdisplay, + link_bpp_x16, bw_overhead_flags);return available_bw >= required_bw; }
@@ -2081,11 +2085,12 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,if (ret)continue ; }else { -if (!is_bw_sufficient_for_dsc_config (dsc_bpp_x16, link_rate, - lane_count, +if (!is_bw_sufficient_for_dsc_config (intel_dp, + link_rate, lane_count, adjusted_mode->crtc_clock, - pipe_config->output_format, - timeslots)) + adjusted_mode->hdisplay, + pipe_config->dsc.slice_count, + dsc_bpp_x16,0 ))continue ; }
Signature · 1 line
2.49.1
Re: [PATCH 09/50] drm/i915/dp: Use the effective data rate for DP compressed BW calculation
Quoted 52 lines · Imre Deak
Use
intel_dp_effective_data_rate()to calculate the required link BW for compressed streams on non-UHBR DP-SST links. This ensures that the BW is calculated the same way for all DP output types and DSC/non-DSC modes, during mode validation as well as during state computation.This approach also allows for accounting with BW overhead due to DSC, FEC being enabled on a link. Acounting for these will be added by follow-up changes.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 27 +++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +12
-9@@ -2025,15 +2025,19 @@ static bool intel_dp_dsc_supports_format(const struct intel_connector *connectorreturn drm_dp_dsc_sink_supports_format (connector->dp.dsc_dpcd, sink_dsc_format); } -static bool is_bw_sufficient_for_dsc_config (int dsc_bpp_x16,u32 link_clock, -u32 lane_count,u32 mode_clock, -enum intel_output_format output_format, -int timeslots) +static bool is_bw_sufficient_for_dsc_config (struct intel_dp *intel_dp, +int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int dsc_slice_count,int link_bpp_x16, +unsigned long bw_overhead_flags) { -u32 available_bw, required_bw; +int available_bw; +int required_bw; - available_bw = (link_clock * lane_count * timeslots *16 ) /8 ; - required_bw = dsc_bpp_x16 * (intel_dp_mode_to_fec_clock (mode_clock)); + available_bw =intel_dp_max_link_data_rate (intel_dp, link_clock, lane_count); + required_bw =intel_dp_link_required (link_clock, lane_count, + mode_clock, mode_hdisplay, + link_bpp_x16, bw_overhead_flags);return available_bw >= required_bw; }@@ -2081,11 +2085,12 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,if (ret)continue ; } else { - if (!is_bw_sufficient_for_dsc_config(dsc_bpp_x16, link_rate, - lane_count, + if (!is_bw_sufficient_for_dsc_config(intel_dp,
drivers/gpu/drm/i915/display/intel_dp.c static int dsc_compute_link_config(struct intel_dp *intel_dp, · line 2096
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-2+ link_rate, lane_count, adjusted_mode->crtc_clock, - pipe_config->output_format, - timeslots)) + adjusted_mode->hdisplay, + pipe_config->dsc.slice_count, + dsc_bpp_x16, 0)) continue; }
--
Cheers,
Luca.
PATCH 9/50 drm/i915/dp: Use the effective data rate for DP compressed BW calculation
In reply to Imre DeakUse intel_dp_effective_data_rate() to calculate the required link BW for compressed streams on non-UHBR DP-SST links. This ensures that the BW is calculated the same way for all DP output types and DSC/non-DSC modes, during mode validation as well as during state computation.
This approach also allows for accounting with BW overhead due to DSC, FEC being enabled on a link. Acounting for these will be added by follow-up changes.
--- drivers/gpu/drm/i915/display/intel_dp.c | 27 +++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +16 -11
@@ -2025,15 +2025,19 @@ static bool intel_dp_dsc_supports_format(const struct intel_connector *connectorreturn drm_dp_dsc_sink_supports_format (connector->dp.dsc_dpcd, sink_dsc_format); } -static bool is_bw_sufficient_for_dsc_config (int dsc_bpp_x16,u32 link_clock, -u32 lane_count,u32 mode_clock, -enum intel_output_format output_format, -int timeslots) +static bool is_bw_sufficient_for_dsc_config (struct intel_dp *intel_dp, +int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int dsc_slice_count,int link_bpp_x16, +unsigned long bw_overhead_flags) { -u32 available_bw, required_bw; +int available_bw; +int required_bw; - available_bw = (link_clock * lane_count * timeslots *16 ) /8 ; - required_bw = dsc_bpp_x16 * (intel_dp_mode_to_fec_clock (mode_clock)); + available_bw =intel_dp_max_link_data_rate (intel_dp, link_clock, lane_count); + required_bw =intel_dp_link_required (link_clock, lane_count, + mode_clock, mode_hdisplay, + link_bpp_x16, bw_overhead_flags);return available_bw >= required_bw; }
@@ -2081,11 +2085,12 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,if (ret)continue ; }else { -if (!is_bw_sufficient_for_dsc_config (dsc_bpp_x16, link_rate, - lane_count, +if (!is_bw_sufficient_for_dsc_config (intel_dp, + link_rate, lane_count, adjusted_mode->crtc_clock, - pipe_config->output_format, - timeslots)) + adjusted_mode->hdisplay, + pipe_config->dsc.slice_count, + dsc_bpp_x16,0 ))continue ; }
Signature · 1 line
2.49.1
Re: [CI 09/50] drm/i915/dp: Use the effective data rate for DP compressed BW calculation
Quoted 12 lines · Imre Deak
Use
intel_dp_effective_data_rate()to calculate the required link BW for
compressed streams on non-UHBR DP-SST links. This ensures that the BW is
calculated the same way for all DP output types and DSC/non-DSC modes,
during mode validation as well as during state computation.This approach also allows for accounting with BW overhead due to DSC, FEC being enabled on a link. Acounting for these will be added by follow-up changes.
Quoted 6 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 27 +++++++++++++++-------- --1 file changed, 16 insertions(+), 11 deletions(-)
Quoted 75 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2025,15 +2025,19 @@ static boolintel_dp_dsc_supports_format(const struct
intel_connector*connector return drm_dp_dsc_sink_supports_format(connector-Quoted 1 line
dp.dsc_dpcd,
sink_dsc_format);}
-static bool is_bw_sufficient_for_dsc_config(intdsc_bpp_x16, u32link_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- u32 lane_count, u32
mode_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- enum intel_output_format
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-1- int timeslots) +static bool is_bw_sufficient_for_dsc_config(struct intel_dp
*intel_dp,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int link_clock, int
lane_count,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int mode_clock, int
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int dsc_slice_count, int
link_bpp_x16,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ unsigned long
bw_overhead_flags)
{drivers/gpu/drm/i915/display/intel_dp.c +2
-1-u32 available_bw, required_bw; +int available_bw; +int required_bw;drivers/gpu/drm/i915/display/intel_dp.c +0
-1- available_bw = (link_clock * lane_count * timeslots * 16) /8;
drivers/gpu/drm/i915/display/intel_dp.c +0
-1- required_bw = dsc_bpp_x16 *(
intel_dp_mode_to_fec_clock(mode_clock));drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ available_bw = intel_dp_max_link_data_rate(intel_dp,
link_clock,lane_count);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ required_bw = intel_dp_link_required(link_clock, lane_count, + mode_clock,
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ link_bpp_x16,
bw_overhead_flags);
returnavailable_bw>=required_bw;
}drivers/gpu/drm/i915/display/intel_dp.c +2
-2@@ -2081,11 +2085,12 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp, if (ret) continue; } else { - if (!is_bw_sufficient_for_dsc_config(dsc_bpp_x16, link_rate, - lane_count, + if (!is_bw_sufficient_for_dsc_config(intel_dp, + link_rate, lane_count,
adjusted_mode->crtc_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
pipe_config->output_format,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-timeslots))
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
adjusted_mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
pipe_config->dsc.slice_count,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
dsc_bpp_x16, 0))
continue;
}
PATCH 10/50 drm/i915/dp: Account with MST, SSC BW overhead for uncompressed DP-MST stream BW
In reply to Imre DeakOn MST links the symbol alignment and SSC have a BW overhead, which should be accounted for when calculating the required stream BW, do so during mode validation for an uncompressed stream.
--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +4 -1
@@ -1458,6 +1458,8 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,const int min_bpp =18 ;int max_dotclk = display->cdclk.max_dotclk_freq;int max_rate, mode_rate, max_lanes, max_link_clock; +unsigned long bw_overhead_flags = +DRM_DP_BW_OVERHEAD_MST |DRM_DP_BW_OVERHEAD_SSC_REF_CLK ;int ret;bool dsc = false;u16 dsc_max_compressed_bpp =0 ;
@@ -1491,7 +1493,8 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector, max_link_clock, max_lanes); mode_rate =intel_dp_link_required (max_link_clock, max_lanes, mode->clock, mode->hdisplay, -fxp_q4_from_int (min_bpp),0 ); +fxp_q4_from_int (min_bpp), + bw_overhead_flags);/* * TODO:
Signature · 1 line
2.49.1
Re: [PATCH 10/50] drm/i915/dp: Account with MST, SSC BW overhead for uncompressed DP-MST stream BW
Quoted 23 lines · Imre Deak
On MST links the symbol alignment and SSC have a BW overhead, which should be accounted for when calculating the required stream BW, do so during mode validation for an uncompressed stream.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-0@@ -1458,6 +1458,8 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,const int min_bpp =18 ;int max_dotclk = display->cdclk.max_dotclk_freq;int max_rate, mode_rate, max_lanes, max_link_clock; +unsigned long bw_overhead_flags = +DRM_DP_BW_OVERHEAD_MST |DRM_DP_BW_OVERHEAD_SSC_REF_CLK ;int ret;bool dsc = false;u16 dsc_max_compressed_bpp =0 ;
drivers/gpu/drm/i915/display/intel_dp_mst.c mst_connector_mode_valid_ctx(struct drm_connector *_connector, · line 1500
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-1@@ -1491,7 +1493,8 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector, max_link_clock, max_lanes); mode_rate =intel_dp_link_required (max_link_clock, max_lanes, mode->clock, mode->hdisplay, -fxp_q4_from_int (min_bpp),0 ); +fxp_q4_from_int (min_bpp), + bw_overhead_flags);/* * TODO:
--
Cheers,
Luca.
PATCH 11/50 drm/i915/dp: Account with DSC BW overhead for compressed DP-SST stream BW
In reply to Imre DeakA DSC compressed stream requires FEC (except for eDP), which has a BW overhead on non-UHBR links that must be accounted for explicitly. Do that during computing the required BW.
Note that the overhead doesn't need to be accounted for on UHBR links where FEC is always enabled and so the corresponding overhead is part of the channel coding efficiency instead (i.e. the overhead is part of the available vs. the required BW).
--- drivers/gpu/drm/i915/display/intel_dp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp.c +5 -1
@@ -2085,12 +2085,16 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,if (ret)continue ; }else { +unsigned long bw_overhead_flags = + pipe_config->fec_enable ?DRM_DP_BW_OVERHEAD_FEC :0 ; +if (!is_bw_sufficient_for_dsc_config (intel_dp, link_rate, lane_count, adjusted_mode->crtc_clock, adjusted_mode->hdisplay, pipe_config->dsc.slice_count, - dsc_bpp_x16,0 )) + dsc_bpp_x16, + bw_overhead_flags))continue ; }
Signature · 1 line
2.49.1
Re: [PATCH 11/50] drm/i915/dp: Account with DSC BW overhead for compressed DP-SST stream BW
Quoted 26 lines · Imre Deak
A DSC compressed stream requires FEC (except for eDP), which has a BW overhead on non-UHBR links that must be accounted for explicitly. Do that during computing the required BW.
Note that the overhead doesn't need to be accounted for on UHBR links where FEC is always enabled and so the corresponding overhead is part of the channel coding efficiency instead (i.e. the overhead is part of the available vs. the required BW).
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp.c +3
-0@@ -2085,12 +2085,16 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,if (ret)continue ; } else { +unsigned long bw_overhead_flags = + pipe_config->fec_enable ?DRM_DP_BW_OVERHEAD_FEC :0 ; + if (!is_bw_sufficient_for_dsc_config(intel_dp,
drivers/gpu/drm/i915/display/intel_dp.c static int dsc_compute_link_config(struct intel_dp *intel_dp, · line 2100
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-1link_rate, lane_count, adjusted_mode->crtc_clock, adjusted_mode->hdisplay, pipe_config->dsc.slice_count, - dsc_bpp_x16, 0)) + dsc_bpp_x16, + bw_overhead_flags)) continue; }
--
Cheers,
Luca.
PATCH 12/50 drm/i915/dp: Account with pipe joiner max compressed BPP limit for DP-MST and eDP
In reply to Imre DeakThe pipe joiner maximum compressed BPP must be limited based on the pipe joiner memory size and BW, do that for all DP outputs by adjusting the max compressed BPP value already in intel_dp_compute_config_link_bpp_limits() (which is used by all output types).
This way the BPP doesn't need to be adjusted in dsc_compute_compressed_bpp() (called for DP-SST after the above limits were computed already), so remove the adjustment from there.
--- drivers/gpu/drm/i915/display/intel_dp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +8 -8
@@ -2245,19 +2245,12 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, {struct intel_display *display =to_intel_display (intel_dp);const struct intel_connector *connector =to_intel_connector (conn_state->connector); -const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;int min_bpp_x16, max_bpp_x16, bpp_step_x16; -int dsc_joiner_max_bpp; -int num_joined_pipes =intel_crtc_num_joined_pipes (pipe_config);int link_bpp_x16;int bpp_x16;int ret; - dsc_joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, adjusted_mode->crtc_clock, - adjusted_mode->hdisplay, - num_joined_pipes); - max_bpp_x16 =min (fxp_q4_from_int (dsc_joiner_max_bpp), limits->link.max_bpp_x16); - + max_bpp_x16 = limits->link.max_bpp_x16; bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector);/* Compressed BPP should be less than the Input DSC bpp */
@@ -2613,6 +2606,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,int dsc_src_min_bpp, dsc_sink_min_bpp, dsc_min_bpp;int dsc_src_max_bpp, dsc_sink_max_bpp, dsc_max_bpp;int throughput_max_bpp_x16; +int joiner_max_bpp; dsc_src_min_bpp =intel_dp_dsc_min_src_compressed_bpp (); dsc_sink_min_bpp =intel_dp_dsc_sink_min_compressed_bpp (crtc_state);
@@ -2620,11 +2614,17 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, limits->link.min_bpp_x16 =fxp_q4_from_int (dsc_min_bpp); dsc_src_max_bpp =dsc_src_max_compressed_bpp (intel_dp); + joiner_max_bpp = +get_max_compressed_bpp_with_joiner (display, + adjusted_mode->crtc_clock, + adjusted_mode->hdisplay, +intel_crtc_num_joined_pipes (crtc_state)); dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp (connector, crtc_state, limits->pipe.max_bpp /3 ); dsc_max_bpp = dsc_sink_max_bpp ?min (dsc_sink_max_bpp, dsc_src_max_bpp) : dsc_src_max_bpp; + dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp));
Signature · 1 line
2.49.1
Re: [PATCH 12/50] drm/i915/dp: Account with pipe joiner max compressed BPP limit for DP-MST and eDP
Quoted 56 lines · Imre Deak
The pipe joiner maximum compressed BPP must be limited based on the pipe joiner memory size and BW, do that for all DP outputs by adjusting the max compressed BPP value already in
intel_dp_compute_config_link_bpp_limits()(which is used by all output types).This way the BPP doesn't need to be adjusted in
dsc_compute_compressed_bpp()(called for DP-SST after the above limits were computed already), so remove the adjustment from there.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +6
-8@@ -2245,19 +2245,12 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, {struct intel_display *display =to_intel_display (intel_dp);const struct intel_connector *connector =to_intel_connector (conn_state->connector); -const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;int min_bpp_x16, max_bpp_x16, bpp_step_x16; -int dsc_joiner_max_bpp; -int num_joined_pipes =intel_crtc_num_joined_pipes (pipe_config);int link_bpp_x16;int bpp_x16;int ret; - dsc_joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, adjusted_mode->crtc_clock, - adjusted_mode->hdisplay, - num_joined_pipes); - max_bpp_x16 =min (fxp_q4_from_int (dsc_joiner_max_bpp), limits->link.max_bpp_x16); - + max_bpp_x16 = limits->link.max_bpp_x16; bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector);/* Compressed BPP should be less than the Input DSC bpp */ @@ -2613,6 +2606,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,int dsc_src_min_bpp, dsc_sink_min_bpp, dsc_min_bpp;int dsc_src_max_bpp, dsc_sink_max_bpp, dsc_max_bpp;int throughput_max_bpp_x16; +int joiner_max_bpp; dsc_src_min_bpp =intel_dp_dsc_min_src_compressed_bpp (); dsc_sink_min_bpp =intel_dp_dsc_sink_min_compressed_bpp (crtc_state);@@ -2620,11 +2614,17 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, limits->link.min_bpp_x16 =fxp_q4_from_int (dsc_min_bpp); dsc_src_max_bpp =dsc_src_max_compressed_bpp (intel_dp); + joiner_max_bpp = + get_max_compressed_bpp_with_joiner(display, + adjusted_mode->crtc_clock, + adjusted_mode->hdisplay,
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, · line 2630
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ intel_crtc_num_joined_pipes(crtc_state)); dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp (connector, crtc_state, limits->pipe.max_bpp /3 ); dsc_max_bpp = dsc_sink_max_bpp ?min (dsc_sink_max_bpp, dsc_src_max_bpp) : dsc_src_max_bpp; + dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp));
--
Cheers,
Luca.
PATCH 13/50 drm/i915/dp: Drop unused timeslots param from dsc_compute_link_config()
In reply to Imre DeakDrop the unused timeslots parameter from dsc_compute_link_config() and other functions calling it.
--- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +7 -11
@@ -2046,8 +2046,7 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state, const struct link_config_limits *limits, - int dsc_bpp_x16, - int timeslots) + int dsc_bpp_x16) { const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;int link_rate, lane_count;
@@ -2240,8 +2239,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state, const struct link_config_limits *limits, - int pipe_bpp, - int timeslots) + int pipe_bpp) { struct intel_display *display = to_intel_display(intel_dp);const struct intel_connector *connector =to_intel_connector (conn_state->connector);
@@ -2269,8 +2267,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, pipe_config, conn_state, limits, - bpp_x16, - timeslots); + bpp_x16);if (ret ==0 ) { pipe_config->dsc.compressed_bpp_x16 = bpp_x16; if (intel_dp->force_dsc_fractional_bpp_en &&
@@ -2327,8 +2324,7 @@ int intel_dp_force_dsc_pipe_bpp(struct intel_dp *intel_dp,static int intel_dp_dsc_compute_pipe_bpp (struct intel_dp *intel_dp,struct intel_crtc_state *pipe_config,struct drm_connector_state *conn_state, -const struct link_config_limits *limits, -int timeslots) +const struct link_config_limits *limits) {const struct intel_connector *connector =to_intel_connector (conn_state->connector);
@@ -2340,7 +2336,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,if (forced_bpp) { ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, forced_bpp, timeslots); + limits, forced_bpp);if (ret ==0 ) { pipe_config->pipe_bpp = forced_bpp;return 0 ;
@@ -2358,7 +2354,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,continue ; ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, pipe_bpp, timeslots); + limits, pipe_bpp);if (ret ==0 ) { pipe_config->pipe_bpp = pipe_bpp;return 0 ;
@@ -2469,7 +2465,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, conn_state, limits); else ret =intel_dp_dsc_compute_pipe_bpp (intel_dp, pipe_config, - conn_state, limits, timeslots); + conn_state, limits);if (ret) {drm_dbg_kms (display->drm,"No Valid pipe bpp for given mode ret = %d\n" , ret);
Signature · 1 line
2.49.1
Re: [PATCH 13/50] drm/i915/dp: Drop unused timeslots param from dsc_compute_link_config()
Quoted 71 lines · Imre Deak
Drop the unused timeslots parameter from
dsc_compute_link_config()and other functions calling it.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +6
-10@@ -2046,8 +2046,7 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state, const struct link_config_limits *limits, - int dsc_bpp_x16, - int timeslots) + int dsc_bpp_x16) { const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;int link_rate, lane_count;@@ -2240,8 +2239,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state, const struct link_config_limits *limits, - int pipe_bpp, - int timeslots) + int pipe_bpp) { struct intel_display *display = to_intel_display(intel_dp);const struct intel_connector *connector =to_intel_connector (conn_state->connector);@@ -2269,8 +2267,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, pipe_config, conn_state, limits, - bpp_x16, - timeslots); + bpp_x16);if (ret ==0 ) { pipe_config->dsc.compressed_bpp_x16 = bpp_x16; if (intel_dp->force_dsc_fractional_bpp_en &&@@ -2327,8 +2324,7 @@ int intel_dp_force_dsc_pipe_bpp(struct intel_dp *intel_dp,static int intel_dp_dsc_compute_pipe_bpp (struct intel_dp *intel_dp,struct intel_crtc_state *pipe_config,struct drm_connector_state *conn_state, -const struct link_config_limits *limits, -int timeslots) +const struct link_config_limits *limits) {const struct intel_connector *connector =to_intel_connector (conn_state->connector);@@ -2340,7 +2336,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,if (forced_bpp) { ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, forced_bpp, timeslots); + limits, forced_bpp);if (ret ==0 ) { pipe_config->pipe_bpp = forced_bpp;return 0 ;@@ -2358,7 +2354,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,continue ; ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, pipe_bpp, timeslots); + limits, pipe_bpp);if (ret ==0 ) { pipe_config->pipe_bpp = pipe_bpp;return 0 ;
drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, · line 2471
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -2469,7 +2465,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, conn_state, limits); else ret =intel_dp_dsc_compute_pipe_bpp (intel_dp, pipe_config, - conn_state, limits, timeslots); + conn_state, limits);if (ret) {drm_dbg_kms (display->drm,"No Valid pipe bpp for given mode ret = %d\n" , ret);
--
Cheers,
Luca.
PATCH 14/50 drm/i915/dp: Factor out align_max_sink_dsc_input_bpp()
In reply to Imre DeakFactor out align_max_sink_dsc_input_bpp(), also used later for computing the maximum DSC input BPP limit.
--- drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +18 -10
@@ -1893,12 +1893,27 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display)return intel_dp_dsc_min_src_input_bpc (); } +static int align_max_sink_dsc_input_bpp (const struct intel_connector *connector, +int max_pipe_bpp) +{ +u8 dsc_bpc[3 ]; +int num_bpc; +int i; + + num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, + dsc_bpc); +for (i =0 ; i < num_bpc; i++) { +if (dsc_bpc[i] *3 <= max_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +int intel_dp_dsc_compute_max_bpp (const struct intel_connector *connector,u8 max_req_bpc) {struct intel_display *display =to_intel_display (connector); -int i, num_bpc; -u8 dsc_bpc[3 ] = {};int dsc_max_bpc; dsc_max_bpc =intel_dp_dsc_max_src_input_bpc (display);
@@ -1908,14 +1923,7 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector, dsc_max_bpc =min (dsc_max_bpc, max_req_bpc); - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, - dsc_bpc); -for (i =0 ; i < num_bpc; i++) { -if (dsc_max_bpc >= dsc_bpc[i]) -return dsc_bpc[i] *3 ; - } - -return 0 ; +return align_max_sink_dsc_input_bpp (connector, dsc_max_bpc *3 ); }static int intel_dp_source_dsc_version_minor (struct intel_display *display)
Signature · 1 line
2.49.1
Re: [PATCH 14/50] drm/i915/dp: Factor out align_max_sink_dsc_input_bpp()
Quoted 10 lines · Imre Deak
Factor out
align_max_sink_dsc_input_bpp(), also used later for computing
the maximum DSC input BPP limit.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++------- --1 file changed, 18 insertions(+), 10 deletions(-)
Quoted 59 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1893,12 +1893,27 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display) return intel_dp_dsc_min_src_input_bpc(); }
+static int align_max_sink_dsc_input_bpp(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +7
-0+ int max_pipe_bpp) +{ +u8 dsc_bpc[3 ]; +int num_bpc; +int i; + + num_bpc = drm_dp_dsc_sink_supported_input_bpcs(connector-Quoted 1 line
dp.dsc_dpcd,
drivers/gpu/drm/i915/display/intel_dp.c +9
-0+ dsc_bpc); +for (i =0 ; i < num_bpc; i++) { +if (dsc_bpc[i] *3 <= max_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +int intel_dp_dsc_compute_max_bpp(const struct
intel_connector*connector,
u8max_req_bpc)
{
structintel_display*display =to_intel_display(connector);drivers/gpu/drm/i915/display/intel_dp.c +0
-2-int i, num_bpc; -u8 dsc_bpc[3 ] = {};int
dsc_max_bpc;
dsc_max_bpc=intel_dp_dsc_max_src_input_bpc(display);drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1908,14 +1923,7 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector,
dsc_max_bpc=min(dsc_max_bpc, max_req_bpc);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- num_bpc = drm_dp_dsc_sink_supported_input_bpcs(connector-Quoted 1 line
dp.dsc_dpcd,
drivers/gpu/drm/i915/display/intel_dp.c +1
-7- dsc_bpc); -for (i =0 ; i < num_bpc; i++) { -if (dsc_max_bpc >= dsc_bpc[i]) -return dsc_bpc[i] *3 ; - } - -return 0 ; + return align_max_sink_dsc_input_bpp(connector, dsc_max_bpc *3);
}
static intintel_dp_source_dsc_version_minor(struct intel_display *display)
Re: [PATCH 14/50] drm/i915/dp: Factor out align_max_sink_dsc_input_bpp()
In reply to Imre DeakQuoted 13 lines · Imre Deak
Factor out
align_max_sink_dsc_input_bpp(), also used later for computing the maximum DSC input BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_max_src_input_bpc(struct intel_display *display) · line 1899
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-0@@ -1893,12 +1893,27 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display)return intel_dp_dsc_min_src_input_bpc (); } +static int align_max_sink_dsc_input_bpp (const struct intel_connector *connector, +int max_pipe_bpp) +{ +u8 dsc_bpc[3 ];
I think it's safer to use the '= {}' we had before, because that zeroes the array, so in case of any stack leaks, you won't leak aleatory parts of the memory. In this case it's only 3 bytes, so hardly anything important could leak, but anyway.
Also, since this is 3 bytes long, it's theoretically better to have it at the end of the stack declarations.
Quoted 38 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-10+int num_bpc; +int i; + + num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, + dsc_bpc); +for (i =0 ; i < num_bpc; i++) { +if (dsc_bpc[i] *3 <= max_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +int intel_dp_dsc_compute_max_bpp (const struct intel_connector *connector,u8 max_req_bpc) {struct intel_display *display =to_intel_display (connector); -int i, num_bpc; -u8 dsc_bpc[3 ] = {};int dsc_max_bpc; dsc_max_bpc =intel_dp_dsc_max_src_input_bpc (display);@@ -1908,14 +1923,7 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector, dsc_max_bpc =min (dsc_max_bpc, max_req_bpc); - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, - dsc_bpc); -for (i =0 ; i < num_bpc; i++) { -if (dsc_max_bpc >= dsc_bpc[i]) -return dsc_bpc[i] *3 ; - } - -return 0 ; +return align_max_sink_dsc_input_bpp (connector, dsc_max_bpc *3 ); }static int intel_dp_source_dsc_version_minor (struct intel_display *display)
Re: [PATCH 14/50] drm/i915/dp: Factor out align_max_sink_dsc_input_bpp()
Quoted 17 lines · Luca Coelho
Quoted 16 lines · Imre Deak
Factor out
align_max_sink_dsc_input_bpp(), also used later for computing the maximum DSC input BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1893,12 +1893,27 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display)return intel_dp_dsc_min_src_input_bpc (); }
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_max_src_input_bpc(struct intel_display *display) · line 1899
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+static int align_max_sink_dsc_input_bpp (const struct intel_connector *connector, +int max_pipe_bpp) +{ +u8 dsc_bpc[3 ];I think it's safer to use the '= {}' we had before, because that zeroes the array, so in case of any stack leaks, you won't leak aleatory parts of the memory. In this case it's only 3 bytes, so hardly anything important could leak, but anyway.
As for any other variable I don't see any reason for initializing it, if it will be initialized before its first use. It will be initialized before its first use by drm_dp_dsc_sink_supported_input_bpcs().
Quoted 2 lines
Also, since this is 3 bytes long, it's theoretically better to have it at the end of the stack declarations.
The compiler is free to reorder the allocation order on the stack and is expected to that for optimal alignment.
Quoted 38 lines
Quoted 38 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-10+int num_bpc; +int i; + + num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, + dsc_bpc); +for (i =0 ; i < num_bpc; i++) { +if (dsc_bpc[i] *3 <= max_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +int intel_dp_dsc_compute_max_bpp (const struct intel_connector *connector,u8 max_req_bpc) {struct intel_display *display =to_intel_display (connector); -int i, num_bpc; -u8 dsc_bpc[3 ] = {};int dsc_max_bpc; dsc_max_bpc =intel_dp_dsc_max_src_input_bpc (display);@@ -1908,14 +1923,7 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector, dsc_max_bpc =min (dsc_max_bpc, max_req_bpc); - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, - dsc_bpc); -for (i =0 ; i < num_bpc; i++) { -if (dsc_max_bpc >= dsc_bpc[i]) -return dsc_bpc[i] *3 ; - } - -return 0 ; +return align_max_sink_dsc_input_bpp (connector, dsc_max_bpc *3 ); }static int intel_dp_source_dsc_version_minor (struct intel_display *display)
Luca Coelho
Reviewed-byRe: [PATCH 14/50] drm/i915/dp: Factor out align_max_sink_dsc_input_bpp()
Quoted 28 lines · Imre Deak
Quoted 17 lines · Luca Coelho
Quoted 16 lines · Imre Deak
Factor out
align_max_sink_dsc_input_bpp(), also used later for computing the maximum DSC input BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1893,12 +1893,27 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display)return intel_dp_dsc_min_src_input_bpc (); }Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_max_src_input_bpc(struct intel_display *display) · line 1899
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+static int align_max_sink_dsc_input_bpp (const struct intel_connector *connector, +int max_pipe_bpp) +{ +u8 dsc_bpc[3 ];I think it's safer to use the '= {}' we had before, because that zeroes the array, so in case of any stack leaks, you won't leak aleatory parts of the memory. In this case it's only 3 bytes, so hardly anything important could leak, but anyway.
Quoted 3 lines
As for any other variable I don't see any reason for initializing it, if it will be initialized before its first use. It will be initialized before its first use by
drm_dp_dsc_sink_supported_input_bpcs().
Fair enough. Security here is probably not so important, and as I said, it's only 3 bytes, but in wifi we once had the activity of pre- initializing all arrays like this for security reasons. Your call.
Quoted 5 lines
Quoted 2 lines
Also, since this is 3 bytes long, it's theoretically better to have it at the end of the stack declarations.
The compiler is free to reorder the allocation order on the stack and is expected to that for optimal alignment.
Of course the compiler will do this sort of things, but it's just better practice IMHO to keeps organized in some way. If you had said that it was in alphabetical order (it isn't), then it would probably satisfy my OCD. lol
In any case, these were just nitpicks, so it's up to you.
--
Cheers,
Luca.
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-10+int num_bpc; +int i; + + num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, + dsc_bpc); +for (i =0 ; i < num_bpc; i++) { +if (dsc_bpc[i] *3 <= max_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +int intel_dp_dsc_compute_max_bpp (const struct intel_connector *connector,u8 max_req_bpc) {struct intel_display *display =to_intel_display (connector); -int i, num_bpc; -u8 dsc_bpc[3 ] = {};int dsc_max_bpc; dsc_max_bpc =intel_dp_dsc_max_src_input_bpc (display);@@ -1908,14 +1923,7 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector, dsc_max_bpc =min (dsc_max_bpc, max_req_bpc); - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, - dsc_bpc); -for (i =0 ; i < num_bpc; i++) { -if (dsc_max_bpc >= dsc_bpc[i]) -return dsc_bpc[i] *3 ; - } - -return 0 ; +return align_max_sink_dsc_input_bpp (connector, dsc_max_bpc *3 ); }static int intel_dp_source_dsc_version_minor (struct intel_display *display)
Re: [PATCH 14/50] drm/i915/dp: Factor out align_max_sink_dsc_input_bpp()
Quoted 29 lines · Luca Coelho
Quoted 28 lines · Imre Deak
Quoted 26 lines · Luca Coelho
Quoted 13 lines · Imre Deak
Factor out
align_max_sink_dsc_input_bpp(), also used later for computing the maximum DSC input BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_max_src_input_bpc(struct intel_display *display) · line 1899
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-0@@ -1893,12 +1893,27 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display)return intel_dp_dsc_min_src_input_bpc (); } +static int align_max_sink_dsc_input_bpp (const struct intel_connector *connector, +int max_pipe_bpp) +{ +u8 dsc_bpc[3 ];I think it's safer to use the '= {}' we had before, because that zeroes the array, so in case of any stack leaks, you won't leak aleatory parts of the memory. In this case it's only 3 bytes, so hardly anything important could leak, but anyway.
Quoted 7 lines
Quoted 3 lines
As for any other variable I don't see any reason for initializing it, if it will be initialized before its first use. It will be initialized before its first use by
drm_dp_dsc_sink_supported_input_bpcs().Fair enough. Security here is probably not so important, and as I said, it's only 3 bytes, but in wifi we once had the activity of pre- initializing all arrays like this for security reasons. Your call.
I don't see how it is more secure. I think any valid reason to zero out variables on the stack for security reasons would need to be a guideline explained and mandated in the whole kernel ubiquitously and should not be considered as an opt-in practice. I'm not aware of such a guideline.
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines
Also, since this is 3 bytes long, it's theoretically better to have it at the end of the stack declarations.
The compiler is free to reorder the allocation order on the stack and is expected to that for optimal alignment.
Of course the compiler will do this sort of things, but it's just better practice IMHO to keeps organized in some way. If you had said that it was in alphabetical order (it isn't), then it would probably satisfy my OCD. lol
The ordering rule I follow is the readability of declarations, which is better if it's in decreasing line length order.
Quoted 48 lines
In any case, these were just nitpicks, so it's up to you.
Reviewed-by Luca Coelho <[email protected]>--
Cheers,
Luca.Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-10+int num_bpc; +int i; + + num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, + dsc_bpc); +for (i =0 ; i < num_bpc; i++) { +if (dsc_bpc[i] *3 <= max_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +int intel_dp_dsc_compute_max_bpp (const struct intel_connector *connector,u8 max_req_bpc) {struct intel_display *display =to_intel_display (connector); -int i, num_bpc; -u8 dsc_bpc[3 ] = {};int dsc_max_bpc; dsc_max_bpc =intel_dp_dsc_max_src_input_bpc (display);@@ -1908,14 +1923,7 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector, dsc_max_bpc =min (dsc_max_bpc, max_req_bpc); - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, - dsc_bpc); -for (i =0 ; i < num_bpc; i++) { -if (dsc_max_bpc >= dsc_bpc[i]) -return dsc_bpc[i] *3 ; - } - -return 0 ; +return align_max_sink_dsc_input_bpp (connector, dsc_max_bpc *3 ); }static int intel_dp_source_dsc_version_minor (struct intel_display *display)
PATCH 15/50 drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16()
In reply to Imre DeakFactor out align_max_vesa_compressed_bpp_x16(), also used later for computing the maximum DSC compressed BPP limit.
--- drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +20 -15
@@ -867,10 +867,23 @@ small_joiner_ram_size_bits(struct intel_display *display)return 6144 *8 ; } +static int align_max_vesa_compressed_bpp_x16 (int max_link_bpp_x16) +{ +int i; + +for (i =ARRAY_SIZE (valid_dsc_bpp) -1 ; i >=0 ; i--) { +int vesa_bpp_x16 =fxp_q4_from_int (valid_dsc_bpp[i]); + +if (vesa_bpp_x16 <= max_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static u32 intel_dp_dsc_nearest_valid_bpp (struct intel_display *display,u32 bpp,u32 pipe_bpp) {u32 bits_per_pixel = bpp; -int i;/* Error out if the max bpp is less than smallest allowed valid bpp */ if (bits_per_pixel < valid_dsc_bpp[0 ]) {
@@ -899,15 +912,13 @@ static u32 intel_dp_dsc_nearest_valid_bpp(struct intel_display *display, u32 bpp } bits_per_pixel =min_t (u32, bits_per_pixel,27 ); }else { +int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); +/* Find the nearest match in the array of known BPPs from VESA */ -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp) -1 ; i++) { -if (bits_per_pixel < valid_dsc_bpp[i +1 ]) -break ; - } -drm_dbg_kms (display->drm,"Set dsc bpp from %d to VESA %d\n" , - bits_per_pixel, valid_dsc_bpp[i]); + link_bpp_x16 =align_max_vesa_compressed_bpp_x16 (link_bpp_x16); - bits_per_pixel = valid_dsc_bpp[i]; +drm_WARN_ON (display->drm,fxp_q4_to_frac (link_bpp_x16)); + bits_per_pixel =fxp_q4_to_int (link_bpp_x16); }return bits_per_pixel;
@@ -2219,7 +2230,6 @@ int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector)bool intel_dp_dsc_valid_compressed_bpp (struct intel_dp *intel_dp,int bpp_x16) {struct intel_display *display =to_intel_display (intel_dp); -int i;if (DISPLAY_VER (display) >=13 ) {if (intel_dp->force_dsc_fractional_bpp_en && !fxp_q4_to_frac (bpp_x16))
@@ -2231,12 +2241,7 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16)if (fxp_q4_to_frac (bpp_x16))return false; -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { -if (fxp_q4_to_int (bpp_x16) == valid_dsc_bpp[i]) -return true; - } - -return false; +return align_max_vesa_compressed_bpp_x16 (bpp_x16) == bpp_x16; }/*
Signature · 1 line
2.49.1
Re: [PATCH 15/50] drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16()
Quoted 9 lines · Imre Deak
Factor out
align_max_vesa_compressed_bpp_x16(), also used later for computing the maximum DSC compressed BPP limit.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++++++++++++--------- --1 file changed, 20 insertions(+), 15 deletions(-)
Quoted 88 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -867,10 +867,23 @@ small_joiner_ram_size_bits(struct intel_display *display) return 6144 * 8; }drivers/gpu/drm/i915/display/intel_dp.c +6
-0+static int align_max_vesa_compressed_bpp_x16 (int max_link_bpp_x16) +{ +int i; + +for (i =ARRAY_SIZE (valid_dsc_bpp) -1 ; i >=0 ; i--) { + int vesa_bpp_x16 =
fxp_q4_from_int(valid_dsc_bpp[i]);drivers/gpu/drm/i915/display/intel_dp.c +8
-0+ +if (vesa_bpp_x16 <= max_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static u32
intel_dp_dsc_nearest_valid_bpp(struct intel_display *display, u32 bpp, u32 pipe_bpp)
{
u32bits_per_pixel= bpp;drivers/gpu/drm/i915/display/intel_dp.c +0
-1-int i;
/* Error out if the max bpp is less than smallest allowed valid bpp */
if (bits_per_pixel< valid_dsc_bpp[0]) {drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -899,15 +912,13 @@ static u32intel_dp_dsc_nearest_valid_bpp(struct
intel_display*display, u32 bpp }
bits_per_pixel=min_t(u32, bits_per_pixel, 27); } else {drivers/gpu/drm/i915/display/intel_dp.c +2
-0+int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); +/* Find the nearest match in the array of known BPPs from VESA */
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp) -1 ; i++){
drivers/gpu/drm/i915/display/intel_dp.c +0
-4-if (bits_per_pixel < valid_dsc_bpp[i +1 ]) -break ; - } - drm_dbg_kms(display->drm, "Set dsc bpp from %d toVESA %d\n",
drivers/gpu/drm/i915/display/intel_dp.c +1
-1- bits_per_pixel, valid_dsc_bpp[i]); + link_bpp_x16 =
align_max_vesa_compressed_bpp_x16(link_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +1
-1- bits_per_pixel = valid_dsc_bpp[i]; + drm_WARN_ON(display->drm,
fxp_q4_to_frac(link_bpp_x16));drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ bits_per_pixel =fxp_q4_to_int (link_bpp_x16);}
returnbits_per_pixel;drivers/gpu/drm/i915/display/intel_dp.c +0
-1@@ -2219,7 +2230,6 @@ int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector) bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp,int bpp_x16) { struct intel_display *display = to_intel_display(intel_dp); -int i;
if (DISPLAY_VER(display)>= 13) {
if (intel_dp->force_dsc_fractional_bpp_en&& !fxp_q4_to_frac(bpp_x16))drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2231,12 +2241,7 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16) if (fxp_q4_to_frac(bpp_x16)) return false;drivers/gpu/drm/i915/display/intel_dp.c +1
-6-for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { -if (fxp_q4_to_int (bpp_x16) == valid_dsc_bpp[i]) -return true; - } - -return false; + return align_max_vesa_compressed_bpp_x16(bpp_x16) ==
bpp_x16;
}
/*
Re: [PATCH 15/50] drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16()
In reply to Imre DeakQuoted 13 lines · Imre Deak
Factor out
align_max_vesa_compressed_bpp_x16(), also used later for computing the maximum DSC compressed BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c small_joiner_ram_size_bits(struct intel_display *display) · line 875
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c +6
-0@@ -867,10 +867,23 @@ small_joiner_ram_size_bits(struct intel_display *display)return 6144 *8 ; } +static int align_max_vesa_compressed_bpp_x16 (int max_link_bpp_x16) +{ +int i; + +for (i =ARRAY_SIZE (valid_dsc_bpp) -1 ; i >=0 ; i--) { +int vesa_bpp_x16 =fxp_q4_from_int (valid_dsc_bpp[i]);
Any reason why you're doing the loop from the end to the beginning, instead of the more natural from 0 to the end?
I think this is clearer and less prone to mistakes:
for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {...}Quoted 58 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-15+ +if (vesa_bpp_x16 <= max_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static u32 intel_dp_dsc_nearest_valid_bpp (struct intel_display *display,u32 bpp,u32 pipe_bpp) {u32 bits_per_pixel = bpp; -int i;/* Error out if the max bpp is less than smallest allowed valid bpp */ if (bits_per_pixel < valid_dsc_bpp[0 ]) {@@ -899,15 +912,13 @@ static u32 intel_dp_dsc_nearest_valid_bpp(struct intel_display *display, u32 bpp } bits_per_pixel =min_t (u32, bits_per_pixel,27 ); }else { +int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); +/* Find the nearest match in the array of known BPPs from VESA */ -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp) -1 ; i++) { -if (bits_per_pixel < valid_dsc_bpp[i +1 ]) -break ; - } -drm_dbg_kms (display->drm,"Set dsc bpp from %d to VESA %d\n" , - bits_per_pixel, valid_dsc_bpp[i]); + link_bpp_x16 =align_max_vesa_compressed_bpp_x16 (link_bpp_x16); - bits_per_pixel = valid_dsc_bpp[i]; +drm_WARN_ON (display->drm,fxp_q4_to_frac (link_bpp_x16)); + bits_per_pixel =fxp_q4_to_int (link_bpp_x16); }return bits_per_pixel;@@ -2219,7 +2230,6 @@ int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector)bool intel_dp_dsc_valid_compressed_bpp (struct intel_dp *intel_dp,int bpp_x16) {struct intel_display *display =to_intel_display (intel_dp); -int i;if (DISPLAY_VER (display) >=13 ) {if (intel_dp->force_dsc_fractional_bpp_en && !fxp_q4_to_frac (bpp_x16))@@ -2231,12 +2241,7 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16)if (fxp_q4_to_frac (bpp_x16))return false; -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { -if (fxp_q4_to_int (bpp_x16) == valid_dsc_bpp[i]) -return true; - } - -return false; +return align_max_vesa_compressed_bpp_x16 (bpp_x16) == bpp_x16; }/*
Re: [PATCH 15/50] drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16()
Quoted 17 lines · Luca Coelho
Quoted 16 lines · Imre Deak
Factor out
align_max_vesa_compressed_bpp_x16(), also used later for computing the maximum DSC compressed BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -867,10 +867,23 @@ small_joiner_ram_size_bits(struct intel_display *display)return 6144 *8 ; }
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c small_joiner_ram_size_bits(struct intel_display *display) · line 875
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c +6
-0+static int align_max_vesa_compressed_bpp_x16 (int max_link_bpp_x16) +{ +int i; + +for (i =ARRAY_SIZE (valid_dsc_bpp) -1 ; i >=0 ; i--) { +int vesa_bpp_x16 =fxp_q4_from_int (valid_dsc_bpp[i]);Any reason why you're doing the loop from the end to the beginning, instead of the more natural from 0 to the end?
Yes. The values in valid_dsc_bpp[] are stored in increasing order, so to find the maximum value <= the passed-in limit, the natural iteration order is from the end of the array.
Quoted 63 lines
I think this is clearer and less prone to mistakes:
for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {...}Quoted 58 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-15+ +if (vesa_bpp_x16 <= max_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static u32 intel_dp_dsc_nearest_valid_bpp (struct intel_display *display,u32 bpp,u32 pipe_bpp) {u32 bits_per_pixel = bpp; -int i;/* Error out if the max bpp is less than smallest allowed valid bpp */ if (bits_per_pixel < valid_dsc_bpp[0 ]) {@@ -899,15 +912,13 @@ static u32 intel_dp_dsc_nearest_valid_bpp(struct intel_display *display, u32 bpp } bits_per_pixel =min_t (u32, bits_per_pixel,27 ); }else { +int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); +/* Find the nearest match in the array of known BPPs from VESA */ -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp) -1 ; i++) { -if (bits_per_pixel < valid_dsc_bpp[i +1 ]) -break ; - } -drm_dbg_kms (display->drm,"Set dsc bpp from %d to VESA %d\n" , - bits_per_pixel, valid_dsc_bpp[i]); + link_bpp_x16 =align_max_vesa_compressed_bpp_x16 (link_bpp_x16); - bits_per_pixel = valid_dsc_bpp[i]; +drm_WARN_ON (display->drm,fxp_q4_to_frac (link_bpp_x16)); + bits_per_pixel =fxp_q4_to_int (link_bpp_x16); }return bits_per_pixel;@@ -2219,7 +2230,6 @@ int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector)bool intel_dp_dsc_valid_compressed_bpp (struct intel_dp *intel_dp,int bpp_x16) {struct intel_display *display =to_intel_display (intel_dp); -int i;if (DISPLAY_VER (display) >=13 ) {if (intel_dp->force_dsc_fractional_bpp_en && !fxp_q4_to_frac (bpp_x16))@@ -2231,12 +2241,7 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16)if (fxp_q4_to_frac (bpp_x16))return false; -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { -if (fxp_q4_to_int (bpp_x16) == valid_dsc_bpp[i]) -return true; - } - -return false; +return align_max_vesa_compressed_bpp_x16 (bpp_x16) == bpp_x16; }/*
Luca Coelho
Reviewed-byRe: [PATCH 15/50] drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16()
Quoted 28 lines · Imre Deak
Quoted 17 lines · Luca Coelho
Quoted 16 lines · Imre Deak
Factor out
align_max_vesa_compressed_bpp_x16(), also used later for computing the maximum DSC compressed BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -867,10 +867,23 @@ small_joiner_ram_size_bits(struct intel_display *display)return 6144 *8 ; }Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c small_joiner_ram_size_bits(struct intel_display *display) · line 875
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c +6
-0+static int align_max_vesa_compressed_bpp_x16 (int max_link_bpp_x16) +{ +int i; + +for (i =ARRAY_SIZE (valid_dsc_bpp) -1 ; i >=0 ; i--) { +int vesa_bpp_x16 =fxp_q4_from_int (valid_dsc_bpp[i]);Any reason why you're doing the loop from the end to the beginning, instead of the more natural from 0 to the end?
Quoted 3 lines
Yes. The values in valid_dsc_bpp[] are stored in increasing order, so to find the maximum value <= the passed-in limit, the natural iteration order is from the end of the array.
I don't really see how this affects anything functionally and by "natural" I meant for the person reading the code. I had to think a bit deeper when reviewing this loop because it's not the "for (i = 0; i < ARRAY_SIZE(...); i++)" format I'm mostly used to.
Anyway, another nitpick with not functional issues, so:
--
Cheers,
Luca.
Quoted 63 lines
Quoted 63 lines
I think this is clearer and less prone to mistakes:
for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {...}Quoted 58 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-15+ +if (vesa_bpp_x16 <= max_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static u32 intel_dp_dsc_nearest_valid_bpp (struct intel_display *display,u32 bpp,u32 pipe_bpp) {u32 bits_per_pixel = bpp; -int i;/* Error out if the max bpp is less than smallest allowed valid bpp */ if (bits_per_pixel < valid_dsc_bpp[0 ]) {@@ -899,15 +912,13 @@ static u32 intel_dp_dsc_nearest_valid_bpp(struct intel_display *display, u32 bpp } bits_per_pixel =min_t (u32, bits_per_pixel,27 ); }else { +int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); +/* Find the nearest match in the array of known BPPs from VESA */ -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp) -1 ; i++) { -if (bits_per_pixel < valid_dsc_bpp[i +1 ]) -break ; - } -drm_dbg_kms (display->drm,"Set dsc bpp from %d to VESA %d\n" , - bits_per_pixel, valid_dsc_bpp[i]); + link_bpp_x16 =align_max_vesa_compressed_bpp_x16 (link_bpp_x16); - bits_per_pixel = valid_dsc_bpp[i]; +drm_WARN_ON (display->drm,fxp_q4_to_frac (link_bpp_x16)); + bits_per_pixel =fxp_q4_to_int (link_bpp_x16); }return bits_per_pixel;@@ -2219,7 +2230,6 @@ int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector)bool intel_dp_dsc_valid_compressed_bpp (struct intel_dp *intel_dp,int bpp_x16) {struct intel_display *display =to_intel_display (intel_dp); -int i;if (DISPLAY_VER (display) >=13 ) {if (intel_dp->force_dsc_fractional_bpp_en && !fxp_q4_to_frac (bpp_x16))@@ -2231,12 +2241,7 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16)if (fxp_q4_to_frac (bpp_x16))return false; -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { -if (fxp_q4_to_int (bpp_x16) == valid_dsc_bpp[i]) -return true; - } - -return false; +return align_max_vesa_compressed_bpp_x16 (bpp_x16) == bpp_x16; }/*
Re: [PATCH 15/50] drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16()
Quoted 29 lines · Luca Coelho
Quoted 28 lines · Imre Deak
Quoted 26 lines · Luca Coelho
Quoted 13 lines · Imre Deak
Factor out
align_max_vesa_compressed_bpp_x16(), also used later for computing the maximum DSC compressed BPP limit.Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 35 ++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0drivers/gpu/drm/i915/display/intel_dp.c small_joiner_ram_size_bits(struct intel_display *display) · line 875
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c +6
-0@@ -867,10 +867,23 @@ small_joiner_ram_size_bits(struct intel_display *display)return 6144 *8 ; } +static int align_max_vesa_compressed_bpp_x16 (int max_link_bpp_x16) +{ +int i; + +for (i =ARRAY_SIZE (valid_dsc_bpp) -1 ; i >=0 ; i--) { +int vesa_bpp_x16 =fxp_q4_from_int (valid_dsc_bpp[i]);Any reason why you're doing the loop from the end to the beginning, instead of the more natural from 0 to the end?
Quoted 8 lines
Quoted 3 lines
Yes. The values in valid_dsc_bpp[] are stored in increasing order, so to find the maximum value <= the passed-in limit, the natural iteration order is from the end of the array.
I don't really see how this affects anything functionally and by "natural" I meant for the person reading the code. I had to think a bit deeper when reviewing this loop because it's not the "for (i = 0; i <
ARRAY_SIZE(...); i++)" format I'm mostly used to.
Yes, I also meant more natural from the reviewer POV. The forward iteration wouldn't be obvious for three reasons: it iterates only through ARRAY_SIZE()-1 elements not ARRAY_SIZE elemts, in iteration "i" it must check the array element at index i+1 not at index i and it also depends an extra check outside of the loop to return 0 if even the first element of the array is above the passed-in limit.
Quoted 73 lines
Anyway, another nitpick with not functional issues, so:
Reviewed-by Luca Coelho <[email protected]>--
Cheers,
Luca.Quoted 63 lines
Quoted 63 lines
I think this is clearer and less prone to mistakes:
for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {...}Quoted 58 lines
drivers/gpu/drm/i915/display/intel_dp.c +14
-15+ +if (vesa_bpp_x16 <= max_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static u32 intel_dp_dsc_nearest_valid_bpp (struct intel_display *display,u32 bpp,u32 pipe_bpp) {u32 bits_per_pixel = bpp; -int i;/* Error out if the max bpp is less than smallest allowed valid bpp */ if (bits_per_pixel < valid_dsc_bpp[0 ]) {@@ -899,15 +912,13 @@ static u32 intel_dp_dsc_nearest_valid_bpp(struct intel_display *display, u32 bpp } bits_per_pixel =min_t (u32, bits_per_pixel,27 ); }else { +int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); +/* Find the nearest match in the array of known BPPs from VESA */ -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp) -1 ; i++) { -if (bits_per_pixel < valid_dsc_bpp[i +1 ]) -break ; - } -drm_dbg_kms (display->drm,"Set dsc bpp from %d to VESA %d\n" , - bits_per_pixel, valid_dsc_bpp[i]); + link_bpp_x16 =align_max_vesa_compressed_bpp_x16 (link_bpp_x16); - bits_per_pixel = valid_dsc_bpp[i]; +drm_WARN_ON (display->drm,fxp_q4_to_frac (link_bpp_x16)); + bits_per_pixel =fxp_q4_to_int (link_bpp_x16); }return bits_per_pixel;@@ -2219,7 +2230,6 @@ int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector)bool intel_dp_dsc_valid_compressed_bpp (struct intel_dp *intel_dp,int bpp_x16) {struct intel_display *display =to_intel_display (intel_dp); -int i;if (DISPLAY_VER (display) >=13 ) {if (intel_dp->force_dsc_fractional_bpp_en && !fxp_q4_to_frac (bpp_x16))@@ -2231,12 +2241,7 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16)if (fxp_q4_to_frac (bpp_x16))return false; -for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { -if (fxp_q4_to_int (bpp_x16) == valid_dsc_bpp[i]) -return true; - } - -return false; +return align_max_vesa_compressed_bpp_x16 (bpp_x16) == bpp_x16; }/*
PATCH 16/50 drm/i915/dp: Fail state computation for invalid min/max link BPP values
In reply to Imre DeakMake sure that state computation fails if the minimum/maximum link BPP values got invalid as a result of limiting both of these values separately to the corresponding source/sink capability limits.
--- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp.c +6 -1
@@ -2654,7 +2654,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, limits->link.max_bpp_x16 = max_link_bpp_x16; drm_dbg_kms(display->drm, - "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits: pixel clock %d kHz DSC %s max lanes %d max rate %d max pipe_bpp %d max link_bpp " FXP_Q4_FMT "\n", + "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits: pixel clock %d kHz DSC %s max lanes %d max rate %d max pipe_bpp %d min link_bpp " FXP_Q4_FMT " max link_bpp " FXP_Q4_FMT "\n", encoder->base.base.id, encoder->base.name, crtc->base.base.id, crtc->base.name, adjusted_mode->crtc_clock,
@@ -2662,8 +2662,13 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, limits->max_lane_count, limits->max_rate, limits->pipe.max_bpp, +FXP_Q4_ARGS (limits->link.min_bpp_x16), FXP_Q4_ARGS(limits->link.max_bpp_x16)); +if (limits->link.min_bpp_x16 <=0 || + limits->link.min_bpp_x16 > limits->link.max_bpp_x16) +return false; +return true; }
Signature · 1 line
2.49.1
Re: [PATCH 16/50] drm/i915/dp: Fail state computation for invalid min/max link BPP values
Quoted 10 lines · Imre Deak
Make sure that state computation fails if the minimum/maximum link BPP
values got invalid as a result of limiting both of these values separately to the corresponding source/sink capability limits.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++++-1 file changed, 6 insertions(+), 1 deletion(-)
Quoted 34 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2654,7 +2654,7 @@ intel_dp_compute_config_link_bpp_limits(structintel_dp *intel_dp, limits->link.max_bpp_x16 = max_link_bpp_x16;
drm_dbg_kms(display->drm,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits:pixel clock %d kHz DSC %s max lanes %d max rate %d max
pipe_bpp%d maxlink_bpp"FXP_Q4_FMT"\n",drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits:pixel clock %d kHz DSC %s max lanes %d max rate %d max
pipe_bpp%d minlink_bpp"FXP_Q4_FMT" maxlink_bpp"FXP_Q4_FMT"\n",encoder->base.base.id,encoder->base.name,crtc->base.base.id,crtc->base.name,adjusted_mode->crtc_clock,drivers/gpu/drm/i915/display/intel_dp.c +1
-0@@ -2662,8 +2662,13 @@ intel_dp_compute_config_link_bpp_limits(structintel_dp *intel_dp, limits->max_lane_count, limits->max_rate, limits->pipe.max_bpp, + FXP_Q4_ARGS(limits->link.min_bpp_x16), FXP_Q4_ARGS(limits->link.max_bpp_x16));drivers/gpu/drm/i915/display/intel_dp.c +4
-0+if (limits->link.min_bpp_x16 <=0 || + limits->link.min_bpp_x16 > limits->link.max_bpp_x16) +return false; +return true;
}
Re: [PATCH 16/50] drm/i915/dp: Fail state computation for invalid min/max link BPP values
In reply to Imre DeakQuoted 26 lines · Imre Deak
Make sure that state computation fails if the minimum/maximum link BPP values got invalid as a result of limiting both of these values separately to the corresponding source/sink capability limits.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -2654,7 +2654,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, limits->link.max_bpp_x16 = max_link_bpp_x16; drm_dbg_kms(display->drm, - "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits: pixel clock %d kHz DSC %s max lanes %d max rate %d max pipe_bpp %d max link_bpp " FXP_Q4_FMT "\n", + "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits: pixel clock %d kHz DSC %s max lanes %d max rate %d max pipe_bpp %d min link_bpp " FXP_Q4_FMT " max link_bpp " FXP_Q4_FMT "\n", encoder->base.base.id, encoder->base.name, crtc->base.base.id, crtc->base.name, adjusted_mode->crtc_clock,@@ -2662,8 +2662,13 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, limits->max_lane_count, limits->max_rate, limits->pipe.max_bpp,
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, · line 2674
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+FXP_Q4_ARGS (limits->link.min_bpp_x16), FXP_Q4_ARGS(limits->link.max_bpp_x16)); +if (limits->link.min_bpp_x16 <=0 || + limits->link.min_bpp_x16 > limits->link.max_bpp_x16) +return false; +return true; }
--
Cheers,
Luca.
PATCH 17/50 drm/i915/dp: Fail state computation for invalid max throughput BPP value
In reply to Imre DeakThere is no reason to accept a minimum/maximum link BPP value above the maximum throughput BPP value, fail the state computation in this case.
--- drivers/gpu/drm/i915/display/intel_dp.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +0 -2
@@ -2638,8 +2638,6 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp)); throughput_max_bpp_x16 =dsc_throughput_quirk_max_bpp_x16 (connector, crtc_state); - throughput_max_bpp_x16 =clamp (throughput_max_bpp_x16, - limits->link.min_bpp_x16, max_link_bpp_x16);if (throughput_max_bpp_x16 < max_link_bpp_x16) { max_link_bpp_x16 = throughput_max_bpp_x16;
Signature · 1 line
2.49.1
Re: [PATCH 17/50] drm/i915/dp: Fail state computation for invalid max throughput BPP value
Quoted 10 lines · Imre Deak
There is no reason to accept a minimum/maximum link BPP value above the
maximum throughput BPP value, fail the state computation in this case.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 2 --1 file changed, 2 deletions(-)
Quoted 19 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2638,8 +2638,6 @@ intel_dp_compute_config_link_bpp_limits(structintel_dp *intel_dp, max_link_bpp_x16 = min(max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp));
throughput_max_bpp_x16=dsc_throughput_quirk_max_bpp_x16(connector, crtc_state);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- throughput_max_bpp_x16 =clamp(throughput_max_bpp_x16,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1- limits-Quoted 1 line
link.min_bpp_x16,
max_link_bpp_x16);if (
throughput_max_bpp_x16<max_link_bpp_x16) {max_link_bpp_x16=throughput_max_bpp_x16;
Re: [PATCH 17/50] drm/i915/dp: Fail state computation for invalid max throughput BPP value
In reply to Imre DeakQuoted 13 lines · Imre Deak
There is no reason to accept a minimum/maximum link BPP value above the maximum throughput BPP value, fail the state computation in this case.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, · line 2643
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-2@@ -2638,8 +2638,6 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp)); throughput_max_bpp_x16 =dsc_throughput_quirk_max_bpp_x16 (connector, crtc_state); - throughput_max_bpp_x16 =clamp (throughput_max_bpp_x16, - limits->link.min_bpp_x16, max_link_bpp_x16);if (throughput_max_bpp_x16 < max_link_bpp_x16) { max_link_bpp_x16 = throughput_max_bpp_x16;
--
Cheers,
Luca.
PATCH 18/50 drm/i915/dp: Fail state computation for invalid max sink compressed BPP value
In reply to Imre DeakThere is no reason to accept an invalid maximum sink compressed BPP value (i.e. 0), fail the state computation in this case.
--- drivers/gpu/drm/i915/display/intel_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +1 -2
@@ -2631,8 +2631,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp (connector, crtc_state, limits->pipe.max_bpp /3 ); - dsc_max_bpp = dsc_sink_max_bpp ? -min (dsc_sink_max_bpp, dsc_src_max_bpp) : dsc_src_max_bpp; + dsc_max_bpp =min (dsc_sink_max_bpp, dsc_src_max_bpp); dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp));
Signature · 1 line
2.49.1
Re: [PATCH 18/50] drm/i915/dp: Fail state computation for invalid max sink compressed BPP value
Quoted 8 lines · Imre Deak
There is no reason to accept an invalid maximum sink compressed BPP value (i.e. 0), fail the state computation in this case.
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 3 +--1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2631,8 +2631,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,
dsc_sink_max_bpp=
intel_dp_dsc_sink_max_compressed_bpp(connector,
crtc_state,limits->pipe.max_bpp / 3);drivers/gpu/drm/i915/display/intel_dp.c +0
-2- dsc_max_bpp = dsc_sink_max_bpp ? - min(dsc_sink_max_bpp, dsc_src_max_bpp):
dsc_src_max_bpp;drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ dsc_max_bpp = min(dsc_sink_max_bpp,
dsc_src_max_bpp);
dsc_max_bpp=min(dsc_max_bpp, joiner_max_bpp);
max_link_bpp_x16=min(max_link_bpp_x16, fxp_q4_from_int(dsc_max_bpp));
Re: [PATCH 18/50] drm/i915/dp: Fail state computation for invalid max sink compressed BPP value
In reply to Imre DeakQuoted 13 lines · Imre Deak
There is no reason to accept an invalid maximum sink compressed BPP value (i.e. 0), fail the state computation in this case.
Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, · line 2637
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-2@@ -2631,8 +2631,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp (connector, crtc_state, limits->pipe.max_bpp /3 ); - dsc_max_bpp = dsc_sink_max_bpp ? -min (dsc_sink_max_bpp, dsc_src_max_bpp) : dsc_src_max_bpp; + dsc_max_bpp =min (dsc_sink_max_bpp, dsc_src_max_bpp); dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp));
--
Cheers,
Luca.
PATCH 19/50 drm/i915/dp: Fail state computation for invalid DSC source input BPP values
In reply to Imre DeakThere is no reason to accept an invalid minimum/maximum DSC source input BPP value (i.e a minimum DSC input BPP value above the maximum pipe BPP or a maximum DSC input BPP value below the minimum pipe BPP value), fail the state computation in these cases.
--- drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +21 -7
@@ -2669,16 +2669,30 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,return true; } -static void -intel_dp_dsc_compute_pipe_bpp_limits (struct intel_dp *intel_dp, +static bool +intel_dp_dsc_compute_pipe_bpp_limits (struct intel_connector *connector,struct link_config_limits *limits) { -struct intel_display *display =to_intel_display (intel_dp); +struct intel_display *display =to_intel_display (connector); +const struct link_config_limits orig_limits = *limits;int dsc_min_bpc =intel_dp_dsc_min_src_input_bpc ();int dsc_max_bpc =intel_dp_dsc_max_src_input_bpc (display); - limits->pipe.max_bpp =clamp (limits->pipe.max_bpp, dsc_min_bpc *3 , dsc_max_bpc *3 ); - limits->pipe.min_bpp =clamp (limits->pipe.min_bpp, dsc_min_bpc *3 , dsc_max_bpc *3 ); + limits->pipe.min_bpp =max (limits->pipe.min_bpp, dsc_min_bpc *3 ); + limits->pipe.max_bpp =min (limits->pipe.max_bpp, dsc_max_bpc *3 ); + +if (limits->pipe.min_bpp <=0 || + limits->pipe.min_bpp > limits->pipe.max_bpp) { +drm_dbg_kms (display->drm, +"[CONNECTOR:%d:%s] Invalid DSC src/sink input BPP (src:%d-%d pipe:%d-%d)\n" , + connector->base.base.id, connector->base.name, + dsc_min_bpc *3 , dsc_max_bpc *3 , + orig_limits.pipe.min_bpp, orig_limits.pipe.max_bpp); + +return false; + } + +return true; }bool
@@ -2718,8 +2732,8 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp, respect_downstream_limits); } -if (dsc) -intel_dp_dsc_compute_pipe_bpp_limits (intel_dp, limits); +if (dsc && !intel_dp_dsc_compute_pipe_bpp_limits (connector, limits)) +return false;if (is_mst || intel_dp->use_max_params) {/*
Signature · 1 line
2.49.1
Re: [PATCH 19/50] drm/i915/dp: Fail state computation for invalid DSC source input BPP values
Quoted 8 lines · Imre Deak
There is no reason to accept an invalid minimum/maximum DSC source input
BPP value (i.e a minimum DSC input BPP value above the maximum pipe BPP
or a maximum DSC input BPP value below the minimum pipe BPP value), fail
the state computation in these cases.
Quoted 6 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++++----- --1 file changed, 21 insertions(+), 7 deletions(-)
Quoted 66 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2669,16 +2669,30 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, return true; }drivers/gpu/drm/i915/display/intel_dp.c +2
-2-static void -intel_dp_dsc_compute_pipe_bpp_limits(struct intel_dp *intel_dp, +static bool +intel_dp_dsc_compute_pipe_bpp_limits(struct intel_connector*connector,
structlink_config_limits*limits)
{drivers/gpu/drm/i915/display/intel_dp.c +2
-1-struct intel_display *display =to_intel_display (intel_dp); +struct intel_display *display =to_intel_display (connector); +const struct link_config_limits orig_limits = *limits;int
dsc_min_bpc=intel_dp_dsc_min_src_input_bpc(); intdsc_max_bpc=intel_dp_dsc_max_src_input_bpc(display);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- limits->pipe.max_bpp = clamp(limits->pipe.max_bpp,
dsc_min_bpc* 3,dsc_max_bpc* 3);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- limits->pipe.min_bpp = clamp(limits->pipe.min_bpp,
dsc_min_bpc* 3,dsc_max_bpc* 3);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ limits->pipe.min_bpp = max(limits->pipe.min_bpp, dsc_min_bpc* 3);
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ limits->pipe.max_bpp = min(limits->pipe.max_bpp, dsc_max_bpc* 3);
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+ +if (limits->pipe.min_bpp <=0 || + limits->pipe.min_bpp > limits->pipe.max_bpp) { + drm_dbg_kms(display->drm, + "[CONNECTOR:%d:%s] Invalid DSC src/sinkinput BPP (src:%d-%d pipe:%d-%d)\n",
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ connector->base.base.id, connector-Quoted 1 line
base.name,
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ dsc_min_bpc * 3, dsc_max_bpc * 3, + orig_limits.pipe.min_bpp,orig_limits.pipe.max_bpp);
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+ +return false; + } + +return true;}
booldrivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2718,8 +2732,8 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
respect_downstream_limits);
}drivers/gpu/drm/i915/display/intel_dp.c +0
-2-if (dsc) - intel_dp_dsc_compute_pipe_bpp_limits(intel_dp,limits);
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ if (dsc && !intel_dp_dsc_compute_pipe_bpp_limits(connector,limits))
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+return false;
if (is_mst||intel_dp->use_max_params) {
/*
PATCH 20/50 drm/i915/dp: Align min/max DSC input BPPs to sink caps
In reply to Imre DeakAlign the minimum/maximum DSC input BPPs to the corresponding sink DSC input BPP capability limits already when computing the BPP limits. This alignment is also performed later during state computation, however there is no reason to initialize the limits to an unaligned/incorrect value.
--- drivers/gpu/drm/i915/display/intel_dp.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +23 -2
@@ -1904,6 +1904,23 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display)return intel_dp_dsc_min_src_input_bpc (); } +static int align_min_sink_dsc_input_bpp (const struct intel_connector *connector, +int min_pipe_bpp) +{ +u8 dsc_bpc[3 ]; +int num_bpc; +int i; + + num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, + dsc_bpc); +for (i = num_bpc -1 ; i >=0 ; i--) { +if (dsc_bpc[i] *3 >= min_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +static int align_max_sink_dsc_input_bpp (const struct intel_connector *connector,int max_pipe_bpp) {
@@ -2679,15 +2696,19 @@ intel_dp_dsc_compute_pipe_bpp_limits(struct intel_connector *connector,int dsc_max_bpc =intel_dp_dsc_max_src_input_bpc (display); limits->pipe.min_bpp =max (limits->pipe.min_bpp, dsc_min_bpc *3 ); + limits->pipe.min_bpp =align_min_sink_dsc_input_bpp (connector, limits->pipe.min_bpp); + limits->pipe.max_bpp =min (limits->pipe.max_bpp, dsc_max_bpc *3 ); + limits->pipe.max_bpp =align_max_sink_dsc_input_bpp (connector, limits->pipe.max_bpp);if (limits->pipe.min_bpp <=0 || limits->pipe.min_bpp > limits->pipe.max_bpp) {drm_dbg_kms (display->drm, -"[CONNECTOR:%d:%s] Invalid DSC src/sink input BPP (src:%d-%d pipe:%d-%d)\n" , +"[CONNECTOR:%d:%s] Invalid DSC src/sink input BPP (src:%d-%d pipe:%d-%d sink-align:%d-%d)\n" , connector->base.base.id, connector->base.name, dsc_min_bpc *3 , dsc_max_bpc *3 , - orig_limits.pipe.min_bpp, orig_limits.pipe.max_bpp); + orig_limits.pipe.min_bpp, orig_limits.pipe.max_bpp, + limits->pipe.min_bpp, limits->pipe.max_bpp);return false; }
Signature · 1 line
2.49.1
Re: [PATCH 20/50] drm/i915/dp: Align min/max DSC input BPPs to sink caps
Quoted 8 lines · Imre Deak
Align the minimum/maximum DSC input BPPs to the corresponding sink DSC
input BPP capability limits already when computing the BPP limits. This
alignment is also performed later during state computation, however there is no reason to initialize the limits to an unaligned/incorrect value.
Quoted 6 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 25
+++++++++++++++++++++++--1 file changed, 23 insertions(+), 2 deletions(-)
Quoted 66 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1904,6 +1904,23 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display) return intel_dp_dsc_min_src_input_bpc(); }
+static int align_min_sink_dsc_input_bpp(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +7
-0+ int min_pipe_bpp) +{ +u8 dsc_bpc[3 ]; +int num_bpc; +int i; + + num_bpc = drm_dp_dsc_sink_supported_input_bpcs(connector-Quoted 1 line
dp.dsc_dpcd,
drivers/gpu/drm/i915/display/intel_dp.c +9
-0+ dsc_bpc); +for (i = num_bpc -1 ; i >=0 ; i--) { +if (dsc_bpc[i] *3 >= min_pipe_bpp) +return dsc_bpc[i] *3 ; + } + +return 0 ; +} +static int align_max_sink_dsc_input_bpp(const struct
intel_connector*connector,
intmax_pipe_bpp) {drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2679,15 +2696,19 @@ intel_dp_dsc_compute_pipe_bpp_limits(structintel_connector *connector, int dsc_max_bpc = intel_dp_dsc_max_src_input_bpc(display);
limits->pipe.min_bpp= max(limits->pipe.min_bpp,dsc_min_bpc
* 3);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ limits->pipe.min_bpp =
align_min_sink_dsc_input_bpp(connector, limits->pipe.min_bpp); +
limits->pipe.max_bpp= min(limits->pipe.max_bpp,dsc_max_bpc
* 3);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ limits->pipe.max_bpp =
align_max_sink_dsc_input_bpp(connector, limits->pipe.max_bpp);
if (limits->pipe.min_bpp<= 0 ||limits->pipe.min_bpp>limits->pipe.max_bpp) { drm_dbg_kms(display->drm,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- "[CONNECTOR:%d:%s] Invalid DSC src/sinkinput BPP (src:%d-%d pipe:%d-%d)\n",
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ "[CONNECTOR:%d:%s] Invalid DSC src/sinkinput BPP (src:%d-%d pipe:%d-%d sink-align:%d-%d)\n",
connector->base.base.id, connector-Quoted 1 line
base.name,
dsc_min_bpc* 3,dsc_max_bpc* 3,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- orig_limits.pipe.min_bpp,orig_limits.pipe.max_bpp);
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ orig_limits.pipe.min_bpp,orig_limits.pipe.max_bpp,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ limits->pipe.min_bpp, limits-Quoted 1 line
pipe.max_bpp);
return false;
}
PATCH 21/50 drm/i915/dp: Align min/max compressed BPPs when calculating BPP limits
In reply to Imre DeakAlign the minimum/maximum DSC compressed BPPs to the corresponding source compressed BPP limits already when computing the BPP limits. This alignment is also performed later during state computation, however there is no reason to initialize the limits to an unaligned/incorrect value.
--- drivers/gpu/drm/i915/display/intel_dp.c | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+)
drivers/gpu/drm/i915/display/intel_dp.c +57 -0
@@ -867,6 +867,20 @@ small_joiner_ram_size_bits(struct intel_display *display)return 6144 *8 ; } +static int align_min_vesa_compressed_bpp_x16 (int min_link_bpp_x16) +{ +int i; + +for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { +int vesa_bpp_x16 =fxp_q4_from_int (valid_dsc_bpp[i]); + +if (vesa_bpp_x16 >= min_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static int align_max_vesa_compressed_bpp_x16 (int max_link_bpp_x16) {int i;
@@ -2261,6 +2275,40 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16)return align_max_vesa_compressed_bpp_x16 (bpp_x16) == bpp_x16; } +static int align_min_compressed_bpp_x16 (const struct intel_connector *connector,int min_bpp_x16) +{ +struct intel_display *display =to_intel_display (connector); + +if (DISPLAY_VER (display) >=13 ) { +int bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector); + +drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); + +return round_up (min_bpp_x16, bpp_step_x16); + }else { +return align_min_vesa_compressed_bpp_x16 (min_bpp_x16); + } +} + +static int align_max_compressed_bpp_x16 (const struct intel_connector *connector, +enum intel_output_format output_format, +int pipe_bpp,int max_bpp_x16) +{ +struct intel_display *display =to_intel_display (connector); +int link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (output_format, pipe_bpp); +int bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector); + + max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16); + +if (DISPLAY_VER (display) >=13 ) { +drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); + +return round_down (max_bpp_x16, bpp_step_x16); + }else { +return align_max_vesa_compressed_bpp_x16 (max_bpp_x16); + } +} +/* * Find the max compressed BPP we can find a link configuration for. The BPPs to * try depend on the source (platform) and sink.
@@ -2639,6 +2687,9 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, dsc_min_bpp =max (dsc_src_min_bpp, dsc_sink_min_bpp); limits->link.min_bpp_x16 =fxp_q4_from_int (dsc_min_bpp); + limits->link.min_bpp_x16 = +align_min_compressed_bpp_x16 (connector, limits->link.min_bpp_x16); + dsc_src_max_bpp =dsc_src_max_compressed_bpp (intel_dp); joiner_max_bpp = get_max_compressed_bpp_with_joiner(display,
@@ -2663,6 +2714,12 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, connector->base.base.id, connector->base.name, FXP_Q4_ARGS(max_link_bpp_x16)); } + + max_link_bpp_x16 = +align_max_compressed_bpp_x16 (connector, + crtc_state->output_format, + limits->pipe.max_bpp, + max_link_bpp_x16); } limits->link.max_bpp_x16 = max_link_bpp_x16;
Signature · 1 line
2.49.1
Re: [PATCH 21/50] drm/i915/dp: Align min/max compressed BPPs when calculating BPP limits
Quoted 87 lines · Imre Deak
Align the minimum/maximum DSC compressed BPPs to the corresponding source compressed BPP limits already when computing the BPP limits. This
alignment is also performed later during state computation, however there is no reason to initialize the limits to an unaligned/incorrect value.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 57
+++++++++++++++++++++++++1 file changed, 57 insertions(+)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -867,6 +867,20 @@ small_joiner_ram_size_bits(struct intel_display *display) return 6144 * 8; }drivers/gpu/drm/i915/display/intel_dp.c +6
-0+static int align_min_vesa_compressed_bpp_x16 (int min_link_bpp_x16) +{ +int i; + +for (i =0 ; i <ARRAY_SIZE (valid_dsc_bpp); i++) { + int vesa_bpp_x16 =
fxp_q4_from_int(valid_dsc_bpp[i]);drivers/gpu/drm/i915/display/intel_dp.c +8
-0+ +if (vesa_bpp_x16 >= min_link_bpp_x16) +return vesa_bpp_x16; + } + +return 0 ; +} +static int
align_max_vesa_compressed_bpp_x16(int max_link_bpp_x16){
int i;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2261,6 +2275,40 @@ bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16)return
align_max_vesa_compressed_bpp_x16(bpp_x16)==bpp_x16;
}
+static intalign_min_compressed_bpp_x16(const struct intel_connector *connector, int min_bpp_x16)drivers/gpu/drm/i915/display/intel_dp.c +5
-0+{ +struct intel_display *display =to_intel_display (connector); + +if (DISPLAY_VER (display) >=13 ) { + int bpp_step_x16 =
intel_dp_dsc_bpp_step_x16(connector);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ + drm_WARN_ON(display->drm,!is_power_of_2(bpp_step_x16));
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ +return round_up (min_bpp_x16, bpp_step_x16); + }else { +return
align_min_vesa_compressed_bpp_x16(min_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ } +} + +static int align_max_compressed_bpp_x16(const struct intel_connector*connector,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+enum intel_output_format
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+int pipe_bpp, int
max_bpp_x16)drivers/gpu/drm/i915/display/intel_dp.c +3
-0+{ +struct intel_display *display =to_intel_display (connector); + int link_bpp_x16 =
intel_dp_output_format_link_bpp_x16(output_format, pipe_bpp);drivers/gpu/drm/i915/display/intel_dp.c +6
-0+int bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector); + + max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16); + +if (DISPLAY_VER (display) >=13 ) { + drm_WARN_ON(display->drm,!is_power_of_2(bpp_step_x16));
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ +return round_down (max_bpp_x16, bpp_step_x16); + }else { +return
align_max_vesa_compressed_bpp_x16(max_bpp_x16);
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ }
well.. return align_max_vesa_compressed_bpp_x16(...) could be placed without "else loop" as well here and above.
Quoted 39 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+} +/*
* Find the max compressed BPP we can find a link configuration for. The BPPs to
* try depend on the source (platform) and sink.drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2639,6 +2687,9 @@ intel_dp_compute_config_link_bpp_limits(structintel_dp *intel_dp, dsc_min_bpp = max(dsc_src_min_bpp, dsc_sink_min_bpp);
limits->link.min_bpp_x16=fxp_q4_from_int(dsc_min_bpp);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ limits->link.min_bpp_x16 = + align_min_compressed_bpp_x16(connector,
limits->link.min_bpp_x16);
+
dsc_src_max_bpp=dsc_src_max_compressed_bpp(intel_dp);
joiner_max_bpp= get_max_compressed_bpp_with_joiner(display,drivers/gpu/drm/i915/display/intel_dp.c +5
-0@@ -2663,6 +2714,12 @@ intel_dp_compute_config_link_bpp_limits(structintel_dp *intel_dp, connector->base.base.id, connector->base.name, FXP_Q4_ARGS(max_link_bpp_x16)); } + + max_link_bpp_x16 = + align_max_compressed_bpp_x16(connector, + crtc_state- >output_format, + limits-Quoted 1 line
pipe.max_bpp,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
max_link_bpp_x16);
}
limits->link.max_bpp_x16=max_link_bpp_x16;
Re: [PATCH 21/50] drm/i915/dp: Align min/max compressed BPPs when calculating BPP limits
Quoted 14 lines · Vinod Govindapillai
[...]
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_dp.c +13
-0+ +static int align_max_compressed_bpp_x16 (const struct intel_connector *connector, +enum intel_output_format output_format, +int pipe_bpp,int max_bpp_x16) +{ +struct intel_display *display =to_intel_display (connector); +int link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (output_format, pipe_bpp); +int bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector); + + max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16); + +if (DISPLAY_VER (display) >=13 ) { +drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16));
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16) · line 2309
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+ +return round_down (max_bpp_x16, bpp_step_x16); + }else { +return align_max_vesa_compressed_bpp_x16 (max_bpp_x16); + }well.. return
align_max_vesa_compressed_bpp_x16(...)could be placed without "else loop" as well here and above.
I'm not aware of a rule saying not to use an else in this case. Imo here using en else is the more readable form.
Quoted 3 lines
Reviewed-by Vinod Govindapillai <[email protected]>Quoted 1 line
+}
PATCH 22/50 drm/i915/dp: Drop intel_dp parameter from intel_dp_compute_config_link_bpp_limits()
In reply to Imre DeakThe intel_dp pointer can be deducted from the connector pointer, so it's enough to pass only connector to intel_dp_compute_config_link_bpp_limits(), do so.
--- drivers/gpu/drm/i915/display/intel_dp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +4 -5
@@ -2653,13 +2653,13 @@ dsc_throughput_quirk_max_bpp_x16(const struct intel_connector *connector,* range, crtc_state and dsc mode. Return true on success. */ static bool -intel_dp_compute_config_link_bpp_limits (struct intel_dp *intel_dp, -const struct intel_connector *connector, +intel_dp_compute_config_link_bpp_limits (struct intel_connector *connector,const struct intel_crtc_state *crtc_state,bool dsc,struct link_config_limits *limits) { -struct intel_display *display =to_intel_display (intel_dp); +struct intel_display *display =to_intel_display (connector); +struct intel_dp *intel_dp =intel_attached_dp (connector);const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;const struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);
@@ -2831,8 +2831,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,intel_dp_test_compute_config (intel_dp, crtc_state, limits); -return intel_dp_compute_config_link_bpp_limits (intel_dp, - connector, +return intel_dp_compute_config_link_bpp_limits (connector, crtc_state, dsc, limits);
Signature · 1 line
2.49.1
Re: [PATCH 22/50] drm/i915/dp: Drop intel_dp parameter from intel_dp_compute_config_link_bpp_limits()
Quoted 10 lines · Imre Deak
The
intel_dppointer can be deducted from the connector pointer, so it's
enough to pass only connector tointel_dp_compute_config_link_bpp_limits(), do so.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 9 ++++-----1 file changed, 4 insertions(+), 5 deletions(-)
Quoted 39 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2653,13 +2653,13 @@ dsc_throughput_quirk_max_bpp_x16(const structintel_connector *connector, * range, crtc_state and dsc mode. Return true on success. */ static bool
drivers/gpu/drm/i915/display/intel_dp.c +0
-2-intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, - const struct intel_connector*connector, +intel_dp_compute_config_link_bpp_limits(struct
intel_connector*connector,
const structintel_crtc_state*crtc_state,
bool dsc, structlink_config_limits*limits)
{drivers/gpu/drm/i915/display/intel_dp.c +2
-1-struct intel_display *display =to_intel_display (intel_dp); +struct intel_display *display =to_intel_display (connector); +struct intel_dp *intel_dp =intel_attached_dp (connector);const struct
drm_display_mode*adjusted_mode=&crtc_state->hw.adjusted_mode;
const structintel_crtc*crtc = to_intel_crtc(crtc_state-Quoted 1 line
uapi.crtc);
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2831,8 +2831,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
intel_dp_test_compute_config(intel_dp, crtc_state, limits);drivers/gpu/drm/i915/display/intel_dp.c +1
-2- return intel_dp_compute_config_link_bpp_limits(intel_dp, - connector, + return intel_dp_compute_config_link_bpp_limits(connector,
crtc_state, dsc, limits);
PATCH 23/50 drm/i915/dp: Pass intel_output_format to intel_dp_dsc_sink_{min_max}_compressed_bpp()
In reply to Imre DeakPrepare for follow-up changes also callingintel_dp_dsc_min_sink_compressed_bpp() /intel_dp_dsc_max_sink_compressed_bpp_x16()
without an intel_crtc_state.
While at it remove the stale function declarations from the header file.
--- drivers/gpu/drm/i915/display/intel_dp.c | 24 ++++++++++++------------ drivers/gpu/drm/i915/display/intel_dp.h | 4 ---- 2 files changed, 12 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +12 -12
@@ -2156,7 +2156,7 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,static u16 intel_dp_dsc_max_sink_compressed_bppx16 (const struct intel_connector *connector, -const struct intel_crtc_state *pipe_config, +enum intel_output_format output_format,int bpc) {u16 max_bppx16 =drm_edp_dsc_sink_output_bpp (connector->dp.dsc_dpcd);
@@ -2167,43 +2167,43 @@ u16 intel_dp_dsc_max_sink_compressed_bppx16(const struct intel_connector *connec* If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate * values as given in spec Table 2-157 DP v2.0 */ -switch (pipe_config->output_format) { +switch (output_format) {case INTEL_OUTPUT_FORMAT_RGB :case INTEL_OUTPUT_FORMAT_YCBCR444 :return (3 * bpc) <<4 ;case INTEL_OUTPUT_FORMAT_YCBCR420 :return (3 * (bpc /2 )) <<4 ;default : -MISSING_CASE (pipe_config->output_format); +MISSING_CASE (output_format);break ; }return 0 ; } -int intel_dp_dsc_sink_min_compressed_bpp (const struct intel_crtc_state *pipe_config) +static int intel_dp_dsc_sink_min_compressed_bpp (enum intel_output_format output_format) {/* From Mandatory bit rate range Support Table 2-157 (DP v2.0) */ -switch (pipe_config->output_format) { +switch (output_format) {case INTEL_OUTPUT_FORMAT_RGB :case INTEL_OUTPUT_FORMAT_YCBCR444 :return 8 ;case INTEL_OUTPUT_FORMAT_YCBCR420 :return 6 ;default : -MISSING_CASE (pipe_config->output_format); +MISSING_CASE (output_format);break ; }return 0 ; } -int intel_dp_dsc_sink_max_compressed_bpp (const struct intel_connector *connector, -const struct intel_crtc_state *pipe_config, -int bpc) +static int intel_dp_dsc_sink_max_compressed_bpp (const struct intel_connector *connector, +enum intel_output_format output_format, +int bpc) {return intel_dp_dsc_max_sink_compressed_bppx16 (connector, - pipe_config, bpc) >>4 ; + output_format, bpc) >>4 ; }int intel_dp_dsc_min_src_compressed_bpp (void )
@@ -2683,7 +2683,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector,int joiner_max_bpp; dsc_src_min_bpp =intel_dp_dsc_min_src_compressed_bpp (); - dsc_sink_min_bpp =intel_dp_dsc_sink_min_compressed_bpp (crtc_state); + dsc_sink_min_bpp =intel_dp_dsc_sink_min_compressed_bpp (crtc_state->output_format); dsc_min_bpp =max (dsc_src_min_bpp, dsc_sink_min_bpp); limits->link.min_bpp_x16 =fxp_q4_from_int (dsc_min_bpp);
@@ -2697,7 +2697,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector, adjusted_mode->hdisplay, intel_crtc_num_joined_pipes(crtc_state)); dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp (connector, - crtc_state, + crtc_state->output_format, limits->pipe.max_bpp /3 ); dsc_max_bpp =min (dsc_sink_max_bpp, dsc_src_max_bpp); dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp);
drivers/gpu/drm/i915/display/intel_dp.h +0 -4
@@ -150,10 +150,6 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct intel_display *display,enum intel_output_format output_format, u32 pipe_bpp, u32 timeslots); -int intel_dp_dsc_sink_min_compressed_bpp (const struct intel_crtc_state *pipe_config); -int intel_dp_dsc_sink_max_compressed_bpp (const struct intel_connector *connector, -const struct intel_crtc_state *pipe_config, -int bpc);bool intel_dp_dsc_valid_compressed_bpp (struct intel_dp *intel_dp,int bpp_x16); u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, int mode_clock, int mode_hdisplay,
Signature · 1 line
2.49.1
Re: [PATCH 23/50] drm/i915/dp: Pass intel_output_format to intel_dp_dsc_sink_{min_max}_compressed_bpp()
Quoted 8 lines · Imre Deak
Prepare for follow-up changes also calling
intel_dp_dsc_min_sink_compressed_bpp()/intel_dp_dsc_max_sink_compressed_bpp_x16()
without anintel_crtc_state.While at it remove the stale function declarations from the header file.
Quoted 7 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 24 ++++++++++++----------- -
drivers/gpu/drm/i915/display/intel_dp.h | 4 ----2 files changed, 12 insertions(+), 16 deletions(-)
Quoted 139 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2156,7 +2156,7 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,
static
u16 intel_dp_dsc_max_sink_compressed_bppx16(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- const struct
intel_crtc_state*pipe_config,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ enum intel_output_format
output_format,
int bpc) {
u16max_bppx16= drm_edp_dsc_sink_output_bpp(connector-Quoted 1 line
dp.dsc_dpcd);
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2167,43 +2167,43 @@ u16intel_dp_dsc_max_sink_compressed_bppx16(const struct
intel_connector*connec
* If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
* values as given in spec Table 2-157 DP v2.0
*/drivers/gpu/drm/i915/display/intel_dp.c +1
-1-switch (pipe_config->output_format) { +switch (output_format) {case
INTEL_OUTPUT_FORMAT_RGB:
caseINTEL_OUTPUT_FORMAT_YCBCR444:
return (3 * bpc) << 4;
caseINTEL_OUTPUT_FORMAT_YCBCR420:
return (3 * (bpc / 2)) << 4;
default:drivers/gpu/drm/i915/display/intel_dp.c +1
-1-MISSING_CASE (pipe_config->output_format); +MISSING_CASE (output_format);break;
}
return 0;
}
-intintel_dp_dsc_sink_min_compressed_bpp(const struct intel_crtc_state *pipe_config)
+static intintel_dp_dsc_sink_min_compressed_bpp(enum intel_output_format output_format)
{
/* From Mandatory bit rate range Support Table 2-157 (DP v2.0) */drivers/gpu/drm/i915/display/intel_dp.c +1
-1-switch (pipe_config->output_format) { +switch (output_format) {case
INTEL_OUTPUT_FORMAT_RGB:
caseINTEL_OUTPUT_FORMAT_YCBCR444:
return 8;
caseINTEL_OUTPUT_FORMAT_YCBCR420:
return 6;
default:drivers/gpu/drm/i915/display/intel_dp.c +1
-1-MISSING_CASE (pipe_config->output_format); +MISSING_CASE (output_format);break;
}
return 0;
}
-int intel_dp_dsc_sink_max_compressed_bpp(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- const struct
intel_crtc_state*pipe_config,drivers/gpu/drm/i915/display/intel_dp.c +1
-1- int bpc) +static int intel_dp_dsc_sink_max_compressed_bpp(const struct
intel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ enum
intel_output_formatoutput_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int bpc){
return intel_dp_dsc_max_sink_compressed_bppx16(connector,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- pipe_config,bpc) >> 4;
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
output_format, bpc) >> 4;
}
intintel_dp_dsc_min_src_compressed_bpp(void)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2683,7 +2683,7 @@ intel_dp_compute_config_link_bpp_limits(structintel_connector *connector, int joiner_max_bpp;
dsc_src_min_bpp=intel_dp_dsc_min_src_compressed_bpp();drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_sink_min_bpp =
intel_dp_dsc_sink_min_compressed_bpp(crtc_state);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ dsc_sink_min_bpp =
intel_dp_dsc_sink_min_compressed_bpp(crtc_state->output_format);dsc_min_bpp=max(dsc_src_min_bpp, dsc_sink_min_bpp);
limits->link.min_bpp_x16=fxp_q4_from_int(dsc_min_bpp);drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2697,7 +2697,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector,
adjusted_mode->hdisplay,intel_crtc_num_joined_pipes(crtc_state));
dsc_sink_max_bpp= intel_dp_dsc_sink_max_compressed_bpp(connector,
-
crtc_state,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+crtc_state->output_format, limits->pipe.max_bpp / 3);
dsc_max_bpp=min(dsc_sink_max_bpp, dsc_src_max_bpp);
dsc_max_bpp=min(dsc_max_bpp, joiner_max_bpp);drivers/gpu/drm/i915/display/intel_dp.h +0
-0@@ -150,10 +150,6 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct intel_display *display,enum
intel_output_formatoutput_format,
u32pipe_bpp, u32 timeslots); -intintel_dp_dsc_sink_min_compressed_bpp(const struct intel_crtc_state *pipe_config);
-int intel_dp_dsc_sink_max_compressed_bpp(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.h +0
-1- const struct
intel_crtc_state*pipe_config,drivers/gpu/drm/i915/display/intel_dp.h +0
-1- int bpc);bool
intel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16);
u8 intel_dp_dsc_get_slice_count(const structintel_connector*connector,
intmode_clock, intmode_hdisplay,
PATCH 24/50 drm/i915/dp: Pass mode clock to dsc_throughput_quirk_max_bpp_x16()
In reply to Imre DeakPrepare for follow-up changes using dsc_throughput_quirk_max_bpp_x16() without an intel_crtc_state pointer.
--- drivers/gpu/drm/i915/display/intel_dp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +4 -6
@@ -2616,11 +2616,8 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,static int dsc_throughput_quirk_max_bpp_x16 (const struct intel_connector *connector, -const struct intel_crtc_state *crtc_state) +int mode_clock) { -const struct drm_display_mode *adjusted_mode = - &crtc_state->hw.adjusted_mode; -if (!connector->dp.dsc_throughput_quirk)return INT_MAX ;
@@ -2640,7 +2637,7 @@ dsc_throughput_quirk_max_bpp_x16(const struct intel_connector *connector,* smaller than the YUV422/420 value, but let's not depend on this * assumption. */ -if (adjusted_mode->crtc_clock < +if (mode_clock <min (connector->dp.dsc_branch_caps.overall_throughput.rgb_yuv444, connector->dp.dsc_branch_caps.overall_throughput.yuv422_420) /2 )return INT_MAX ;
@@ -2704,7 +2701,8 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector, max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp)); - throughput_max_bpp_x16 =dsc_throughput_quirk_max_bpp_x16 (connector, crtc_state); + throughput_max_bpp_x16 = +dsc_throughput_quirk_max_bpp_x16 (connector, adjusted_mode->crtc_clock);if (throughput_max_bpp_x16 < max_link_bpp_x16) { max_link_bpp_x16 = throughput_max_bpp_x16;
Signature · 1 line
2.49.1
Re: [PATCH 24/50] drm/i915/dp: Pass mode clock to dsc_throughput_quirk_max_bpp_x16()
Quoted 9 lines · Imre Deak
Prepare for follow-up changes using
dsc_throughput_quirk_max_bpp_x16()
without anintel_crtc_statepointer.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 10 ++++------1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 48 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2616,11 +2616,8 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
static int
dsc_throughput_quirk_max_bpp_x16(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- const struct intel_crtc_state
*crtc_state)drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int mode_clock){
drivers/gpu/drm/i915/display/intel_dp.c +0
-3-const struct drm_display_mode *adjusted_mode = - &crtc_state->hw.adjusted_mode; -if (!connector->dp.dsc_throughput_quirk)
returnINT_MAX;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2640,7 +2637,7 @@ dsc_throughput_quirk_max_bpp_x16(const structintel_connector *connector, * smaller than the YUV422/420 value, but let's not dependon this
* assumption.
*/drivers/gpu/drm/i915/display/intel_dp.c +1
-1- if (adjusted_mode->crtc_clock < + if (mode_clock <min(connector-
Quoted 1 line
dp.dsc_branch_caps.overall_throughput.rgb_yuv444,
connector-
Quoted 1 line
dp.dsc_branch_caps.overall_throughput.yuv422_420) / 2)
return
INT_MAX;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2704,7 +2701,8 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector,
max_link_bpp_x16=min(max_link_bpp_x16, fxp_q4_from_int(dsc_max_bpp));drivers/gpu/drm/i915/display/intel_dp.c +0
-1- throughput_max_bpp_x16 =
dsc_throughput_quirk_max_bpp_x16(connector, crtc_state);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ throughput_max_bpp_x16 = + dsc_throughput_quirk_max_bpp_x16(connector,
adjusted_mode->crtc_clock);
if (throughput_max_bpp_x16<max_link_bpp_x16) {max_link_bpp_x16=throughput_max_bpp_x16;
PATCH 25/50 drm/i915/dp: Factor out compute_min_compressed_bpp_x16()
In reply to Imre DeakFactor out compute_min_compressed_bpp_x16() also used during mode validation in a follow-up change.
--- drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +18 -8
@@ -2645,6 +2645,23 @@ dsc_throughput_quirk_max_bpp_x16(const struct intel_connector *connector,return fxp_q4_from_int (12 ); } +static int compute_min_compressed_bpp_x16 (struct intel_connector *connector, +enum intel_output_format output_format) +{ +int dsc_src_min_bpp, dsc_sink_min_bpp, dsc_min_bpp; +int min_bpp_x16; + + dsc_src_min_bpp =intel_dp_dsc_min_src_compressed_bpp (); + dsc_sink_min_bpp =intel_dp_dsc_sink_min_compressed_bpp (output_format); + dsc_min_bpp =max (dsc_src_min_bpp, dsc_sink_min_bpp); + + min_bpp_x16 =fxp_q4_from_int (dsc_min_bpp); + + min_bpp_x16 =align_min_compressed_bpp_x16 (connector, min_bpp_x16); + +return min_bpp_x16; +} +/* * Calculate the output link min, max bpp values in limits based on the pipe bpp * range, crtc_state and dsc mode. Return true on success.
@@ -2674,18 +2691,11 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector, limits->link.min_bpp_x16 =fxp_q4_from_int (limits->pipe.min_bpp); }else { -int dsc_src_min_bpp, dsc_sink_min_bpp, dsc_min_bpp;int dsc_src_max_bpp, dsc_sink_max_bpp, dsc_max_bpp;int throughput_max_bpp_x16;int joiner_max_bpp; - - dsc_src_min_bpp =intel_dp_dsc_min_src_compressed_bpp (); - dsc_sink_min_bpp =intel_dp_dsc_sink_min_compressed_bpp (crtc_state->output_format); - dsc_min_bpp =max (dsc_src_min_bpp, dsc_sink_min_bpp); - limits->link.min_bpp_x16 =fxp_q4_from_int (dsc_min_bpp); - limits->link.min_bpp_x16 = -align_min_compressed_bpp_x16 (connector, limits->link.min_bpp_x16); +compute_min_compressed_bpp_x16 (connector, crtc_state->output_format); dsc_src_max_bpp =dsc_src_max_compressed_bpp (intel_dp); joiner_max_bpp =
Signature · 1 line
2.49.1
Re: [PATCH 25/50] drm/i915/dp: Factor out compute_min_compressed_bpp_x16()
Quoted 22 lines · Imre Deak
Factor out
compute_min_compressed_bpp_x16()also used during mode validation in a follow-up change.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++------ --1 file changed, 18 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2645,6 +2645,23 @@ dsc_throughput_quirk_max_bpp_x16(const struct intel_connector *connector, return fxp_q4_from_int(12); }
+static int compute_min_compressed_bpp_x16(structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ enum intel_output_format
Quoted 2 lines
output_format)
+{
Could be "const struct intel_connector". align_min_compressed_bpp_x16() also takes const intel_connector
with that,
Quoted 50 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+int dsc_src_min_bpp, dsc_sink_min_bpp, dsc_min_bpp; +int min_bpp_x16; + + dsc_src_min_bpp =intel_dp_dsc_min_src_compressed_bpp (); + dsc_sink_min_bpp =
intel_dp_dsc_sink_min_compressed_bpp(output_format);drivers/gpu/drm/i915/display/intel_dp.c +5
-0+ dsc_min_bpp =max (dsc_src_min_bpp, dsc_sink_min_bpp); + + min_bpp_x16 =fxp_q4_from_int (dsc_min_bpp); + + min_bpp_x16 = align_min_compressed_bpp_x16(connector,
min_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ +return min_bpp_x16; +} +/*
* Calculate the output link min, max bpp values in limits based on the pipe bpp
* range,crtc_stateand dsc mode. Return true on success.drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2674,18 +2691,11 @@intel_dp_compute_config_link_bpp_limits(struct
intel_connector*connector,
limits->link.min_bpp_x16= fxp_q4_from_int(limits-Quoted 1 line
pipe.min_bpp);
} else {
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-int dsc_src_min_bpp, dsc_sink_min_bpp, dsc_min_bpp;int
dsc_src_max_bpp,dsc_sink_max_bpp,dsc_max_bpp; intthroughput_max_bpp_x16;
intjoiner_max_bpp;drivers/gpu/drm/i915/display/intel_dp.c +0
-2- - dsc_src_min_bpp =
intel_dp_dsc_min_src_compressed_bpp();drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_sink_min_bpp =
intel_dp_dsc_sink_min_compressed_bpp(crtc_state->output_format);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_min_bpp = max(dsc_src_min_bpp,
dsc_sink_min_bpp);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- limits->link.min_bpp_x16 =
fxp_q4_from_int(dsc_min_bpp);
-
limits->link.min_bpp_x16=drivers/gpu/drm/i915/display/intel_dp.c +0
-1- align_min_compressed_bpp_x16(connector,
limits->link.min_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ compute_min_compressed_bpp_x16(connector,
crtc_state->output_format);
dsc_src_max_bpp=dsc_src_max_compressed_bpp(intel_dp);
joiner_max_bpp=
Re: [PATCH 25/50] drm/i915/dp: Factor out compute_min_compressed_bpp_x16()
Quoted 10 lines · Vinod Govindapillai
Quoted 9 lines · Imre Deak
Factor out
compute_min_compressed_bpp_x16()also used during mode validation in a follow-up change.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++------ --1 file changed, 18 insertions(+), 8 deletions(-)
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_dp.c dsc_throughput_quirk_max_bpp_x16(const struct intel_connector *connector, · line 2650
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2645,6 +2645,23 @@ dsc_throughput_quirk_max_bpp_x16(const struct intel_connector *connector, return fxp_q4_from_int(12); }drivers/gpu/drm/i915/display/intel_dp.c +3
-0+static int compute_min_compressed_bpp_x16 (struct intel_connector *connector, + enum intel_output_format output_format) +{Could be "const struct
intel_connector".
My understanding is that the connector/crtc etc. objects should not be passed via a const pointer vs. the connector_state/crtc_state etc. state pointers for these objects which should be const whenever possible.
Quoted 1 line
align_min_compressed_bpp_x16()also takes constintel_connector
Yes, but only to match align_max_compressed_bpp_x16() which is also called from dsc_compute_compressed_bpp(). The latter one can pass only a const connector pointer to the called function.
Quoted 3 lines
with that,
Reviewed-by Vinod Govindapillai <[email protected]>
Re: [PATCH 25/50] drm/i915/dp: Factor out compute_min_compressed_bpp_x16()
Quoted 31 lines · Imre Deak
Quoted 21 lines · Vinod Govindapillai
Quoted 20 lines · Imre Deak
Factor out
compute_min_compressed_bpp_x16()also used during mode validation in a follow-up change.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 26 +++++++++++++++++--
----
--1 file changed, 18 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2645,6 +2645,23 @@ dsc_throughput_quirk_max_bpp_x16(conststruct
intel_connector*connector,
returnfxp_q4_from_int(12);
}Quoted 8 lines
Quoted 6 lines
+static int compute_min_compressed_bpp_x16(structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ enum
intel_output_formatoutput_format)
+{Could be "const struct
intel_connector".
Quoted 5 lines
My understanding is that the connector/crtc etc. objects should not be
passed via a const pointer vs. the connector_state/crtc_state etc. state pointers for these objects which should be const whenever possible.
Okay. Good to know.
BR
Vinod
Quoted 11 lines
Quoted 2 lines
align_min_compressed_bpp_x16()also takes constintel_connectorYes, but only to match
align_max_compressed_bpp_x16()which is also called fromdsc_compute_compressed_bpp(). The latter one can pass only a
const connector pointer to the called function.Quoted 3 lines
with that,
Reviewed-by Vinod Govindapillai <[email protected]>
PATCH 26/50 drm/i915/dp: Factor out compute_max_compressed_bpp_x16()
In reply to Imre DeakFactor out compute_max_compressed_bpp_x16() also used during mode validation in a follow-up change.
--- drivers/gpu/drm/i915/display/intel_dp.c | 82 +++++++++++++++---------- 1 file changed, 49 insertions(+), 33 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +49 -33
@@ -2662,6 +2662,48 @@ static int compute_min_compressed_bpp_x16(struct intel_connector *connector,return min_bpp_x16; } +static int compute_max_compressed_bpp_x16 (struct intel_connector *connector, +int mode_clock,int mode_hdisplay, +int num_joined_pipes, +enum intel_output_format output_format, +int pipe_max_bpp,int max_link_bpp_x16) +{ +struct intel_display *display =to_intel_display (connector); +struct intel_dp *intel_dp =intel_attached_dp (connector); +int dsc_src_max_bpp, dsc_sink_max_bpp, dsc_max_bpp; +int throughput_max_bpp_x16; +int joiner_max_bpp; + + dsc_src_max_bpp =dsc_src_max_compressed_bpp (intel_dp); + joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, + mode_clock, + mode_hdisplay, + num_joined_pipes); + dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp (connector, + output_format, + pipe_max_bpp /3 ); + dsc_max_bpp =min (dsc_sink_max_bpp, dsc_src_max_bpp); + dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); + + max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp)); + + throughput_max_bpp_x16 =dsc_throughput_quirk_max_bpp_x16 (connector, + mode_clock); +if (throughput_max_bpp_x16 < max_link_bpp_x16) { + max_link_bpp_x16 = throughput_max_bpp_x16; + +drm_dbg_kms (display->drm, +"[CONNECTOR:%d:%s] Decreasing link max bpp to " FXP_Q4_FMT " due to DSC throughput quirk\n" , + connector->base.base.id, connector->base.name, +FXP_Q4_ARGS (max_link_bpp_x16)); + } + + max_link_bpp_x16 =align_max_compressed_bpp_x16 (connector, output_format, + pipe_max_bpp, max_link_bpp_x16); + +return max_link_bpp_x16; +} +/* * Calculate the output link min, max bpp values in limits based on the pipe bpp * range, crtc_state and dsc mode. Return true on success.
@@ -2691,43 +2733,17 @@ intel_dp_compute_config_link_bpp_limits(struct intel_connector *connector, limits->link.min_bpp_x16 =fxp_q4_from_int (limits->pipe.min_bpp); }else { -int dsc_src_max_bpp, dsc_sink_max_bpp, dsc_max_bpp; -int throughput_max_bpp_x16; -int joiner_max_bpp; limits->link.min_bpp_x16 =compute_min_compressed_bpp_x16 (connector, crtc_state->output_format); - dsc_src_max_bpp =dsc_src_max_compressed_bpp (intel_dp); - joiner_max_bpp = -get_max_compressed_bpp_with_joiner (display, - adjusted_mode->crtc_clock, - adjusted_mode->hdisplay, -intel_crtc_num_joined_pipes (crtc_state)); - dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp (connector, - crtc_state->output_format, - limits->pipe.max_bpp /3 ); - dsc_max_bpp =min (dsc_sink_max_bpp, dsc_src_max_bpp); - dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); - - max_link_bpp_x16 =min (max_link_bpp_x16,fxp_q4_from_int (dsc_max_bpp)); - - throughput_max_bpp_x16 = -dsc_throughput_quirk_max_bpp_x16 (connector, adjusted_mode->crtc_clock); -if (throughput_max_bpp_x16 < max_link_bpp_x16) { - max_link_bpp_x16 = throughput_max_bpp_x16; - -drm_dbg_kms (display->drm, -"[CRTC:%d:%s][CONNECTOR:%d:%s] Decreasing link max bpp to " FXP_Q4_FMT " due to DSC throughput quirk\n" , - crtc->base.base.id, crtc->base.name, - connector->base.base.id, connector->base.name, -FXP_Q4_ARGS (max_link_bpp_x16)); - } - max_link_bpp_x16 = -align_max_compressed_bpp_x16 (connector, - crtc_state->output_format, - limits->pipe.max_bpp, - max_link_bpp_x16); +compute_max_compressed_bpp_x16 (connector, + adjusted_mode->crtc_clock, + adjusted_mode->hdisplay, +intel_crtc_num_joined_pipes (crtc_state), + crtc_state->output_format, + limits->pipe.max_bpp, + max_link_bpp_x16); } limits->link.max_bpp_x16 = max_link_bpp_x16;
Signature · 1 line
2.49.1
Re: [PATCH 26/50] drm/i915/dp: Factor out compute_max_compressed_bpp_x16()
Quoted 18 lines · Imre Deak
Factor out
compute_max_compressed_bpp_x16()also used during mode validation in a follow-up change.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 82 +++++++++++++++-------- --1 file changed, 49 insertions(+), 33 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2662,6 +2662,48 @@ static int compute_min_compressed_bpp_x16(struct intel_connector *connector, return min_bpp_x16; }
Quoted 3 lines
+static int compute_max_compressed_bpp_x16(structintel_connector*connector,
const ?
Quoted 139 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int mode_clock, int
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ int num_joined_pipes, + enum intel_output_format
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int pipe_max_bpp, int
max_link_bpp_x16)drivers/gpu/drm/i915/display/intel_dp.c +10
-0+{ +struct intel_display *display =to_intel_display (connector); +struct intel_dp *intel_dp =intel_attached_dp (connector); +int dsc_src_max_bpp, dsc_sink_max_bpp, dsc_max_bpp; +int throughput_max_bpp_x16; +int joiner_max_bpp; + + dsc_src_max_bpp =dsc_src_max_compressed_bpp (intel_dp); + joiner_max_bpp = get_max_compressed_bpp_with_joiner(display, +
mode_clock,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp(connector,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ outp
ut_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe
_max_bpp/ 3);drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ dsc_max_bpp =min (dsc_sink_max_bpp, dsc_src_max_bpp); + dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); + + max_link_bpp_x16 = min(max_link_bpp_x16,
fxp_q4_from_int(dsc_max_bpp));drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ + throughput_max_bpp_x16 =dsc_throughput_quirk_max_bpp_x16(connector,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
mode_clock);drivers/gpu/drm/i915/display/intel_dp.c +5
-0+if (throughput_max_bpp_x16 < max_link_bpp_x16) { + max_link_bpp_x16 = throughput_max_bpp_x16; + + drm_dbg_kms(display->drm, + "[CONNECTOR:%d:%s] Decreasing link maxbpp to "
FXP_Q4_FMT" due to DSC throughput quirk\n",drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ connector->base.base.id, connector-Quoted 1 line
base.name,
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ FXP_Q4_ARGS(max_link_bpp_x16)); + } + + max_link_bpp_x16 = align_max_compressed_bpp_x16(connector,
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe_max_bpp,
max_link_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ +return max_link_bpp_x16; +} +/*
* Calculate the output link min, max bpp values in limits based on the pipe bpp
* range,crtc_stateand dsc mode. Return true on success.drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2691,43 +2733,17 @@intel_dp_compute_config_link_bpp_limits(struct
intel_connector*connector,
limits->link.min_bpp_x16= fxp_q4_from_int(limits-Quoted 1 line
pipe.min_bpp);
} else {
drivers/gpu/drm/i915/display/intel_dp.c +0
-3-int dsc_src_max_bpp, dsc_sink_max_bpp, dsc_max_bpp; -int throughput_max_bpp_x16; -int joiner_max_bpp;
limits->link.min_bpp_x16=compute_min_compressed_bpp_x16(connector, crtc_state->output_format);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_src_max_bpp =
dsc_src_max_compressed_bpp(intel_dp);drivers/gpu/drm/i915/display/intel_dp.c +0
-3- joiner_max_bpp = - get_max_compressed_bpp_with_joiner(display, -
adjusted_mode->crtc_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
adjusted_mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
intel_crtc_num_joined_pipes(crtc_state));drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_sink_max_bpp =intel_dp_dsc_sink_max_compressed_bpp(connector,
-crtc_state->output_format, - limits->pipe.max_bpp / 3);drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_max_bpp = min(dsc_sink_max_bpp,
dsc_src_max_bpp);drivers/gpu/drm/i915/display/intel_dp.c +0
-3- dsc_max_bpp =min (dsc_max_bpp, joiner_max_bpp); - - max_link_bpp_x16 = min(max_link_bpp_x16,
fxp_q4_from_int(dsc_max_bpp));drivers/gpu/drm/i915/display/intel_dp.c +0
-3- - throughput_max_bpp_x16 = - dsc_throughput_quirk_max_bpp_x16(connector,
adjusted_mode->crtc_clock);drivers/gpu/drm/i915/display/intel_dp.c +0
-5-if (throughput_max_bpp_x16 < max_link_bpp_x16) { - max_link_bpp_x16 = throughput_max_bpp_x16; - - drm_dbg_kms(display->drm, - "[CRTC:%d:%s][CONNECTOR:%d:%s]Decreasing link max bpp to "
FXP_Q4_FMT" due to DSC throughput quirk\n",drivers/gpu/drm/i915/display/intel_dp.c +0
-1- crtc->base.base.id, crtc-Quoted 1 line
base.name,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1- connector->base.base.id,
connector->base.name,drivers/gpu/drm/i915/display/intel_dp.c +0
-3- FXP_Q4_ARGS(max_link_bpp_x16)); - } -
max_link_bpp_x16=drivers/gpu/drm/i915/display/intel_dp.c +0
-2- align_max_compressed_bpp_x16(connector, - crtc_state-Quoted 1 line
output_format,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- limits-Quoted 1 line
pipe.max_bpp,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
max_link_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ compute_max_compressed_bpp_x16(connector, +
adjusted_mode->crtc_clock,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
adjusted_mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
intel_crtc_num_joined_pipes(crtc_state),drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ crtc_state-Quoted 1 line
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ limits-Quoted 1 line
pipe.max_bpp,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
max_link_bpp_x16);
}
limits->link.max_bpp_x16=max_link_bpp_x16;
PATCH 27/50 drm/i915/dp: Add intel_dp_mode_valid_with_dsc()
In reply to Imre DeakAdd intel_dp_mode_valid_with_dsc() and call this for an SST/MST mode validation to prepare for a follow-up change using a way to verify the mode's required BW the same way this is done elsewhere during state computation (which in turn depends on the mode's effective data rate with the corresponding BW overhead).
--- drivers/gpu/drm/i915/display/intel_dp.c | 57 +++++++++++++++------ drivers/gpu/drm/i915/display/intel_dp.h | 7 +++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 29 ++++------- 3 files changed, 57 insertions(+), 36 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +41 -16
@@ -1579,24 +1579,20 @@ intel_dp_mode_valid(struct drm_connector *_connector, dsc_slice_count =drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, true); + dsc = dsc_max_compressed_bpp && dsc_slice_count; }else if (drm_dp_sink_supports_fec (connector->dp.fec_capability)) { - dsc_max_compressed_bpp = -intel_dp_dsc_get_max_compressed_bpp (display, - max_link_clock, - max_lanes, - target_clock, - mode->hdisplay, - num_joined_pipes, - output_format, - pipe_bpp,64 ); - dsc_slice_count = -intel_dp_dsc_get_slice_count (connector, - target_clock, - mode->hdisplay, - num_joined_pipes); +unsigned long bw_overhead_flags =0 ; + +if (!drm_dp_is_uhbr_rate (max_link_clock)) + bw_overhead_flags |=DRM_DP_BW_OVERHEAD_FEC ; + + dsc =intel_dp_mode_valid_with_dsc (connector, + max_link_clock, max_lanes, + target_clock, mode->hdisplay, + num_joined_pipes, + output_format, pipe_bpp, + bw_overhead_flags); } - - dsc = dsc_max_compressed_bpp && dsc_slice_count; }if (intel_dp_joiner_needs_dsc (display, num_joined_pipes) && !dsc)
@@ -2704,6 +2700,35 @@ static int compute_max_compressed_bpp_x16(struct intel_connector *connector,return max_link_bpp_x16; } +bool intel_dp_mode_valid_with_dsc (struct intel_connector *connector, +int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int num_joined_pipes, +enum intel_output_format output_format, +int pipe_bpp,unsigned long bw_overhead_flags) +{ +struct intel_display *display =to_intel_display (connector); +int dsc_max_compressed_bpp; +int dsc_slice_count; + + dsc_max_compressed_bpp = +intel_dp_dsc_get_max_compressed_bpp (display, + link_clock, + lane_count, + mode_clock, + mode_hdisplay, + num_joined_pipes, + output_format, + pipe_bpp,64 ); + dsc_slice_count = +intel_dp_dsc_get_slice_count (connector, + mode_clock, + mode_hdisplay, + num_joined_pipes); + +return dsc_max_compressed_bpp && dsc_slice_count; +} +/* * Calculate the output link min, max bpp values in limits based on the pipe bpp * range, crtc_state and dsc mode. Return true on success.
drivers/gpu/drm/i915/display/intel_dp.h +7 -0
@@ -150,6 +150,13 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct intel_display *display,enum intel_output_format output_format, u32 pipe_bpp, u32 timeslots); + +bool intel_dp_mode_valid_with_dsc (struct intel_connector *connector, +int link_clock,int lane_count, +int mode_clock,int mode_hdisplay, +int num_joined_pipes, +enum intel_output_format output_format, +int pipe_bpp,unsigned long bw_overhead_flags);bool intel_dp_dsc_valid_compressed_bpp (struct intel_dp *intel_dp,int bpp_x16); u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, int mode_clock, int mode_hdisplay,
drivers/gpu/drm/i915/display/intel_dp_mst.c +9 -20
@@ -1462,8 +1462,6 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,DRM_DP_BW_OVERHEAD_MST |DRM_DP_BW_OVERHEAD_SSC_REF_CLK ;int ret;bool dsc = false; -u16 dsc_max_compressed_bpp =0 ; -u8 dsc_slice_count =0 ;int target_clock = mode->clock;int num_joined_pipes;
@@ -1522,31 +1520,22 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,return 0 ; } -if (intel_dp_has_dsc (connector)) { +if (intel_dp_has_dsc (connector) &&drm_dp_sink_supports_fec (connector->dp.fec_capability)) {/* * TBD pass the connector BPC, * for now U8_MAX so that max BPC on that platform would be picked */ int pipe_bpp =intel_dp_dsc_compute_max_bpp (connector,U8_MAX ); -if (drm_dp_sink_supports_fec (connector->dp.fec_capability)) { - dsc_max_compressed_bpp = -intel_dp_dsc_get_max_compressed_bpp (display, - max_link_clock, - max_lanes, - target_clock, - mode->hdisplay, - num_joined_pipes, -INTEL_OUTPUT_FORMAT_RGB , - pipe_bpp,64 ); - dsc_slice_count = -intel_dp_dsc_get_slice_count (connector, - target_clock, - mode->hdisplay, - num_joined_pipes); - } +if (!drm_dp_is_uhbr_rate (max_link_clock)) + bw_overhead_flags |=DRM_DP_BW_OVERHEAD_FEC ; - dsc = dsc_max_compressed_bpp && dsc_slice_count; + dsc =intel_dp_mode_valid_with_dsc (connector, + max_link_clock, max_lanes, + target_clock, mode->hdisplay, + num_joined_pipes, +INTEL_OUTPUT_FORMAT_RGB , pipe_bpp, + bw_overhead_flags); }if (intel_dp_joiner_needs_dsc (display, num_joined_pipes) && !dsc) {
Signature · 1 line
2.49.1
Re: [PATCH 27/50] drm/i915/dp: Add intel_dp_mode_valid_with_dsc()
Quoted 94 lines · Imre Deak
Add
intel_dp_mode_valid_with_dsc()and call this for an SST/MST mode validation to prepare for a follow-up change using a way to verify the
mode's required BW the same way this is done elsewhere during state computation (which in turn depends on the mode's effective data rate with the corresponding BW overhead).Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 57 +++++++++++++++---- --
drivers/gpu/drm/i915/display/intel_dp.h | 7 +++drivers/gpu/drm/i915/display/intel_dp_mst.c| 29 ++++-------3 files changed, 57 insertions(+), 36 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1579,24 +1579,20 @@ intel_dp_mode_valid(struct drm_connector *_connector,
dsc_slice_count= drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd,
true );drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ dsc = dsc_max_compressed_bpp &&
dsc_slice_count;
} else if (drm_dp_sink_supports_fec(connector-Quoted 1 line
dp.fec_capability)) {
drivers/gpu/drm/i915/display/intel_dp.c +0
-2- dsc_max_compressed_bpp = -intel_dp_dsc_get_max_compressed_bpp(display,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
max_link_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
max_lanes,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
target_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
num_joined_pipes,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
output_format,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
pipe_bpp, 64);drivers/gpu/drm/i915/display/intel_dp.c +0
-2- dsc_slice_count = -intel_dp_dsc_get_slice_count(connector,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
target_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- mode-Quoted 1 line
hdisplay,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +4
-0+unsigned long bw_overhead_flags =0 ; + +if (!drm_dp_is_uhbr_rate (max_link_clock)) + bw_overhead_flags |=
DRM_DP_BW_OVERHEAD_FEC;drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ + dsc =intel_dp_mode_valid_with_dsc(connector,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
max_link_clock,max_lanes,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
target_clock,mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
num_joined_pipes,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
output_format,pipe_bpp,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
bw_overhead_flags);
}drivers/gpu/drm/i915/display/intel_dp.c +0
-2- - dsc = dsc_max_compressed_bpp && dsc_slice_count;}
if (intel_dp_joiner_needs_dsc(display, num_joined_pipes)&& !dsc)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2704,6 +2700,35 @@ static int compute_max_compressed_bpp_x16(struct intel_connector *connector, return max_link_bpp_x16; }drivers/gpu/drm/i915/display/intel_dp.c +5
-0+bool intel_dp_mode_valid_with_dsc (struct intel_connector *connector, + int link_clock, int lane_count, + int mode_clock, int mode_hdisplay, + int num_joined_pipes, + enum intel_output_format
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int pipe_bpp, unsigned long
Quoted 1 line
bw_overhead_flags)
bw_overhead_flags is not used in this patch. But I see that this is being used in the next patch.
Quoted 132 lines
drivers/gpu/drm/i915/display/intel_dp.c +12
-0+{ +struct intel_display *display =to_intel_display (connector); +int dsc_max_compressed_bpp; +int dsc_slice_count; + + dsc_max_compressed_bpp = + intel_dp_dsc_get_max_compressed_bpp(display, + link_clock, + lane_count, + mode_clock, + mode_hdisplay, +
num_joined_pipes,drivers/gpu/drm/i915/display/intel_dp.c +11
-0+ output_format, + pipe_bpp, 64); + dsc_slice_count = +intel_dp_dsc_get_slice_count (connector, + mode_clock, + mode_hdisplay, + num_joined_pipes); + +return dsc_max_compressed_bpp && dsc_slice_count; +} +/*
* Calculate the output link min, max bpp values in limits based on the pipe bpp
* range,crtc_stateand dsc mode. Return true on success.drivers/gpu/drm/i915/display/intel_dp.h +0
-0@@ -150,6 +150,13 @@ u16 intel_dp_dsc_get_max_compressed_bpp(struct intel_display *display,enum
intel_output_formatoutput_format,
u32pipe_bpp, u32 timeslots);drivers/gpu/drm/i915/display/intel_dp.h +6
-0+ +bool intel_dp_mode_valid_with_dsc (struct intel_connector *connector, + int link_clock, int lane_count, + int mode_clock, int mode_hdisplay, + int num_joined_pipes, + enum intel_output_format
output_format,drivers/gpu/drm/i915/display/intel_dp.h +1
-0+ int pipe_bpp, unsigned long
bw_overhead_flags);
boolintel_dp_dsc_valid_compressed_bpp(struct intel_dp *intel_dp, int bpp_x16);
u8 intel_dp_dsc_get_slice_count(const structintel_connector*connector,
intmode_clock, intmode_hdisplay,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0@@ -1462,8 +1462,6 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,
DRM_DP_BW_OVERHEAD_MST|DRM_DP_BW_OVERHEAD_SSC_REF_CLK;
int ret;
bool dsc = false;drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-2-u16 dsc_max_compressed_bpp =0 ; -u8 dsc_slice_count =0 ;int
target_clock=mode->clock;
intnum_joined_pipes;drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0@@ -1522,31 +1520,22 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector, return 0; }drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-1-if (intel_dp_has_dsc (connector)) { + if (intel_dp_has_dsc(connector) &&
drm_dp_sink_supports_fec(connector->dp.fec_capability)) { /*
* TBD pass the connector BPC,
* for nowU8_MAXso that max BPC on that platform would be picked
*/
intpipe_bpp=intel_dp_dsc_compute_max_bpp(connector, U8_MAX);drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1- if (drm_dp_sink_supports_fec(connector-Quoted 1 line
dp.fec_capability)) {
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-2- dsc_max_compressed_bpp = -intel_dp_dsc_get_max_compressed_bpp(display,
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
max_link_clock,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
max_lanes,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
target_clock,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
num_joined_pipes,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
INTEL_OUTPUT_FORMAT_RGB,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
pipe_bpp, 64);drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-2- dsc_slice_count = -intel_dp_dsc_get_slice_count(connector,
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
target_clock,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1- mode-Quoted 1 line
hdisplay,
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-1- } +if (!drm_dp_is_uhbr_rate (max_link_clock)) + bw_overhead_flags |=DRM_DP_BW_OVERHEAD_FEC ;drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-1- dsc = dsc_max_compressed_bpp && dsc_slice_count; + dsc = intel_dp_mode_valid_with_dsc(connector, + max_link_clock,
max_lanes,drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-0+ target_clock,
mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-0+ num_joined_pipes, +
INTEL_OUTPUT_FORMAT_RGB,pipe_bpp,drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-0+
bw_overhead_flags);
}
if (intel_dp_joiner_needs_dsc(display, num_joined_pipes)&& !dsc) {
PATCH 28/50 drm/i915/dp: Unify detect and compute time DSC mode BW validation
In reply to Imre DeakAtm, a DP DSC video mode's required BW vs. the available BW is determined by calculating the maximum compressed BPP value allowed by the available BW. Doing that using a closed-form formula as it's done atm (vs. an iterative way) is problematic, since the overhead of the required BW itself depends on the BPP value being calculated. Instead of that calculate the required BW for the minimum compressed BPP value supported both by the source and the sink and check this BW against the available BW. This change also aligns the BW calculation during mode validation with how this is done during state computation, calculating the required effective data rate with the corresponding BW overhead.
--- drivers/gpu/drm/i915/display/intel_dp.c | 137 ++++-------------------- drivers/gpu/drm/i915/display/intel_dp.h | 8 -- 2 files changed, 18 insertions(+), 127 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +18 -119
@@ -895,49 +895,6 @@ static int align_max_vesa_compressed_bpp_x16(int max_link_bpp_x16)return 0 ; } -static u32 intel_dp_dsc_nearest_valid_bpp (struct intel_display *display,u32 bpp,u32 pipe_bpp) -{ -u32 bits_per_pixel = bpp; - -/* Error out if the max bpp is less than smallest allowed valid bpp */ -if (bits_per_pixel < valid_dsc_bpp[0 ]) { -drm_dbg_kms (display->drm,"Unsupported BPP %u, min %u\n" , - bits_per_pixel, valid_dsc_bpp[0 ]); -return 0 ; - } - -/* From XE_LPD onwards we support from bpc upto uncompressed bpp-1 BPPs */ -if (DISPLAY_VER (display) >=13 ) { - bits_per_pixel =min (bits_per_pixel, pipe_bpp -1 ); - -/* -* According to BSpec, 27 is the max DSC output bpp, -* 8 is the min DSC output bpp. -* While we can still clamp higher bpp values to 27, saving bandwidth, -* if it is required to oompress up to bpp < 8, means we can't do -* that and probably means we can't fit the required mode, even with -* DSC enabled. -*/ -if (bits_per_pixel <8 ) { -drm_dbg_kms (display->drm, -"Unsupported BPP %u, min 8\n" , - bits_per_pixel); -return 0 ; - } - bits_per_pixel =min_t (u32, bits_per_pixel,27 ); - }else { -int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); - -/* Find the nearest match in the array of known BPPs from VESA */ - link_bpp_x16 =align_max_vesa_compressed_bpp_x16 (link_bpp_x16); - -drm_WARN_ON (display->drm,fxp_q4_to_frac (link_bpp_x16)); - bits_per_pixel =fxp_q4_to_int (link_bpp_x16); - } - -return bits_per_pixel; -} -static int bigjoiner_interface_bits (struct intel_display *display) {return DISPLAY_VER (display) >=14 ?36 :24 ;
@@ -1001,64 +958,6 @@ u32 get_max_compressed_bpp_with_joiner(struct intel_display *display,return max_bpp; } -/* TODO: return a bpp_x16 value */ -u16 intel_dp_dsc_get_max_compressed_bpp (struct intel_display *display, -u32 link_clock,u32 lane_count, -u32 mode_clock,u32 mode_hdisplay, -int num_joined_pipes, -enum intel_output_format output_format, -u32 pipe_bpp, -u32 timeslots) -{ -u32 bits_per_pixel, joiner_max_bpp; - -/* -* Available Link Bandwidth(Kbits/sec) = (NumberOfLanes)* -* (LinkSymbolClock)* 8 * (TimeSlots / 64) -* for SST -> TimeSlots is 64(i.e all TimeSlots that are available) -* for MST -> TimeSlots has to be calculated, based on mode requirements -* -* Due to FEC overhead, the available bw is reduced to 97.2261%. -* To support the given mode: -* Bandwidth required should be <= Available link Bandwidth * FEC Overhead -* =>ModeClock * bits_per_pixel <= Available Link Bandwidth * FEC Overhead -* =>bits_per_pixel <= Available link Bandwidth * FEC Overhead / ModeClock -* =>bits_per_pixel <= (NumberOfLanes * LinkSymbolClock) * 8 (TimeSlots / 64) / -* (ModeClock / FEC Overhead) -* =>bits_per_pixel <= (NumberOfLanes * LinkSymbolClock * TimeSlots) / -* (ModeClock / FEC Overhead * 8) -*/ - bits_per_pixel = ((link_clock * lane_count) * timeslots) / - (intel_dp_mode_to_fec_clock (mode_clock) *8 ); - -/* Bandwidth required for 420 is half, that of 444 format */ -if (output_format ==INTEL_OUTPUT_FORMAT_YCBCR420 ) - bits_per_pixel *=2 ; - -/* -* According to DSC 1.2a Section 4.1.1 Table 4.1 the maximum -* supported PPS value can be 63.9375 and with the further -* mention that for 420, 422 formats, bpp should be programmed double -* the target bpp restricting our target bpp to be 31.9375 at max. -*/ -if (output_format ==INTEL_OUTPUT_FORMAT_YCBCR420 ) - bits_per_pixel =min_t (u32, bits_per_pixel,31 ); - -drm_dbg_kms (display->drm,"Max link bpp is %u for %u timeslots " -"total bw %u pixel clock %u\n" , - bits_per_pixel, timeslots, - (link_clock * lane_count *8 ), -intel_dp_mode_to_fec_clock (mode_clock)); - - joiner_max_bpp =get_max_compressed_bpp_with_joiner (display, mode_clock, - mode_hdisplay, num_joined_pipes); - bits_per_pixel =min (bits_per_pixel, joiner_max_bpp); - - bits_per_pixel =intel_dp_dsc_nearest_valid_bpp (display, bits_per_pixel, pipe_bpp); - -return bits_per_pixel; -} -u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector,int mode_clock,int mode_hdisplay,int num_joined_pipes)
@@ -2707,26 +2606,26 @@ bool intel_dp_mode_valid_with_dsc(struct intel_connector *connector,enum intel_output_format output_format, int pipe_bpp, unsigned long bw_overhead_flags) { - struct intel_display *display = to_intel_display(connector); -int dsc_max_compressed_bpp; -int dsc_slice_count; + struct intel_dp *intel_dp = intel_attached_dp(connector); +int min_bpp_x16 =compute_min_compressed_bpp_x16 (connector, output_format); +int max_bpp_x16 =compute_max_compressed_bpp_x16 (connector, + mode_clock, mode_hdisplay, + num_joined_pipes, + output_format, + pipe_bpp,INT_MAX ); +int dsc_slice_count =intel_dp_dsc_get_slice_count (connector, + mode_clock, + mode_hdisplay, + num_joined_pipes); - dsc_max_compressed_bpp = -intel_dp_dsc_get_max_compressed_bpp (display, - link_clock, - lane_count, - mode_clock, - mode_hdisplay, - num_joined_pipes, - output_format, - pipe_bpp,64 ); - dsc_slice_count = -intel_dp_dsc_get_slice_count (connector, - mode_clock, - mode_hdisplay, - num_joined_pipes); +if (min_bpp_x16 <=0 || min_bpp_x16 > max_bpp_x16) +return false; -return dsc_max_compressed_bpp && dsc_slice_count; +return is_bw_sufficient_for_dsc_config (intel_dp, + link_clock, lane_count, + mode_clock, mode_hdisplay, + dsc_slice_count, min_bpp_x16, + bw_overhead_flags); }/*
drivers/gpu/drm/i915/display/intel_dp.h +0 -8
@@ -143,14 +143,6 @@ bool intel_digital_port_connected(struct intel_encoder *encoder);bool intel_digital_port_connected_locked (struct intel_encoder *encoder);int intel_dp_dsc_compute_max_bpp (const struct intel_connector *connector,u8 dsc_max_bpc); -u16 intel_dp_dsc_get_max_compressed_bpp (struct intel_display *display, -u32 link_clock,u32 lane_count, -u32 mode_clock,u32 mode_hdisplay, -int num_joined_pipes, -enum intel_output_format output_format, -u32 pipe_bpp, -u32 timeslots); - bool intel_dp_mode_valid_with_dsc(struct intel_connector *connector, int link_clock, int lane_count, int mode_clock, int mode_hdisplay,
Signature · 1 line
2.49.1
Re: [PATCH 28/50] drm/i915/dp: Unify detect and compute time DSC mode BW validation
Quoted 14 lines · Imre Deak
Atm, a DP DSC video mode's required BW vs. the available BW is determined by calculating the maximum compressed BPP value allowed by the available BW. Doing that using a closed-form formula as it's done atm (vs. an iterative way) is problematic, since the overhead of the required BW itself depends on the BPP value being calculated. Instead of
that calculate the required BW for the minimum compressed BPP value supported both by the source and the sink and check this BW against the
available BW. This change also aligns the BW calculation during mode validation with how this is done during state computation, calculating
the required effective data rate with the corresponding BW overhead.
Quoted 7 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 137 ++++------------------ --
drivers/gpu/drm/i915/display/intel_dp.h | 8 --2 files changed, 18 insertions(+), 127 deletions(-)
Quoted 241 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -895,49 +895,6 @@ static int align_max_vesa_compressed_bpp_x16(int max_link_bpp_x16) return 0; }
-static u32intel_dp_dsc_nearest_valid_bpp(struct intel_display *display, u32 bpp, u32 pipe_bpp)drivers/gpu/drm/i915/display/intel_dp.c +0
-4-{ -u32 bits_per_pixel = bpp; - -/* Error out if the max bpp is less than smallest allowed valid bpp */
drivers/gpu/drm/i915/display/intel_dp.c +0
-2-if (bits_per_pixel < valid_dsc_bpp[0 ]) { - drm_dbg_kms(display->drm, "Unsupported BPP %u, min%u\n",
drivers/gpu/drm/i915/display/intel_dp.c +0
-5- bits_per_pixel, valid_dsc_bpp[0]); -return 0 ; - } - -/* From XE_LPD onwards we support from bpc upto uncompressed bpp-1 BPPs */
drivers/gpu/drm/i915/display/intel_dp.c +0
-7-if (DISPLAY_VER (display) >=13 ) { - bits_per_pixel =min (bits_per_pixel, pipe_bpp -1 ); - -/* -* According to BSpec, 27 is the max DSC output bpp, -* 8 is the min DSC output bpp. -* While we can still clamp higher bpp values to 27, saving bandwidth,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-* if it is required to oompress up to bpp < 8, means we can't do
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-* that and probably means we can't fit the required mode, even with
drivers/gpu/drm/i915/display/intel_dp.c +0
-13-* DSC enabled. -*/ -if (bits_per_pixel <8 ) { -drm_dbg_kms (display->drm, - "Unsupported BPP %u, min 8\n", - bits_per_pixel); -return 0 ; - } - bits_per_pixel =min_t (u32, bits_per_pixel,27 ); - }else { -int link_bpp_x16 =fxp_q4_from_int (bits_per_pixel); - -/* Find the nearest match in the array of known BPPs from VESA */
drivers/gpu/drm/i915/display/intel_dp.c +0
-1- link_bpp_x16 =
align_max_vesa_compressed_bpp_x16(link_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +0
-2- - drm_WARN_ON(display->drm,
fxp_q4_to_frac(link_bpp_x16));drivers/gpu/drm/i915/display/intel_dp.c +0
-6- bits_per_pixel =fxp_q4_to_int (link_bpp_x16); - } - -return bits_per_pixel; -} -static int
bigjoiner_interface_bits(struct intel_display *display){
returnDISPLAY_VER(display)>= 14 ? 36 : 24;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1001,64 +958,6 @@ u32 get_max_compressed_bpp_with_joiner(structintel_display *display, return max_bpp; }drivers/gpu/drm/i915/display/intel_dp.c +0
-2-/* TODO: return a bpp_x16 value */ -u16 intel_dp_dsc_get_max_compressed_bpp(struct intel_display*display,
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-u32 link_clock, u32
lane_count,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-u32 mode_clock, u32
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +0
-2-int num_joined_pipes, - enum intel_output_format
output_format,drivers/gpu/drm/i915/display/intel_dp.c +0
-9- u32 pipe_bpp, - u32 timeslots) -{ -u32 bits_per_pixel, joiner_max_bpp; - -/* -* Available Link Bandwidth(Kbits/sec) = (NumberOfLanes)* -* (LinkSymbolClock)* 8 * (TimeSlots / 64) -* for SST -> TimeSlots is 64(i.e all TimeSlots that are available)
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-* for MST -> TimeSlots has to be calculated, based on mode requirements
drivers/gpu/drm/i915/display/intel_dp.c +0
-2-* -* Due to FEC overhead, the available bw is reduced to 97.2261%.
drivers/gpu/drm/i915/display/intel_dp.c +0
-2-* To support the given mode: -* Bandwidth required should be <= Available link Bandwidth * FEC Overhead
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-* =>ModeClock * bits_per_pixel <= Available Link Bandwidth * FEC Overhead
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-* =>bits_per_pixel <= Available link Bandwidth * FEC Overhead / ModeClock
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-* =>bits_per_pixel <= (NumberOfLanes * LinkSymbolClock) * 8 (TimeSlots / 64) /
drivers/gpu/drm/i915/display/intel_dp.c +0
-2-* (ModeClock / FEC Overhead) -* =>bits_per_pixel <= (NumberOfLanes * LinkSymbolClock * TimeSlots) /
drivers/gpu/drm/i915/display/intel_dp.c +0
-4-* (ModeClock / FEC Overhead * 8) -*/ - bits_per_pixel = ((link_clock * lane_count) * timeslots) / - (intel_dp_mode_to_fec_clock(mode_clock) *8);
drivers/gpu/drm/i915/display/intel_dp.c +0
-9- -/* Bandwidth required for 420 is half, that of 444 format */ -if (output_format ==INTEL_OUTPUT_FORMAT_YCBCR420 ) - bits_per_pixel *=2 ; - -/* -* According to DSC 1.2a Section 4.1.1 Table 4.1 the maximum -* supported PPS value can be 63.9375 and with the further -* mention that for 420, 422 formats, bpp should be programmed double
drivers/gpu/drm/i915/display/intel_dp.c +0
-1-* the target bpp restricting our target bpp to be 31.9375 at max.
drivers/gpu/drm/i915/display/intel_dp.c +0
-5-*/ -if (output_format ==INTEL_OUTPUT_FORMAT_YCBCR420 ) - bits_per_pixel =min_t (u32, bits_per_pixel,31 ); - - drm_dbg_kms(display->drm, "Max link bpp is %u for %utimeslots "
drivers/gpu/drm/i915/display/intel_dp.c +0
-4-"total bw %u pixel clock %u\n" , - bits_per_pixel, timeslots, - (link_clock * lane_count * 8), -intel_dp_mode_to_fec_clock(mode_clock));drivers/gpu/drm/i915/display/intel_dp.c +0
-2- - joiner_max_bpp = get_max_compressed_bpp_with_joiner(display,
mode_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
mode_hdisplay,num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +0
-3- bits_per_pixel =min (bits_per_pixel, joiner_max_bpp); - - bits_per_pixel = intel_dp_dsc_nearest_valid_bpp(display,
bits_per_pixel,pipe_bpp);drivers/gpu/drm/i915/display/intel_dp.c +0
-4- -return bits_per_pixel; -} -u8 intel_dp_dsc_get_slice_count(const struct
intel_connector*connector,
intmode_clock, intmode_hdisplay, intnum_joined_pipes)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2707,26 +2606,26 @@ bool intel_dp_mode_valid_with_dsc(struct intel_connector *connector,enum
intel_output_formatoutput_format,
intpipe_bpp, unsigned longbw_overhead_flags)
{drivers/gpu/drm/i915/display/intel_dp.c +2
-3-struct intel_display *display =to_intel_display (connector); -int dsc_max_compressed_bpp; -int dsc_slice_count; +struct intel_dp *intel_dp =intel_attached_dp (connector); + int min_bpp_x16 = compute_min_compressed_bpp_x16(connector,
output_format);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ int max_bpp_x16 = compute_max_compressed_bpp_x16(connector, + mode_clock,
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
num_joined_pipes,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe_bpp,
INT_MAX);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int dsc_slice_count =intel_dp_dsc_get_slice_count(connector,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
mode_clock,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +0
-7- dsc_max_compressed_bpp = - intel_dp_dsc_get_max_compressed_bpp(display, - link_clock, - lane_count, - mode_clock, - mode_hdisplay, -
num_joined_pipes,drivers/gpu/drm/i915/display/intel_dp.c +2
-7- output_format, - pipe_bpp, 64); - dsc_slice_count = -intel_dp_dsc_get_slice_count (connector, - mode_clock, - mode_hdisplay, - num_joined_pipes); +if (min_bpp_x16 <=0 || min_bpp_x16 > max_bpp_x16) +return false;drivers/gpu/drm/i915/display/intel_dp.c +2
-1-return dsc_max_compressed_bpp && dsc_slice_count; + return is_bw_sufficient_for_dsc_config(intel_dp, + link_clock,
lane_count,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ mode_clock,
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ dsc_slice_count,
min_bpp_x16,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ bw_overhead_flags);}
/*drivers/gpu/drm/i915/display/intel_dp.h +0
-0@@ -143,14 +143,6 @@ bool intel_digital_port_connected(struct intel_encoder *encoder);bool
intel_digital_port_connected_locked(struct intel_encoder *encoder);
int intel_dp_dsc_compute_max_bpp(const structintel_connector*connector,
u8dsc_max_bpc); -u16 intel_dp_dsc_get_max_compressed_bpp(structintel_display*display,drivers/gpu/drm/i915/display/intel_dp.h +0
-1-u32 link_clock, u32
lane_count,drivers/gpu/drm/i915/display/intel_dp.h +0
-1-u32 mode_clock, u32
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.h +0
-2-int num_joined_pipes, - enum intel_output_format
output_format,drivers/gpu/drm/i915/display/intel_dp.h +0
-3-u32 pipe_bpp, - u32 timeslots); -bool intel_dp_mode_valid_with_dsc(struct
intel_connector*connector, intlink_clock, intlane_count, intmode_clock, intmode_hdisplay,
PATCH 29/50 drm/i915/dp: Use helpers to align min/max compressed BPPs
In reply to Imre DeakThe minimum/maximum compressed BPP values are aligned/bounded in intel_dp_compute_link_bpp_limits() to the corresponding source limits. The minimum compressed BPP value doesn't change afterwards, so no need to align it again, remove that.
The maximum compressed BPP, which depends on the pipe BPP value still needs to be aligned, since the pipe BPP value could change after the above limits were computed, via intel_dp_force_dsc_pipe_bpp(). Use the corresponding helper for this alignment instead of open-coding the same.
--- drivers/gpu/drm/i915/display/intel_dp.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +5 -18
@@ -2217,20 +2217,15 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,struct intel_display *display =to_intel_display (intel_dp);const struct intel_connector *connector =to_intel_connector (conn_state->connector);int min_bpp_x16, max_bpp_x16, bpp_step_x16; -int link_bpp_x16;int bpp_x16;int ret; + min_bpp_x16 = limits->link.min_bpp_x16; max_bpp_x16 = limits->link.max_bpp_x16; bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector); -/* Compressed BPP should be less than the Input DSC bpp */ - link_bpp_x16 =intel_dp_output_format_link_bpp_x16 (pipe_config->output_format, pipe_bpp); - max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16); - -drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); - min_bpp_x16 =round_up (limits->link.min_bpp_x16, bpp_step_x16); - max_bpp_x16 =round_down (max_bpp_x16, bpp_step_x16); + max_bpp_x16 =align_max_compressed_bpp_x16 (connector, pipe_config->output_format, + pipe_bpp, max_bpp_x16);for (bpp_x16 = max_bpp_x16; bpp_x16 >= min_bpp_x16; bpp_x16 -= bpp_step_x16) {if (!intel_dp_dsc_valid_compressed_bpp (intel_dp, bpp_x16))
@@ -2346,8 +2341,6 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct intel_connector *connector =to_intel_connector (conn_state->connector);int pipe_bpp, forced_bpp; -int dsc_min_bpp; -int dsc_max_bpp; forced_bpp =intel_dp_force_dsc_pipe_bpp (intel_dp, limits);
@@ -2367,15 +2360,9 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, pipe_config->port_clock = limits->max_rate; pipe_config->lane_count = limits->max_lane_count; - dsc_min_bpp =fxp_q4_to_int_roundup (limits->link.min_bpp_x16); - - dsc_max_bpp =fxp_q4_to_int (limits->link.max_bpp_x16); - -/* Compressed BPP should be less than the Input DSC bpp */ - dsc_max_bpp =min (dsc_max_bpp, pipe_bpp -1 ); - pipe_config->dsc.compressed_bpp_x16 = -fxp_q4_from_int (max (dsc_min_bpp, dsc_max_bpp)); +align_max_compressed_bpp_x16 (connector, pipe_config->output_format, + pipe_bpp, limits->link.max_bpp_x16); pipe_config->pipe_bpp = pipe_bpp;
Signature · 1 line
2.49.1
Re: [PATCH 29/50] drm/i915/dp: Use helpers to align min/max compressed BPPs
Quoted 14 lines · Imre Deak
The minimum/maximum compressed BPP values are aligned/bounded in
intel_dp_compute_link_bpp_limits()to the corresponding source limits.
The minimum compressed BPP value doesn't change afterwards, so no need
to align it again, remove that.The maximum compressed BPP, which depends on the pipe BPP value still needs to be aligned, since the pipe BPP value could change after the above limits were computed, via
intel_dp_force_dsc_pipe_bpp(). Use the
corresponding helper for this alignment instead of open-coding the same.
Quoted 5 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 23 +++++------------------1 file changed, 5 insertions(+), 18 deletions(-)
Quoted 70 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2217,20 +2217,15 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, struct intel_display *display = to_intel_display(intel_dp);const struct
intel_connector*connector =to_intel_connector(conn_state->connector); intmin_bpp_x16,max_bpp_x16,bpp_step_x16;drivers/gpu/drm/i915/display/intel_dp.c +0
-1-int link_bpp_x16;int
bpp_x16;
int ret;drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ min_bpp_x16 = limits->link.min_bpp_x16;
max_bpp_x16=limits->link.max_bpp_x16;bpp_step_x16=intel_dp_dsc_bpp_step_x16(connector);drivers/gpu/drm/i915/display/intel_dp.c +0
-2-/* Compressed BPP should be less than the Input DSC bpp */ - link_bpp_x16 =
intel_dp_output_format_link_bpp_x16(pipe_config->output_format, pipe_bpp);drivers/gpu/drm/i915/display/intel_dp.c +0
-4- max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16); - -drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); - min_bpp_x16 = round_up(limits->link.min_bpp_x16,
bpp_step_x16);drivers/gpu/drm/i915/display/intel_dp.c +1
-1- max_bpp_x16 =round_down (max_bpp_x16, bpp_step_x16); + max_bpp_x16 = align_max_compressed_bpp_x16(connector,
pipe_config->output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe_bpp,
max_bpp_x16);
for (bpp_x16=max_bpp_x16;bpp_x16>=min_bpp_x16;bpp_x16-=bpp_step_x16) {
if (!intel_dp_dsc_valid_compressed_bpp(intel_dp,bpp_x16))drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2346,8 +2341,6 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct
intel_connector*connector =to_intel_connector(conn_state->connector); intpipe_bpp,forced_bpp;drivers/gpu/drm/i915/display/intel_dp.c +0
-2-int dsc_min_bpp; -int dsc_max_bpp;
forced_bpp=intel_dp_force_dsc_pipe_bpp(intel_dp, limits);drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2367,15 +2360,9 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, pipe_config->port_clock = limits->max_rate; pipe_config->lane_count = limits->max_lane_count;drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_min_bpp = fxp_q4_to_int_roundup(limits-Quoted 1 line
link.min_bpp_x16);
drivers/gpu/drm/i915/display/intel_dp.c +0
-6- - dsc_max_bpp =fxp_q4_to_int (limits->link.max_bpp_x16); - -/* Compressed BPP should be less than the Input DSC bpp */ - dsc_max_bpp =min (dsc_max_bpp, pipe_bpp -1 ); -
pipe_config->dsc.compressed_bpp_x16=drivers/gpu/drm/i915/display/intel_dp.c +1
-1-fxp_q4_from_int (max (dsc_min_bpp, dsc_max_bpp)); + align_max_compressed_bpp_x16(connector, pipe_config-Quoted 1 line
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe_bpp, limits-Quoted 1 line
link.max_bpp_x16);
pipe_config->pipe_bpp=pipe_bpp;
Re: [PATCH 29/50] drm/i915/dp: Use helpers to align min/max compressed BPPs
In reply to Imre DeakQuoted 14 lines · Imre Deak
The minimum/maximum compressed BPP values are aligned/bounded in
intel_dp_compute_link_bpp_limits()to the corresponding source limits.
The minimum compressed BPP value doesn't change afterwards, so no need
to align it again, remove that.The maximum compressed BPP, which depends on the pipe BPP value still needs to be aligned, since the pipe BPP value could change after the above limits were computed, via
intel_dp_force_dsc_pipe_bpp(). Use the
corresponding helper for this alignment instead of open-coding the same.
Quoted 5 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 23 +++++------------------1 file changed, 5 insertions(+), 18 deletions(-)
Quoted 70 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2217,20 +2217,15 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, struct intel_display *display = to_intel_display(intel_dp);const struct
intel_connector*connector =to_intel_connector(conn_state->connector); intmin_bpp_x16,max_bpp_x16,bpp_step_x16;drivers/gpu/drm/i915/display/intel_dp.c +0
-1-int link_bpp_x16;int
bpp_x16;
int ret;drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ min_bpp_x16 = limits->link.min_bpp_x16;
max_bpp_x16=limits->link.max_bpp_x16;bpp_step_x16=intel_dp_dsc_bpp_step_x16(connector);drivers/gpu/drm/i915/display/intel_dp.c +0
-2-/* Compressed BPP should be less than the Input DSC bpp */ - link_bpp_x16 =
intel_dp_output_format_link_bpp_x16(pipe_config->output_format, pipe_bpp);drivers/gpu/drm/i915/display/intel_dp.c +0
-4- max_bpp_x16 =min (max_bpp_x16, link_bpp_x16 - bpp_step_x16); - -drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); - min_bpp_x16 = round_up(limits->link.min_bpp_x16,
bpp_step_x16);drivers/gpu/drm/i915/display/intel_dp.c +1
-1- max_bpp_x16 =round_down (max_bpp_x16, bpp_step_x16); + max_bpp_x16 = align_max_compressed_bpp_x16(connector,
pipe_config->output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe_bpp,
max_bpp_x16);
for (bpp_x16=max_bpp_x16;bpp_x16>=min_bpp_x16;bpp_x16-=bpp_step_x16) {
if (!intel_dp_dsc_valid_compressed_bpp(intel_dp,bpp_x16))drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2346,8 +2341,6 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct
intel_connector*connector =to_intel_connector(conn_state->connector); intpipe_bpp,forced_bpp;drivers/gpu/drm/i915/display/intel_dp.c +0
-2-int dsc_min_bpp; -int dsc_max_bpp;
forced_bpp=intel_dp_force_dsc_pipe_bpp(intel_dp, limits);drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2367,15 +2360,9 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, pipe_config->port_clock = limits->max_rate; pipe_config->lane_count = limits->max_lane_count;drivers/gpu/drm/i915/display/intel_dp.c +0
-1- dsc_min_bpp = fxp_q4_to_int_roundup(limits-Quoted 1 line
link.min_bpp_x16);
drivers/gpu/drm/i915/display/intel_dp.c +0
-6- - dsc_max_bpp =fxp_q4_to_int (limits->link.max_bpp_x16); - -/* Compressed BPP should be less than the Input DSC bpp */ - dsc_max_bpp =min (dsc_max_bpp, pipe_bpp -1 ); -
pipe_config->dsc.compressed_bpp_x16=drivers/gpu/drm/i915/display/intel_dp.c +1
-1-fxp_q4_from_int (max (dsc_min_bpp, dsc_max_bpp)); + align_max_compressed_bpp_x16(connector, pipe_config-Quoted 1 line
output_format,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe_bpp, limits-Quoted 1 line
link.max_bpp_x16);
pipe_config->pipe_bpp=pipe_bpp;
PATCH 30/50 drm/i915/dp: Simplify computing DSC BPPs for eDP
In reply to Imre DeakThe maximum pipe BPP value (used as the DSC input BPP) has been aligned already to the corresponding source/sink input BPP capabilities in intel_dp_compute_config_limits(). So it isn't needed to perform the same alignment again in intel_edp_dsc_compute_pipe_bpp() called later, this function can simply use the already aligned maximum pipe BPP value, do that.
--- drivers/gpu/drm/i915/display/intel_dp.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +3 -13
@@ -2337,26 +2337,16 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct drm_connector_state *conn_state, const struct link_config_limits *limits) { - struct intel_display *display = to_intel_display(intel_dp); struct intel_connector *connector =to_intel_connector (conn_state->connector);int pipe_bpp, forced_bpp; forced_bpp =intel_dp_force_dsc_pipe_bpp (intel_dp, limits); - -if (forced_bpp) { +if (forced_bpp) pipe_bpp = forced_bpp; - }else { -int max_bpc = limits->pipe.max_bpp /3 ; +else + pipe_bpp = limits->pipe.max_bpp; -/* For eDP use max bpp that can be supported with DSC. */ - pipe_bpp =intel_dp_dsc_compute_max_bpp (connector, max_bpc); -if (!is_dsc_pipe_bpp_sufficient (limits, pipe_bpp)) { -drm_dbg_kms (display->drm, -"Computed BPC is not in DSC BPC limits\n" ); -return -EINVAL ; - } - } pipe_config->port_clock = limits->max_rate; pipe_config->lane_count = limits->max_lane_count;
Signature · 1 line
2.49.1
Re: [PATCH 30/50] drm/i915/dp: Simplify computing DSC BPPs for eDP
Quoted 11 lines · Imre Deak
The maximum pipe BPP value (used as the DSC input BPP) has been aligned
already to the corresponding source/sink input BPP capabilities inintel_dp_compute_config_limits(). So it isn't needed to perform the same
alignment again inintel_edp_dsc_compute_pipe_bpp()called later, this
function can simply use the already aligned maximum pipe BPP value, do
that.
Quoted 5 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 16 +++-------------1 file changed, 3 insertions(+), 13 deletions(-)
Quoted 41 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2337,26 +2337,16 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct
drm_connector_state*conn_state,
const structlink_config_limits*limits)
{drivers/gpu/drm/i915/display/intel_dp.c +0
-1-struct intel_display *display =to_intel_display (intel_dp);struct
intel_connector*connector =to_intel_connector(conn_state->connector); intpipe_bpp,forced_bpp;
forced_bpp=intel_dp_force_dsc_pipe_bpp(intel_dp, limits);drivers/gpu/drm/i915/display/intel_dp.c +1
-2- -if (forced_bpp) { +if (forced_bpp)
pipe_bpp=forced_bpp;drivers/gpu/drm/i915/display/intel_dp.c +2
-2- }else { -int max_bpc = limits->pipe.max_bpp /3 ; +else + pipe_bpp = limits->pipe.max_bpp;drivers/gpu/drm/i915/display/intel_dp.c +0
-1-/* For eDP use max bpp that can be supported with DSC. */
drivers/gpu/drm/i915/display/intel_dp.c +0
-1- pipe_bpp = intel_dp_dsc_compute_max_bpp(connector,
max_bpc);drivers/gpu/drm/i915/display/intel_dp.c +0
-3-if (!is_dsc_pipe_bpp_sufficient (limits, pipe_bpp)) { - drm_dbg_kms(display->drm, - "Computed BPC is not in DSC BPClimits\n");
drivers/gpu/drm/i915/display/intel_dp.c +0
-3-return -EINVAL ; - } - }
pipe_config->port_clock=limits->max_rate;pipe_config->lane_count=limits->max_lane_count;
PATCH 31/50 drm/i915/dp: Simplify computing DSC BPPs for DP-SST
In reply to Imre DeakThe maximum pipe BPP value (used as the DSC input BPP) has been aligned already to the corresponding source/sink input BPP capabilities in intel_dp_compute_config_limits(). So it isn't needed to perform the same alignment again in intel_dp_dsc_compute_pipe_bpp() called later, this function can simply use the already aligned maximum pipe BPP value, do that.
Also, there is no point in trying pipe BPP values lower than the
maximum: this would only make dsc_compute_compressed_bpp() start with a lower _compressed_ BPP value, but this lower compressed BPP value has been tried already when dsc_compute_compressed_bpp() was called with the higher pipe BPP value (i.e. the first dsc_compute_compressed_bpp() call tries already all the possible compressed BPP values which are all below the pipe BPP value passed to it). Simplify the function accordingly trying only the maximum pipe BPP value.
--- drivers/gpu/drm/i915/display/intel_dp.c | 29 +++++++------------------ 1 file changed, 8 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +8 -21
@@ -2294,11 +2294,8 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct drm_connector_state *conn_state, const struct link_config_limits *limits) { - const struct intel_connector *connector = -to_intel_connector (conn_state->connector); -u8 dsc_bpc[3 ] = {}; int forced_bpp, pipe_bpp; -int num_bpc, i, ret; +int ret; forced_bpp =intel_dp_force_dsc_pipe_bpp (intel_dp, limits);
@@ -2311,25 +2308,15 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, } } -/* -* Get the maximum DSC bpc that will be supported by any valid -* link configuration and compressed bpp. -*/ - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, dsc_bpc); -for (i =0 ; i < num_bpc; i++) { - pipe_bpp = dsc_bpc[i] *3 ; -if (pipe_bpp < limits->pipe.min_bpp || pipe_bpp > limits->pipe.max_bpp) -continue ; + pipe_bpp = limits->pipe.max_bpp; + ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, + limits, pipe_bpp); +if (ret) +return -EINVAL ; - ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, pipe_bpp); -if (ret ==0 ) { - pipe_config->pipe_bpp = pipe_bpp; -return 0 ; - } - } + pipe_config->pipe_bpp = pipe_bpp; -return -EINVAL ; +return 0 ; } static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
Signature · 1 line
2.49.1
Re: [PATCH 31/50] drm/i915/dp: Simplify computing DSC BPPs for DP-SST
Quoted 23 lines · Imre Deak
The maximum pipe BPP value (used as the DSC input BPP) has been aligned
already to the corresponding source/sink input BPP capabilities inintel_dp_compute_config_limits(). So it isn't needed to perform the same
alignment again inintel_dp_dsc_compute_pipe_bpp()called later, this function can simply use the already aligned maximum pipe BPP value, do
that.Also, there is no point in trying pipe BPP values lower than the
maximum: this would only makedsc_compute_compressed_bpp()start with a
lower _compressed_ BPP value, but this lower compressed BPP value has been tried already whendsc_compute_compressed_bpp()was called with the
higher pipe BPP value (i.e. the firstdsc_compute_compressed_bpp()call
tries already all the possible compressed BPP values which are all below
the pipe BPP value passed to it). Simplify the function accordingly trying only the maximum pipe BPP value.
Quoted 6 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 29 +++++++---------------- --1 file changed, 8 insertions(+), 21 deletions(-)
I guess, typically this is a two patch solution. But considering the code changes it make sense to have it as one patch.
Quoted 60 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2294,11 +2294,8 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct
drm_connector_state*conn_state,
const structlink_config_limits*limits)
{drivers/gpu/drm/i915/display/intel_dp.c +0
-3-const struct intel_connector *connector = -to_intel_connector (conn_state->connector); -u8 dsc_bpc[3 ] = {};int
forced_bpp,pipe_bpp;drivers/gpu/drm/i915/display/intel_dp.c +1
-1-int num_bpc, i, ret; +int ret;
forced_bpp=intel_dp_force_dsc_pipe_bpp(intel_dp, limits);drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2311,25 +2308,15 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, } }drivers/gpu/drm/i915/display/intel_dp.c +0
-2-/* -* Get the maximum DSC bpc that will be supported by any valid
drivers/gpu/drm/i915/display/intel_dp.c +0
-3-* link configuration and compressed bpp. -*/ - num_bpc = drm_dp_dsc_sink_supported_input_bpcs(connector-Quoted 1 line
dp.dsc_dpcd,
dsc_bpc);drivers/gpu/drm/i915/display/intel_dp.c +0
-3- for (i = 0; i < num_bpc; i++) { - pipe_bpp = dsc_bpc[i] * 3; - if (pipe_bpp < limits->pipe.min_bpp || pipe_bpp >
limits->pipe.max_bpp)drivers/gpu/drm/i915/display/intel_dp.c +2
-1-continue ; + pipe_bpp = limits->pipe.max_bpp; + ret = dsc_compute_compressed_bpp(intel_dp, pipe_config,
conn_state,drivers/gpu/drm/i915/display/intel_dp.c +3
-0+ limits, pipe_bpp); +if (ret) +return -EINVAL ;drivers/gpu/drm/i915/display/intel_dp.c +0
-1- ret = dsc_compute_compressed_bpp(intel_dp,
pipe_config,conn_state,drivers/gpu/drm/i915/display/intel_dp.c +1
-6- limits, pipe_bpp); -if (ret ==0 ) { - pipe_config->pipe_bpp = pipe_bpp; -return 0 ; - } - } + pipe_config->pipe_bpp = pipe_bpp;drivers/gpu/drm/i915/display/intel_dp.c +1
-1-return -EINVAL ; +return 0 ;}
static int intel_edp_dsc_compute_pipe_bpp(structintel_dp*intel_dp,
Re: [PATCH 31/50] drm/i915/dp: Simplify computing DSC BPPs for DP-SST
Quoted 26 lines · Vinod Govindapillai
Quoted 17 lines · Imre Deak
The maximum pipe BPP value (used as the DSC input BPP) has been aligned already to the corresponding source/sink input BPP capabilities in
intel_dp_compute_config_limits(). So it isn't needed to perform the same alignment again inintel_dp_dsc_compute_pipe_bpp()called later, this function can simply use the already aligned maximum pipe BPP value, do that.Also, there is no point in trying pipe BPP values lower than the
maximum: this would only makedsc_compute_compressed_bpp()start with a lower _compressed_ BPP value, but this lower compressed BPP value has been tried already whendsc_compute_compressed_bpp()was called with the higher pipe BPP value (i.e. the firstdsc_compute_compressed_bpp()call tries already all the possible compressed BPP values which are all below the pipe BPP value passed to it). Simplify the function accordingly trying only the maximum pipe BPP value.Quoted 6 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 29 +++++++---------------- --1 file changed, 8 insertions(+), 21 deletions(-)
Quoted 2 lines
I guess, typically this is a two patch solution. But considering the code changes it make sense to have it as one patch.
Yes, the current code before this patch combines the alignment and fallback logic, so I found it clearer to remove both in one patch, instead of tweaking the code in one patch to do only one of these and then remove the tweak in a separate patch.
Quoted 56 lines
Reviewed-by Vinod Govindapillai <[email protected]>Quoted 53 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-4@@ -2294,11 +2294,8 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, struct drm_connector_state *conn_state, const struct link_config_limits *limits) { -const struct intel_connector *connector = -to_intel_connector (conn_state->connector); -u8 dsc_bpc[3 ] = {}; int forced_bpp, pipe_bpp; -int num_bpc, i, ret; +int ret;
forced_bpp=intel_dp_force_dsc_pipe_bpp(intel_dp, limits);drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2311,25 +2308,15 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, } }drivers/gpu/drm/i915/display/intel_dp.c +5
-9-/* -* Get the maximum DSC bpc that will be supported by any valid -* link configuration and compressed bpp. -*/ - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, dsc_bpc); -for (i =0 ; i < num_bpc; i++) { - pipe_bpp = dsc_bpc[i] *3 ; -if (pipe_bpp < limits->pipe.min_bpp || pipe_bpp > limits->pipe.max_bpp) -continue ; + pipe_bpp = limits->pipe.max_bpp; + ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, + limits, pipe_bpp); +if (ret) +return -EINVAL ;drivers/gpu/drm/i915/display/intel_dp.c +1
-7- ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, pipe_bpp); -if (ret ==0 ) { - pipe_config->pipe_bpp = pipe_bpp; -return 0 ; - } - } + pipe_config->pipe_bpp = pipe_bpp;drivers/gpu/drm/i915/display/intel_dp.c +1
-1-return -EINVAL ; +return 0 ;}
static int intel_edp_dsc_compute_pipe_bpp(structintel_dp*intel_dp,
PATCH 32/50 drm/i915/dp: Simplify computing forced DSC BPP for DP-SST
In reply to Imre DeakIf dsc_compute_compressed_bpp() failed with a forced pipe BPP value (where the forced pipe BPP value itself is valid within the min/max pipe BPP limits), the function will also fail when called with the maximum pipe BPP value: dsc_compute_compressed_bpp() will try all compressed BPPs below the passed in pipe BPP value and if the function failed with a given (low) compressed BPP value it will also fail with a compressed BPP value higher than the one which failed already.
Based on the above remove the logic to retry computing a compressed BPP value with the maximum pipe BPP value if computing the compressed BPP failed already with the (lower) forced pipe BPP value.
--- drivers/gpu/drm/i915/display/intel_dp.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +4 -10
@@ -2298,17 +2298,11 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,int ret; forced_bpp =intel_dp_force_dsc_pipe_bpp (intel_dp, limits); +if (forced_bpp) + pipe_bpp = forced_bpp; +else + pipe_bpp = limits->pipe.max_bpp; -if (forced_bpp) { - ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, forced_bpp); -if (ret ==0 ) { - pipe_config->pipe_bpp = forced_bpp; -return 0 ; - } - } - - pipe_bpp = limits->pipe.max_bpp; ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, limits, pipe_bpp);if (ret)
Signature · 1 line
2.49.1
Re: [PATCH 32/50] drm/i915/dp: Simplify computing forced DSC BPP for DP-SST
Quoted 16 lines · Imre Deak
If
dsc_compute_compressed_bpp()failed with a forced pipe BPP value (where the forced pipe BPP value itself is valid within the min/max pipe
BPP limits), the function will also fail when called with the maximum pipe BPP value:dsc_compute_compressed_bpp()will try all compressed BPPs below the passed in pipe BPP value and if the function failed with
a given (low) compressed BPP value it will also fail with a compressed
BPP value higher than the one which failed already.Based on the above remove the logic to retry computing a compressed BPP
value with the maximum pipe BPP value if computing the compressed BPP failed already with the (lower) forced pipe BPP value.
Quoted 5 lines
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 14 ++++----------1 file changed, 4 insertions(+), 10 deletions(-)
Quoted 31 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2298,17 +2298,11 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, int ret;
forced_bpp=intel_dp_force_dsc_pipe_bpp(intel_dp, limits);drivers/gpu/drm/i915/display/intel_dp.c +4
-0+if (forced_bpp) + pipe_bpp = forced_bpp; +else + pipe_bpp = limits->pipe.max_bpp;drivers/gpu/drm/i915/display/intel_dp.c +0
-2-if (forced_bpp) { - ret = dsc_compute_compressed_bpp(intel_dp,
pipe_config,conn_state,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- limits,
forced_bpp);drivers/gpu/drm/i915/display/intel_dp.c +0
-7-if (ret ==0 ) { - pipe_config->pipe_bpp = forced_bpp; -return 0 ; - } - } - - pipe_bpp = limits->pipe.max_bpp;ret = dsc_compute_compressed_bpp(intel_dp,
pipe_config,conn_state,
limits,pipe_bpp); if (ret)
PATCH 33/50 drm/i915/dp: Unify computing compressed BPP for DP-SST and eDP
In reply to Imre DeakMove computing the eDP compressed BPP value to the function computing this for DP, allowing further simplifications later.
--- drivers/gpu/drm/i915/display/intel_dp.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +13 -8
@@ -2226,6 +2226,14 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp, max_bpp_x16 =align_max_compressed_bpp_x16 (connector, pipe_config->output_format, pipe_bpp, max_bpp_x16); +if (intel_dp_is_edp (intel_dp)) { + pipe_config->port_clock = limits->max_rate; + pipe_config->lane_count = limits->max_lane_count; + + pipe_config->dsc.compressed_bpp_x16 = max_bpp_x16; + +return 0 ; + }for (bpp_x16 = max_bpp_x16; bpp_x16 >= min_bpp_x16; bpp_x16 -= bpp_step_x16) {if (!intel_dp_dsc_valid_compressed_bpp (intel_dp, bpp_x16))
@@ -2318,9 +2326,8 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct drm_connector_state *conn_state, const struct link_config_limits *limits) { - struct intel_connector *connector = -to_intel_connector (conn_state->connector); int pipe_bpp, forced_bpp; +int ret; forced_bpp =intel_dp_force_dsc_pipe_bpp (intel_dp, limits);if (forced_bpp)
@@ -2328,12 +2335,10 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,else pipe_bpp = limits->pipe.max_bpp; - pipe_config->port_clock = limits->max_rate; - pipe_config->lane_count = limits->max_lane_count; - - pipe_config->dsc.compressed_bpp_x16 = -align_max_compressed_bpp_x16 (connector, pipe_config->output_format, - pipe_bpp, limits->link.max_bpp_x16); + ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, + limits, pipe_bpp); +if (ret) +return -EINVAL ; pipe_config->pipe_bpp = pipe_bpp;
Signature · 1 line
2.49.1
Re: [PATCH 33/50] drm/i915/dp: Unify computing compressed BPP for DP-SST and eDP
Quoted 8 lines · Imre Deak
Move computing the eDP compressed BPP value to the function computing this for DP, allowing further simplifications later.
Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 21 +++++++++++++--------1 file changed, 13 insertions(+), 8 deletions(-)
Quoted 60 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2226,6 +2226,14 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,
max_bpp_x16= align_max_compressed_bpp_x16(connector,pipe_config->output_format,
pipe_bpp,max_bpp_x16);drivers/gpu/drm/i915/display/intel_dp.c +8
-0+if (intel_dp_is_edp (intel_dp)) { + pipe_config->port_clock = limits->max_rate; + pipe_config->lane_count = limits->max_lane_count; + + pipe_config->dsc.compressed_bpp_x16 = max_bpp_x16; + +return 0 ; + }
for (bpp_x16=max_bpp_x16;bpp_x16>=min_bpp_x16;bpp_x16-=bpp_step_x16) {
if (!intel_dp_dsc_valid_compressed_bpp(intel_dp,bpp_x16))drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2318,9 +2326,8 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,struct
drm_connector_state*conn_state,
const structlink_config_limits*limits)
{drivers/gpu/drm/i915/display/intel_dp.c +0
-2-struct intel_connector *connector = -to_intel_connector (conn_state->connector);int
pipe_bpp,forced_bpp;drivers/gpu/drm/i915/display/intel_dp.c +1
-0+int ret;
forced_bpp=intel_dp_force_dsc_pipe_bpp(intel_dp, limits); if (forced_bpp)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2328,12 +2335,10 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,else
pipe_bpp=limits->pipe.max_bpp;drivers/gpu/drm/i915/display/intel_dp.c +0
-5- pipe_config->port_clock = limits->max_rate; - pipe_config->lane_count = limits->max_lane_count; - - pipe_config->dsc.compressed_bpp_x16 = - align_max_compressed_bpp_x16(connector, pipe_config-Quoted 1 line
output_format,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- pipe_bpp, limits-Quoted 1 line
link.max_bpp_x16);
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ ret = dsc_compute_compressed_bpp(intel_dp, pipe_config,
conn_state,drivers/gpu/drm/i915/display/intel_dp.c +3
-0+ limits, pipe_bpp); +if (ret) +return -EINVAL ;
pipe_config->pipe_bpp=pipe_bpp;
PATCH 34/50 drm/i915/dp: Simplify eDP vs. DP compressed BPP computation
In reply to Imre Deakintel_edp_dsc_compute_pipe_bpp() matches now intel_dp_dsc_compute_pipe_bpp(), remove the former function.
--- drivers/gpu/drm/i915/display/intel_dp.c | 32 ++----------------------- 1 file changed, 2 insertions(+), 30 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +2 -30
@@ -2321,30 +2321,6 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,return 0 ; } -static int intel_edp_dsc_compute_pipe_bpp (struct intel_dp *intel_dp, -struct intel_crtc_state *pipe_config, -struct drm_connector_state *conn_state, -const struct link_config_limits *limits) -{ -int pipe_bpp, forced_bpp; -int ret; - - forced_bpp =intel_dp_force_dsc_pipe_bpp (intel_dp, limits); -if (forced_bpp) - pipe_bpp = forced_bpp; -else - pipe_bpp = limits->pipe.max_bpp; - - ret =dsc_compute_compressed_bpp (intel_dp, pipe_config, conn_state, - limits, pipe_bpp); -if (ret) -return -EINVAL ; - - pipe_config->pipe_bpp = pipe_bpp; - -return 0 ; -} -/* * Return whether FEC must be enabled for 8b10b SST or MST links. On 128b132b * links FEC is always enabled implicitly by the HW, so this function returns
@@ -2396,12 +2372,8 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,* figured out for DP MST DSC. */ if (!is_mst) { -if (intel_dp_is_edp (intel_dp)) - ret =intel_edp_dsc_compute_pipe_bpp (intel_dp, pipe_config, - conn_state, limits); -else - ret =intel_dp_dsc_compute_pipe_bpp (intel_dp, pipe_config, - conn_state, limits); + ret =intel_dp_dsc_compute_pipe_bpp (intel_dp, pipe_config, + conn_state, limits);if (ret) {drm_dbg_kms (display->drm,"No Valid pipe bpp for given mode ret = %d\n" , ret);
Signature · 1 line
2.49.1
Re: [PATCH 34/50] drm/i915/dp: Simplify eDP vs. DP compressed BPP computation
Quoted 9 lines · Imre Deak
intel_edp_dsc_compute_pipe_bpp()matches nowintel_dp_dsc_compute_pipe_bpp(), remove the former function.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 32 ++--------------------- --1 file changed, 2 insertions(+), 30 deletions(-)
Quoted 66 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2321,30 +2321,6 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, return 0; }drivers/gpu/drm/i915/display/intel_dp.c +0
-2-static int intel_edp_dsc_compute_pipe_bpp (struct intel_dp *intel_dp, - struct intel_crtc_state
*pipe_config,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- struct drm_connector_state
*conn_state,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- const struct
link_config_limits*limits)drivers/gpu/drm/i915/display/intel_dp.c +0
-11-{ -int pipe_bpp, forced_bpp; -int ret; - - forced_bpp =intel_dp_force_dsc_pipe_bpp (intel_dp, limits); -if (forced_bpp) - pipe_bpp = forced_bpp; -else - pipe_bpp = limits->pipe.max_bpp; - - ret = dsc_compute_compressed_bpp(intel_dp, pipe_config,
conn_state,drivers/gpu/drm/i915/display/intel_dp.c +0
-9- limits, pipe_bpp); -if (ret) -return -EINVAL ; - - pipe_config->pipe_bpp = pipe_bpp; - -return 0 ; -} -/*
* Return whether FEC must be enabled for 8b10b SST or MST links. On128b132b
* links FEC is always enabled implicitly by the HW, so this function returnsdrivers/gpu/drm/i915/display/intel_dp.c +0
-6@@ -2396,12 +2372,8 @@ int intel_dp_dsc_compute_config(structintel_dp *intel_dp, * figured out for DP MST DSC. */ if (!is_mst) { -if (intel_dp_is_edp (intel_dp)) - ret =intel_edp_dsc_compute_pipe_bpp (intel_dp, pipe_config, - conn_state, limits); -else - ret = intel_dp_dsc_compute_pipe_bpp(intel_dp, pipe_config, -
conn_state, limits);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ ret = intel_dp_dsc_compute_pipe_bpp(intel_dp,
pipe_config,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ conn_state,limits);
if (ret) {
drm_dbg_kms(display->drm,
"No Valid pipe bpp for given mode ret = %d\n", ret);
PATCH 35/50 drm/i915/dp: Simplify computing the DSC compressed BPP for DP-MST
In reply to Imre DeakThe minimum/maximum DSC input (i.e. pipe) and compressed (i.e. link) BPP limits are computed already in intel_dp_compute_config_limits(), so there is no need to do this again in mst_stream_dsc_compute_link_config() called later. Remove the corresponding alignments from the latter function and use the precomputed (aligned and within bounds) maximum pipe BPP and the min/max compressed BPP values instead as-is.
--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 48 +++------------------ 1 file changed, 6 insertions(+), 42 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +6 -42
@@ -463,57 +463,21 @@ static int mst_stream_dsc_compute_link_config(struct intel_dp *intel_dp, {struct intel_display *display =to_intel_display (intel_dp);struct intel_connector *connector =to_intel_connector (conn_state->connector); -int num_bpc; -u8 dsc_bpc[3 ] = {}; -int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp; -int min_compressed_bpp_x16, max_compressed_bpp_x16; -int bpp_step_x16; - max_bpp = limits->pipe.max_bpp; - min_bpp = limits->pipe.min_bpp; - - num_bpc =drm_dp_dsc_sink_supported_input_bpcs (connector->dp.dsc_dpcd, - dsc_bpc); - -drm_dbg_kms (display->drm,"DSC Source supported min bpp %d max bpp %d\n" , - min_bpp, max_bpp); - - sink_min_bpp =min_array (dsc_bpc, num_bpc) *3 ; - sink_max_bpp =max_array (dsc_bpc, num_bpc) *3 ; - -drm_dbg_kms (display->drm,"DSC Sink supported min bpp %d max bpp %d\n" , - sink_min_bpp, sink_max_bpp); - -if (min_bpp < sink_min_bpp) - min_bpp = sink_min_bpp; - -if (max_bpp > sink_max_bpp) - max_bpp = sink_max_bpp; - - crtc_state->pipe_bpp = max_bpp; - - min_compressed_bpp_x16 = limits->link.min_bpp_x16; - max_compressed_bpp_x16 = limits->link.max_bpp_x16; + crtc_state->pipe_bpp = limits->pipe.max_bpp;drm_dbg_kms (display->drm,"DSC Sink supported compressed min bpp " FXP_Q4_FMT " compressed max bpp " FXP_Q4_FMT "\n" , -FXP_Q4_ARGS (min_compressed_bpp_x16),FXP_Q4_ARGS (max_compressed_bpp_x16)); - - bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector); - - max_compressed_bpp_x16 =min (max_compressed_bpp_x16,fxp_q4_from_int (crtc_state->pipe_bpp) - bpp_step_x16); - -drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); - min_compressed_bpp_x16 =round_up (min_compressed_bpp_x16, bpp_step_x16); - max_compressed_bpp_x16 =round_down (max_compressed_bpp_x16, bpp_step_x16); +FXP_Q4_ARGS (limits->link.min_bpp_x16),FXP_Q4_ARGS (limits->link.max_bpp_x16)); crtc_state->lane_count = limits->max_lane_count; crtc_state->port_clock = limits->max_rate;return intel_dp_mtp_tu_compute_config (intel_dp, crtc_state, conn_state, - min_compressed_bpp_x16, - max_compressed_bpp_x16, - bpp_step_x16, true); + limits->link.min_bpp_x16, + limits->link.max_bpp_x16, +intel_dp_dsc_bpp_step_x16 (connector), + true); }static int mode_hblank_period_ns (const struct drm_display_mode *mode)
Signature · 1 line
2.49.1
Re: [PATCH 35/50] drm/i915/dp: Simplify computing the DSC compressed BPP for DP-MST
Quoted 11 lines · Imre Deak
The minimum/maximum DSC input (i.e. pipe) and compressed (i.e. link) BPP
limits are computed already inintel_dp_compute_config_limits(), so there is no need to do this again inmst_stream_dsc_compute_link_config()called later. Remove the corresponding alignments from the latter function and use the precomputed (aligned and within bounds) maximum pipe BPP and the min/max
compressed BPP values instead as-is.Signed-off-by Imre Deak <[email protected]>
Quoted 92 lines
---
drivers/gpu/drm/i915/display/intel_dp_mst.c | 48 +++---------------- --1 file changed, 6 insertions(+), 42 deletions(-)drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0@@ -463,57 +463,21 @@ static int mst_stream_dsc_compute_link_config(struct intel_dp *intel_dp, { struct intel_display *display = to_intel_display(intel_dp);struct
intel_connector*connector =to_intel_connector(conn_state->connector);drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-5-int num_bpc; -u8 dsc_bpc[3 ] = {}; -int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp; -int min_compressed_bpp_x16, max_compressed_bpp_x16; -int bpp_step_x16;drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-4- max_bpp = limits->pipe.max_bpp; - min_bpp = limits->pipe.min_bpp; - - num_bpc = drm_dp_dsc_sink_supported_input_bpcs(connector-Quoted 1 line
dp.dsc_dpcd,
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-3- dsc_bpc); - - drm_dbg_kms(display->drm, "DSC Source supported min bpp %dmax bpp %d\n",
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-6- min_bpp, max_bpp); - - sink_min_bpp =min_array (dsc_bpc, num_bpc) *3 ; - sink_max_bpp =max_array (dsc_bpc, num_bpc) *3 ; - - drm_dbg_kms(display->drm, "DSC Sink supported min bpp %d maxbpp %d\n",
drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-12- sink_min_bpp, sink_max_bpp); - -if (min_bpp < sink_min_bpp) - min_bpp = sink_min_bpp; - -if (max_bpp > sink_max_bpp) - max_bpp = sink_max_bpp; - - crtc_state->pipe_bpp = max_bpp; - - min_compressed_bpp_x16 = limits->link.min_bpp_x16; - max_compressed_bpp_x16 = limits->link.max_bpp_x16; + crtc_state->pipe_bpp = limits->pipe.max_bpp;
drm_dbg_kms(display->drm,
"DSC Sink supported compressed min bpp "FXP_Q4_FMT" compressed max bpp "FXP_Q4_FMT"\n",drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1- FXP_Q4_ARGS(min_compressed_bpp_x16),
FXP_Q4_ARGS(max_compressed_bpp_x16));drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-4- - bpp_step_x16 =intel_dp_dsc_bpp_step_x16 (connector); - - max_compressed_bpp_x16 = min(max_compressed_bpp_x16,
fxp_q4_from_int(crtc_state->pipe_bpp)-bpp_step_x16);drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-3- -drm_WARN_ON (display->drm, !is_power_of_2 (bpp_step_x16)); - min_compressed_bpp_x16 = round_up(min_compressed_bpp_x16,
bpp_step_x16);drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1- max_compressed_bpp_x16 = round_down(max_compressed_bpp_x16,
bpp_step_x16);drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-0+ FXP_Q4_ARGS(limits->link.min_bpp_x16),
FXP_Q4_ARGS(limits->link.max_bpp_x16));
crtc_state->lane_count=limits->max_lane_count;crtc_state->port_clock=limits->max_rate;
return intel_dp_mtp_tu_compute_config(intel_dp,crtc_state,conn_state,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
min_compressed_bpp_x16,drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1-
max_compressed_bpp_x16,drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-1- bpp_step_x16, true); + limits-Quoted 1 line
link.min_bpp_x16,
drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-0+ limits-Quoted 1 line
link.max_bpp_x16,
drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-0+
intel_dp_dsc_bpp_step_x16(connector),drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-0+ true);}
static intmode_hblank_period_ns(const struct drm_display_mode *mode)
PATCH 36/50 drm/i915/dsc: Track the detaild DSC slice configuration
In reply to Imre DeakAdd a way to track the detailed DSC pipes-per-line, streams-per-pipe, slices-per-stream configuration instead of the current streams-per-pipe and slices-per-line value. This way describes the slice configuration in a clearer way, for instance providing a
2 pipes-per-line x 2 streams-per-pipe x 2 slices-per-stream = 8 slices-per-line
view, instead of the current, coarser
2 streams-per-pipe, 8 slices-per-line
view, the former better reflecting that each DSC stream engine has 2 slices. This also let's optimizing the configuration in a simpler/clearer way, for instance using 1 stream x 2 slices, or 1 stream x 4 slices instead of the current 2 stream x 1 slice, or 2 streams x 2 slices configuration (so that 1 DSC stream engine can be powered off in each pipe).
Follow-up changes will convert the current slices-per-line computation logic to compute instead the above detailed slice configuration.
--- drivers/gpu/drm/i915/display/intel_display_types.h | 5 +++++ drivers/gpu/drm/i915/display/intel_vdsc.c | 5 +++++ drivers/gpu/drm/i915/display/intel_vdsc.h | 2 ++ 3 files changed, 12 insertions(+)
drivers/gpu/drm/i915/display/intel_display_types.h +5 -0
@@ -1306,6 +1306,11 @@ struct intel_crtc_state {bool compression_enabled_on_link;bool compression_enable;int num_streams; +struct intel_dsc_slice_config { +int pipes_per_line; +int streams_per_pipe; +int slices_per_stream; + } slice_config;/* Compressed Bpp in U6.4 format (first 4 bits for fractional part) */ u16 compressed_bpp_x16;u8 slice_count;
drivers/gpu/drm/i915/display/intel_vdsc.c +5 -0
@@ -35,6 +35,11 @@ bool intel_dsc_source_support(const struct intel_crtc_state *crtc_state)return true; } +int intel_dsc_line_slice_count (const struct intel_dsc_slice_config *config) +{ +return config->pipes_per_line * config->streams_per_pipe * config->slices_per_stream; +} +static bool is_pipe_dsc (struct intel_crtc *crtc,enum transcoder cpu_transcoder) {struct intel_display *display =to_intel_display (crtc);
drivers/gpu/drm/i915/display/intel_vdsc.h +2 -0
@@ -13,9 +13,11 @@ struct drm_printer;enum transcoder ;struct intel_crtc ;struct intel_crtc_state ; +struct intel_dsc_slice_config ;struct intel_encoder ;bool intel_dsc_source_support (const struct intel_crtc_state *crtc_state); +int intel_dsc_line_slice_count (const struct intel_dsc_slice_config *config);void intel_uncompressed_joiner_enable (const struct intel_crtc_state *crtc_state);void intel_dsc_enable (const struct intel_crtc_state *crtc_state);void intel_dsc_disable (const struct intel_crtc_state *crtc_state);
Signature · 1 line
2.49.1
Re: [PATCH 36/50] drm/i915/dsc: Track the detaild DSC slice configuration
Quoted 24 lines · Imre Deak
Add a way to track the detailed DSC pipes-per-line, streams-per-pipe, slices-per-stream configuration instead of the current streams-per- pipe
and slices-per-line value. This way describes the slice configuration in
a clearer way, for instance providing a2 pipes-per-line x 2 streams-per-pipe x 2 slices-per-stream = 8 slices-per-line
view, instead of the current, coarser
2 streams-per-pipe, 8 slices-per-line
view, the former better reflecting that each DSC stream engine has 2 slices. This also let's optimizing the configuration in a simpler/clearer way, for instance using 1 stream x 2 slices, or 1 stream
x 4 slices instead of the current 2 stream x 1 slice, or 2 streams x 2
slices configuration (so that 1 DSC stream engine can be powered off in
each pipe).
Quoted 5 lines
Follow-up changes will convert the current slices-per-line computation
logic to compute instead the above detailed slice configuration.Signed-off-by Imre Deak <[email protected]>
Quoted 65 lines
---
drivers/gpu/drm/i915/display/intel_display_types.h | 5 +++++ drivers/gpu/drm/i915/display/intel_vdsc.c | 5 +++++ drivers/gpu/drm/i915/display/intel_vdsc.h | 2 ++3 files changed, 12 insertions(+)drivers/gpu/drm/i915/display/intel_display_types.h +5
-0@@ -1306,6 +1306,11 @@ struct intel_crtc_state { bool compression_enabled_on_link; bool compression_enable; int num_streams; +struct intel_dsc_slice_config { +int pipes_per_line; +int streams_per_pipe; +int slices_per_stream; + } slice_config; /* Compressed Bpp in U6.4 format (first 4 bits forfractional part) */
u16compressed_bpp_x16;
u8slice_count;drivers/gpu/drm/i915/display/intel_vdsc.c +0
-0@@ -35,6 +35,11 @@ bool intel_dsc_source_support(const struct intel_crtc_state *crtc_state) return true; }
+intintel_dsc_line_slice_count(const struct intel_dsc_slice_config *config)drivers/gpu/drm/i915/display/intel_vdsc.c +2
-0+{ + return config->pipes_per_line * config->streams_per_pipe *
config->slices_per_stream;drivers/gpu/drm/i915/display/intel_vdsc.c +2
-0+} +static bool
is_pipe_dsc(struct intel_crtc *crtc, enum transcoder cpu_transcoder)
{
structintel_display*display =to_intel_display(crtc);drivers/gpu/drm/i915/display/intel_vdsc.h +1
-0@@ -13,9 +13,11 @@ struct drm_printer; enum transcoder; struct intel_crtc; struct intel_crtc_state; +struct intel_dsc_slice_config ; struct intel_encoder;
boolintel_dsc_source_support(const struct intel_crtc_state *crtc_state);
+intintel_dsc_line_slice_count(const struct intel_dsc_slice_config *config);
voidintel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state);
voidintel_dsc_enable(const struct intel_crtc_state *crtc_state); voidintel_dsc_disable(const struct intel_crtc_state *crtc_state);
PATCH 37/50 drm/i915/dsc: Track the DSC stream count in the DSC slice config state
In reply to Imre DeakMove the tracking for the DSC stream count from intel_crtc_state::dsc.num_streams to intel_crtc_state::dsc.slice_config.streams_per_pipe.
While at it add a TODO comment to read out the full DSC configuration from HW including the pipes-per-line and slices-per-stream values.
--- drivers/gpu/drm/i915/display/icl_dsi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_display_types.h | 1 - drivers/gpu/drm/i915/display/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/display/intel_vdsc.c | 11 ++++++----- 5 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +2 -2
@@ -1626,9 +1626,9 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,/* FIXME: split only when necessary */ if (crtc_state->dsc.slice_count >1 ) - crtc_state->dsc.num_streams =2 ; + crtc_state->dsc.slice_config.streams_per_pipe =2 ;else - crtc_state->dsc.num_streams =1 ; + crtc_state->dsc.slice_config.streams_per_pipe =1 ;/* FIXME: initialize from VBT */ vdsc_cfg->rc_model_size =DSC_RC_MODEL_SIZE_CONST ;
drivers/gpu/drm/i915/display/intel_display.c +1 -1
@@ -5450,7 +5450,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_I (dsc.config.nsl_bpg_offset);PIPE_CONF_CHECK_BOOL (dsc.compression_enable); -PIPE_CONF_CHECK_I (dsc.num_streams); +PIPE_CONF_CHECK_I (dsc.slice_config.streams_per_pipe);PIPE_CONF_CHECK_I (dsc.compressed_bpp_x16);PIPE_CONF_CHECK_BOOL (splitter.enable);
drivers/gpu/drm/i915/display/intel_display_types.h +0 -1
@@ -1305,7 +1305,6 @@ struct intel_crtc_state {/* Only used for state computation, not read out from the HW. */ bool compression_enabled_on_link;bool compression_enable; -int num_streams;struct intel_dsc_slice_config {int pipes_per_line;int streams_per_pipe;
drivers/gpu/drm/i915/display/intel_dp.c +3 -3
@@ -2417,11 +2417,11 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,*/ if (pipe_config->joiner_pipes && num_joined_pipes ==4 && pipe_config->dsc.slice_count ==12 ) - pipe_config->dsc.num_streams =3 ; + pipe_config->dsc.slice_config.streams_per_pipe =3 ;else if (pipe_config->joiner_pipes || pipe_config->dsc.slice_count >1 ) - pipe_config->dsc.num_streams =2 ; + pipe_config->dsc.slice_config.streams_per_pipe =2 ;else - pipe_config->dsc.num_streams =1 ; + pipe_config->dsc.slice_config.streams_per_pipe =1 ; ret =intel_dp_dsc_compute_params (connector, pipe_config);if (ret <0 ) {
drivers/gpu/drm/i915/display/intel_vdsc.c +6 -5
@@ -421,7 +421,7 @@ intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder)static int intel_dsc_get_vdsc_per_pipe (const struct intel_crtc_state *crtc_state) { -return crtc_state->dsc.num_streams; +return crtc_state->dsc.slice_config.streams_per_pipe; }int intel_dsc_get_num_vdsc_instances (const struct intel_crtc_state *crtc_state)
@@ -1023,12 +1023,13 @@ void intel_dsc_get_config(struct intel_crtc_state *crtc_state)if (!crtc_state->dsc.compression_enable) goto out; +/* TODO: Read out slice_config.pipes_per_line/slices_per_stream as well */ if (dss_ctl1 &JOINER_ENABLE && dss_ctl2 & (VDSC2_ENABLE |SMALL_JOINER_CONFIG_3_ENGINES )) - crtc_state->dsc.num_streams =3 ; + crtc_state->dsc.slice_config.streams_per_pipe =3 ;else if (dss_ctl1 &JOINER_ENABLE && dss_ctl2 &VDSC1_ENABLE ) - crtc_state->dsc.num_streams =2 ; + crtc_state->dsc.slice_config.streams_per_pipe =2 ;else - crtc_state->dsc.num_streams =1 ; + crtc_state->dsc.slice_config.streams_per_pipe =1 ;intel_dsc_get_pps_config (crtc_state); out:
@@ -1042,7 +1043,7 @@ static void intel_vdsc_dump_state(struct drm_printer *p, int indent,"dsc-dss: compressed-bpp:" FXP_Q4_FMT ", slice-count: %d, num_streams: %d\n" ,FXP_Q4_ARGS (crtc_state->dsc.compressed_bpp_x16), crtc_state->dsc.slice_count, - crtc_state->dsc.num_streams); + crtc_state->dsc.slice_config.streams_per_pipe); } void intel_vdsc_state_dump(struct drm_printer *p, int indent,
Signature · 1 line
2.49.1
Re: [PATCH 37/50] drm/i915/dsc: Track the DSC stream count in the DSC slice config state
Quoted 8 lines · Imre Deak
Move the tracking for the DSC stream count from
intel_crtc_state::dsc.num_streamstointel_crtc_state::dsc.slice_config.streams_per_pipe.While at it add a TODO comment to read out the full DSC configuration from HW including the pipes-per-line and slices-per-stream values.
Signed-off-by Imre Deak <[email protected]>
Quoted 128 lines
---
drivers/gpu/drm/i915/display/icl_dsi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display.c | 2 +-drivers/gpu/drm/i915/display/intel_display_types.h| 1 - drivers/gpu/drm/i915/display/intel_dp.c | 6 +++--- drivers/gpu/drm/i915/display/intel_vdsc.c | 11 ++++++-----5 files changed, 12 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +0
-0@@ -1626,9 +1626,9 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
/* FIXME: split only when necessary */
if (crtc_state->dsc.slice_count> 1)drivers/gpu/drm/i915/display/icl_dsi.c +1
-1- crtc_state->dsc.num_streams =2 ; + crtc_state->dsc.slice_config.streams_per_pipe =2 ;else
drivers/gpu/drm/i915/display/icl_dsi.c +1
-1- crtc_state->dsc.num_streams =1 ; + crtc_state->dsc.slice_config.streams_per_pipe =1 ;
/* FIXME: initialize from VBT */vdsc_cfg->rc_model_size=DSC_RC_MODEL_SIZE_CONST;drivers/gpu/drm/i915/display/intel_display.c +0
-0@@ -5450,7 +5450,7 @@ intel_pipe_config_compare(const structintel_crtc_state *current_config, PIPE_CONF_CHECK_I(dsc.config.nsl_bpg_offset);
PIPE_CONF_CHECK_BOOL(dsc.compression_enable);drivers/gpu/drm/i915/display/intel_display.c +1
-1-PIPE_CONF_CHECK_I (dsc.num_streams); +PIPE_CONF_CHECK_I (dsc.slice_config.streams_per_pipe);
PIPE_CONF_CHECK_I(dsc.compressed_bpp_x16);
PIPE_CONF_CHECK_BOOL(splitter.enable);drivers/gpu/drm/i915/display/intel_display_types.h +0
-0@@ -1305,7 +1305,6 @@ struct intel_crtc_state { /* Only used for state computation, not read outfrom the HW. */
boolcompression_enabled_on_link;
boolcompression_enable;drivers/gpu/drm/i915/display/intel_display_types.h +0
-1-int num_streams;struct
intel_dsc_slice_config{
intpipes_per_line;
intstreams_per_pipe;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2417,11 +2417,11 @@ int intel_dp_dsc_compute_config(structintel_dp *intel_dp, */ if (
pipe_config->joiner_pipes&&num_joined_pipes== 4 &&pipe_config->dsc.slice_count== 12)drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.num_streams =3 ; + pipe_config->dsc.slice_config.streams_per_pipe =3 ;else if (
pipe_config->joiner_pipes|| pipe_config-Quoted 1 line
dsc.slice_count > 1)
drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.num_streams =2 ; + pipe_config->dsc.slice_config.streams_per_pipe =2 ;else
drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.num_streams =1 ; + pipe_config->dsc.slice_config.streams_per_pipe =1 ;
ret =intel_dp_dsc_compute_params(connector, pipe_config); if (ret < 0) {drivers/gpu/drm/i915/display/intel_vdsc.c +0
-0@@ -421,7 +421,7 @@ intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder)
static intintel_dsc_get_vdsc_per_pipe(const struct intel_crtc_state *crtc_state)
{drivers/gpu/drm/i915/display/intel_vdsc.c +1
-1-return crtc_state->dsc.num_streams; +return crtc_state->dsc.slice_config.streams_per_pipe;}
intintel_dsc_get_num_vdsc_instances(const struct intel_crtc_state *crtc_state)drivers/gpu/drm/i915/display/intel_vdsc.c +0
-0@@ -1023,12 +1023,13 @@ void intel_dsc_get_config(struct intel_crtc_state *crtc_state) if (!crtc_state->dsc.compression_enable) goto out;drivers/gpu/drm/i915/display/intel_vdsc.c +1
-0+/* TODO: Read out slice_config.pipes_per_line/slices_per_stream as well */ if (
dss_ctl1&JOINER_ENABLE&&dss_ctl2& (VDSC2_ENABLE|SMALL_JOINER_CONFIG_3_ENGINES))drivers/gpu/drm/i915/display/intel_vdsc.c +1
-1- crtc_state->dsc.num_streams =3 ; + crtc_state->dsc.slice_config.streams_per_pipe =3 ;else if (
dss_ctl1&JOINER_ENABLE&&dss_ctl2&VDSC1_ENABLE)drivers/gpu/drm/i915/display/intel_vdsc.c +1
-1- crtc_state->dsc.num_streams =2 ; + crtc_state->dsc.slice_config.streams_per_pipe =2 ;else
drivers/gpu/drm/i915/display/intel_vdsc.c +1
-1- crtc_state->dsc.num_streams =1 ; + crtc_state->dsc.slice_config.streams_per_pipe =1 ;
intel_dsc_get_pps_config(crtc_state);
out:drivers/gpu/drm/i915/display/intel_vdsc.c +0
-0@@ -1042,7 +1043,7 @@ static void intel_vdsc_dump_state(struct drm_printer *p, int indent, "dsc-dss: compressed-bpp:" FXP_Q4_FMT ", slice-count: %d, num_streams: %d\n",FXP_Q4_ARGS(crtc_state-
Quoted 1 line
dsc.compressed_bpp_x16),
crtc_state->dsc.slice_count,drivers/gpu/drm/i915/display/intel_vdsc.c +1
-1- crtc_state->dsc.num_streams); + crtc_state-Quoted 1 line
dsc.slice_config.streams_per_pipe);
}
void intel_vdsc_state_dump(structdrm_printer*p, int indent,
PATCH 38/50 drm/i915/dsi: Move initialization of DSI DSC streams-per-pipe to fill_dsc()
In reply to Imre DeakMove the initialization of the DSI DSC streams-per-pipe value to fill_dsc() next to where the corresponding (per-line) slice_count value is initialized. This allows converting the initialization to use the detailed slice configuration state in follow-up changes.
--- drivers/gpu/drm/i915/display/icl_dsi.c | 6 ------ drivers/gpu/drm/i915/display/intel_bios.c | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +0 -6
@@ -1624,12 +1624,6 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,if (crtc_state->pipe_bpp <8 *3 )return -EINVAL ; -/* FIXME: split only when necessary */ -if (crtc_state->dsc.slice_count >1 ) - crtc_state->dsc.slice_config.streams_per_pipe =2 ; -else - crtc_state->dsc.slice_config.streams_per_pipe =1 ; -/* FIXME: initialize from VBT */ vdsc_cfg->rc_model_size =DSC_RC_MODEL_SIZE_CONST ;
drivers/gpu/drm/i915/display/intel_bios.c +5 -0
@@ -3516,10 +3516,14 @@ static void fill_dsc(struct intel_crtc_state *crtc_state,* throughput etc. into account. * * Also, per spec DSI supports 1, 2, 3 or 4 horizontal slices. +* +* FIXME: split only when necessary */ if (dsc->slices_per_line &BIT (2 )) { + crtc_state->dsc.slice_config.streams_per_pipe =2 ; crtc_state->dsc.slice_count =4 ; }else if (dsc->slices_per_line &BIT (1 )) { + crtc_state->dsc.slice_config.streams_per_pipe =2 ; crtc_state->dsc.slice_count =2 ; }else {/* FIXME */
@@ -3527,6 +3531,7 @@ static void fill_dsc(struct intel_crtc_state *crtc_state,drm_dbg_kms (display->drm,"VBT: Unsupported DSC slice count for DSI\n" ); + crtc_state->dsc.slice_config.streams_per_pipe =1 ; crtc_state->dsc.slice_count =1 ; }
Signature · 1 line
2.49.1
Re: [PATCH 38/50] drm/i915/dsi: Move initialization of DSI DSC streams-per-pipe to fill_dsc()
Quoted 49 lines · Imre Deak
Move the initialization of the DSI DSC streams-per-pipe value to
fill_dsc()next to where the corresponding (per-line)slice_countvalue
is initialized. This allows converting the initialization to use the detailed slice configuration state in follow-up changes.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/icl_dsi.c | 6 ------drivers/gpu/drm/i915/display/intel_bios.c| 5 +++++2 files changed, 5 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +0
-0@@ -1624,12 +1624,6 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder, if (crtc_state->pipe_bpp < 8 * 3) return -EINVAL;drivers/gpu/drm/i915/display/icl_dsi.c +0
-6-/* FIXME: split only when necessary */ -if (crtc_state->dsc.slice_count >1 ) - crtc_state->dsc.slice_config.streams_per_pipe =2 ; -else - crtc_state->dsc.slice_config.streams_per_pipe =1 ; -/* FIXME: initialize from VBT */
vdsc_cfg->rc_model_size=DSC_RC_MODEL_SIZE_CONST;drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3516,10 +3516,14 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, * throughput etc. into account. * * Also, per spec DSI supports 1, 2, 3 or 4 horizontalslices.
drivers/gpu/drm/i915/display/intel_bios.c +2
-0+* +* FIXME: split only when necessary */
if (dsc->slices_per_line& BIT(2)) {drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_config.streams_per_pipe =2 ;
crtc_state->dsc.slice_count= 4; } else if (dsc->slices_per_line& BIT(1)) {
drivers/gpu/drm/i915/display/intel_bios.c
Quoted 1 line
drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_config.streams_per_pipe =2 ;
fill_dsc is called by intel_bios_get_dsc_params. Is streams_per_pipe really bios parameter? I see slices_per_line is in VBT. Streams_per_pipe and existing slice_count are decided based on that. Is that right place to make that decisions or should we leave that decision to caller of intel_bios_get_dsc_params?
BR,
Jouni Högander
Quoted 13 lines
crtc_state->dsc.slice_count= 2;
} else {
/* FIXME */drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3527,6 +3531,7 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, drm_dbg_kms(display->drm,"VBT: Unsupported DSC slice count for DSI\n");
drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_config.streams_per_pipe =1 ;
crtc_state->dsc.slice_count= 1;
}
Re: [PATCH 38/50] drm/i915/dsi: Move initialization of DSI DSC streams-per-pipe to fill_dsc()
Quoted 45 lines · Jouni Hogander
Quoted 44 lines · Imre Deak
Move the initialization of the DSI DSC streams-per-pipe value to
fill_dsc()next to where the corresponding (per-line)slice_countvalue
is initialized. This allows converting the initialization to use the detailed slice configuration state in follow-up changes.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/icl_dsi.c | 6 ------drivers/gpu/drm/i915/display/intel_bios.c| 5 +++++2 files changed, 5 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +0
-0@@ -1624,12 +1624,6 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder, if (crtc_state->pipe_bpp < 8 * 3) return -EINVAL;drivers/gpu/drm/i915/display/icl_dsi.c +0
-6-/* FIXME: split only when necessary */ -if (crtc_state->dsc.slice_count >1 ) - crtc_state->dsc.slice_config.streams_per_pipe =2 ; -else - crtc_state->dsc.slice_config.streams_per_pipe =1 ; -/* FIXME: initialize from VBT */
vdsc_cfg->rc_model_size=DSC_RC_MODEL_SIZE_CONST;drivers/gpu/drm/i915/display/intel_bios.c +2
-0@@ -3516,10 +3516,14 @@ static void fill_dsc(struct intel_crtc_state *crtc_state,* throughput etc. into account. * * Also, per spec DSI supports 1, 2, 3 or 4 horizontal slices. +* +* FIXME: split only when necessary */ if (dsc->slices_per_line & BIT(2)) {
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_bios.c static void fill_dsc(struct intel_crtc_state *crtc_state, · line 3526
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_bios.c +2
-0+ crtc_state->dsc.slice_config.streams_per_pipe =2 ; crtc_state->dsc.slice_count = 4; } else if (dsc->slices_per_line & BIT(1)) { + crtc_state->dsc.slice_config.streams_per_pipe =2 ;
fill_dscis called byintel_bios_get_dsc_params. Isstreams_per_pipereally bios parameter? I seeslices_per_lineis in VBT.Streams_per_pipeand existingslice_countare decided based on that.
The slices_per_line computed in fill_dsc() at the moment (crtc_state->dsc.slice_count) is not exactly what is in VBT. VBT indicates what slices_per_line counts the sink supports, not what the selected slices_per_line count should be (which would be a single integer parameter in VBT, not a mask).
Quoted 2 lines
Is that right place to make that decisions or should we leave that decision to caller of
intel_bios_get_dsc_params?
I think the computation of the slices_per_line value (for which the sink's slice_per_line capability mask is only one criteria) should be at the same spot where the closely related pipes_per_line, streams_per_pipe and slices_per_stream are computed as well. In fact at the end of the patchset only these latter 3 params are computed and the slices_per_line value is derived from these using a helper function.
I agree with you that fill_dsc() should not do the actual state computation (like it does atm selecting slices_per_line aka dsc.slice_count), rather this should be done by the DSI encoder state computation in gen11_dsi_dsc_compute_config(), fill_dsc() only returning a mask of the slices_per_line counts supported by the sink. Would you be ok to do this as a follow-up?
Quoted 15 lines
BR,
Jouni Högander
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_bios.c +0
-0crtc_state->dsc.slice_count = 2; } else { /* FIXME */@@ -3527,6 +3531,7 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, drm_dbg_kms(display->drm, "VBT: Unsupported DSC slice count for DSI\n");drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_config.streams_per_pipe =1 ;
crtc_state->dsc.slice_count= 1;
}
Hogander, Jouni
Reviewed-byRe: [PATCH 38/50] drm/i915/dsi: Move initialization of DSI DSC streams-per-pipe to fill_dsc()
Quoted 84 lines · Imre Deak
Quoted 55 lines · Jouni Hogander
Quoted 54 lines · Imre Deak
Move the initialization of the DSI DSC streams-per-pipe value to
fill_dsc()next to where the corresponding (per-line)slice_countvalue
is initialized. This allows converting the initialization to use the
detailed slice configuration state in follow-up changes.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/icl_dsi.c | 6 ------drivers/gpu/drm/i915/display/intel_bios.c| 5 +++++2 files changed, 5 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +0
-0@@ -1624,12 +1624,6 @@ static intgen11_dsi_dsc_compute_config(struct
intel_encoder*encoder,
if (crtc_state->pipe_bpp< 8 * 3)
return-EINVAL;drivers/gpu/drm/i915/display/icl_dsi.c +0
-3-/* FIXME: split only when necessary */ -if (crtc_state->dsc.slice_count >1 ) - crtc_state->dsc.slice_config.streams_per_pipe =2;
drivers/gpu/drm/i915/display/icl_dsi.c +0
-2-else - crtc_state->dsc.slice_config.streams_per_pipe =1;
-
/* FIXME: initialize from VBT */vdsc_cfg->rc_model_size=DSC_RC_MODEL_SIZE_CONST;drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3516,10 +3516,14 @@ static void fill_dsc(structintel_crtc_state *crtc_state, * throughput etc. into account. * * Also, per spec DSI supports 1, 2, 3 or 4 horizontalslices.
drivers/gpu/drm/i915/display/intel_bios.c +2
-0+* +* FIXME: split only when necessary */
if (dsc->slices_per_line& BIT(2)) {drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_config.streams_per_pipe =2;
crtc_state->dsc.slice_count= 4; } else if (dsc->slices_per_line& BIT(1)) {Quoted 8 lines
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_config.streams_per_pipe =2;
fill_dscis called byintel_bios_get_dsc_params. Isstreams_per_pipe
really bios parameter? I seeslices_per_lineis in VBT.Streams_per_pipeand existingslice_countare decided based on that.The
slices_per_linecomputed infill_dsc()at the moment (crtc_state->dsc.slice_count) is not exactly what is in VBT. VBT indicates whatslices_per_linecounts the sink supports, not what the selectedslices_per_linecount should be (which would be a single integer parameter in VBT, not a mask).Quoted 2 lines
Is that right place to make that decisions or should we leave that decision to caller of
intel_bios_get_dsc_params?I think the computation of the
slices_per_linevalue (for which the sink'sslice_per_linecapability mask is only one criteria) should be at
the same spot where the closely relatedpipes_per_line,streams_per_pipe
andslices_per_streamare computed as well. In fact at the end of the patchset only these latter 3 params are computed and theslices_per_line
value is derived from these using a helper function.
Quoted 8 lines
I agree with you that
fill_dsc()should not do the actual state computation (like it does atm selectingslices_per_lineaka dsc.slice_count), rather this should be done by the DSI encoder state computation ingen11_dsi_dsc_compute_config(),fill_dsc()only returning
a mask of theslices_per_linecounts supported by the sink. Would you be
ok to do this as a follow-up?
Thank you for the explanation. I'm fine with doing it as a follow-up:
Quoted 19 lines
Quoted 19 lines
BR,
Jouni Högander
Quoted 14 lines
crtc_state->dsc.slice_count= 2;
} else {
/* FIXME */drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3527,6 +3531,7 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, drm_dbg_kms(display->drm,"VBT: Unsupported DSC slice count for DSI\n");
drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_config.streams_per_pipe =1;
crtc_state->dsc.slice_count= 1;
}
PATCH 39/50 drm/i915/dsi: Track the detailed DSC slice configuration
In reply to Imre DeakAdd tracking for the DSI DSC pipes-per-line and slices-per-stream value in the slice config state and compute the current slices-per-line value using this slice config state. The slices-per-line value used atm will be removed by a follow-up change after converting all the places using it to use the detailed slice config instead.
--- drivers/gpu/drm/i915/display/intel_bios.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +8 -3
@@ -41,6 +41,7 @@#include "intel_display_utils.h" #include "intel_gmbus.h" #include "intel_rom.h" +#include "intel_vdsc.h" #define _INTEL_BIOS_PRIVATE#include "intel_vbt_defs.h"
@@ -3519,12 +3520,14 @@ static void fill_dsc(struct intel_crtc_state *crtc_state,* * FIXME: split only when necessary */ + crtc_state->dsc.slice_config.pipes_per_line =1 ; +if (dsc->slices_per_line &BIT (2 )) { crtc_state->dsc.slice_config.streams_per_pipe =2 ; - crtc_state->dsc.slice_count =4 ; + crtc_state->dsc.slice_config.slices_per_stream =2 ; }else if (dsc->slices_per_line &BIT (1 )) { crtc_state->dsc.slice_config.streams_per_pipe =2 ; - crtc_state->dsc.slice_count =2 ; + crtc_state->dsc.slice_config.slices_per_stream =1 ; }else {/* FIXME */ if (!(dsc->slices_per_line &BIT (0 )))
@@ -3532,9 +3535,11 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, "VBT: Unsupported DSC slice count for DSI\n"); crtc_state->dsc.slice_config.streams_per_pipe =1 ; - crtc_state->dsc.slice_count =1 ; + crtc_state->dsc.slice_config.slices_per_stream =1 ; } + crtc_state->dsc.slice_count =intel_dsc_line_slice_count (&crtc_state->dsc.slice_config); +if (crtc_state->hw.adjusted_mode.crtc_hdisplay % crtc_state->dsc.slice_count !=0 ) drm_dbg_kms(display->drm,
Signature · 1 line
2.49.1
Re: [PATCH 39/50] drm/i915/dsi: Track the detailed DSC slice configuration
Quoted 11 lines · Imre Deak
Add tracking for the DSI DSC pipes-per-line and slices-per-stream value
in the slice config state and compute the current slices-per-line value
using this slice config state. The slices-per-line value used atm will
be removed by a follow-up change after converting all the places using
it to use the detailed slice config instead.Signed-off-by Imre Deak <[email protected]>
Quoted 51 lines
---
drivers/gpu/drm/i915/display/intel_bios.c | 11 ++++++++---1 file changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +1
-0@@ -41,6 +41,7 @@ #include "intel_display_utils.h" #include "intel_gmbus.h" #include "intel_rom.h" +#include "intel_vdsc.h"
#define_INTEL_BIOS_PRIVATE
#include "intel_vbt_defs.h"drivers/gpu/drm/i915/display/intel_bios.c +4
-2@@ -3519,12 +3520,14 @@ static void fill_dsc(struct intel_crtc_state*crtc_state, * * FIXME: split only when necessary */ + crtc_state->dsc.slice_config.pipes_per_line =1 ; + if (dsc->slices_per_line & BIT(2)) { crtc_state->dsc.slice_config.streams_per_pipe = 2; - crtc_state->dsc.slice_count =4 ; + crtc_state->dsc.slice_config.slices_per_stream =2 ; } else if (dsc->slices_per_line & BIT(1)) { crtc_state->dsc.slice_config.streams_per_pipe = 2; - crtc_state->dsc.slice_count =2 ; + crtc_state->dsc.slice_config.slices_per_stream =1 ; } else { /* FIXME */if (!(dsc->slices_per_line & BIT(0)))
drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3532,9 +3535,11 @@ static void fill_dsc(struct intel_crtc_state *crtc_state,"VBT: Unsupported DSC slice count for DSI\n");
crtc_state->dsc.slice_config.streams_per_pipe= 1;drivers/gpu/drm/i915/display/intel_bios.c +1
-1- crtc_state->dsc.slice_count =1 ; + crtc_state->dsc.slice_config.slices_per_stream =1 ;}
drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ crtc_state->dsc.slice_count =
intel_dsc_line_slice_count(&crtc_state->dsc.slice_config); +
if (crtc_state->hw.adjusted_mode.crtc_hdisplay%crtc_state->dsc.slice_count!= 0) drm_dbg_kms(display->drm,
PATCH 40/50 drm/i915/dp: Track the detailed DSC slice configuration
In reply to Imre DeakAdd tracking for the DP DSC pipes-per-line and slices-per-stream value in the slice config state and compute the current slices-per-line (slice_count) value using this slice config. The slices-per-line value used atm will be removed by a follow-up change after converting all the places using it to use the slice config instead.
For now the slices-per-stream value is calculated based on the slices-per-line value (slice_count) calculated by the drm_dp_dsc_sink_max_slice_count() / intel_dp_dsc_get_slice_count() functions. In a follow-up change these functions will be converted to calculate the slices-per-stream value directly, along with the detailed slice configuration.
--- drivers/gpu/drm/i915/display/intel_dp.c | 32 ++++++++++++++++--------- 1 file changed, 21 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +21 -11
@@ -2356,6 +2356,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, &pipe_config->hw.adjusted_mode;int num_joined_pipes =intel_crtc_num_joined_pipes (pipe_config);bool is_mst =intel_crtc_has_type (pipe_config,INTEL_OUTPUT_DP_MST ); +int slices_per_line;int ret;/*
@@ -2383,30 +2384,26 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,/* Calculate Slice count */ if (intel_dp_is_edp (intel_dp)) { - pipe_config->dsc.slice_count = + slices_per_line =drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, true); -if (!pipe_config->dsc.slice_count) { +if (!slices_per_line) {drm_dbg_kms (display->drm,"Unsupported Slice Count %d\n" , - pipe_config->dsc.slice_count); + slices_per_line);return -EINVAL ; } }else { -u8 dsc_dp_slice_count; - - dsc_dp_slice_count = + slices_per_line =intel_dp_dsc_get_slice_count (connector, adjusted_mode->crtc_clock, adjusted_mode->crtc_hdisplay, num_joined_pipes); -if (!dsc_dp_slice_count) { +if (!slices_per_line) {drm_dbg_kms (display->drm,"Compressed Slice Count not supported\n" );return -EINVAL ; } - - pipe_config->dsc.slice_count = dsc_dp_slice_count; }/* * VDSC engine operates at 1 Pixel per clock, so if peak pixel rate
@@ -2415,14 +2412,27 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,* In case of Ultrajoiner along with 12 slices we need to use 3 * VDSC instances. */ + pipe_config->dsc.slice_config.pipes_per_line = num_joined_pipes; +if (pipe_config->joiner_pipes && num_joined_pipes ==4 && - pipe_config->dsc.slice_count ==12 ) + slices_per_line ==12 ) pipe_config->dsc.slice_config.streams_per_pipe =3 ; -else if (pipe_config->joiner_pipes || pipe_config->dsc.slice_count >1 ) +else if (pipe_config->joiner_pipes || slices_per_line >1 ) pipe_config->dsc.slice_config.streams_per_pipe =2 ;else pipe_config->dsc.slice_config.streams_per_pipe =1 ; + pipe_config->dsc.slice_config.slices_per_stream = + slices_per_line / + pipe_config->dsc.slice_config.pipes_per_line / + pipe_config->dsc.slice_config.streams_per_pipe; + + pipe_config->dsc.slice_count = +intel_dsc_line_slice_count (&pipe_config->dsc.slice_config); + +drm_WARN_ON (display->drm, + pipe_config->dsc.slice_count != slices_per_line); + ret =intel_dp_dsc_compute_params (connector, pipe_config);if (ret <0 ) { drm_dbg_kms(display->drm,
Signature · 1 line
2.49.1
Re: [PATCH 40/50] drm/i915/dp: Track the detailed DSC slice configuration
Quoted 35 lines · Imre Deak
Add tracking for the DP DSC pipes-per-line and slices-per-stream value
in the slice config state and compute the current slices-per-line (slice_count) value using this slice config. The slices-per-line value
used atm will be removed by a follow-up change after converting all the
places using it to use the slice config instead.For now the slices-per-stream value is calculated based on the slices-per-line value (
slice_count) calculated by thedrm_dp_dsc_sink_max_slice_count()/intel_dp_dsc_get_slice_count()functions. In a follow-up change these functions will be converted to calculate the slices-per-stream value directly, along with the detailed
slice configuration.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 32 ++++++++++++++++------- --1 file changed, 21 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2356,6 +2356,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, &pipe_config->hw.adjusted_mode;int
num_joined_pipes=intel_crtc_num_joined_pipes(pipe_config); boolis_mst=intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST);
drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, · line 2359
Quoted 1 line
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+int slices_per_line;
Why you are not using obvious name for this: slice_count ?
Quoted 35 lines
int ret;
/*drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2383,30 +2384,26 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
/* Calculate Slice count */
if (intel_dp_is_edp(intel_dp)) {drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.slice_count = + slices_per_line =drm_dp_dsc_sink_max_slice_count(connector-
Quoted 1 line
dp.dsc_dpcd,
true);
drivers/gpu/drm/i915/display/intel_dp.c +1
-1-if (!pipe_config->dsc.slice_count) { +if (!slices_per_line) {drm_dbg_kms(display->drm, "Unsupported Slice Count %d\n",
drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.slice_count); + slices_per_line);return
-EINVAL;
}
} else {drivers/gpu/drm/i915/display/intel_dp.c +1
-3-u8 dsc_dp_slice_count; - - dsc_dp_slice_count = + slices_per_line =intel_dp_dsc_get_slice_count(connector, adjusted_mode-
Quoted 1 line
crtc_clock,adjusted_mode-
Quoted 1 line
crtc_hdisplay,
num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +1
-1-if (!dsc_dp_slice_count) { +if (!slices_per_line) {
Quoted 5 lines
drm_dbg_kms(display->drm, "Compressed Slice Count not supported\n");
return-EINVAL;
}
You could share handling of !slices_per_line for DP and eDP.
BR,
Jouni Högander
Quoted 42 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-2- - pipe_config->dsc.slice_count = dsc_dp_slice_count;}
/*
* VDSC engine operates at 1 Pixel per clock, so if peak pixel ratedrivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2415,14 +2412,27 @@ int intel_dp_dsc_compute_config(structintel_dp *intel_dp, * In case of Ultrajoiner along with 12 slices we need touse 3
* VDSC instances.
*/drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ pipe_config->dsc.slice_config.pipes_per_line =
num_joined_pipes;
+
if (pipe_config->joiner_pipes&&num_joined_pipes== 4 &&drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.slice_count == 12) + slices_per_line == 12)
pipe_config->dsc.slice_config.streams_per_pipe= 3;drivers/gpu/drm/i915/display/intel_dp.c +0
-1- else if (pipe_config->joiner_pipes || pipe_config-Quoted 1 line
dsc.slice_count > 1)
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+else if (pipe_config->joiner_pipes || slices_per_line >1 )
pipe_config->dsc.slice_config.streams_per_pipe= 2; elsepipe_config->dsc.slice_config.streams_per_pipe= 1;drivers/gpu/drm/i915/display/intel_dp.c +7
-0+ pipe_config->dsc.slice_config.slices_per_stream = + slices_per_line / + pipe_config->dsc.slice_config.pipes_per_line / + pipe_config->dsc.slice_config.streams_per_pipe; + + pipe_config->dsc.slice_count = + intel_dsc_line_slice_count(&pipe_config-Quoted 1 line
dsc.slice_config);
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+ + drm_WARN_ON(display->drm, + pipe_config->dsc.slice_count !=
slices_per_line);
+
ret =intel_dp_dsc_compute_params(connector, pipe_config); if (ret < 0) {
drm_dbg_kms(display->drm,
Re: [PATCH 40/50] drm/i915/dp: Track the detailed DSC slice configuration
Quoted 22 lines · Jouni Hogander
Quoted 20 lines · Imre Deak
Add tracking for the DP DSC pipes-per-line and slices-per-stream value in the slice config state and compute the current slices-per-line (
slice_count) value using this slice config. The slices-per-line value used atm will be removed by a follow-up change after converting all the places using it to use the slice config instead.For now the slices-per-stream value is calculated based on the slices-per-line value (
slice_count) calculated by thedrm_dp_dsc_sink_max_slice_count()/intel_dp_dsc_get_slice_count()functions. In a follow-up change these functions will be converted to calculate the slices-per-stream value directly, along with the detailed slice configuration.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 32 ++++++++++++++++------- --1 file changed, 21 insertions(+), 11 deletions(-)
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, · line 2359
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-0@@ -2356,6 +2356,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, &pipe_config->hw.adjusted_mode; int num_joined_pipes = intel_crtc_num_joined_pipes(pipe_config); bool is_mst = intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST); +int slices_per_line;Why you are not using obvious name for this:
slice_count?
slice_count is not obvious imo. It could mean the number of slices per line/pipe/stream. It's the first one reported by the sink.
Quoted 29 lines
Quoted 29 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0int ret;
/*drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2383,30 +2384,26 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
/* Calculate Slice count */
if (intel_dp_is_edp(intel_dp)) {drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.slice_count = + slices_per_line =
drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, true);drivers/gpu/drm/i915/display/intel_dp.c +1
-1-if (!pipe_config->dsc.slice_count) { +if (!slices_per_line) {drm_dbg_kms(display->drm, "Unsupported Slice Count %d\n",
drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.slice_count); + slices_per_line);return
-EINVAL;
}
} else {drivers/gpu/drm/i915/display/intel_dp.c +1
-3-u8 dsc_dp_slice_count; - - dsc_dp_slice_count = + slices_per_line =intel_dp_dsc_get_slice_count(connector,
adjusted_mode->crtc_clock,adjusted_mode->crtc_hdisplay,num_joined_pipes);
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-1-if (!dsc_dp_slice_count) { +if (!slices_per_line) {drm_dbg_kms(display->drm,
"Compressed Slice Count not supported\n"); return-EINVAL;
}You could share handling of !slices_per_line for DP and eDP.
I do that later in
"Unify DP and eDP slice count computation"
leaving the changes in this patch simple.
Quoted 4 lines
BR,
Jouni Högander
Hogander, Jouni
Reviewed-byRe: [PATCH 40/50] drm/i915/dp: Track the detailed DSC slice configuration
Quoted 43 lines · Imre Deak
Quoted 26 lines · Jouni Hogander
Quoted 24 lines · Imre Deak
Add tracking for the DP DSC pipes-per-line and slices-per-stream value in the slice config state and compute the current slices-per-line (
slice_count) value using this slice config. The slices-per-line value used atm will be removed by a follow-up change
after converting all the places using it to use the slice config instead.For now the slices-per-stream value is calculated based on the slices-per-line value (
slice_count) calculated by thedrm_dp_dsc_sink_max_slice_count()/intel_dp_dsc_get_slice_count()
functions. In a follow-up change these functions will be converted
to calculate the slices-per-stream value directly, along with the detailed slice configuration.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 32 ++++++++++++++++---
----
--1 file changed, 21 insertions(+), 11 deletions(-)Quoted 15 lines
drivers/gpu/drm/i915/display/intel_dp.c int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, · line 2359
Quoted 13 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2356,6 +2356,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, &pipe_config->hw.adjusted_mode;int
num_joined_pipes=intel_crtc_num_joined_pipes(pipe_config); boolis_mst=intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+int slices_per_line;Why you are not using obvious name for this:
slice_count?
Quoted 3 lines
slice_countis not obvious imo. It could mean the number of slices per
line/pipe/stream. It's the first one reported by the sink.
ok
Quoted 47 lines
Quoted 38 lines
Quoted 38 lines
int ret;
/*drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2383,30 +2384,26 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
/* Calculate Slice count */
if (intel_dp_is_edp(intel_dp)) {drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.slice_count = + slices_per_line =drm_dp_dsc_sink_max_slice_count(connecto
r->dp.dsc_dpcd,
true);drivers/gpu/drm/i915/display/intel_dp.c +1
-1-if (!pipe_config->dsc.slice_count) { +if (!slices_per_line) {drm_dbg_kms(display->drm, "Unsupported Slice Count %d\n",
drivers/gpu/drm/i915/display/intel_dp.c +0
-1- pipe_config-Quoted 1 line
dsc.slice_count);
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ slices_per_line);return
-EINVAL;
}
} else {drivers/gpu/drm/i915/display/intel_dp.c +1
-3-u8 dsc_dp_slice_count; - - dsc_dp_slice_count = + slices_per_line =intel_dp_dsc_get_slice_count(connector,
adjusted_mode->crtc_clock,adjusted_mode->crtc_hdisplay,num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +0
-1-if (!dsc_dp_slice_count) {Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+if (!slices_per_line) {
drm_dbg_kms(display->drm, "Compressed Slice Count not supported\n");
return-EINVAL;
}You could share handling of !slices_per_line for DP and eDP.
Quoted 4 lines
I do that later in
"Unify DP and eDP slice count computation"leaving the changes in this patch simple.
Ok, thank you for pointing it out:
Quoted 5 lines
Quoted 5 lines
BR,
Jouni Högander
PATCH 41/50 drm/i915/dsc: Switch to using intel_dsc_line_slice_count()
In reply to Imre DeakBy now all the places are updated to track the DSC slice configuration in intel_crtc_state::dsc.slice_config, so calculate the slices-per-line value using that config, instead of using intel_crtc_state::dsc.slice_count caching the same value and remove the cached slice_count.
--- drivers/gpu/drm/i915/display/intel_bios.c | 6 ++---- drivers/gpu/drm/i915/display/intel_display_types.h | 1 - drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------ drivers/gpu/drm/i915/display/intel_vdsc.c | 7 ++++--- 4 files changed, 11 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +2 -4
@@ -3538,14 +3538,12 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, crtc_state->dsc.slice_config.slices_per_stream =1 ; } - crtc_state->dsc.slice_count =intel_dsc_line_slice_count (&crtc_state->dsc.slice_config); -if (crtc_state->hw.adjusted_mode.crtc_hdisplay % - crtc_state->dsc.slice_count !=0 ) +intel_dsc_line_slice_count (&crtc_state->dsc.slice_config) !=0 )drm_dbg_kms (display->drm,"VBT: DSC hdisplay %d not divisible by slice count %d\n" , crtc_state->hw.adjusted_mode.crtc_hdisplay, - crtc_state->dsc.slice_count); +intel_dsc_line_slice_count (&crtc_state->dsc.slice_config));/* * The VBT rc_buffer_block_size and rc_buffer_size definitions
drivers/gpu/drm/i915/display/intel_display_types.h +0 -1
@@ -1312,7 +1312,6 @@ struct intel_crtc_state { } slice_config;/* Compressed Bpp in U6.4 format (first 4 bits for fractional part) */ u16 compressed_bpp_x16; -u8 slice_count;struct drm_dsc_config config; } dsc;
drivers/gpu/drm/i915/display/intel_dp.c +5 -6
@@ -2031,12 +2031,14 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp, }else {unsigned long bw_overhead_flags = pipe_config->fec_enable ?DRM_DP_BW_OVERHEAD_FEC :0 ; +int line_slice_count = +intel_dsc_line_slice_count (&pipe_config->dsc.slice_config);if (!is_bw_sufficient_for_dsc_config (intel_dp, link_rate, lane_count, adjusted_mode->crtc_clock, adjusted_mode->hdisplay, - pipe_config->dsc.slice_count, + line_slice_count, dsc_bpp_x16, bw_overhead_flags))continue ;
@@ -2427,11 +2429,8 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, pipe_config->dsc.slice_config.pipes_per_line / pipe_config->dsc.slice_config.streams_per_pipe; - pipe_config->dsc.slice_count = -intel_dsc_line_slice_count (&pipe_config->dsc.slice_config); -drm_WARN_ON (display->drm, - pipe_config->dsc.slice_count != slices_per_line); +intel_dsc_line_slice_count (&pipe_config->dsc.slice_config) != slices_per_line); ret =intel_dp_dsc_compute_params (connector, pipe_config);if (ret <0 ) {
@@ -2449,7 +2448,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,"Compressed Bpp = " FXP_Q4_FMT " Slice Count = %d\n" , pipe_config->pipe_bpp,FXP_Q4_ARGS (pipe_config->dsc.compressed_bpp_x16), - pipe_config->dsc.slice_count); + intel_dsc_line_slice_count(&pipe_config->dsc.slice_config));return 0 ; }
drivers/gpu/drm/i915/display/intel_vdsc.c +4 -3
@@ -283,8 +283,9 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)int ret; vdsc_cfg->pic_width = pipe_config->hw.adjusted_mode.crtc_hdisplay; - vdsc_cfg->slice_width =DIV_ROUND_UP (vdsc_cfg->pic_width, - pipe_config->dsc.slice_count); + vdsc_cfg->slice_width = +DIV_ROUND_UP (vdsc_cfg->pic_width, +intel_dsc_line_slice_count (&pipe_config->dsc.slice_config)); err =intel_dsc_slice_dimensions_valid (pipe_config, vdsc_cfg);
@@ -1042,7 +1043,7 @@ static void intel_vdsc_dump_state(struct drm_printer *p, int indent,drm_printf_indent (p, indent,"dsc-dss: compressed-bpp:" FXP_Q4_FMT ", slice-count: %d, num_streams: %d\n" ,FXP_Q4_ARGS (crtc_state->dsc.compressed_bpp_x16), - crtc_state->dsc.slice_count, +intel_dsc_line_slice_count (&crtc_state->dsc.slice_config), crtc_state->dsc.slice_config.streams_per_pipe); }
Signature · 1 line
2.49.1
Re: [PATCH 41/50] drm/i915/dsc: Switch to using intel_dsc_line_slice_count()
Quoted 9 lines · Imre Deak
By now all the places are updated to track the DSC slice configuration
inintel_crtc_state::dsc.slice_config, so calculate the slices-per- line
value using that config, instead of usingintel_crtc_state::dsc.slice_countcaching the same value and remove the cachedslice_count.Signed-off-by Imre Deak <[email protected]>
Quoted 148 lines
---
drivers/gpu/drm/i915/display/intel_bios.c | 6 ++----drivers/gpu/drm/i915/display/intel_display_types.h| 1 - drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------ drivers/gpu/drm/i915/display/intel_vdsc.c | 7 ++++---4 files changed, 11 insertions(+), 14 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3538,14 +3538,12 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, crtc_state->dsc.slice_config.slices_per_stream = 1; }drivers/gpu/drm/i915/display/intel_bios.c +0
-1- crtc_state->dsc.slice_count =
intel_dsc_line_slice_count(&crtc_state->dsc.slice_config); -
if (crtc_state->hw.adjusted_mode.crtc_hdisplay%drivers/gpu/drm/i915/display/intel_bios.c +1
-1- crtc_state->dsc.slice_count != 0) + intel_dsc_line_slice_count(&crtc_state-Quoted 1 line
dsc.slice_config) != 0)
drm_dbg_kms(display->drm,
"VBT: DSC hdisplay %d not divisible by slice count %d\n",
crtc_state-Quoted 1 line
hw.adjusted_mode.crtc_hdisplay,
drivers/gpu/drm/i915/display/intel_bios.c +1
-1- crtc_state->dsc.slice_count); + intel_dsc_line_slice_count(&crtc_state-Quoted 1 line
dsc.slice_config));
/*
* The VBTrc_buffer_block_sizeandrc_buffer_sizedefinitionsdrivers/gpu/drm/i915/display/intel_display_types.h +0
-0@@ -1312,7 +1312,6 @@ struct intel_crtc_state { } slice_config; /* Compressed Bpp in U6.4 format (first 4 bits forfractional part) */
u16compressed_bpp_x16;drivers/gpu/drm/i915/display/intel_display_types.h +0
-1-u8 slice_count;struct
drm_dsc_configconfig;
} dsc;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2031,12 +2031,14 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp, } else {unsigned long
bw_overhead_flags=pipe_config->fec_enable?DRM_DP_BW_OVERHEAD_FEC: 0;drivers/gpu/drm/i915/display/intel_dp.c +2
-0+int line_slice_count = + intel_dsc_line_slice_count(&
pipe_config->dsc.slice_config);
if
(!is_bw_sufficient_for_dsc_config(intel_dp,link_rate,lane_count,adjusted_mode->crtc_clock,adjusted_mode->hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
pipe_config->dsc.slice_count,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
line_slice_count,dsc_bpp_x16,bw_overhead_flags))
continue;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2427,11 +2429,8 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
pipe_config->dsc.slice_config.pipes_per_line/pipe_config->dsc.slice_config.streams_per_pipe;drivers/gpu/drm/i915/display/intel_dp.c +0
-2- pipe_config->dsc.slice_count = - intel_dsc_line_slice_count(&pipe_config-Quoted 1 line
dsc.slice_config);
-
drm_WARN_ON(display->drm,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- pipe_config->dsc.slice_count !=
slices_per_line);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ intel_dsc_line_slice_count(&pipe_config-Quoted 1 line
dsc.slice_config) !=
slices_per_line);
ret =intel_dp_dsc_compute_params(connector, pipe_config); if (ret < 0) {drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2449,7 +2448,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,"Compressed Bpp = "
FXP_Q4_FMT" Slice Count = %d\n",
pipe_config->pipe_bpp, FXP_Q4_ARGS(pipe_config-Quoted 1 line
dsc.compressed_bpp_x16),
drivers/gpu/drm/i915/display/intel_dp.c +1
-1- pipe_config->dsc.slice_count); + intel_dsc_line_slice_count(&pipe_config-Quoted 1 line
dsc.slice_config));
return 0;
}drivers/gpu/drm/i915/display/intel_vdsc.c +0
-0@@ -283,8 +283,9 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config) int ret;
vdsc_cfg->pic_width= pipe_config-Quoted 1 line
hw.adjusted_mode.crtc_hdisplay;
drivers/gpu/drm/i915/display/intel_vdsc.c +0
-2- vdsc_cfg->slice_width = DIV_ROUND_UP(vdsc_cfg->pic_width, - pipe_config-Quoted 1 line
dsc.slice_count);
drivers/gpu/drm/i915/display/intel_vdsc.c +3
-0+ vdsc_cfg->slice_width = + DIV_ROUND_UP(vdsc_cfg->pic_width, +
intel_dsc_line_slice_count(&pipe_config->dsc.slice_config));
err =intel_dsc_slice_dimensions_valid(pipe_config, vdsc_cfg);drivers/gpu/drm/i915/display/intel_vdsc.c +0
-0@@ -1042,7 +1043,7 @@ static void intel_vdsc_dump_state(struct drm_printer *p, int indent, drm_printf_indent(p, indent, "dsc-dss: compressed-bpp:" FXP_Q4_FMT ", slice-count: %d, num_streams: %d\n",FXP_Q4_ARGS(crtc_state-
Quoted 1 line
dsc.compressed_bpp_x16),
drivers/gpu/drm/i915/display/intel_vdsc.c +1
-1- crtc_state->dsc.slice_count, + intel_dsc_line_slice_count(&crtc_state-Quoted 1 line
dsc.slice_config),
crtc_state-
Quoted 1 line
dsc.slice_config.streams_per_pipe);
}
PATCH 42/50 drm/i915/dp: Factor out intel_dp_dsc_min_slice_count()
In reply to Imre DeakFactor out intel_dp_dsc_min_slice_count() for making intel_dp_dsc_get_slice_count() more readable and also to prepare for a follow-up change unifying the eDP and DP slice count/config computation.
--- drivers/gpu/drm/i915/display/intel_dp.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +17 -6
@@ -958,14 +958,11 @@ u32 get_max_compressed_bpp_with_joiner(struct intel_display *display,return max_bpp; } -u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, -int mode_clock,int mode_hdisplay, -int num_joined_pipes) +static int intel_dp_dsc_min_slice_count (const struct intel_connector *connector, +int mode_clock,int mode_hdisplay) {struct intel_display *display =to_intel_display (connector); -u32 sink_slice_count_mask = -drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false); -u8 min_slice_count, i; +u8 min_slice_count;int max_slice_width;int tp_rgb_yuv444;int tp_yuv422_420;
@@ -1024,6 +1021,20 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,DIV_ROUND_UP (mode_hdisplay, max_slice_width)); +return min_slice_count; +} + +u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, +int mode_clock,int mode_hdisplay, +int num_joined_pipes) +{ +struct intel_display *display =to_intel_display (connector); +int min_slice_count = +intel_dp_dsc_min_slice_count (connector, mode_clock, mode_hdisplay); +u32 sink_slice_count_mask = +drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false); +int i; +/* Find the closest match to the valid slice count values */ for (i =0 ; i <ARRAY_SIZE (valid_dsc_slicecount); i++) {u8 test_slice_count = valid_dsc_slicecount[i] * num_joined_pipes;
Signature · 1 line
2.49.1
Re: [PATCH 42/50] drm/i915/dp: Factor out intel_dp_dsc_min_slice_count()
Quoted 7 lines · Imre Deak
Factor out
intel_dp_dsc_min_slice_count()for makingintel_dp_dsc_get_slice_count()more readable and also to prepare for a
follow-up change unifying the eDP and DP slice count/config computation.Signed-off-by Imre Deak <[email protected]>
Quoted 58 lines
---
drivers/gpu/drm/i915/display/intel_dp.c | 23 +++++++++++++++++------1 file changed, 17 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -958,14 +958,11 @@ u32 get_max_compressed_bpp_with_joiner(structintel_display *display, return max_bpp; }
-u8 intel_dp_dsc_get_slice_count(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +1
-2- int mode_clock, int mode_hdisplay, - int num_joined_pipes) +static int intel_dp_dsc_min_slice_count(const struct intel_connector*connector,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+int mode_clock, int
mode_hdisplay)
{
structintel_display*display =to_intel_display(connector);drivers/gpu/drm/i915/display/intel_dp.c +0
-2-u32 sink_slice_count_mask = - drm_dp_dsc_sink_slice_count_mask(connector-Quoted 1 line
dp.dsc_dpcd, false);
drivers/gpu/drm/i915/display/intel_dp.c +1
-1-u8 min_slice_count, i; +u8 min_slice_count;int
max_slice_width;
inttp_rgb_yuv444;
inttp_yuv422_420;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1024,6 +1021,20 @@ u8 intel_dp_dsc_get_slice_count(const structintel_connector *connector, DIV_ROUND_UP(mode_hdisplay, max_slice_width));drivers/gpu/drm/i915/display/intel_dp.c +4
-0+return min_slice_count; +} + +u8 intel_dp_dsc_get_slice_count(const struct intel_connector*connector,
drivers/gpu/drm/i915/display/intel_dp.c +6
-0+ int mode_clock, int mode_hdisplay, + int num_joined_pipes) +{ + struct intel_display *display = to_intel_display(connector); + int min_slice_count = + intel_dp_dsc_min_slice_count(connector, mode_clock,
mode_hdisplay);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+u32 sink_slice_count_mask = + drm_dp_dsc_sink_slice_count_mask(connector-Quoted 1 line
dp.dsc_dpcd, false);
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+int i; +/* Find the closest match to the valid slice count values */ for (i = 0; i <
ARRAY_SIZE(valid_dsc_slicecount); i++) { u8test_slice_count= valid_dsc_slicecount[i] *num_joined_pipes;
PATCH 43/50 drm/i915/dp: Use int for DSC slice count variables
In reply to Imre DeakThere is no reason to use the more specific u8 type for slice count variables, use the more generic int type instead.
--- drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +5 -6
@@ -962,7 +962,7 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector, int mode_clock, int mode_hdisplay) {struct intel_display *display =to_intel_display (connector); -u8 min_slice_count; +int min_slice_count;int max_slice_width;int tp_rgb_yuv444;int tp_yuv422_420;
@@ -1007,7 +1007,7 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,* slice and VDSC engine, whenever we approach close enough to max CDCLK */ if (mode_clock >= ((display->cdclk.max_cdclk_freq *85 ) /100 )) - min_slice_count =max_t (u8, min_slice_count,2 ); + min_slice_count =max (min_slice_count,2 ); max_slice_width =drm_dp_dsc_sink_max_slice_width (connector->dp.dsc_dpcd);if (max_slice_width <DP_DSC_MIN_SLICE_WIDTH_VALUE ) {
@@ -1017,9 +1017,8 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,return 0 ; }/* Also take into account max slice width */ - min_slice_count =max_t (u8, min_slice_count, -DIV_ROUND_UP (mode_hdisplay, - max_slice_width)); + min_slice_count =max (min_slice_count, +DIV_ROUND_UP (mode_hdisplay, max_slice_width));return min_slice_count; }
@@ -1037,7 +1036,7 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,/* Find the closest match to the valid slice count values */ for (i =0 ; i <ARRAY_SIZE (valid_dsc_slicecount); i++) { -u8 test_slice_count = valid_dsc_slicecount[i] * num_joined_pipes; +int test_slice_count = valid_dsc_slicecount[i] * num_joined_pipes;/* * 3 DSC Slices per pipe need 3 DSC engines, which is supported only
Signature · 1 line
2.49.1
Re: [PATCH 43/50] drm/i915/dp: Use int for DSC slice count variables
Quoted 4 lines · Imre Deak
There is no reason to use the more specific u8 type for slice count variables, use the more generic int type instead.
Signed-off-by Imre Deak <[email protected]>
Quoted 60 lines
---
drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------1 file changed, 5 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -962,7 +962,7 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,int
mode_clock, intmode_hdisplay)
{
structintel_display*display =to_intel_display(connector);drivers/gpu/drm/i915/display/intel_dp.c +1
-1-u8 min_slice_count; +int min_slice_count;int
max_slice_width;
inttp_rgb_yuv444;
inttp_yuv422_420;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1007,7 +1007,7 @@ static int intel_dp_dsc_min_slice_count(conststruct intel_connector *connector, * slice and VDSC engine, whenever we approach close enoughto max CDCLK
*/
if (mode_clock>= ((display->cdclk.max_cdclk_freq* 85) / 100))drivers/gpu/drm/i915/display/intel_dp.c +1
-1- min_slice_count =max_t (u8, min_slice_count,2 ); + min_slice_count =max (min_slice_count,2 );
max_slice_width= drm_dp_dsc_sink_max_slice_width(connector-Quoted 1 line
dp.dsc_dpcd);
if (
max_slice_width<DP_DSC_MIN_SLICE_WIDTH_VALUE) {drivers/gpu/drm/i915/display/intel_dp.c +2
-3@@ -1017,9 +1017,8 @@ static int intel_dp_dsc_min_slice_count(conststruct intel_connector *connector, return 0; } /* Also take into account max slice width */ - min_slice_count =max_t (u8, min_slice_count, -DIV_ROUND_UP (mode_hdisplay, - max_slice_width)); + min_slice_count =max (min_slice_count, + DIV_ROUND_UP(mode_hdisplay, max_slice_width));
returnmin_slice_count;
}drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1037,7 +1036,7 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
/* Find the closest match to the valid slice count values */ for (i = 0; i <ARRAY_SIZE(valid_dsc_slicecount); i++) {drivers/gpu/drm/i915/display/intel_dp.c +0
-1- u8 test_slice_count = valid_dsc_slicecount[i] *
num_joined_pipes;drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int test_slice_count = valid_dsc_slicecount[i] *
num_joined_pipes;
/*
* 3 DSC Slices per pipe need 3 DSC engines, which is supported only
PATCH 44/50 drm/i915/dp: Rename test_slice_count to slices_per_line
In reply to Imre DeakRename test_slice_count to slices_per_line for clarity.
--- drivers/gpu/drm/i915/display/intel_dp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +5 -5
@@ -1036,7 +1036,7 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,/* Find the closest match to the valid slice count values */ for (i =0 ; i <ARRAY_SIZE (valid_dsc_slicecount); i++) { -int test_slice_count = valid_dsc_slicecount[i] * num_joined_pipes; +int slices_per_line = valid_dsc_slicecount[i] * num_joined_pipes;/* * 3 DSC Slices per pipe need 3 DSC engines, which is supported only
@@ -1046,7 +1046,7 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, (!HAS_DSC_3ENGINES(display) || num_joined_pipes != 4)) continue; -if (!(drm_dp_dsc_slice_count_to_mask (test_slice_count) & +if (!(drm_dp_dsc_slice_count_to_mask (slices_per_line) & sink_slice_count_mask))continue ;
@@ -1058,11 +1058,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,if (num_joined_pipes >1 && valid_dsc_slicecount[i] <2 )continue ; -if (mode_hdisplay % test_slice_count) +if (mode_hdisplay % slices_per_line)continue ; -if (min_slice_count <= test_slice_count) -return test_slice_count; +if (min_slice_count <= slices_per_line) +return slices_per_line; }/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */
Signature · 1 line
2.49.1
Re: [PATCH 44/50] drm/i915/dp: Rename test_slice_count to slices_per_line
Quoted 3 lines · Imre Deak
Rename
test_slice_counttoslices_per_linefor clarity.Signed-off-by Imre Deak <[email protected]>
Quoted 53 lines
---
drivers/gpu/drm/i915/display/intel_dp.c | 10 +++++-----1 file changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1036,7 +1036,7 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
/* Find the closest match to the valid slice count values */ for (i = 0; i <ARRAY_SIZE(valid_dsc_slicecount); i++) {drivers/gpu/drm/i915/display/intel_dp.c +0
-1- int test_slice_count = valid_dsc_slicecount[i] *
num_joined_pipes;drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int slices_per_line = valid_dsc_slicecount[i] *
num_joined_pipes;
/*
* 3 DSC Slices per pipe need 3 DSC engines, which is supported onlydrivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1046,7 +1046,7 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,(!HAS_DSC_3ENGINES(display) ||
num_joined_pipes!= 4))
continue;drivers/gpu/drm/i915/display/intel_dp.c +0
-1- if(!(drm_dp_dsc_slice_count_to_mask(test_slice_count) &
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ if(!(drm_dp_dsc_slice_count_to_mask(slices_per_line) &
sink_slice_count_mask)) continue;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1058,11 +1058,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,if (
num_joined_pipes> 1 && valid_dsc_slicecount[i] < 2)
continue;drivers/gpu/drm/i915/display/intel_dp.c +1
-1-if (mode_hdisplay % test_slice_count) +if (mode_hdisplay % slices_per_line)continue;
drivers/gpu/drm/i915/display/intel_dp.c +2
-2-if (min_slice_count <= test_slice_count) -return test_slice_count; +if (min_slice_count <= slices_per_line) +return slices_per_line;}
/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */
PATCH 45/50 drm/i915/dp: Simplify the DSC slice config loop's slices-per-pipe iteration
In reply to Imre DeakSimplify the slice config loop in intel_dp_dsc_get_slice_count(), using the loop iterator as the slices-per-pipe value directly, instead of looking up the same value from an array.
While at it move the code comment about the slice configuration closer to where the configuration is determined and clarify it a bit.
--- drivers/gpu/drm/i915/display/intel_dp.c | 33 ++++++++++--------------- 1 file changed, 13 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +13 -20
@@ -107,20 +107,6 @@/* Constants for DP DSC configurations */ static const u8 valid_dsc_bpp[] = {6 ,8 ,10 ,12 ,15 }; -/* -* With Single pipe configuration, HW is capable of supporting maximum of: -* 2 slices per line for ICL, BMG -* 4 slices per line for other platforms. -* For now consider a max of 2 slices per line, which works for all platforms. -* With this we can have max of 4 DSC Slices per pipe. -* -* For higher resolutions where 12 slice support is required with -* ultrajoiner, only then each pipe can support 3 slices. -* -* #TODO Split this better to use 4 slices/dsc engine where supported. -*/ -static const u8 valid_dsc_slicecount[] = {1 ,2 ,3 ,4 }; -/** * intel_dp_is_edp - is the given port attached to an eDP panel (either CPU or PCH) * @intel_dp: DP struct
@@ -1032,17 +1018,24 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,intel_dp_dsc_min_slice_count (connector, mode_clock, mode_hdisplay);u32 sink_slice_count_mask =drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false); -int i; +int slices_per_pipe; -/* Find the closest match to the valid slice count values */ -for (i =0 ; i <ARRAY_SIZE (valid_dsc_slicecount); i++) { -int slices_per_line = valid_dsc_slicecount[i] * num_joined_pipes; +/* +* Find the closest match to the valid slice count values +* +* Max HW DSC-per-pipe x slice-per-DSC (= slice-per-pipe) capability: +* ICL: 2x2 +* BMG: 2x2, or for ultrajoined 4 pipes: 3x1 +* TGL+: 2x4 (TODO: Add support for this) +*/ +for (slices_per_pipe =1 ; slices_per_pipe <=4 ; slices_per_pipe++) { +int slices_per_line = slices_per_pipe * num_joined_pipes;/* * 3 DSC Slices per pipe need 3 DSC engines, which is supported only * with Ultrajoiner only for some platforms. */ -if (valid_dsc_slicecount[i] ==3 && +if (slices_per_pipe ==3 && (!HAS_DSC_3ENGINES (display) || num_joined_pipes !=4 ))continue ;
@@ -1055,7 +1048,7 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,* So there should be at least 2 dsc slices per pipe, * whenever bigjoiner is enabled. */ -if (num_joined_pipes >1 && valid_dsc_slicecount[i] <2 ) +if (num_joined_pipes >1 && slices_per_pipe <2 )continue ;if (mode_hdisplay % slices_per_line)
Signature · 1 line
2.49.1
Re: [PATCH 45/50] drm/i915/dp: Simplify the DSC slice config loop's slices-per-pipe iteration
Quoted 10 lines · Imre Deak
Simplify the slice config loop in
intel_dp_dsc_get_slice_count(), using
the loop iterator as the slices-per-pipe value directly, instead of looking up the same value from an array.While at it move the code comment about the slice configuration closer
to where the configuration is determined and clarify it a bit.Signed-off-by Imre Deak <[email protected]>
Quoted 86 lines
---
drivers/gpu/drm/i915/display/intel_dp.c | 33 ++++++++++------------- --1 file changed, 13 insertions(+), 20 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -107,20 +107,6 @@ /* Constants for DP DSC configurations */ static const u8 valid_dsc_bpp[] = {6, 8, 10, 12, 15};
-/*
- * With Single pipe configuration, HW is capable of supporting maximum of:
- * 2 slices per line for ICL, BMG
- * 4 slices per line for other platforms.
- * For now consider a max of 2 slices per line, which works for all platforms.
- * With this we can have max of 4 DSC Slices per pipe.
- *
- * For higher resolutions where 12 slice support is required with
- * ultrajoiner, only then each pipe can support 3 slices.
- *
- * #TODO Split this better to use 4 slices/dsc engine where supported.
- */drivers/gpu/drm/i915/display/intel_dp.c +0
-2-static const u8 valid_dsc_slicecount[] = {1 ,2 ,3 ,4 }; -/**
*intel_dp_is_edp- is the given port attached to an eDP panel (either CPU or PCH)
* @intel_dp: DP structdrivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1032,17 +1018,24 @@ u8 intel_dp_dsc_get_slice_count(const structintel_connector *connector, intel_dp_dsc_min_slice_count(connector, mode_clock,mode_hdisplay );u32
sink_slice_count_mask= drm_dp_dsc_sink_slice_count_mask(connector-Quoted 1 line
dp.dsc_dpcd, false);
drivers/gpu/drm/i915/display/intel_dp.c +1
-1-int i; +int slices_per_pipe;drivers/gpu/drm/i915/display/intel_dp.c +0
-3-/* Find the closest match to the valid slice count values */ -for (i =0 ; i <ARRAY_SIZE (valid_dsc_slicecount); i++) { - int slices_per_line = valid_dsc_slicecount[i] *
num_joined_pipes;drivers/gpu/drm/i915/display/intel_dp.c +4
-0+/* +* Find the closest match to the valid slice count values +* +* Max HW DSC-per-pipe x slice-per-DSC (= slice-per-pipe) capability:
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+* ICL: 2x2 +* BMG: 2x2, or for ultrajoined 4 pipes: 3x1 +* TGL+: 2x4 (TODO: Add support for this) +*/ + for (slices_per_pipe = 1; slices_per_pipe <= 4;slices_per_pipe++) {
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ int slices_per_line = slices_per_pipe *
num_joined_pipes;
/*
* 3 DSC Slices per pipe need 3 DSC engines, which is supported only
* with Ultrajoiner only for some platforms. */drivers/gpu/drm/i915/display/intel_dp.c +1
-1- if (valid_dsc_slicecount[i] == 3 && + if (slices_per_pipe == 3 &&(!HAS_DSC_3ENGINES(display) ||
num_joined_pipes!= 4))
continue;drivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -1055,7 +1048,7 @@ u8 intel_dp_dsc_get_slice_count(const structintel_connector *connector, * So there should be at least 2 dsc slices per pipe, * whenever bigjoiner is enabled. */ -if (num_joined_pipes >1 && valid_dsc_slicecount[i] < 2) +if (num_joined_pipes >1 && slices_per_pipe <2 )continue;
if (mode_hdisplay%slices_per_line)
PATCH 46/50 drm/i915/dsc: Add intel_dsc_get_slice_config()
In reply to Imre DeakAdd intel_dsc_get_slice_config() and move the logic to select a given slice configuration to that function from the configuration loop in intel_dp_dsc_get_slice_count(). The same functionality can be used by other outputs like DSI as well, done as a follow-up.
--- drivers/gpu/drm/i915/display/intel_dp.c | 22 ++++------- drivers/gpu/drm/i915/display/intel_vdsc.c | 48 +++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vdsc.h | 4 ++ 3 files changed, 59 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +7 -15
@@ -1029,28 +1029,20 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,* TGL+: 2x4 (TODO: Add support for this) */ for (slices_per_pipe =1 ; slices_per_pipe <=4 ; slices_per_pipe++) { -int slices_per_line = slices_per_pipe * num_joined_pipes; +struct intel_dsc_slice_config config; +int slices_per_line; -/* -* 3 DSC Slices per pipe need 3 DSC engines, which is supported only -* with Ultrajoiner only for some platforms. -*/ -if (slices_per_pipe ==3 && - (!HAS_DSC_3ENGINES (display) || num_joined_pipes !=4 )) +if (!intel_dsc_get_slice_config (display, + num_joined_pipes, slices_per_pipe, + &config))continue ; + slices_per_line =intel_dsc_line_slice_count (&config); +if (!(drm_dp_dsc_slice_count_to_mask (slices_per_line) & sink_slice_count_mask))continue ; -/* -* Bigjoiner needs small joiner to be enabled. -* So there should be at least 2 dsc slices per pipe, -* whenever bigjoiner is enabled. -*/ -if (num_joined_pipes >1 && slices_per_pipe <2 ) -continue ; -if (mode_hdisplay % slices_per_line)continue ;
drivers/gpu/drm/i915/display/intel_vdsc.c +48 -0
54 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_vdsc.h +4 -0
@@ -13,11 +13,15 @@ struct drm_printer;enum transcoder ;struct intel_crtc ;struct intel_crtc_state ; +struct intel_display ;struct intel_dsc_slice_config ;struct intel_encoder ;bool intel_dsc_source_support (const struct intel_crtc_state *crtc_state);int intel_dsc_line_slice_count (const struct intel_dsc_slice_config *config); +bool intel_dsc_get_slice_config (struct intel_display *display, +int num_joined_pipes,int slice_per_pipe, +struct intel_dsc_slice_config *config);void intel_uncompressed_joiner_enable (const struct intel_crtc_state *crtc_state);void intel_dsc_enable (const struct intel_crtc_state *crtc_state);void intel_dsc_disable (const struct intel_crtc_state *crtc_state);
Signature · 1 line
2.49.1
Re: [PATCH 46/50] drm/i915/dsc: Add intel_dsc_get_slice_config()
Quoted 6 lines · Imre Deak
Add
intel_dsc_get_slice_config()and move the logic to select a given slice configuration to that function from the configuration loop inintel_dp_dsc_get_slice_count(). The same functionality can be used by other outputs like DSI as well, done as a follow-up.Signed-off-by Imre Deak <[email protected]>
Quoted 154 lines
---
drivers/gpu/drm/i915/display/intel_dp.c | 22 ++++-------drivers/gpu/drm/i915/display/intel_vdsc.c| 48
+++++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_vdsc.h | 4 ++3 files changed, 59 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +2
-1@@ -1029,28 +1029,20 @@ u8 intel_dp_dsc_get_slice_count(const structintel_connector *connector, * TGL+: 2x4 (TODO: Add support for this) */ for (slices_per_pipe = 1; slices_per_pipe <= 4; slices_per_pipe++) { -int slices_per_line = slices_per_pipe * num_joined_pipes; +struct intel_dsc_slice_config config; +int slices_per_line;drivers/gpu/drm/i915/display/intel_dp.c +0
-2-/* -* 3 DSC Slices per pipe need 3 DSC engines, which is supported only
drivers/gpu/drm/i915/display/intel_dp.c +0
-4-* with Ultrajoiner only for some platforms. -*/ - if (slices_per_pipe == 3 && - (!HAS_DSC_3ENGINES(display) || num_joined_pipes!= 4))
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ if (!intel_dsc_get_slice_config(display, + num_joined_pipes,
slices_per_pipe,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ &config))continue;
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ slices_per_line =
intel_dsc_line_slice_count(&config);
+
if (!(drm_dp_dsc_slice_count_to_mask(slices_per_line) &sink_slice_count_mask)) continue;drivers/gpu/drm/i915/display/intel_dp.c +0
-3-/* -* Bigjoiner needs small joiner to be enabled. -* So there should be at least 2 dsc slices per pipe,
drivers/gpu/drm/i915/display/intel_dp.c +0
-5-* whenever bigjoiner is enabled. -*/ -if (num_joined_pipes >1 && slices_per_pipe <2 ) -continue ; -if (
mode_hdisplay%slices_per_line) continue;drivers/gpu/drm/i915/display/intel_vdsc.c +0
-0@@ -40,6 +40,54 @@ int intel_dsc_line_slice_count(const struct intel_dsc_slice_config *config)return
config->pipes_per_line*config->streams_per_pipe*config->slices_per_stream;
}drivers/gpu/drm/i915/display/intel_vdsc.c +2
-0+bool intel_dsc_get_slice_config (struct intel_display *display, + int pipes_per_line, int
slices_per_pipe,drivers/gpu/drm/i915/display/intel_vdsc.c +1
-0+struct intel_dsc_slice_config *config)
drivers/gpu/drm/i915/display/intel_vdsc.c +8
-0+{ +int streams_per_pipe; + +/* TODO: Add support for 8 slices per pipe on TGL+. */ +switch (slices_per_pipe) { +case 3 : +/* +* 3 DSC Slices per pipe need 3 DSC engines, which is supported only
drivers/gpu/drm/i915/display/intel_vdsc.c +3
-0+* with Ultrajoiner only for some platforms. +*/ + if (!HAS_DSC_3ENGINES(display) || pipes_per_line !=4)
drivers/gpu/drm/i915/display/intel_vdsc.c +6
-0+return false; + + streams_per_pipe =3 ; +break ; +case 4 : +/* TODO: Consider using 1 DSC engine stream x 4 slices instead. */
drivers/gpu/drm/i915/display/intel_vdsc.c +2
-0+case 2 : +/* TODO: Consider using 1 DSC engine stream x 2 slices instead. */
drivers/gpu/drm/i915/display/intel_vdsc.c +6
-0+ streams_per_pipe =2 ; +break ; +case 1 : +/* +* Bigjoiner needs small joiner to be enabled. +* So there should be at least 2 dsc slices per pipe,
drivers/gpu/drm/i915/display/intel_vdsc.c +15
-0+* whenever bigjoiner is enabled. +*/ +if (pipes_per_line >1 ) +return false; + + streams_per_pipe =1 ; +break ; +default : +MISSING_CASE (slices_per_pipe); +return false; + } + + config->pipes_per_line = pipes_per_line; + config->streams_per_pipe = streams_per_pipe; + config->slices_per_stream = slices_per_pipe /
streams_per_pipe;drivers/gpu/drm/i915/display/intel_vdsc.c +5
-0+ +return true; +} + +static bool
is_pipe_dsc(struct intel_crtc *crtc, enum transcoder cpu_transcoder)
{
structintel_display*display =to_intel_display(crtc);drivers/gpu/drm/i915/display/intel_vdsc.h +1
-0@@ -13,11 +13,15 @@ struct drm_printer; enum transcoder; struct intel_crtc; struct intel_crtc_state; +struct intel_display ; struct intel_dsc_slice_config; struct intel_encoder;
boolintel_dsc_source_support(const struct intel_crtc_state *crtc_state);
intintel_dsc_line_slice_count(const struct intel_dsc_slice_config *config);drivers/gpu/drm/i915/display/intel_vdsc.h +2
-0+bool intel_dsc_get_slice_config (struct intel_display *display, + int num_joined_pipes, int
slice_per_pipe,drivers/gpu/drm/i915/display/intel_vdsc.h +1
-0+struct intel_dsc_slice_config *config);
voidintel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state);
voidintel_dsc_enable(const struct intel_crtc_state *crtc_state); voidintel_dsc_disable(const struct intel_crtc_state *crtc_state);
PATCH 47/50 drm/i915/dsi: Use intel_dsc_get_slice_config()
In reply to Imre DeakUse intel_dsc_get_slice_config() for DSI to compute the slice configuration based on the slices-per-line sink capability, instead of open-coding the same.
--- drivers/gpu/drm/i915/display/intel_bios.c | 25 ++++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/intel_bios.c +13 -12
@@ -3486,12 +3486,13 @@ bool intel_bios_is_dsi_present(struct intel_display *display,return false; } -static void fill_dsc (struct intel_crtc_state *crtc_state, +static bool fill_dsc (struct intel_crtc_state *crtc_state,struct dsc_compression_parameters_entry *dsc,int dsc_max_bpc) {struct intel_display *display =to_intel_display (crtc_state);struct drm_dsc_config *vdsc_cfg = &crtc_state->dsc.config; +int slices_per_line;int bpc =8 ; vdsc_cfg->dsc_version_major = dsc->version_major;
@@ -3520,24 +3521,24 @@ static void fill_dsc(struct intel_crtc_state *crtc_state,* * FIXME: split only when necessary */ - crtc_state->dsc.slice_config.pipes_per_line =1 ; -if (dsc->slices_per_line &BIT (2 )) { - crtc_state->dsc.slice_config.streams_per_pipe =2 ; - crtc_state->dsc.slice_config.slices_per_stream =2 ; + slices_per_line =4 ; }else if (dsc->slices_per_line &BIT (1 )) { - crtc_state->dsc.slice_config.streams_per_pipe =2 ; - crtc_state->dsc.slice_config.slices_per_stream =1 ; + slices_per_line =2 ; }else {/* FIXME */ if (!(dsc->slices_per_line &BIT (0 )))drm_dbg_kms (display->drm,"VBT: Unsupported DSC slice count for DSI\n" ); - crtc_state->dsc.slice_config.streams_per_pipe =1 ; - crtc_state->dsc.slice_config.slices_per_stream =1 ; + slices_per_line =1 ; } +if (drm_WARN_ON (display->drm, + !intel_dsc_get_slice_config (display,1 , slices_per_line, + &crtc_state->dsc.slice_config))) +return false; +if (crtc_state->hw.adjusted_mode.crtc_hdisplay %intel_dsc_line_slice_count (&crtc_state->dsc.slice_config) !=0 ) drm_dbg_kms(display->drm,
@@ -3558,6 +3559,8 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, vdsc_cfg->block_pred_enable = dsc->block_prediction_enable; vdsc_cfg->slice_height = dsc->slice_height; + +return true; }/* FIXME: initially DSI specific */
@@ -3578,9 +3581,7 @@ bool intel_bios_get_dsc_params(struct intel_encoder *encoder,if (!devdata->dsc)return false; -fill_dsc (crtc_state, devdata->dsc, dsc_max_bpc); - -return true; +return fill_dsc (crtc_state, devdata->dsc, dsc_max_bpc); } }
Signature · 1 line
2.49.1
Re: [PATCH 47/50] drm/i915/dsi: Use intel_dsc_get_slice_config()
Quoted 6 lines · Imre Deak
Use
intel_dsc_get_slice_config()for DSI to compute the slice configuration based on the slices-per-line sink capability, instead of
open-coding the same.Signed-off-by Imre Deak <[email protected]>
Quoted 89 lines
---
drivers/gpu/drm/i915/display/intel_bios.c | 25 ++++++++++++--------- --1 file changed, 13 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3486,12 +3486,13 @@ bool intel_bios_is_dsi_present(struct intel_display *display, return false; }drivers/gpu/drm/i915/display/intel_bios.c +1
-1-static void fill_dsc(struct intel_crtc_state *crtc_state, +static bool fill_dsc(struct intel_crtc_state *crtc_state,struct
dsc_compression_parameters_entry*dsc, intdsc_max_bpc)
{
structintel_display*display =to_intel_display(crtc_state);
structdrm_dsc_config*vdsc_cfg=&crtc_state->dsc.config;drivers/gpu/drm/i915/display/intel_bios.c +1
-0+int slices_per_line;int bpc = 8;
vdsc_cfg->dsc_version_major=dsc->version_major;drivers/gpu/drm/i915/display/intel_bios.c +2
-6@@ -3520,24 +3521,24 @@ static void fill_dsc(struct intel_crtc_state*crtc_state, * * FIXME: split only when necessary */ - crtc_state->dsc.slice_config.pipes_per_line =1 ; - if (dsc->slices_per_line & BIT(2)) { - crtc_state->dsc.slice_config.streams_per_pipe =2 ; - crtc_state->dsc.slice_config.slices_per_stream =2 ; + slices_per_line =4 ; } else if (dsc->slices_per_line & BIT(1)) { - crtc_state->dsc.slice_config.streams_per_pipe =2 ; - crtc_state->dsc.slice_config.slices_per_stream =1 ; + slices_per_line =2 ; } else { /* FIXME */ if (!(dsc->slices_per_line & BIT(0))) drm_dbg_kms(display->drm,"VBT: Unsupported DSC slice count for DSI\n");
drivers/gpu/drm/i915/display/intel_bios.c +1
-2- crtc_state->dsc.slice_config.streams_per_pipe =1 ; - crtc_state->dsc.slice_config.slices_per_stream =1 ; + slices_per_line =1 ;}
drivers/gpu/drm/i915/display/intel_bios.c +2
-0+ if (drm_WARN_ON(display->drm, + !intel_dsc_get_slice_config(display, 1,
slices_per_line,drivers/gpu/drm/i915/display/intel_bios.c +1
-0+ &crtc_state-Quoted 1 line
dsc.slice_config)))
drivers/gpu/drm/i915/display/intel_bios.c +2
-0+return false; +if (
crtc_state->hw.adjusted_mode.crtc_hdisplay% intel_dsc_line_slice_count(&crtc_state-Quoted 1 line
dsc.slice_config) != 0)
drm_dbg_kms(display->drm,
drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3558,6 +3559,8 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, vdsc_cfg->block_pred_enable = dsc->block_prediction_enable;
vdsc_cfg->slice_height=dsc->slice_height;drivers/gpu/drm/i915/display/intel_bios.c +2
-0+ +return true;}
/* FIXME: initially DSI specific */drivers/gpu/drm/i915/display/intel_bios.c +0
-0@@ -3578,9 +3581,7 @@ bool intel_bios_get_dsc_params(struct intel_encoder *encoder, if (!devdata->dsc) return false;drivers/gpu/drm/i915/display/intel_bios.c +0
-1- fill_dsc(crtc_state, devdata->dsc,
dsc_max_bpc);drivers/gpu/drm/i915/display/intel_bios.c +1
-2- -return true; + return fill_dsc(crtc_state, devdata->dsc,
dsc_max_bpc);
}
}
PATCH 48/50 drm/i915/dp: Unify DP and eDP slice count computation
In reply to Imre DeakUnify the DP and eDP slices-per-line computation. Atm eDP simply returns the maximum slices-per-line value supported by the sink, but using the same helper function for both cases still makes sense, since a follow-up change will compute the detailed slice config for both cases.
--- drivers/gpu/drm/i915/display/intel_dp.c | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +25 -25
@@ -948,11 +948,20 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector, int mode_clock, int mode_hdisplay) {struct intel_display *display =to_intel_display (connector); +bool is_edp = + connector->base.connector_type == DRM_MODE_CONNECTOR_eDP;int min_slice_count;int max_slice_width;int tp_rgb_yuv444;int tp_yuv422_420; +/* +* TODO: allow using less than the maximum number of slices +* supported by the eDP sink, to allow using fewer DSC engines. +*/ +if (is_edp) +return drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, true); +/* * TODO: Use the throughput value specific to the actual RGB/YUV * format of the output.
@@ -1016,8 +1025,10 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,struct intel_display *display =to_intel_display (connector);int min_slice_count =intel_dp_dsc_min_slice_count (connector, mode_clock, mode_hdisplay); +bool is_edp = + connector->base.connector_type == DRM_MODE_CONNECTOR_eDP;u32 sink_slice_count_mask = -drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, false); +drm_dp_dsc_sink_slice_count_mask (connector->dp.dsc_dpcd, is_edp);int slices_per_pipe;/*
@@ -1470,9 +1481,13 @@ intel_dp_mode_valid(struct drm_connector *_connector,if (intel_dp_is_edp (intel_dp)) { dsc_max_compressed_bpp =drm_edp_dsc_sink_output_bpp (connector->dp.dsc_dpcd) >>4 ; + dsc_slice_count = -drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, - true); +intel_dp_dsc_get_slice_count (connector, + target_clock, + mode->hdisplay, + num_joined_pipes); + dsc = dsc_max_compressed_bpp && dsc_slice_count; }else if (drm_dp_sink_supports_fec (connector->dp.fec_capability)) {unsigned long bw_overhead_flags =0 ;
@@ -2380,28 +2395,13 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, }/* Calculate Slice count */ -if (intel_dp_is_edp (intel_dp)) { - slices_per_line = -drm_dp_dsc_sink_max_slice_count (connector->dp.dsc_dpcd, - true); -if (!slices_per_line) { -drm_dbg_kms (display->drm, -"Unsupported Slice Count %d\n" , - slices_per_line); -return -EINVAL ; - } - }else { - slices_per_line = -intel_dp_dsc_get_slice_count (connector, - adjusted_mode->crtc_clock, - adjusted_mode->crtc_hdisplay, - num_joined_pipes); -if (!slices_per_line) { -drm_dbg_kms (display->drm, -"Compressed Slice Count not supported\n" ); -return -EINVAL ; - } - } + slices_per_line =intel_dp_dsc_get_slice_count (connector, + adjusted_mode->crtc_clock, + adjusted_mode->crtc_hdisplay, + num_joined_pipes); +if (!slices_per_line) +return -EINVAL ; +/* * VDSC engine operates at 1 Pixel per clock, so if peak pixel rate * is greater than the maximum Cdclock and if slice count is even
Signature · 1 line
2.49.1
Re: [PATCH 48/50] drm/i915/dp: Unify DP and eDP slice count computation
Quoted 9 lines · Imre Deak
Unify the DP and eDP slices-per-line computation. Atm eDP simply returns
the maximum slices-per-line value supported by the sink, but using the
same helper function for both cases still makes sense, since a follow-up
change will compute the detailed slice config for both cases.Signed-off-by Imre Deak <[email protected]>
Quoted 127 lines
---
drivers/gpu/drm/i915/display/intel_dp.c | 50 ++++++++++++----------- --1 file changed, 25 insertions(+), 25 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -948,11 +948,20 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,int
mode_clock, intmode_hdisplay)
{
structintel_display*display =to_intel_display(connector);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+bool is_edp = + connector->base.connector_type ==
DRM_MODE_CONNECTOR_eDP;
intmin_slice_count;
intmax_slice_width;
inttp_rgb_yuv444;
inttp_yuv422_420;drivers/gpu/drm/i915/display/intel_dp.c +3
-0+/* +* TODO: allow using less than the maximum number of slices +* supported by the eDP sink, to allow using fewer DSC engines.
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+*/ +if (is_edp) + return drm_dp_dsc_sink_max_slice_count(connector-Quoted 1 line
dp.dsc_dpcd, true);
+
/*
* TODO: Use the throughput value specific to the actual RGB/YUV
* format of the output.drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1016,8 +1025,10 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, struct intel_display *display = to_intel_display(connector);int
min_slice_count=intel_dp_dsc_min_slice_count(connector, mode_clock, mode_hdisplay);drivers/gpu/drm/i915/display/intel_dp.c +2
-0+bool is_edp = + connector->base.connector_type ==
DRM_MODE_CONNECTOR_eDP;
u32sink_slice_count_mask=drivers/gpu/drm/i915/display/intel_dp.c +0
-1- drm_dp_dsc_sink_slice_count_mask(connector-Quoted 1 line
dp.dsc_dpcd, false);
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ drm_dp_dsc_sink_slice_count_mask(connector-Quoted 1 line
dp.dsc_dpcd,
is_edp);int
slices_per_pipe;
/*drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1470,9 +1481,13 @@ intel_dp_mode_valid(struct drm_connector *_connector, if (intel_dp_is_edp(intel_dp)) {
dsc_max_compressed_bpp=drm_edp_dsc_sink_output_bpp(connecto r->dp.dsc_dpcd)>> 4;
+
dsc_slice_count=
-drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, - true);drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ intel_dp_dsc_get_slice_count(connector,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
target_clock,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ mode-Quoted 1 line
hdisplay,
drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
num_joined_pipes);
+
dsc =dsc_max_compressed_bpp&&dsc_slice_count;
} else if (drm_dp_sink_supports_fec(connector-Quoted 1 line
dp.fec_capability)) {
unsigned long
bw_overhead_flags= 0;drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -2380,28 +2395,13 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, }
/* Calculate Slice count */drivers/gpu/drm/i915/display/intel_dp.c +0
-3-if (intel_dp_is_edp (intel_dp)) { - slices_per_line = - drm_dp_dsc_sink_max_slice_count(connector-Quoted 1 line
dp.dsc_dpcd,
drivers/gpu/drm/i915/display/intel_dp.c +0
-11- true); -if (!slices_per_line) { -drm_dbg_kms (display->drm, - "Unsupported Slice Count %d\n", - slices_per_line); -return -EINVAL ; - } - }else { - slices_per_line = - intel_dp_dsc_get_slice_count(connector, - adjusted_mode-Quoted 1 line
crtc_clock,drivers/gpu/drm/i915/display/intel_dp.c +0
-1- adjusted_mode-Quoted 1 line
crtc_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +0
-1-
num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +0
-3-if (!slices_per_line) { - drm_dbg_kms(display->drm, - "Compressed Slice Count notsupported\n");
drivers/gpu/drm/i915/display/intel_dp.c +2
-3-return -EINVAL ; - } - } + slices_per_line = intel_dp_dsc_get_slice_count(connector, +
adjusted_mode->crtc_clock,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
adjusted_mode->crtc_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+
num_joined_pipes);drivers/gpu/drm/i915/display/intel_dp.c +3
-0+if (!slices_per_line) +return -EINVAL ; +/*
* VDSC engine operates at 1 Pixel per clock, so if peak pixel rate
* is greater than the maximum Cdclock and if slice count is even
PATCH 49/50 drm/i915/dp: Add intel_dp_dsc_get_slice_config()
In reply to Imre DeakAdd intel_dp_dsc_get_slice_config() to compute the detailed slice configuration and determine the slices-per-line value (returned by intel_dp_dsc_get_slice_count()) using this function.
--- drivers/gpu/drm/i915/display/intel_dp.c | 37 +++++++++++++++++++------ 1 file changed, 28 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +28 -9
@@ -971,10 +971,10 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,*/ if (mode_clock >max (connector->dp.dsc_branch_caps.overall_throughput.rgb_yuv444, connector->dp.dsc_branch_caps.overall_throughput.yuv422_420)) -return 0 ; +return false;if (mode_hdisplay > connector->dp.dsc_branch_caps.max_line_width) -return 0 ; +return false;/* * TODO: Pass the total pixel rate of all the streams transferred to
@@ -1009,7 +1009,7 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,drm_dbg_kms (display->drm,"Unsupported slice width %d by DP DSC Sink device\n" , max_slice_width); -return 0 ; +return false; }/* Also take into account max slice width */ min_slice_count = max(min_slice_count,
@@ -1018,9 +1018,11 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,return min_slice_count; } -u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, -int mode_clock,int mode_hdisplay, -int num_joined_pipes) +static bool +intel_dp_dsc_get_slice_config (const struct intel_connector *connector, +int mode_clock,int mode_hdisplay, +int num_joined_pipes, +struct intel_dsc_slice_config *config_ret) {struct intel_display *display =to_intel_display (connector); int min_slice_count =
@@ -1057,8 +1059,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,if (mode_hdisplay % slices_per_line)continue ; -if (min_slice_count <= slices_per_line) -return slices_per_line; +if (min_slice_count <= slices_per_line) { + *config_ret = config; + +return true; + } }/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */
@@ -1069,7 +1074,21 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, min_slice_count, (int)BITS_PER_TYPE(sink_slice_count_mask), &sink_slice_count_mask); -return 0 ; +return false; +} + +u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, +int mode_clock,int mode_hdisplay, +int num_joined_pipes) +{ +struct intel_dsc_slice_config config; + +if (!intel_dp_dsc_get_slice_config (connector, + mode_clock, mode_hdisplay, + num_joined_pipes, &config)) +return 0 ; + +return intel_dsc_line_slice_count (&config); } static bool source_can_output(struct intel_dp *intel_dp,
Signature · 1 line
2.49.1
Re: [PATCH 49/50] drm/i915/dp: Add intel_dp_dsc_get_slice_config()
Quoted 22 lines · Imre Deak
Add
intel_dp_dsc_get_slice_config()to compute the detailed slice configuration and determine the slices-per-line value (returned byintel_dp_dsc_get_slice_count()) using this function.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 37 +++++++++++++++++++---- --1 file changed, 28 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -971,10 +971,10 @@ static int intel_dp_dsc_min_slice_count(conststruct intel_connector *connector, */ if (
mode_clock> max(connector-Quoted 1 line
dp.dsc_branch_caps.overall_throughput.rgb_yuv444,
connector-
Quoted 1 line
dp.dsc_branch_caps.overall_throughput.yuv422_420))
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-1-return 0 ; +return false;
Why you are changing these to return false? Otherwise looks ok.
BR,
Jouni Högander
Quoted 83 lines
if (mode_hdisplay> connector-Quoted 1 line
dp.dsc_branch_caps.max_line_width)
drivers/gpu/drm/i915/display/intel_dp.c +1
-1-return 0 ; +return false;
/*
* TODO: Pass the total pixel rate of all the streams transferred todrivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1009,7 +1009,7 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector, drm_dbg_kms(display->drm,"Unsupported slice width %d by DP DSC Sink device\n",
max_slice_width);drivers/gpu/drm/i915/display/intel_dp.c +1
-1-return 0 ; +return false;}
/* Also take into account max slice width */min_slice_count= max(min_slice_count,drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1018,9 +1018,11 @@ static int intel_dp_dsc_min_slice_count(conststruct intel_connector *connector, return min_slice_count; }
-u8 intel_dp_dsc_get_slice_count(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +2
-2- int mode_clock, int mode_hdisplay, - int num_joined_pipes) +static bool +intel_dp_dsc_get_slice_config(const struct intel_connector*connector,
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+ int mode_clock, int mode_hdisplay, + int num_joined_pipes, + struct intel_dsc_slice_config
*config_ret)
{
structintel_display*display =to_intel_display(connector); intmin_slice_count=drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1057,8 +1059,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, if (mode_hdisplay % slices_per_line) continue;drivers/gpu/drm/i915/display/intel_dp.c +5
-2-if (min_slice_count <= slices_per_line) -return slices_per_line; +if (min_slice_count <= slices_per_line) { + *config_ret = config; + +return true; + }}
/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1069,7 +1074,21 @@ u8 intel_dp_dsc_get_slice_count(const structintel_connector *connector, min_slice_count, (int)BITS_PER_TYPE(sink_slice_count_mask), &sink_slice_count_mask);drivers/gpu/drm/i915/display/intel_dp.c +4
-1-return 0 ; +return false; +} + +u8 intel_dp_dsc_get_slice_count(const struct intel_connector*connector,
drivers/gpu/drm/i915/display/intel_dp.c +7
-0+ int mode_clock, int mode_hdisplay, + int num_joined_pipes) +{ + struct intel_dsc_slice_config config; + + if (!intel_dp_dsc_get_slice_config(connector, + mode_clock,
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ num_joined_pipes,&config))
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+return 0 ; + +return intel_dsc_line_slice_count (&config);}
static bool source_can_output(structintel_dp*intel_dp,
Re: [PATCH 49/50] drm/i915/dp: Add intel_dp_dsc_get_slice_config()
Quoted 11 lines · Jouni Hogander
Quoted 10 lines · Imre Deak
Add
intel_dp_dsc_get_slice_config()to compute the detailed slice configuration and determine the slices-per-line value (returned byintel_dp_dsc_get_slice_count()) using this function.Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 37 +++++++++++++++++++---- --1 file changed, 28 insertions(+), 9 deletions(-)
Quoted 12 lines
drivers/gpu/drm/i915/display/intel_dp.c static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector, · line 974
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -971,10 +971,10 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,*/ if (mode_clock > max(connector->dp.dsc_branch_caps.overall_throughput.rgb_yuv444, connector->dp.dsc_branch_caps.overall_throughput.yuv422_420)) -return 0 ; +return false;Why you are changing these to return false? Otherwise looks ok.
Uh, thanks for catching this. It's a rebase fail on my part after reordering this patch wrt. "Factor out intel_dp_dsc_min_slice_count()" in the patchset. What I meant was to change the return value to a bool only for intel_dp_dsc_get_slice_count()/intel_dp_dsc_get_slice_config(), will send an updated version.
Quoted 73 lines
BR,
Jouni Högander
Quoted 68 lines
if (mode_hdisplay>connector->dp.dsc_branch_caps.max_line_width)drivers/gpu/drm/i915/display/intel_dp.c +1
-1-return 0 ; +return false;
/*
* TODO: Pass the total pixel rate of all the streams transferred todrivers/gpu/drm/i915/display/intel_dp.c +1
-1@@ -1009,7 +1009,7 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector, drm_dbg_kms(display->drm, "Unsupported slice width %d by DP DSC Sink device\n", max_slice_width); -return 0 ; +return false; } /* Also take into account max slice width */ min_slice_count = max(min_slice_count,@@ -1018,9 +1018,11 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector, return min_slice_count; }drivers/gpu/drm/i915/display/intel_dp.c +5
-3-u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, -int mode_clock,int mode_hdisplay, -int num_joined_pipes) +static bool +intel_dp_dsc_get_slice_config (const struct intel_connector *connector, + int mode_clock, int mode_hdisplay, + int num_joined_pipes, + struct intel_dsc_slice_config *config_ret){
structintel_display*display =to_intel_display(connector); intmin_slice_count=drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1057,8 +1059,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, if (mode_hdisplay % slices_per_line) continue;drivers/gpu/drm/i915/display/intel_dp.c +5
-2-if (min_slice_count <= slices_per_line) -return slices_per_line; +if (min_slice_count <= slices_per_line) { + *config_ret = config; + +return true; + }}
/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1069,7 +1074,21 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, min_slice_count, (int)BITS_PER_TYPE(sink_slice_count_mask), &sink_slice_count_mask);drivers/gpu/drm/i915/display/intel_dp.c +15
-1-return 0 ; +return false; +} + +u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, +int mode_clock,int mode_hdisplay, +int num_joined_pipes) +{ +struct intel_dsc_slice_config config; + +if (!intel_dp_dsc_get_slice_config (connector, + mode_clock, mode_hdisplay, + num_joined_pipes, &config)) +return 0 ; + +return intel_dsc_line_slice_count (&config);}
static bool source_can_output(structintel_dp*intel_dp,
PATCH v2 49/50 drm/i915/dp: Add intel_dp_dsc_get_slice_config()
In reply to Imre DeakAdd intel_dp_dsc_get_slice_config() to compute the detailed slice configuration and determine the slices-per-line value (returned by intel_dp_dsc_get_slice_count()) using this function.
v2: Fix incorrectly returning false from intel_dp_dsc_min_slice_count()
due to rebase fail. (Jouni)
--- drivers/gpu/drm/i915/display/intel_dp.c | 31 ++++++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +25 -6
@@ -1018,9 +1018,11 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,return min_slice_count; } -u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, -int mode_clock,int mode_hdisplay, -int num_joined_pipes) +static bool +intel_dp_dsc_get_slice_config (const struct intel_connector *connector, +int mode_clock,int mode_hdisplay, +int num_joined_pipes, +struct intel_dsc_slice_config *config_ret) {struct intel_display *display =to_intel_display (connector); int min_slice_count =
@@ -1057,8 +1059,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,if (mode_hdisplay % slices_per_line)continue ; -if (min_slice_count <= slices_per_line) -return slices_per_line; +if (min_slice_count <= slices_per_line) { + *config_ret = config; + +return true; + } }/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */
@@ -1069,7 +1074,21 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, min_slice_count, (int)BITS_PER_TYPE(sink_slice_count_mask), &sink_slice_count_mask); -return 0 ; +return false; +} + +u8 intel_dp_dsc_get_slice_count (const struct intel_connector *connector, +int mode_clock,int mode_hdisplay, +int num_joined_pipes) +{ +struct intel_dsc_slice_config config; + +if (!intel_dp_dsc_get_slice_config (connector, + mode_clock, mode_hdisplay, + num_joined_pipes, &config)) +return 0 ; + +return intel_dsc_line_slice_count (&config); } static bool source_can_output(struct intel_dp *intel_dp,
Signature · 1 line
2.49.1
Re: [PATCH v2 49/50] drm/i915/dp: Add intel_dp_dsc_get_slice_config()
Quoted 7 lines · Imre Deak
Add
intel_dp_dsc_get_slice_config()to compute the detailed slice configuration and determine the slices-per-line value (returned byintel_dp_dsc_get_slice_count()) using this function.v2: Fix incorrectly returning false from
intel_dp_dsc_min_slice_count()
due to rebase fail. (Jouni)
Quoted 76 lines
Cc Jouni Högander <[email protected]>Signed-off-by Imre Deak <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp.c | 31 ++++++++++++++++++++--- --1 file changed, 25 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1018,9 +1018,11 @@ static int intel_dp_dsc_min_slice_count(conststruct intel_connector *connector, return min_slice_count; }
-u8 intel_dp_dsc_get_slice_count(const structintel_connector*connector,drivers/gpu/drm/i915/display/intel_dp.c +2
-2- int mode_clock, int mode_hdisplay, - int num_joined_pipes) +static bool +intel_dp_dsc_get_slice_config(const struct intel_connector*connector,
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+ int mode_clock, int mode_hdisplay, + int num_joined_pipes, + struct intel_dsc_slice_config
*config_ret)
{
structintel_display*display =to_intel_display(connector); intmin_slice_count=drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1057,8 +1059,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector, if (mode_hdisplay % slices_per_line) continue;drivers/gpu/drm/i915/display/intel_dp.c +5
-2-if (min_slice_count <= slices_per_line) -return slices_per_line; +if (min_slice_count <= slices_per_line) { + *config_ret = config; + +return true; + }}
/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -1069,7 +1074,21 @@ u8 intel_dp_dsc_get_slice_count(const structintel_connector *connector, min_slice_count, (int)BITS_PER_TYPE(sink_slice_count_mask), &sink_slice_count_mask);drivers/gpu/drm/i915/display/intel_dp.c +4
-1-return 0 ; +return false; +} + +u8 intel_dp_dsc_get_slice_count(const struct intel_connector*connector,
drivers/gpu/drm/i915/display/intel_dp.c +7
-0+ int mode_clock, int mode_hdisplay, + int num_joined_pipes) +{ + struct intel_dsc_slice_config config; + + if (!intel_dp_dsc_get_slice_config(connector, + mode_clock,
mode_hdisplay,drivers/gpu/drm/i915/display/intel_dp.c +1
-0+ num_joined_pipes,&config))
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+return 0 ; + +return intel_dsc_line_slice_count (&config);}
static bool source_can_output(structintel_dp*intel_dp,
Patchwork
CI✗ CI.checkpatch: warning for drm/i915/dp: Clean up link BW/DSC slice config computation
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915/dp: Clean up link BW/DSC slice config computation
URL : https://patchwork.freedesktop.org/series/158181/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 2de9a3901bc28757c7906b454717b64e2a214021
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 56ce135820f8ff0e6602953b1e7aea25fff207f4
Author: Imre Deak <[email protected]> Date: Thu Nov 27 19:50:23 2025 +0200
drm/i915/dp: Use intel_dp_dsc_get_slice_config()
Simplify things by computing the detailed slice configuration using intel_dp_dsc_get_slice_config(), instead of open-coding the same.
+ /mt/dim checkpatch d858d76d3596e85f00b062a894e38e7fda3d9916 drm-intel 64341df08911 drm/dp: Parse all DSC slice count caps for eDP 1.5fa01f242ceaa drm/dp: Add drm_dp_dsc_sink_slice_count_mask()b7e8b9e9acfd drm/i915/dp: Fix DSC sink's slice count capability check 966768b34612 drm/i915/dp: Return a fixed point BPP value from intel_dp_output_bpp() 2491ba0e6d49 drm/i915/dp: Use a mode's crtc_clock vs. clock during state computation 8912be8af7b6 drm/i915/dp: Factor out intel_dp_link_bw_overhead()cd7af982ca7e drm/i915/dp: Fix BW check in is_bw_sufficient_for_dsc_config() e831be48def7 drm/i915/dp: Use the effective data rate for DP BW calculation 4ca8b5cd7b94 drm/i915/dp: Use the effective data rate for DP compressed BW calculation 9341a38bff31 drm/i915/dp: Account with MST, SSC BW overhead for uncompressed DP-MST stream BW 331012ff9a15 drm/i915/dp: Account with DSC BW overhead for compressed DP-SST stream BW fb8971dc28c5 drm/i915/dp: Account with pipe joiner max compressed BPP limit for DP-MST and eDP 28bc5460f9f8 drm/i915/dp: Drop unused timeslots param from dsc_compute_link_config() f82324c69c61 drm/i915/dp: Factor out align_max_sink_dsc_input_bpp() 654de9436624 drm/i915/dp: Factor out align_max_vesa_compressed_bpp_x16() 3ba88c5e4245 drm/i915/dp: Fail state computation for invalid min/max link BPP values -:22: WARNING:LONG_LINE: line length of 191 exceeds 100 columns
#22: FILE: drivers/gpu/drm/i915/display/intel_dp.c:2657:
+ "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits: pixel clock %d kHz DSC %s max lanes %d max rate %d max pipe_bpp %d min link_bpp " FXP_Q4_FMT " max link_bpp " FXP_Q4_FMT "\n",
total: 0 errors, 1 warnings, 0 checks, 21 lines checkedea064b53d1eb drm/i915/dp: Fail state computation for invalid max throughput BPP value 78194274166b drm/i915/dp: Fail state computation for invalid max sink compressed BPP value a367a04b3feb drm/i915/dp: Fail state computation for invalid DSC source input BPP values 56f3df1f1134 drm/i915/dp: Align min/max DSC input BPPs to sink capsa022353eb347 drm/i915/dp: Align min/max compressed BPPs when calculating BPP limits 419f79280147 drm/i915/dp: Drop intel_dp parameter from intel_dp_compute_config_link_bpp_limits() 5d35de4db8fc drm/i915/dp: Pass intel_output_format to intel_dp_dsc_sink_{min_max}_compressed_bpp() 2539108fee66 drm/i915/dp: Pass mode clock to dsc_throughput_quirk_max_bpp_x16()fd71400a6b90 drm/i915/dp: Factor out compute_min_compressed_bpp_x16()9e0d1e34830a drm/i915/dp: Factor out compute_max_compressed_bpp_x16()4ef8e9d619e3 drm/i915/dp: Add intel_dp_mode_valid_with_dsc()10ef3b0de2cc drm/i915/dp: Unify detect and compute time DSC mode BW validatione60e175dc16e drm/i915/dp: Use helpers to align min/max compressed BPPsf03f904d3985 drm/i915/dp: Simplify computing DSC BPPs for eDP13a04ffc50dc drm/i915/dp: Simplify computing DSC BPPs for DP-SST2eca4cbcfc39 drm/i915/dp: Simplify computing forced DSC BPP for DP-SSTebb208273e3c drm/i915/dp: Unify computing compressed BPP for DP-SST and eDPe4d8ca7aa954 drm/i915/dp: Simplify eDP vs. DP compressed BPP computation8f0bfce75f6a drm/i915/dp: Simplify computing the DSC compressed BPP for DP-MST54ecae22fd00 drm/i915/dsc: Track the detaild DSC slice configuration
-:11: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #11:
2 pipes-per-line x 2 streams-per-pipe x 2 slices-per-stream = 8 slices-per-line
total: 0 errors, 1 warnings, 0 checks, 33 lines checked2efbfc05c876 drm/i915/dsc: Track the DSC stream count in the DSC slice config state 059f55447eba drm/i915/dsi: Move initialization of DSI DSC streams-per-pipe to fill_dsc() c5658987797d drm/i915/dsi: Track the detailed DSC slice configuration 3531a16b7fd0 drm/i915/dp: Track the detailed DSC slice configuration 6b6c71fd9269 drm/i915/dsc: Switch to using intel_dsc_line_slice_count() 0b336bf6c481 drm/i915/dp: Factor out intel_dp_dsc_min_slice_count() 5582a6edf283 drm/i915/dp: Use int for DSC slice count variables 93531abf81ad drm/i915/dp: Rename test_slice_count to slices_per_line 8ad633f8fe2f drm/i915/dp: Simplify the DSC slice config loop's slices-per-pipe iteration 4c99f145d612 drm/i915/dsc: Add intel_dsc_get_slice_config()
-:108: CHECK:LINE_SPACING: Please don't use multiple blank lines
#108: FILE: drivers/gpu/drm/i915/display/intel_vdsc.c:90:
+
+
total: 0 errors, 0 warnings, 1 checks, 104 lines checked f7537ea5783f drm/i915/dsi: Use intel_dsc_get_slice_config() 7eaed6595c41 drm/i915/dp: Unify DP and eDP slice count computation 1d87df9af494 drm/i915/dp: Add intel_dp_dsc_get_slice_config() 56ce135820f8 drm/i915/dp: Use intel_dp_dsc_get_slice_config()
Patchwork
CI✓ CI.KUnit: success for drm/i915/dp: Clean up link BW/DSC slice config computation
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915/dp: Clean up link BW/DSC slice config computation
URL : https://patchwork.freedesktop.org/series/158181/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [20:28:04] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [20:28:08] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [20:28:39] Starting KUnit Kernel (1/1)... [20:28:39] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [20:28:40] ================== guc_buf (11 subtests) =================== [20:28:40] [PASSED] test_smallest [20:28:40] [PASSED] test_largest [20:28:40] [PASSED] test_granular [20:28:40] [PASSED] test_unique [20:28:40] [PASSED] test_overlap [20:28:40] [PASSED] test_reusable [20:28:40] [PASSED] test_too_big [20:28:40] [PASSED] test_flush [20:28:40] [PASSED] test_lookup [20:28:40] [PASSED] test_data [20:28:40] [PASSED] test_class [20:28:40] ===================== [PASSED] guc_buf ===================== [20:28:40] =================== guc_dbm (7 subtests) =================== [20:28:40] [PASSED] test_empty [20:28:40] [PASSED] test_default [20:28:40] ======================== test_size ======================== [20:28:40] [PASSED] 4 [20:28:40] [PASSED] 8 [20:28:40] [PASSED] 32 [20:28:40] [PASSED] 256 [20:28:40] ==================== [PASSED] test_size ==================== [20:28:40] ======================= test_reuse ======================== [20:28:40] [PASSED] 4 [20:28:40] [PASSED] 8 [20:28:40] [PASSED] 32 [20:28:40] [PASSED] 256 [20:28:40] =================== [PASSED] test_reuse ==================== [20:28:40] =================== test_range_overlap ==================== [20:28:40] [PASSED] 4 [20:28:40] [PASSED] 8 [20:28:40] [PASSED] 32 [20:28:40] [PASSED] 256 [20:28:40] =============== [PASSED] test_range_overlap ================ [20:28:40] =================== test_range_compact ==================== [20:28:40] [PASSED] 4 [20:28:40] [PASSED] 8 [20:28:40] [PASSED] 32 [20:28:40] [PASSED] 256 [20:28:40] =============== [PASSED] test_range_compact ================ [20:28:40] ==================== test_range_spare ===================== [20:28:40] [PASSED] 4 [20:28:40] [PASSED] 8 [20:28:40] [PASSED] 32 [20:28:40] [PASSED] 256 [20:28:40] ================ [PASSED] test_range_spare ================= [20:28:40] ===================== [PASSED] guc_dbm ===================== [20:28:40] =================== guc_idm (6 subtests) =================== [20:28:40] [PASSED] bad_init [20:28:40] [PASSED] no_init [20:28:40] [PASSED] init_fini [20:28:40] [PASSED] check_used [20:28:40] [PASSED] check_quota [20:28:40] [PASSED] check_all [20:28:40] ===================== [PASSED] guc_idm ===================== [20:28:40] ================== no_relay (3 subtests) =================== [20:28:40] [PASSED] xe_drops_guc2pf_if_not_ready [20:28:40] [PASSED] xe_drops_guc2vf_if_not_ready [20:28:40] [PASSED] xe_rejects_send_if_not_ready [20:28:40] ==================== [PASSED] no_relay ===================== [20:28:40] ================== pf_relay (14 subtests) ================== [20:28:40] [PASSED] pf_rejects_guc2pf_too_short [20:28:40] [PASSED] pf_rejects_guc2pf_too_long [20:28:40] [PASSED] pf_rejects_guc2pf_no_payload [20:28:40] [PASSED] pf_fails_no_payload [20:28:40] [PASSED] pf_fails_bad_origin [20:28:40] [PASSED] pf_fails_bad_type [20:28:40] [PASSED] pf_txn_reports_error [20:28:40] [PASSED] pf_txn_sends_pf2guc [20:28:40] [PASSED] pf_sends_pf2guc [20:28:40] [SKIPPED] pf_loopback_nop [20:28:40] [SKIPPED] pf_loopback_echo [20:28:40] [SKIPPED] pf_loopback_fail [20:28:40] [SKIPPED] pf_loopback_busy [20:28:40] [SKIPPED] pf_loopback_retry [20:28:40] ==================== [PASSED] pf_relay ===================== [20:28:40] ================== vf_relay (3 subtests) =================== [20:28:40] [PASSED] vf_rejects_guc2vf_too_short [20:28:40] [PASSED] vf_rejects_guc2vf_too_long [20:28:40] [PASSED] vf_rejects_guc2vf_no_payload [20:28:40] ==================== [PASSED] vf_relay ===================== [20:28:40] ================ pf_gt_config (6 subtests) ================= [20:28:40] [PASSED] fair_contexts_1vf [20:28:40] [PASSED] fair_doorbells_1vf [20:28:40] [PASSED] fair_ggtt_1vf [20:28:40] ====================== fair_contexts ====================== [20:28:40] [PASSED] 1 VF [20:28:40] [PASSED] 2 VFs [20:28:40] [PASSED] 3 VFs [20:28:40] [PASSED] 4 VFs [20:28:40] [PASSED] 5 VFs [20:28:40] [PASSED] 6 VFs [20:28:40] [PASSED] 7 VFs [20:28:40] [PASSED] 8 VFs [20:28:40] [PASSED] 9 VFs [20:28:40] [PASSED] 10 VFs [20:28:40] [PASSED] 11 VFs [20:28:40] [PASSED] 12 VFs [20:28:40] [PASSED] 13 VFs [20:28:40] [PASSED] 14 VFs [20:28:40] [PASSED] 15 VFs [20:28:40] [PASSED] 16 VFs [20:28:40] [PASSED] 17 VFs [20:28:40] [PASSED] 18 VFs [20:28:40] [PASSED] 19 VFs [20:28:40] [PASSED] 20 VFs [20:28:40] [PASSED] 21 VFs [20:28:40] [PASSED] 22 VFs [20:28:40] [PASSED] 23 VFs [20:28:40] [PASSED] 24 VFs [20:28:40] [PASSED] 25 VFs [20:28:40] [PASSED] 26 VFs [20:28:40] [PASSED] 27 VFs [20:28:40] [PASSED] 28 VFs [20:28:40] [PASSED] 29 VFs [20:28:40] [PASSED] 30 VFs [20:28:40] [PASSED] 31 VFs [20:28:40] [PASSED] 32 VFs [20:28:40] [PASSED] 33 VFs [20:28:40] [PASSED] 34 VFs [20:28:40] [PASSED] 35 VFs [20:28:40] [PASSED] 36 VFs [20:28:40] [PASSED] 37 VFs [20:28:40] [PASSED] 38 VFs [20:28:40] [PASSED] 39 VFs [20:28:40] [PASSED] 40 VFs [20:28:40] [PASSED] 41 VFs [20:28:40] [PASSED] 42 VFs [20:28:40] [PASSED] 43 VFs [20:28:40] [PASSED] 44 VFs [20:28:40] [PASSED] 45 VFs [20:28:40] [PASSED] 46 VFs [20:28:40] [PASSED] 47 VFs [20:28:40] [PASSED] 48 VFs [20:28:40] [PASSED] 49 VFs [20:28:40] [PASSED] 50 VFs [20:28:40] [PASSED] 51 VFs [20:28:40] [PASSED] 52 VFs [20:28:40] [PASSED] 53 VFs [20:28:40] [PASSED] 54 VFs [20:28:40] [PASSED] 55 VFs [20:28:40] [PASSED] 56 VFs [20:28:40] [PASSED] 57 VFs [20:28:40] [PASSED] 58 VFs [20:28:40] [PASSED] 59 VFs [20:28:40] [PASSED] 60 VFs [20:28:40] [PASSED] 61 VFs [20:28:40] [PASSED] 62 VFs [20:28:40] [PASSED] 63 VFs [20:28:40] ================== [PASSED] fair_contexts ================== [20:28:40] ===================== fair_doorbells ====================== [20:28:40] [PASSED] 1 VF [20:28:40] [PASSED] 2 VFs [20:28:40] [PASSED] 3 VFs [20:28:40] [PASSED] 4 VFs [20:28:40] [PASSED] 5 VFs [20:28:40] [PASSED] 6 VFs [20:28:40] [PASSED] 7 VFs [20:28:40] [PASSED] 8 VFs [20:28:40] [PASSED] 9 VFs [20:28:40] [PASSED] 10 VFs [20:28:40] [PASSED] 11 VFs [20:28:40] [PASSED] 12 VFs [20:28:40] [PASSED] 13 VFs [20:28:40] [PASSED] 14 VFs [20:28:40] [PASSED] 15 VFs [20:28:40] [PASSED] 16 VFs [20:28:40] [PASSED] 17 VFs [20:28:40] [PASSED] 18 VFs [20:28:40] [PASSED] 19 VFs [20:28:40] [PASSED] 20 VFs [20:28:40] [PASSED] 21 VFs [20:28:40] [PASSED] 22 VFs [20:28:40] [PASSED] 23 VFs [20:28:40] [PASSED] 24 VFs [20:28:40] [PASSED] 25 VFs [20:28:40] [PASSED] 26 VFs [20:28:40] [PASSED] 27 VFs [20:28:40] [PASSED] 28 VFs [20:28:40] [PASSED] 29 VFs [20:28:40] [PASSED] 30 VFs [20:28:40] [PASSED] 31 VFs [20:28:40] [PASSED] 32 VFs [20:28:40] [PASSED] 33 VFs [20:28:40] [PASSED] 34 VFs [20:28:40] [PASSED] 35 VFs [20:28:40] [PASSED] 36 VFs [20:28:40] [PASSED] 37 VFs [20:28:40] [PASSED] 38 VFs [20:28:40] [PASSED] 39 VFs [20:28:40] [PASSED] 40 VFs [20:28:40] [PASSED] 41 VFs [20:28:40] [PASSED] 42 VFs [20:28:40] [PASSED] 43 VFs [20:28:40] [PASSED] 44 VFs [20:28:40] [PASSED] 45 VFs [20:28:40] [PASSED] 46 VFs [20:28:40] [PASSED] 47 VFs [20:28:40] [PASSED] 48 VFs [20:28:40] [PASSED] 49 VFs [20:28:40] [PASSED] 50 VFs [20:28:40] [PASSED] 51 VFs [20:28:40] [PASSED] 52 VFs [20:28:40] [PASSED] 53 VFs [20:28:40] [PASSED] 54 VFs [20:28:40] [PASSED] 55 VFs [20:28:40] [PASSED] 56 VFs [20:28:40] [PASSED] 57 VFs [20:28:40] [PASSED] 58 VFs [20:28:40] [PASSED] 59 VFs [20:28:40] [PASSED] 60 VFs [20:28:40] [PASSED] 61 VFs [20:28:40] [PASSED] 62 VFs [20:28:40] [PASSED] 63 VFs [20:28:40] ================= [PASSED] fair_doorbells ================== [20:28:40] ======================== fair_ggtt ======================== [20:28:40] [PASSED] 1 VF [20:28:40] [PASSED] 2 VFs [20:28:40] [PASSED] 3 VFs [20:28:40] [PASSED] 4 VFs [20:28:40] [PASSED] 5 VFs [20:28:40] [PASSED] 6 VFs [20:28:40] [PASSED] 7 VFs [20:28:40] [PASSED] 8 VFs [20:28:40] [PASSED] 9 VFs [20:28:40] [PASSED] 10 VFs [20:28:40] [PASSED] 11 VFs [20:28:40] [PASSED] 12 VFs [20:28:40] [PASSED] 13 VFs [20:28:40] [PASSED] 14 VFs [20:28:40] [PASSED] 15 VFs [20:28:40] [PASSED] 16 VFs [20:28:40] [PASSED] 17 VFs [20:28:40] [PASSED] 18 VFs [20:28:40] [PASSED] 19 VFs [20:28:40] [PASSED] 20 VFs [20:28:40] [PASSED] 21 VFs [20:28:40] [PASSED] 22 VFs [20:28:40] [PASSED] 23 VFs [20:28:40] [PASSED] 24 VFs [20:28:40] [PASSED] 25 VFs [20:28:40] [PASSED] 26 VFs [20:28:40] [PASSED] 27 VFs [20:28:40] [PASSED] 28 VFs [20:28:40] [PASSED] 29 VFs [20:28:40] [PASSED] 30 VFs [20:28:40] [PASSED] 31 VFs [20:28:40] [PASSED] 32 VFs [20:28:40] [PASSED] 33 VFs [20:28:40] [PASSED] 34 VFs [20:28:40] [PASSED] 35 VFs [20:28:40] [PASSED] 36 VFs [20:28:40] [PASSED] 37 VFs [20:28:40] [PASSED] 38 VFs [20:28:40] [PASSED] 39 VFs [20:28:40] [PASSED] 40 VFs [20:28:40] [PASSED] 41 VFs [20:28:40] [PASSED] 42 VFs [20:28:40] [PASSED] 43 VFs [20:28:40] [PASSED] 44 VFs [20:28:40] [PASSED] 45 VFs [20:28:40] [PASSED] 46 VFs [20:28:40] [PASSED] 47 VFs [20:28:40] [PASSED] 48 VFs [20:28:40] [PASSED] 49 VFs [20:28:40] [PASSED] 50 VFs [20:28:40] [PASSED] 51 VFs [20:28:40] [PASSED] 52 VFs [20:28:40] [PASSED] 53 VFs [20:28:40] [PASSED] 54 VFs [20:28:40] [PASSED] 55 VFs [20:28:40] [PASSED] 56 VFs [20:28:40] [PASSED] 57 VFs [20:28:40] [PASSED] 58 VFs [20:28:40] [PASSED] 59 VFs [20:28:40] [PASSED] 60 VFs [20:28:40] [PASSED] 61 VFs [20:28:40] [PASSED] 62 VFs [20:28:40] [PASSED] 63 VFs [20:28:40] ==================== [PASSED] fair_ggtt ==================== [20:28:40] ================== [PASSED] pf_gt_config =================== [20:28:40] ===================== lmtt (1 subtest) ===================== [20:28:40] ======================== test_ops ========================= [20:28:40] [PASSED] 2-level [20:28:40] [PASSED] multi-level [20:28:40] ==================== [PASSED] test_ops ===================== [20:28:40] ====================== [PASSED] lmtt ======================= [20:28:40] ================= pf_service (11 subtests) ================= [20:28:40] [PASSED] pf_negotiate_any [20:28:40] [PASSED] pf_negotiate_base_match [20:28:40] [PASSED] pf_negotiate_base_newer [20:28:40] [PASSED] pf_negotiate_base_next [20:28:40] [SKIPPED] pf_negotiate_base_older [20:28:40] [PASSED] pf_negotiate_base_prev [20:28:40] [PASSED] pf_negotiate_latest_match [20:28:40] [PASSED] pf_negotiate_latest_newer [20:28:40] [PASSED] pf_negotiate_latest_next [20:28:40] [SKIPPED] pf_negotiate_latest_older [20:28:40] [SKIPPED] pf_negotiate_latest_prev [20:28:40] =================== [PASSED] pf_service ==================== [20:28:40] ================= xe_guc_g2g (2 subtests) ================== [20:28:40] ============== xe_live_guc_g2g_kunit_default ============== [20:28:40] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ========== [20:28:40] ============== xe_live_guc_g2g_kunit_allmem =============== [20:28:40] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ========== [20:28:40] =================== [SKIPPED] xe_guc_g2g =================== [20:28:40] =================== xe_mocs (2 subtests) =================== [20:28:40] ================ xe_live_mocs_kernel_kunit ================ [20:28:40] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============ [20:28:40] ================ xe_live_mocs_reset_kunit ================= [20:28:40] ============ [SKIPPED] xe_live_mocs_reset_kunit ============ [20:28:40] ==================== [SKIPPED] xe_mocs ===================== [20:28:40] ================= xe_migrate (2 subtests) ================== [20:28:40] ================= xe_migrate_sanity_kunit ================= [20:28:40] ============ [SKIPPED] xe_migrate_sanity_kunit ============= [20:28:40] ================== xe_validate_ccs_kunit ================== [20:28:40] ============= [SKIPPED] xe_validate_ccs_kunit ============== [20:28:40] =================== [SKIPPED] xe_migrate =================== [20:28:40] ================== xe_dma_buf (1 subtest) ================== [20:28:40] ==================== xe_dma_buf_kunit ===================== [20:28:40] ================ [SKIPPED] xe_dma_buf_kunit ================ [20:28:40] =================== [SKIPPED] xe_dma_buf =================== [20:28:40] ================= xe_bo_shrink (1 subtest) ================= [20:28:40] =================== xe_bo_shrink_kunit ==================== [20:28:40] =============== [SKIPPED] xe_bo_shrink_kunit =============== [20:28:40] ================== [SKIPPED] xe_bo_shrink ================== [20:28:40] ==================== xe_bo (2 subtests) ==================== [20:28:40] ================== xe_ccs_migrate_kunit =================== [20:28:40] ============== [SKIPPED] xe_ccs_migrate_kunit ============== [20:28:40] ==================== xe_bo_evict_kunit ==================== [20:28:40] =============== [SKIPPED] xe_bo_evict_kunit ================ [20:28:40] ===================== [SKIPPED] xe_bo ====================== [20:28:40] ==================== args (11 subtests) ==================== [20:28:40] [PASSED] count_args_test [20:28:40] [PASSED] call_args_example [20:28:40] [PASSED] call_args_test [20:28:40] [PASSED] drop_first_arg_example [20:28:40] [PASSED] drop_first_arg_test [20:28:40] [PASSED] first_arg_example [20:28:40] [PASSED] first_arg_test [20:28:40] [PASSED] last_arg_example [20:28:40] [PASSED] last_arg_test [20:28:40] [PASSED] pick_arg_example [20:28:40] [PASSED] sep_comma_example [20:28:40] ====================== [PASSED] args ======================= [20:28:40] =================== xe_pci (3 subtests) ==================== [20:28:40] ==================== check_graphics_ip ==================== [20:28:40] [PASSED] 12.00 Xe_LP [20:28:40] [PASSED] 12.10 Xe_LP+ [20:28:40] [PASSED] 12.55 Xe_HPG [20:28:40] [PASSED] 12.60 Xe_HPC [20:28:40] [PASSED] 12.70 Xe_LPG [20:28:40] [PASSED] 12.71 Xe_LPG [20:28:40] [PASSED] 12.74 Xe_LPG+ [20:28:40] [PASSED] 20.01 Xe2_HPG [20:28:40] [PASSED] 20.02 Xe2_HPG [20:28:40] [PASSED] 20.04 Xe2_LPG [20:28:40] [PASSED] 30.00 Xe3_LPG [20:28:40] [PASSED] 30.01 Xe3_LPG [20:28:40] [PASSED] 30.03 Xe3_LPG [20:28:40] [PASSED] 30.04 Xe3_LPG [20:28:40] [PASSED] 30.05 Xe3_LPG [20:28:40] [PASSED] 35.11 Xe3p_XPC [20:28:40] ================ [PASSED] check_graphics_ip ================ [20:28:40] ===================== check_media_ip ====================== [20:28:40] [PASSED] 12.00 Xe_M [20:28:40] [PASSED] 12.55 Xe_HPM [20:28:40] [PASSED] 13.00 Xe_LPM+ [20:28:40] [PASSED] 13.01 Xe2_HPM [20:28:40] [PASSED] 20.00 Xe2_LPM [20:28:40] [PASSED] 30.00 Xe3_LPM [20:28:40] [PASSED] 30.02 Xe3_LPM [20:28:40] [PASSED] 35.00 Xe3p_LPM [20:28:40] [PASSED] 35.03 Xe3p_HPM [20:28:40] ================= [PASSED] check_media_ip ================== [20:28:40] =================== check_platform_desc =================== [20:28:40] [PASSED] 0x9A60 (TIGERLAKE) [20:28:40] [PASSED] 0x9A68 (TIGERLAKE) [20:28:40] [PASSED] 0x9A70 (TIGERLAKE) [20:28:40] [PASSED] 0x9A40 (TIGERLAKE) [20:28:40] [PASSED] 0x9A49 (TIGERLAKE) [20:28:40] [PASSED] 0x9A59 (TIGERLAKE) [20:28:40] [PASSED] 0x9A78 (TIGERLAKE) [20:28:40] [PASSED] 0x9AC0 (TIGERLAKE) [20:28:40] [PASSED] 0x9AC9 (TIGERLAKE) [20:28:40] [PASSED] 0x9AD9 (TIGERLAKE) [20:28:40] [PASSED] 0x9AF8 (TIGERLAKE) [20:28:40] [PASSED] 0x4C80 (ROCKETLAKE) [20:28:40] [PASSED] 0x4C8A (ROCKETLAKE) [20:28:40] [PASSED] 0x4C8B (ROCKETLAKE) [20:28:40] [PASSED] 0x4C8C (ROCKETLAKE) [20:28:40] [PASSED] 0x4C90 (ROCKETLAKE) [20:28:40] [PASSED] 0x4C9A (ROCKETLAKE) [20:28:40] [PASSED] 0x4680 (ALDERLAKE_S) [20:28:40] [PASSED] 0x4682 (ALDERLAKE_S) [20:28:40] [PASSED] 0x4688 (ALDERLAKE_S) [20:28:40] [PASSED] 0x468A (ALDERLAKE_S) [20:28:40] [PASSED] 0x468B (ALDERLAKE_S) [20:28:40] [PASSED] 0x4690 (ALDERLAKE_S) [20:28:40] [PASSED] 0x4692 (ALDERLAKE_S) [20:28:40] [PASSED] 0x4693 (ALDERLAKE_S) [20:28:40] [PASSED] 0x46A0 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46A1 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46A2 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46A3 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46A6 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46A8 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46AA (ALDERLAKE_P) [20:28:40] [PASSED] 0x462A (ALDERLAKE_P) [20:28:40] [PASSED] 0x4626 (ALDERLAKE_P) [20:28:40] [PASSED] 0x4628 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46B0 (ALDERLAKE_P) stty: 'standard input': Inappropriate ioctl for device [20:28:40] [PASSED] 0x46B1 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46B2 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46B3 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46C0 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46C1 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46C2 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46C3 (ALDERLAKE_P) [20:28:40] [PASSED] 0x46D0 (ALDERLAKE_N) [20:28:40] [PASSED] 0x46D1 (ALDERLAKE_N) [20:28:40] [PASSED] 0x46D2 (ALDERLAKE_N) [20:28:40] [PASSED] 0x46D3 (ALDERLAKE_N) [20:28:40] [PASSED] 0x46D4 (ALDERLAKE_N) [20:28:40] [PASSED] 0xA721 (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7A1 (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7A9 (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7AC (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7AD (ALDERLAKE_P) [20:28:40] [PASSED] 0xA720 (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7A0 (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7A8 (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7AA (ALDERLAKE_P) [20:28:40] [PASSED] 0xA7AB (ALDERLAKE_P) [20:28:40] [PASSED] 0xA780 (ALDERLAKE_S) [20:28:40] [PASSED] 0xA781 (ALDERLAKE_S) [20:28:40] [PASSED] 0xA782 (ALDERLAKE_S) [20:28:40] [PASSED] 0xA783 (ALDERLAKE_S) [20:28:40] [PASSED] 0xA788 (ALDERLAKE_S) [20:28:40] [PASSED] 0xA789 (ALDERLAKE_S) [20:28:40] [PASSED] 0xA78A (ALDERLAKE_S) [20:28:40] [PASSED] 0xA78B (ALDERLAKE_S) [20:28:40] [PASSED] 0x4905 (DG1) [20:28:40] [PASSED] 0x4906 (DG1) [20:28:40] [PASSED] 0x4907 (DG1) [20:28:40] [PASSED] 0x4908 (DG1) [20:28:40] [PASSED] 0x4909 (DG1) [20:28:40] [PASSED] 0x56C0 (DG2) [20:28:40] [PASSED] 0x56C2 (DG2) [20:28:40] [PASSED] 0x56C1 (DG2) [20:28:40] [PASSED] 0x7D51 (METEORLAKE) [20:28:40] [PASSED] 0x7DD1 (METEORLAKE) [20:28:40] [PASSED] 0x7D41 (METEORLAKE) [20:28:40] [PASSED] 0x7D67 (METEORLAKE) [20:28:40] [PASSED] 0xB640 (METEORLAKE) [20:28:40] [PASSED] 0x56A0 (DG2) [20:28:40] [PASSED] 0x56A1 (DG2) [20:28:40] [PASSED] 0x56A2 (DG2) [20:28:40] [PASSED] 0x56BE (DG2) [20:28:40] [PASSED] 0x56BF (DG2) [20:28:40] [PASSED] 0x5690 (DG2) [20:28:40] [PASSED] 0x5691 (DG2) [20:28:40] [PASSED] 0x5692 (DG2) [20:28:40] [PASSED] 0x56A5 (DG2) [20:28:40] [PASSED] 0x56A6 (DG2) [20:28:40] [PASSED] 0x56B0 (DG2) [20:28:40] [PASSED] 0x56B1 (DG2) [20:28:40] [PASSED] 0x56BA (DG2) [20:28:40] [PASSED] 0x56BB (DG2) [20:28:40] [PASSED] 0x56BC (DG2) [20:28:40] [PASSED] 0x56BD (DG2) [20:28:40] [PASSED] 0x5693 (DG2) [20:28:40] [PASSED] 0x5694 (DG2) [20:28:40] [PASSED] 0x5695 (DG2) [20:28:40] [PASSED] 0x56A3 (DG2) [20:28:40] [PASSED] 0x56A4 (DG2) [20:28:40] [PASSED] 0x56B2 (DG2) [20:28:40] [PASSED] 0x56B3 (DG2) [20:28:40] [PASSED] 0x5696 (DG2) [20:28:40] [PASSED] 0x5697 (DG2) [20:28:40] [PASSED] 0xB69 (PVC) [20:28:40] [PASSED] 0xB6E (PVC) [20:28:40] [PASSED] 0xBD4 (PVC) [20:28:40] [PASSED] 0xBD5 (PVC) [20:28:40] [PASSED] 0xBD6 (PVC) [20:28:40] [PASSED] 0xBD7 (PVC) [20:28:40] [PASSED] 0xBD8 (PVC) [20:28:40] [PASSED] 0xBD9 (PVC) [20:28:40] [PASSED] 0xBDA (PVC) [20:28:40] [PASSED] 0xBDB (PVC) [20:28:40] [PASSED] 0xBE0 (PVC) [20:28:40] [PASSED] 0xBE1 (PVC) [20:28:40] [PASSED] 0xBE5 (PVC) [20:28:40] [PASSED] 0x7D40 (METEORLAKE) [20:28:40] [PASSED] 0x7D45 (METEORLAKE) [20:28:40] [PASSED] 0x7D55 (METEORLAKE) [20:28:40] [PASSED] 0x7D60 (METEORLAKE) [20:28:40] [PASSED] 0x7DD5 (METEORLAKE) [20:28:40] [PASSED] 0x6420 (LUNARLAKE) [20:28:40] [PASSED] 0x64A0 (LUNARLAKE) [20:28:40] [PASSED] 0x64B0 (LUNARLAKE) [20:28:40] [PASSED] 0xE202 (BATTLEMAGE) [20:28:40] [PASSED] 0xE209 (BATTLEMAGE) [20:28:40] [PASSED] 0xE20B (BATTLEMAGE) [20:28:40] [PASSED] 0xE20C (BATTLEMAGE) [20:28:40] [PASSED] 0xE20D (BATTLEMAGE) [20:28:40] [PASSED] 0xE210 (BATTLEMAGE) [20:28:40] [PASSED] 0xE211 (BATTLEMAGE) [20:28:40] [PASSED] 0xE212 (BATTLEMAGE) [20:28:40] [PASSED] 0xE216 (BATTLEMAGE) [20:28:40] [PASSED] 0xE220 (BATTLEMAGE) [20:28:40] [PASSED] 0xE221 (BATTLEMAGE) [20:28:40] [PASSED] 0xE222 (BATTLEMAGE) [20:28:40] [PASSED] 0xE223 (BATTLEMAGE) [20:28:40] [PASSED] 0xB080 (PANTHERLAKE) [20:28:40] [PASSED] 0xB081 (PANTHERLAKE) [20:28:40] [PASSED] 0xB082 (PANTHERLAKE) [20:28:40] [PASSED] 0xB083 (PANTHERLAKE) [20:28:40] [PASSED] 0xB084 (PANTHERLAKE) [20:28:40] [PASSED] 0xB085 (PANTHERLAKE) [20:28:40] [PASSED] 0xB086 (PANTHERLAKE) [20:28:40] [PASSED] 0xB087 (PANTHERLAKE) [20:28:40] [PASSED] 0xB08F (PANTHERLAKE) [20:28:40] [PASSED] 0xB090 (PANTHERLAKE) [20:28:40] [PASSED] 0xB0A0 (PANTHERLAKE) [20:28:40] [PASSED] 0xB0B0 (PANTHERLAKE) [20:28:40] [PASSED] 0xD740 (NOVALAKE_S) [20:28:40] [PASSED] 0xD741 (NOVALAKE_S) [20:28:40] [PASSED] 0xD742 (NOVALAKE_S) [20:28:40] [PASSED] 0xD743 (NOVALAKE_S) [20:28:40] [PASSED] 0xD744 (NOVALAKE_S) [20:28:40] [PASSED] 0xD745 (NOVALAKE_S) [20:28:40] [PASSED] 0x674C (CRESCENTISLAND) [20:28:40] [PASSED] 0xFD80 (PANTHERLAKE) [20:28:40] [PASSED] 0xFD81 (PANTHERLAKE) [20:28:40] =============== [PASSED] check_platform_desc =============== [20:28:40] ===================== [PASSED] xe_pci ====================== [20:28:40] =================== xe_rtp (2 subtests) ==================== [20:28:40] =============== xe_rtp_process_to_sr_tests ================ [20:28:40] [PASSED] coalesce-same-reg [20:28:40] [PASSED] no-match-no-add [20:28:40] [PASSED] match-or [20:28:40] [PASSED] match-or-xfail [20:28:40] [PASSED] no-match-no-add-multiple-rules [20:28:40] [PASSED] two-regs-two-entries [20:28:40] [PASSED] clr-one-set-other [20:28:40] [PASSED] set-field [20:28:40] [PASSED] conflict-duplicate [20:28:40] [PASSED] conflict-not-disjoint [20:28:40] [PASSED] conflict-reg-type [20:28:40] =========== [PASSED] xe_rtp_process_to_sr_tests ============ [20:28:40] ================== xe_rtp_process_tests =================== [20:28:40] [PASSED] active1 [20:28:40] [PASSED] active2 [20:28:40] [PASSED] active-inactive [20:28:40] [PASSED] inactive-active [20:28:40] [PASSED] inactive-1st_or_active-inactive [20:28:40] [PASSED] inactive-2nd_or_active-inactive [20:28:40] [PASSED] inactive-last_or_active-inactive [20:28:40] [PASSED] inactive-no_or_active-inactive [20:28:40] ============== [PASSED] xe_rtp_process_tests =============== [20:28:40] ===================== [PASSED] xe_rtp ====================== [20:28:40] ==================== xe_wa (1 subtest) ===================== [20:28:40] ======================== xe_wa_gt ========================= [20:28:40] [PASSED] TIGERLAKE B0 [20:28:40] [PASSED] DG1 A0 [20:28:40] [PASSED] DG1 B0 [20:28:40] [PASSED] ALDERLAKE_S A0 [20:28:40] [PASSED] ALDERLAKE_S B0 [20:28:40] [PASSED] ALDERLAKE_S C0 [20:28:40] [PASSED] ALDERLAKE_S D0 [20:28:40] [PASSED] ALDERLAKE_P A0 [20:28:40] [PASSED] ALDERLAKE_P B0 [20:28:40] [PASSED] ALDERLAKE_P C0 [20:28:40] [PASSED] ALDERLAKE_S RPLS D0 [20:28:40] [PASSED] ALDERLAKE_P RPLU E0 [20:28:40] [PASSED] DG2 G10 C0 [20:28:40] [PASSED] DG2 G11 B1 [20:28:40] [PASSED] DG2 G12 A1 [20:28:40] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0 [20:28:40] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0 [20:28:40] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0 [20:28:40] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0 [20:28:40] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0 [20:28:40] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1 [20:28:40] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0 [20:28:40] ==================== [PASSED] xe_wa_gt ===================== [20:28:40] ====================== [PASSED] xe_wa ====================== [20:28:40] ============================================================ [20:28:40] Testing complete. Ran 510 tests: passed: 492, skipped: 18 [20:28:40] Elapsed time: 35.729s total, 4.231s configuring, 31.029s building, 0.455s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [20:28:40] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [20:28:42] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [20:29:07] Starting KUnit Kernel (1/1)... [20:29:07] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [20:29:07] ============ drm_test_pick_cmdline (2 subtests) ============ [20:29:07] [PASSED] drm_test_pick_cmdline_res_1920_1080_60 [20:29:07] =============== drm_test_pick_cmdline_named =============== [20:29:07] [PASSED] NTSC [20:29:07] [PASSED] NTSC-J [20:29:07] [PASSED] PAL [20:29:07] [PASSED] PAL-M [20:29:07] =========== [PASSED] drm_test_pick_cmdline_named =========== [20:29:07] ============== [PASSED] drm_test_pick_cmdline ============== [20:29:07] == drm_test_atomic_get_connector_for_encoder (1 subtest) === [20:29:07] [PASSED] drm_test_drm_atomic_get_connector_for_encoder [20:29:07] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ==== [20:29:07] =========== drm_validate_clone_mode (2 subtests) =========== [20:29:07] ============== drm_test_check_in_clone_mode =============== [20:29:07] [PASSED] in_clone_mode [20:29:07] [PASSED] not_in_clone_mode [20:29:07] ========== [PASSED] drm_test_check_in_clone_mode =========== [20:29:07] =============== drm_test_check_valid_clones =============== [20:29:07] [PASSED] not_in_clone_mode [20:29:07] [PASSED] valid_clone [20:29:07] [PASSED] invalid_clone [20:29:07] =========== [PASSED] drm_test_check_valid_clones =========== [20:29:07] ============= [PASSED] drm_validate_clone_mode ============= [20:29:07] ============= drm_validate_modeset (1 subtest) ============= [20:29:07] [PASSED] drm_test_check_connector_changed_modeset [20:29:07] ============== [PASSED] drm_validate_modeset =============== [20:29:07] ====== drm_test_bridge_get_current_state (2 subtests) ====== [20:29:07] [PASSED] drm_test_drm_bridge_get_current_state_atomic [20:29:07] [PASSED] drm_test_drm_bridge_get_current_state_legacy [20:29:07] ======== [PASSED] drm_test_bridge_get_current_state ======== [20:29:07] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ====== [20:29:07] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic [20:29:07] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled [20:29:07] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy [20:29:07] ======== [PASSED] drm_test_bridge_helper_reset_crtc ======== [20:29:07] ============== drm_bridge_alloc (2 subtests) =============== [20:29:07] [PASSED] drm_test_drm_bridge_alloc_basic [20:29:07] [PASSED] drm_test_drm_bridge_alloc_get_put [20:29:07] ================ [PASSED] drm_bridge_alloc ================= [20:29:07] ================== drm_buddy (8 subtests) ================== [20:29:07] [PASSED] drm_test_buddy_alloc_limit [20:29:07] [PASSED] drm_test_buddy_alloc_optimistic [20:29:07] [PASSED] drm_test_buddy_alloc_pessimistic [20:29:07] [PASSED] drm_test_buddy_alloc_pathological [20:29:07] [PASSED] drm_test_buddy_alloc_contiguous [20:29:07] [PASSED] drm_test_buddy_alloc_clear [20:29:07] [PASSED] drm_test_buddy_alloc_range_bias [20:29:08] [PASSED] drm_test_buddy_fragmentation_performance [20:29:08] ==================== [PASSED] drm_buddy ==================== [20:29:08] ============= drm_cmdline_parser (40 subtests) ============= [20:29:08] [PASSED] drm_test_cmdline_force_d_only [20:29:08] [PASSED] drm_test_cmdline_force_D_only_dvi [20:29:08] [PASSED] drm_test_cmdline_force_D_only_hdmi [20:29:08] [PASSED] drm_test_cmdline_force_D_only_not_digital [20:29:08] [PASSED] drm_test_cmdline_force_e_only [20:29:08] [PASSED] drm_test_cmdline_res [20:29:08] [PASSED] drm_test_cmdline_res_vesa [20:29:08] [PASSED] drm_test_cmdline_res_vesa_rblank [20:29:08] [PASSED] drm_test_cmdline_res_rblank [20:29:08] [PASSED] drm_test_cmdline_res_bpp [20:29:08] [PASSED] drm_test_cmdline_res_refresh [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh_margins [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital [20:29:08] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on [20:29:08] [PASSED] drm_test_cmdline_res_margins_force_on [20:29:08] [PASSED] drm_test_cmdline_res_vesa_margins [20:29:08] [PASSED] drm_test_cmdline_name [20:29:08] [PASSED] drm_test_cmdline_name_bpp [20:29:08] [PASSED] drm_test_cmdline_name_option [20:29:08] [PASSED] drm_test_cmdline_name_bpp_option [20:29:08] [PASSED] drm_test_cmdline_rotate_0 [20:29:08] [PASSED] drm_test_cmdline_rotate_90 [20:29:08] [PASSED] drm_test_cmdline_rotate_180 [20:29:08] [PASSED] drm_test_cmdline_rotate_270 [20:29:08] [PASSED] drm_test_cmdline_hmirror [20:29:08] [PASSED] drm_test_cmdline_vmirror [20:29:08] [PASSED] drm_test_cmdline_margin_options [20:29:08] [PASSED] drm_test_cmdline_multiple_options [20:29:08] [PASSED] drm_test_cmdline_bpp_extra_and_option [20:29:08] [PASSED] drm_test_cmdline_extra_and_option [20:29:08] [PASSED] drm_test_cmdline_freestanding_options [20:29:08] [PASSED] drm_test_cmdline_freestanding_force_e_and_options [20:29:08] [PASSED] drm_test_cmdline_panel_orientation [20:29:08] ================ drm_test_cmdline_invalid ================= [20:29:08] [PASSED] margin_only [20:29:08] [PASSED] interlace_only [20:29:08] [PASSED] res_missing_x [20:29:08] [PASSED] res_missing_y [20:29:08] [PASSED] res_bad_y [20:29:08] [PASSED] res_missing_y_bpp [20:29:08] [PASSED] res_bad_bpp [20:29:08] [PASSED] res_bad_refresh [20:29:08] [PASSED] res_bpp_refresh_force_on_off [20:29:08] [PASSED] res_invalid_mode [20:29:08] [PASSED] res_bpp_wrong_place_mode [20:29:08] [PASSED] name_bpp_refresh [20:29:08] [PASSED] name_refresh [20:29:08] [PASSED] name_refresh_wrong_mode [20:29:08] [PASSED] name_refresh_invalid_mode [20:29:08] [PASSED] rotate_multiple [20:29:08] [PASSED] rotate_invalid_val [20:29:08] [PASSED] rotate_truncated [20:29:08] [PASSED] invalid_option [20:29:08] [PASSED] invalid_tv_option [20:29:08] [PASSED] truncated_tv_option [20:29:08] ============ [PASSED] drm_test_cmdline_invalid ============= [20:29:08] =============== drm_test_cmdline_tv_options =============== [20:29:08] [PASSED] NTSC [20:29:08] [PASSED] NTSC_443 [20:29:08] [PASSED] NTSC_J [20:29:08] [PASSED] PAL [20:29:08] [PASSED] PAL_M [20:29:08] [PASSED] PAL_N [20:29:08] [PASSED] SECAM [20:29:08] [PASSED] MONO_525 [20:29:08] [PASSED] MONO_625 [20:29:08] =========== [PASSED] drm_test_cmdline_tv_options =========== [20:29:08] =============== [PASSED] drm_cmdline_parser ================ [20:29:08] ========== drmm_connector_hdmi_init (20 subtests) ========== [20:29:08] [PASSED] drm_test_connector_hdmi_init_valid [20:29:08] [PASSED] drm_test_connector_hdmi_init_bpc_8 [20:29:08] [PASSED] drm_test_connector_hdmi_init_bpc_10 [20:29:08] [PASSED] drm_test_connector_hdmi_init_bpc_12 [20:29:08] [PASSED] drm_test_connector_hdmi_init_bpc_invalid [20:29:08] [PASSED] drm_test_connector_hdmi_init_bpc_null [20:29:08] [PASSED] drm_test_connector_hdmi_init_formats_empty [20:29:08] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb [20:29:08] === drm_test_connector_hdmi_init_formats_yuv420_allowed === [20:29:08] [PASSED] supported_formats=0x9 yuv420_allowed=1 [20:29:08] [PASSED] supported_formats=0x9 yuv420_allowed=0 [20:29:08] [PASSED] supported_formats=0x3 yuv420_allowed=1 [20:29:08] [PASSED] supported_formats=0x3 yuv420_allowed=0 [20:29:08] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed === [20:29:08] [PASSED] drm_test_connector_hdmi_init_null_ddc [20:29:08] [PASSED] drm_test_connector_hdmi_init_null_product [20:29:08] [PASSED] drm_test_connector_hdmi_init_null_vendor [20:29:08] [PASSED] drm_test_connector_hdmi_init_product_length_exact [20:29:08] [PASSED] drm_test_connector_hdmi_init_product_length_too_long [20:29:08] [PASSED] drm_test_connector_hdmi_init_product_valid [20:29:08] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact [20:29:08] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long [20:29:08] [PASSED] drm_test_connector_hdmi_init_vendor_valid [20:29:08] ========= drm_test_connector_hdmi_init_type_valid ========= [20:29:08] [PASSED] HDMI-A [20:29:08] [PASSED] HDMI-B [20:29:08] ===== [PASSED] drm_test_connector_hdmi_init_type_valid ===== [20:29:08] ======== drm_test_connector_hdmi_init_type_invalid ======== [20:29:08] [PASSED] Unknown [20:29:08] [PASSED] VGA [20:29:08] [PASSED] DVI-I [20:29:08] [PASSED] DVI-D [20:29:08] [PASSED] DVI-A [20:29:08] [PASSED] Composite [20:29:08] [PASSED] SVIDEO [20:29:08] [PASSED] LVDS [20:29:08] [PASSED] Component [20:29:08] [PASSED] DIN [20:29:08] [PASSED] DP [20:29:08] [PASSED] TV [20:29:08] [PASSED] eDP [20:29:08] [PASSED] Virtual [20:29:08] [PASSED] DSI [20:29:08] [PASSED] DPI [20:29:08] [PASSED] Writeback [20:29:08] [PASSED] SPI [20:29:08] [PASSED] USB [20:29:08] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ==== [20:29:08] ============ [PASSED] drmm_connector_hdmi_init ============= [20:29:08] ============= drmm_connector_init (3 subtests) ============= [20:29:08] [PASSED] drm_test_drmm_connector_init [20:29:08] [PASSED] drm_test_drmm_connector_init_null_ddc [20:29:08] ========= drm_test_drmm_connector_init_type_valid ========= [20:29:08] [PASSED] Unknown [20:29:08] [PASSED] VGA [20:29:08] [PASSED] DVI-I [20:29:08] [PASSED] DVI-D [20:29:08] [PASSED] DVI-A [20:29:08] [PASSED] Composite [20:29:08] [PASSED] SVIDEO [20:29:08] [PASSED] LVDS [20:29:08] [PASSED] Component [20:29:08] [PASSED] DIN [20:29:08] [PASSED] DP [20:29:08] [PASSED] HDMI-A [20:29:08] [PASSED] HDMI-B [20:29:08] [PASSED] TV [20:29:08] [PASSED] eDP [20:29:08] [PASSED] Virtual [20:29:08] [PASSED] DSI [20:29:08] [PASSED] DPI [20:29:08] [PASSED] Writeback [20:29:08] [PASSED] SPI [20:29:08] [PASSED] USB [20:29:08] ===== [PASSED] drm_test_drmm_connector_init_type_valid ===== [20:29:08] =============== [PASSED] drmm_connector_init =============== [20:29:08] ========= drm_connector_dynamic_init (6 subtests) ========== [20:29:08] [PASSED] drm_test_drm_connector_dynamic_init [20:29:08] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc [20:29:08] [PASSED] drm_test_drm_connector_dynamic_init_not_added [20:29:08] [PASSED] drm_test_drm_connector_dynamic_init_properties [20:29:08] ===== drm_test_drm_connector_dynamic_init_type_valid ====== [20:29:08] [PASSED] Unknown [20:29:08] [PASSED] VGA [20:29:08] [PASSED] DVI-I [20:29:08] [PASSED] DVI-D [20:29:08] [PASSED] DVI-A [20:29:08] [PASSED] Composite [20:29:08] [PASSED] SVIDEO [20:29:08] [PASSED] LVDS [20:29:08] [PASSED] Component [20:29:08] [PASSED] DIN [20:29:08] [PASSED] DP [20:29:08] [PASSED] HDMI-A [20:29:08] [PASSED] HDMI-B [20:29:08] [PASSED] TV [20:29:08] [PASSED] eDP [20:29:08] [PASSED] Virtual [20:29:08] [PASSED] DSI [20:29:08] [PASSED] DPI [20:29:08] [PASSED] Writeback [20:29:08] [PASSED] SPI [20:29:08] [PASSED] USB [20:29:08] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid == [20:29:08] ======== drm_test_drm_connector_dynamic_init_name ========= [20:29:08] [PASSED] Unknown [20:29:08] [PASSED] VGA [20:29:08] [PASSED] DVI-I [20:29:08] [PASSED] DVI-D [20:29:08] [PASSED] DVI-A [20:29:08] [PASSED] Composite [20:29:08] [PASSED] SVIDEO [20:29:08] [PASSED] LVDS [20:29:08] [PASSED] Component [20:29:08] [PASSED] DIN [20:29:08] [PASSED] DP [20:29:08] [PASSED] HDMI-A [20:29:08] [PASSED] HDMI-B [20:29:08] [PASSED] TV [20:29:08] [PASSED] eDP [20:29:08] [PASSED] Virtual [20:29:08] [PASSED] DSI [20:29:08] [PASSED] DPI [20:29:08] [PASSED] Writeback [20:29:08] [PASSED] SPI [20:29:08] [PASSED] USB [20:29:08] ==== [PASSED] drm_test_drm_connector_dynamic_init_name ===== [20:29:08] =========== [PASSED] drm_connector_dynamic_init ============ [20:29:08] ==== drm_connector_dynamic_register_early (4 subtests) ===== [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_early_defer [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object [20:29:08] ====== [PASSED] drm_connector_dynamic_register_early ======= [20:29:08] ======= drm_connector_dynamic_register (7 subtests) ======== [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_on_list [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_no_defer [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_no_init [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_mode_object [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_sysfs [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name [20:29:08] [PASSED] drm_test_drm_connector_dynamic_register_debugfs [20:29:08] ========= [PASSED] drm_connector_dynamic_register ========== [20:29:08] = drm_connector_attach_broadcast_rgb_property (2 subtests) = [20:29:08] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property [20:29:08] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector [20:29:08] === [PASSED] drm_connector_attach_broadcast_rgb_property === [20:29:08] ========== drm_get_tv_mode_from_name (2 subtests) ========== [20:29:08] ========== drm_test_get_tv_mode_from_name_valid =========== [20:29:08] [PASSED] NTSC [20:29:08] [PASSED] NTSC-443 [20:29:08] [PASSED] NTSC-J [20:29:08] [PASSED] PAL [20:29:08] [PASSED] PAL-M [20:29:08] [PASSED] PAL-N [20:29:08] [PASSED] SECAM [20:29:08] [PASSED] Mono [20:29:08] ====== [PASSED] drm_test_get_tv_mode_from_name_valid ======= [20:29:08] [PASSED] drm_test_get_tv_mode_from_name_truncated [20:29:08] ============ [PASSED] drm_get_tv_mode_from_name ============ [20:29:08] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) = [20:29:08] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb [20:29:08] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc [20:29:08] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1 [20:29:08] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc [20:29:08] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1 [20:29:08] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double [20:29:08] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid = [20:29:08] [PASSED] VIC 96 [20:29:08] [PASSED] VIC 97 [20:29:08] [PASSED] VIC 101 [20:29:08] [PASSED] VIC 102 [20:29:08] [PASSED] VIC 106 [20:29:08] [PASSED] VIC 107 [20:29:08] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid === [20:29:08] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc [20:29:08] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc [20:29:08] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc [20:29:08] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc [20:29:08] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc [20:29:08] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ==== [20:29:08] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) == [20:29:08] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ==== [20:29:08] [PASSED] Automatic [20:29:08] [PASSED] Full [20:29:08] [PASSED] Limited 16:235 [20:29:08] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name === [20:29:08] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid [20:29:08] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ==== [20:29:08] == drm_hdmi_connector_get_output_format_name (2 subtests) == [20:29:08] === drm_test_drm_hdmi_connector_get_output_format_name ==== [20:29:08] [PASSED] RGB [20:29:08] [PASSED] YUV 4:2:0 [20:29:08] [PASSED] YUV 4:2:2 [20:29:08] [PASSED] YUV 4:4:4 [20:29:08] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name === [20:29:08] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid [20:29:08] ==== [PASSED] drm_hdmi_connector_get_output_format_name ==== [20:29:08] ============= drm_damage_helper (21 subtests) ============== [20:29:08] [PASSED] drm_test_damage_iter_no_damage [20:29:08] [PASSED] drm_test_damage_iter_no_damage_fractional_src [20:29:08] [PASSED] drm_test_damage_iter_no_damage_src_moved [20:29:08] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved [20:29:08] [PASSED] drm_test_damage_iter_no_damage_not_visible [20:29:08] [PASSED] drm_test_damage_iter_no_damage_no_crtc [20:29:08] [PASSED] drm_test_damage_iter_no_damage_no_fb [20:29:08] [PASSED] drm_test_damage_iter_simple_damage [20:29:08] [PASSED] drm_test_damage_iter_single_damage [20:29:08] [PASSED] drm_test_damage_iter_single_damage_intersect_src [20:29:08] [PASSED] drm_test_damage_iter_single_damage_outside_src [20:29:08] [PASSED] drm_test_damage_iter_single_damage_fractional_src [20:29:08] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src [20:29:08] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src [20:29:08] [PASSED] drm_test_damage_iter_single_damage_src_moved [20:29:08] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved [20:29:08] [PASSED] drm_test_damage_iter_damage [20:29:08] [PASSED] drm_test_damage_iter_damage_one_intersect [20:29:08] [PASSED] drm_test_damage_iter_damage_one_outside [20:29:08] [PASSED] drm_test_damage_iter_damage_src_moved [20:29:08] [PASSED] drm_test_damage_iter_damage_not_visible [20:29:08] ================ [PASSED] drm_damage_helper ================ [20:29:08] ============== drm_dp_mst_helper (3 subtests) ============== [20:29:08] ============== drm_test_dp_mst_calc_pbn_mode ============== [20:29:08] [PASSED] Clock 154000 BPP 30 DSC disabled [20:29:08] [PASSED] Clock 234000 BPP 30 DSC disabled [20:29:08] [PASSED] Clock 297000 BPP 24 DSC disabled [20:29:08] [PASSED] Clock 332880 BPP 24 DSC enabled [20:29:08] [PASSED] Clock 324540 BPP 24 DSC enabled [20:29:08] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ========== [20:29:08] ============== drm_test_dp_mst_calc_pbn_div =============== [20:29:08] [PASSED] Link rate 2000000 lane count 4 [20:29:08] [PASSED] Link rate 2000000 lane count 2 [20:29:08] [PASSED] Link rate 2000000 lane count 1 [20:29:08] [PASSED] Link rate 1350000 lane count 4 [20:29:08] [PASSED] Link rate 1350000 lane count 2 [20:29:08] [PASSED] Link rate 1350000 lane count 1 [20:29:08] [PASSED] Link rate 1000000 lane count 4 [20:29:08] [PASSED] Link rate 1000000 lane count 2 [20:29:08] [PASSED] Link rate 1000000 lane count 1 [20:29:08] [PASSED] Link rate 810000 lane count 4 [20:29:08] [PASSED] Link rate 810000 lane count 2 [20:29:08] [PASSED] Link rate 810000 lane count 1 [20:29:08] [PASSED] Link rate 540000 lane count 4 [20:29:08] [PASSED] Link rate 540000 lane count 2 [20:29:08] [PASSED] Link rate 540000 lane count 1 [20:29:08] [PASSED] Link rate 270000 lane count 4 [20:29:08] [PASSED] Link rate 270000 lane count 2 [20:29:08] [PASSED] Link rate 270000 lane count 1 [20:29:08] [PASSED] Link rate 162000 lane count 4 [20:29:08] [PASSED] Link rate 162000 lane count 2 [20:29:08] [PASSED] Link rate 162000 lane count 1 [20:29:08] ========== [PASSED] drm_test_dp_mst_calc_pbn_div =========== [20:29:08] ========= drm_test_dp_mst_sideband_msg_req_decode ========= [20:29:08] [PASSED] DP_ENUM_PATH_RESOURCES with port number [20:29:08] [PASSED] DP_POWER_UP_PHY with port number [20:29:08] [PASSED] DP_POWER_DOWN_PHY with port number [20:29:08] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks [20:29:08] [PASSED] DP_ALLOCATE_PAYLOAD with port number [20:29:08] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI [20:29:08] [PASSED] DP_ALLOCATE_PAYLOAD with PBN [20:29:08] [PASSED] DP_QUERY_PAYLOAD with port number [20:29:08] [PASSED] DP_QUERY_PAYLOAD with VCPI [20:29:08] [PASSED] DP_REMOTE_DPCD_READ with port number [20:29:08] [PASSED] DP_REMOTE_DPCD_READ with DPCD address [20:29:08] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes [20:29:08] [PASSED] DP_REMOTE_DPCD_WRITE with port number [20:29:08] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address [20:29:08] [PASSED] DP_REMOTE_DPCD_WRITE with data array [20:29:08] [PASSED] DP_REMOTE_I2C_READ with port number [20:29:08] [PASSED] DP_REMOTE_I2C_READ with I2C device ID [20:29:08] [PASSED] DP_REMOTE_I2C_READ with transactions array [20:29:08] [PASSED] DP_REMOTE_I2C_WRITE with port number [20:29:08] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID [20:29:08] [PASSED] DP_REMOTE_I2C_WRITE with data array [20:29:08] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID [20:29:08] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID [20:29:08] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event [20:29:08] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event [20:29:08] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior [20:29:08] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior [20:29:08] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode ===== [20:29:08] ================ [PASSED] drm_dp_mst_helper ================ [20:29:08] ================== drm_exec (7 subtests) =================== [20:29:08] [PASSED] sanitycheck [20:29:08] [PASSED] test_lock [20:29:08] [PASSED] test_lock_unlock [20:29:08] [PASSED] test_duplicates [20:29:08] [PASSED] test_prepare [20:29:08] [PASSED] test_prepare_array [20:29:08] [PASSED] test_multiple_loops [20:29:08] ==================== [PASSED] drm_exec ===================== [20:29:08] =========== drm_format_helper_test (17 subtests) =========== [20:29:08] ============== drm_test_fb_xrgb8888_to_gray8 ============== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ========== [20:29:08] ============= drm_test_fb_xrgb8888_to_rgb332 ============== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ========== [20:29:08] ============= drm_test_fb_xrgb8888_to_rgb565 ============== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ========== [20:29:08] ============ drm_test_fb_xrgb8888_to_xrgb1555 ============= [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 ========= [20:29:08] ============ drm_test_fb_xrgb8888_to_argb1555 ============= [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 ========= [20:29:08] ============ drm_test_fb_xrgb8888_to_rgba5551 ============= [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 ========= [20:29:08] ============= drm_test_fb_xrgb8888_to_rgb888 ============== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ========== [20:29:08] ============= drm_test_fb_xrgb8888_to_bgr888 ============== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ========== [20:29:08] ============ drm_test_fb_xrgb8888_to_argb8888 ============= [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 ========= [20:29:08] =========== drm_test_fb_xrgb8888_to_xrgb2101010 =========== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 ======= [20:29:08] =========== drm_test_fb_xrgb8888_to_argb2101010 =========== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 ======= [20:29:08] ============== drm_test_fb_xrgb8888_to_mono =============== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ========== [PASSED] drm_test_fb_xrgb8888_to_mono =========== [20:29:08] ==================== drm_test_fb_swab ===================== [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ================ [PASSED] drm_test_fb_swab ================= [20:29:08] ============ drm_test_fb_xrgb8888_to_xbgr8888 ============= [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 ========= [20:29:08] ============ drm_test_fb_xrgb8888_to_abgr8888 ============= [20:29:08] [PASSED] single_pixel_source_buffer [20:29:08] [PASSED] single_pixel_clip_rectangle [20:29:08] [PASSED] well_known_colors [20:29:08] [PASSED] destination_pitch [20:29:08] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 ========= [20:29:08] ================= drm_test_fb_clip_offset ================= [20:29:08] [PASSED] pass through [20:29:08] [PASSED] horizontal offset [20:29:08] [PASSED] vertical offset [20:29:08] [PASSED] horizontal and vertical offset [20:29:08] [PASSED] horizontal offset (custom pitch) [20:29:08] [PASSED] vertical offset (custom pitch) [20:29:08] [PASSED] horizontal and vertical offset (custom pitch) [20:29:08] ============= [PASSED] drm_test_fb_clip_offset ============= [20:29:08] =================== drm_test_fb_memcpy ==================== [20:29:08] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258) [20:29:08] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258) [20:29:08] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559) [20:29:08] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258) [20:29:08] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258) [20:29:08] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559) [20:29:08] [PASSED] well_known_colors: XB24 little-endian (0x34324258) [20:29:08] [PASSED] well_known_colors: XRA8 little-endian (0x38415258) [20:29:08] [PASSED] well_known_colors: YU24 little-endian (0x34325559) [20:29:08] [PASSED] destination_pitch: XB24 little-endian (0x34324258) [20:29:08] [PASSED] destination_pitch: XRA8 little-endian (0x38415258) [20:29:08] [PASSED] destination_pitch: YU24 little-endian (0x34325559) [20:29:08] =============== [PASSED] drm_test_fb_memcpy ================ [20:29:08] ============= [PASSED] drm_format_helper_test ============== [20:29:08] ================= drm_format (18 subtests) ================= [20:29:08] [PASSED] drm_test_format_block_width_invalid [20:29:08] [PASSED] drm_test_format_block_width_one_plane [20:29:08] [PASSED] drm_test_format_block_width_two_plane [20:29:08] [PASSED] drm_test_format_block_width_three_plane [20:29:08] [PASSED] drm_test_format_block_width_tiled [20:29:08] [PASSED] drm_test_format_block_height_invalid [20:29:08] [PASSED] drm_test_format_block_height_one_plane [20:29:08] [PASSED] drm_test_format_block_height_two_plane [20:29:08] [PASSED] drm_test_format_block_height_three_plane [20:29:08] [PASSED] drm_test_format_block_height_tiled [20:29:08] [PASSED] drm_test_format_min_pitch_invalid [20:29:08] [PASSED] drm_test_format_min_pitch_one_plane_8bpp [20:29:08] [PASSED] drm_test_format_min_pitch_one_plane_16bpp [20:29:08] [PASSED] drm_test_format_min_pitch_one_plane_24bpp [20:29:08] [PASSED] drm_test_format_min_pitch_one_plane_32bpp [20:29:08] [PASSED] drm_test_format_min_pitch_two_plane [20:29:08] [PASSED] drm_test_format_min_pitch_three_plane_8bpp [20:29:08] [PASSED] drm_test_format_min_pitch_tiled [20:29:08] =================== [PASSED] drm_format ==================== [20:29:08] ============== drm_framebuffer (10 subtests) =============== [20:29:08] ========== drm_test_framebuffer_check_src_coords ========== [20:29:08] [PASSED] Success: source fits into fb [20:29:08] [PASSED] Fail: overflowing fb with x-axis coordinate [20:29:08] [PASSED] Fail: overflowing fb with y-axis coordinate [20:29:08] [PASSED] Fail: overflowing fb with source width [20:29:08] [PASSED] Fail: overflowing fb with source height [20:29:08] ====== [PASSED] drm_test_framebuffer_check_src_coords ====== [20:29:08] [PASSED] drm_test_framebuffer_cleanup [20:29:08] =============== drm_test_framebuffer_create =============== [20:29:08] [PASSED] ABGR8888 normal sizes [20:29:08] [PASSED] ABGR8888 max sizes [20:29:08] [PASSED] ABGR8888 pitch greater than min required [20:29:08] [PASSED] ABGR8888 pitch less than min required [20:29:08] [PASSED] ABGR8888 Invalid width [20:29:08] [PASSED] ABGR8888 Invalid buffer handle [20:29:08] [PASSED] No pixel format [20:29:08] [PASSED] ABGR8888 Width 0 [20:29:08] [PASSED] ABGR8888 Height 0 [20:29:08] [PASSED] ABGR8888 Out of bound height * pitch combination [20:29:08] [PASSED] ABGR8888 Large buffer offset [20:29:08] [PASSED] ABGR8888 Buffer offset for inexistent plane [20:29:08] [PASSED] ABGR8888 Invalid flag [20:29:08] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers [20:29:08] [PASSED] ABGR8888 Valid buffer modifier [20:29:08] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE) [20:29:08] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS [20:29:08] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS [20:29:08] [PASSED] NV12 Normal sizes [20:29:08] [PASSED] NV12 Max sizes [20:29:08] [PASSED] NV12 Invalid pitch [20:29:08] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag [20:29:08] [PASSED] NV12 different modifier per-plane [20:29:08] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE [20:29:08] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS [20:29:08] [PASSED] NV12 Modifier for inexistent plane [20:29:08] [PASSED] NV12 Handle for inexistent plane [20:29:08] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS [20:29:08] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier [20:29:08] [PASSED] YVU420 Normal sizes [20:29:08] [PASSED] YVU420 Max sizes [20:29:08] [PASSED] YVU420 Invalid pitch [20:29:08] [PASSED] YVU420 Different pitches [20:29:08] [PASSED] YVU420 Different buffer offsets/pitches [20:29:08] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS [20:29:08] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS [20:29:08] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS [20:29:08] [PASSED] YVU420 Valid modifier [20:29:08] [PASSED] YVU420 Different modifiers per plane [20:29:08] [PASSED] YVU420 Modifier for inexistent plane [20:29:08] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR) [20:29:08] [PASSED] X0L2 Normal sizes [20:29:08] [PASSED] X0L2 Max sizes [20:29:08] [PASSED] X0L2 Invalid pitch [20:29:08] [PASSED] X0L2 Pitch greater than minimum required [20:29:08] [PASSED] X0L2 Handle for inexistent plane [20:29:08] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set [20:29:08] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set [20:29:08] [PASSED] X0L2 Valid modifier [20:29:08] [PASSED] X0L2 Modifier for inexistent plane [20:29:08] =========== [PASSED] drm_test_framebuffer_create =========== [20:29:08] [PASSED] drm_test_framebuffer_free [20:29:08] [PASSED] drm_test_framebuffer_init [20:29:08] [PASSED] drm_test_framebuffer_init_bad_format [20:29:08] [PASSED] drm_test_framebuffer_init_dev_mismatch [20:29:08] [PASSED] drm_test_framebuffer_lookup [20:29:08] [PASSED] drm_test_framebuffer_lookup_inexistent [20:29:08] [PASSED] drm_test_framebuffer_modifiers_not_supported [20:29:08] ================= [PASSED] drm_framebuffer ================= [20:29:08] ================ drm_gem_shmem (8 subtests) ================ [20:29:08] [PASSED] drm_gem_shmem_test_obj_create [20:29:08] [PASSED] drm_gem_shmem_test_obj_create_private [20:29:08] [PASSED] drm_gem_shmem_test_pin_pages [20:29:08] [PASSED] drm_gem_shmem_test_vmap [20:29:08] [PASSED] drm_gem_shmem_test_get_pages_sgt [20:29:08] [PASSED] drm_gem_shmem_test_get_sg_table [20:29:08] [PASSED] drm_gem_shmem_test_madvise [20:29:08] [PASSED] drm_gem_shmem_test_purge [20:29:08] ================== [PASSED] drm_gem_shmem ================== [20:29:08] === drm_atomic_helper_connector_hdmi_check (27 subtests) === [20:29:08] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode [20:29:08] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1 [20:29:08] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode [20:29:08] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1 [20:29:08] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode [20:29:08] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1 [20:29:08] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 ======= [20:29:08] [PASSED] Automatic [20:29:08] [PASSED] Full [20:29:08] [PASSED] Limited 16:235 [20:29:08] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 === [20:29:08] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed [20:29:08] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed [20:29:08] [PASSED] drm_test_check_disable_connector [20:29:08] [PASSED] drm_test_check_hdmi_funcs_reject_rate [20:29:08] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb [20:29:08] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420 [20:29:08] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422 [20:29:08] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420 [20:29:08] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420 [20:29:08] [PASSED] drm_test_check_output_bpc_crtc_mode_changed [20:29:08] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed [20:29:08] [PASSED] drm_test_check_output_bpc_dvi [20:29:08] [PASSED] drm_test_check_output_bpc_format_vic_1 [20:29:08] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only [20:29:08] [PASSED] drm_test_check_output_bpc_format_display_rgb_only [20:29:08] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only [20:29:08] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only [20:29:08] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc [20:29:08] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc [20:29:08] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc [20:29:08] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ====== [20:29:08] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ==== [20:29:08] [PASSED] drm_test_check_broadcast_rgb_value [20:29:08] [PASSED] drm_test_check_bpc_8_value [20:29:08] [PASSED] drm_test_check_bpc_10_value [20:29:08] [PASSED] drm_test_check_bpc_12_value [20:29:08] [PASSED] drm_test_check_format_value [20:29:08] [PASSED] drm_test_check_tmds_char_value [20:29:08] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ====== [20:29:08] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) = [20:29:08] [PASSED] drm_test_check_mode_valid [20:29:08] [PASSED] drm_test_check_mode_valid_reject [20:29:08] [PASSED] drm_test_check_mode_valid_reject_rate [20:29:08] [PASSED] drm_test_check_mode_valid_reject_max_clock [20:29:08] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid === [20:29:08] ================= drm_managed (2 subtests) ================= [20:29:08] [PASSED] drm_test_managed_release_action [20:29:08] [PASSED] drm_test_managed_run_action [20:29:08] =================== [PASSED] drm_managed =================== [20:29:08] =================== drm_mm (6 subtests) ==================== [20:29:08] [PASSED] drm_test_mm_init [20:29:08] [PASSED] drm_test_mm_debug [20:29:08] [PASSED] drm_test_mm_align32 [20:29:08] [PASSED] drm_test_mm_align64 [20:29:08] [PASSED] drm_test_mm_lowest [20:29:08] [PASSED] drm_test_mm_highest [20:29:08] ===================== [PASSED] drm_mm ====================== [20:29:08] ============= drm_modes_analog_tv (5 subtests) ============= [20:29:08] [PASSED] drm_test_modes_analog_tv_mono_576i [20:29:08] [PASSED] drm_test_modes_analog_tv_ntsc_480i [20:29:08] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined [20:29:08] [PASSED] drm_test_modes_analog_tv_pal_576i [20:29:08] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined [20:29:08] =============== [PASSED] drm_modes_analog_tv =============== [20:29:08] ============== drm_plane_helper (2 subtests) =============== [20:29:08] =============== drm_test_check_plane_state ================ [20:29:08] [PASSED] clipping_simple [20:29:08] [PASSED] clipping_rotate_reflect [20:29:08] [PASSED] positioning_simple [20:29:08] [PASSED] upscaling [20:29:08] [PASSED] downscaling [20:29:08] [PASSED] rounding1 [20:29:08] [PASSED] rounding2 [20:29:08] [PASSED] rounding3 [20:29:08] [PASSED] rounding4 [20:29:08] =========== [PASSED] drm_test_check_plane_state ============ [20:29:08] =========== drm_test_check_invalid_plane_state ============ [20:29:08] [PASSED] positioning_invalid [20:29:08] [PASSED] upscaling_invalid [20:29:08] [PASSED] downscaling_invalid [20:29:08] ======= [PASSED] drm_test_check_invalid_plane_state ======== [20:29:08] ================ [PASSED] drm_plane_helper ================= [20:29:08] ====== drm_connector_helper_tv_get_modes (1 subtest) ======= [20:29:08] ====== drm_test_connector_helper_tv_get_modes_check ======= [20:29:08] [PASSED] None [20:29:08] [PASSED] PAL [20:29:08] [PASSED] NTSC [20:29:08] [PASSED] Both, NTSC Default [20:29:08] [PASSED] Both, PAL Default [20:29:08] [PASSED] Both, NTSC Default, with PAL on command-line [20:29:08] [PASSED] Both, PAL Default, with NTSC on command-line [20:29:08] == [PASSED] drm_test_connector_helper_tv_get_modes_check === [20:29:08] ======== [PASSED] drm_connector_helper_tv_get_modes ======== [20:29:08] ================== drm_rect (9 subtests) =================== [20:29:08] [PASSED] drm_test_rect_clip_scaled_div_by_zero [20:29:08] [PASSED] drm_test_rect_clip_scaled_not_clipped [20:29:08] [PASSED] drm_test_rect_clip_scaled_clipped [20:29:08] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned [20:29:08] ================= drm_test_rect_intersect ================= [20:29:08] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0 [20:29:08] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1 [20:29:08] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0 [20:29:08] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1 [20:29:08] [PASSED] right x left: 2x1+0+0 x 3x1+1+0 [20:29:08] [PASSED] left x right: 3x1+1+0 x 2x1+0+0 [20:29:08] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1 [20:29:08] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0 [20:29:08] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1 [20:29:08] [PASSED] touching side: 1x1+0+0 x 1x1+1+0 [20:29:08] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0 [20:29:08] [PASSED] inside another: 2x2+0+0 x 1x1+1+1 [20:29:08] [PASSED] far away: 1x1+0+0 x 1x1+3+6 [20:29:08] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10 [20:29:08] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10 [20:29:08] ============= [PASSED] drm_test_rect_intersect ============= [20:29:08] ================ drm_test_rect_calc_hscale ================ [20:29:08] [PASSED] normal use [20:29:08] [PASSED] out of max range [20:29:08] [PASSED] out of min range [20:29:08] [PASSED] zero dst [20:29:08] [PASSED] negative src [20:29:08] [PASSED] negative dst [20:29:08] ============ [PASSED] drm_test_rect_calc_hscale ============ [20:29:08] ================ drm_test_rect_calc_vscale ================ [20:29:08] [PASSED] normal use stty: 'standard input': Inappropriate ioctl for device [20:29:08] [PASSED] out of max range [20:29:08] [PASSED] out of min range [20:29:08] [PASSED] zero dst [20:29:08] [PASSED] negative src [20:29:08] [PASSED] negative dst [20:29:08] ============ [PASSED] drm_test_rect_calc_vscale ============ [20:29:08] ================== drm_test_rect_rotate =================== [20:29:08] [PASSED] reflect-x [20:29:08] [PASSED] reflect-y [20:29:08] [PASSED] rotate-0 [20:29:08] [PASSED] rotate-90 [20:29:08] [PASSED] rotate-180 [20:29:08] [PASSED] rotate-270 [20:29:08] ============== [PASSED] drm_test_rect_rotate =============== [20:29:08] ================ drm_test_rect_rotate_inv ================= [20:29:08] [PASSED] reflect-x [20:29:08] [PASSED] reflect-y [20:29:08] [PASSED] rotate-0 [20:29:08] [PASSED] rotate-90 [20:29:08] [PASSED] rotate-180 [20:29:08] [PASSED] rotate-270 [20:29:08] ============ [PASSED] drm_test_rect_rotate_inv ============= [20:29:08] ==================== [PASSED] drm_rect ===================== [20:29:08] ============ drm_sysfb_modeset_test (1 subtest) ============ [20:29:08] ============ drm_test_sysfb_build_fourcc_list ============= [20:29:08] [PASSED] no native formats [20:29:08] [PASSED] XRGB8888 as native format [20:29:08] [PASSED] remove duplicates [20:29:08] [PASSED] convert alpha formats [20:29:08] [PASSED] random formats [20:29:08] ======== [PASSED] drm_test_sysfb_build_fourcc_list ========= [20:29:08] ============= [PASSED] drm_sysfb_modeset_test ============== [20:29:08] ================== drm_fixp (2 subtests) =================== [20:29:08] [PASSED] drm_test_int2fixp [20:29:08] [PASSED] drm_test_sm2fixp [20:29:08] ==================== [PASSED] drm_fixp ===================== [20:29:08] ============================================================ [20:29:08] Testing complete. Ran 624 tests: passed: 624 [20:29:08] Elapsed time: 27.647s total, 1.728s configuring, 25.497s building, 0.404s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig [20:29:08] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig [20:29:09] Building KUnit Kernel ... Populating config with: $ make ARCH=um O=.kunit olddefconfig Building with: $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48 [20:29:19] Starting KUnit Kernel (1/1)... [20:29:19] ============================================================ Running tests with: $ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt [20:29:19] ================= ttm_device (5 subtests) ================== [20:29:19] [PASSED] ttm_device_init_basic [20:29:19] [PASSED] ttm_device_init_multiple [20:29:19] [PASSED] ttm_device_fini_basic [20:29:19] [PASSED] ttm_device_init_no_vma_man [20:29:19] ================== ttm_device_init_pools ================== [20:29:19] [PASSED] No DMA allocations, no DMA32 required [20:29:19] [PASSED] DMA allocations, DMA32 required [20:29:19] [PASSED] No DMA allocations, DMA32 required [20:29:19] [PASSED] DMA allocations, no DMA32 required [20:29:19] ============== [PASSED] ttm_device_init_pools ============== [20:29:19] =================== [PASSED] ttm_device ==================== [20:29:19] ================== ttm_pool (8 subtests) =================== [20:29:19] ================== ttm_pool_alloc_basic =================== [20:29:19] [PASSED] One page [20:29:19] [PASSED] More than one page [20:29:19] [PASSED] Above the allocation limit [20:29:19] [PASSED] One page, with coherent DMA mappings enabled [20:29:19] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [20:29:19] ============== [PASSED] ttm_pool_alloc_basic =============== [20:29:19] ============== ttm_pool_alloc_basic_dma_addr ============== [20:29:19] [PASSED] One page [20:29:19] [PASSED] More than one page [20:29:19] [PASSED] Above the allocation limit [20:29:19] [PASSED] One page, with coherent DMA mappings enabled [20:29:19] [PASSED] Above the allocation limit, with coherent DMA mappings enabled [20:29:19] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ========== [20:29:19] [PASSED] ttm_pool_alloc_order_caching_match [20:29:19] [PASSED] ttm_pool_alloc_caching_mismatch [20:29:19] [PASSED] ttm_pool_alloc_order_mismatch [20:29:19] [PASSED] ttm_pool_free_dma_alloc [20:29:19] [PASSED] ttm_pool_free_no_dma_alloc [20:29:19] [PASSED] ttm_pool_fini_basic [20:29:19] ==================== [PASSED] ttm_pool ===================== [20:29:19] ================ ttm_resource (8 subtests) ================= [20:29:19] ================= ttm_resource_init_basic ================= [20:29:19] [PASSED] Init resource in TTM_PL_SYSTEM [20:29:19] [PASSED] Init resource in TTM_PL_VRAM [20:29:19] [PASSED] Init resource in a private placement [20:29:19] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags [20:29:19] ============= [PASSED] ttm_resource_init_basic ============= [20:29:19] [PASSED] ttm_resource_init_pinned [20:29:19] [PASSED] ttm_resource_fini_basic [20:29:19] [PASSED] ttm_resource_manager_init_basic [20:29:19] [PASSED] ttm_resource_manager_usage_basic [20:29:19] [PASSED] ttm_resource_manager_set_used_basic [20:29:19] [PASSED] ttm_sys_man_alloc_basic [20:29:19] [PASSED] ttm_sys_man_free_basic [20:29:19] ================== [PASSED] ttm_resource =================== [20:29:19] =================== ttm_tt (15 subtests) =================== [20:29:19] ==================== ttm_tt_init_basic ==================== [20:29:19] [PASSED] Page-aligned size [20:29:19] [PASSED] Extra pages requested [20:29:19] ================ [PASSED] ttm_tt_init_basic ================ [20:29:19] [PASSED] ttm_tt_init_misaligned [20:29:19] [PASSED] ttm_tt_fini_basic [20:29:19] [PASSED] ttm_tt_fini_sg [20:29:19] [PASSED] ttm_tt_fini_shmem [20:29:19] [PASSED] ttm_tt_create_basic [20:29:19] [PASSED] ttm_tt_create_invalid_bo_type [20:29:19] [PASSED] ttm_tt_create_ttm_exists [20:29:19] [PASSED] ttm_tt_create_failed [20:29:19] [PASSED] ttm_tt_destroy_basic [20:29:19] [PASSED] ttm_tt_populate_null_ttm [20:29:19] [PASSED] ttm_tt_populate_populated_ttm [20:29:19] [PASSED] ttm_tt_unpopulate_basic [20:29:19] [PASSED] ttm_tt_unpopulate_empty_ttm [20:29:19] [PASSED] ttm_tt_swapin_basic [20:29:19] ===================== [PASSED] ttm_tt ====================== [20:29:19] =================== ttm_bo (14 subtests) =================== [20:29:19] =========== ttm_bo_reserve_optimistic_no_ticket =========== [20:29:19] [PASSED] Cannot be interrupted and sleeps [20:29:19] [PASSED] Cannot be interrupted, locks straight away [20:29:19] [PASSED] Can be interrupted, sleeps [20:29:19] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket ======= [20:29:19] [PASSED] ttm_bo_reserve_locked_no_sleep [20:29:19] [PASSED] ttm_bo_reserve_no_wait_ticket [20:29:19] [PASSED] ttm_bo_reserve_double_resv [20:29:19] [PASSED] ttm_bo_reserve_interrupted [20:29:19] [PASSED] ttm_bo_reserve_deadlock [20:29:19] [PASSED] ttm_bo_unreserve_basic [20:29:19] [PASSED] ttm_bo_unreserve_pinned [20:29:19] [PASSED] ttm_bo_unreserve_bulk [20:29:19] [PASSED] ttm_bo_fini_basic [20:29:19] [PASSED] ttm_bo_fini_shared_resv [20:29:19] [PASSED] ttm_bo_pin_basic [20:29:19] [PASSED] ttm_bo_pin_unpin_resource [20:29:19] [PASSED] ttm_bo_multiple_pin_one_unpin [20:29:19] ===================== [PASSED] ttm_bo ====================== [20:29:19] ============== ttm_bo_validate (21 subtests) =============== [20:29:19] ============== ttm_bo_init_reserved_sys_man =============== [20:29:19] [PASSED] Buffer object for userspace [20:29:19] [PASSED] Kernel buffer object [20:29:19] [PASSED] Shared buffer object [20:29:19] ========== [PASSED] ttm_bo_init_reserved_sys_man =========== [20:29:19] ============== ttm_bo_init_reserved_mock_man ============== [20:29:19] [PASSED] Buffer object for userspace [20:29:19] [PASSED] Kernel buffer object [20:29:19] [PASSED] Shared buffer object [20:29:19] ========== [PASSED] ttm_bo_init_reserved_mock_man ========== [20:29:19] [PASSED] ttm_bo_init_reserved_resv [20:29:19] ================== ttm_bo_validate_basic ================== [20:29:19] [PASSED] Buffer object for userspace [20:29:19] [PASSED] Kernel buffer object [20:29:19] [PASSED] Shared buffer object [20:29:19] ============== [PASSED] ttm_bo_validate_basic ============== [20:29:19] [PASSED] ttm_bo_validate_invalid_placement [20:29:19] ============= ttm_bo_validate_same_placement ============== [20:29:19] [PASSED] System manager [20:29:19] [PASSED] VRAM manager [20:29:19] ========= [PASSED] ttm_bo_validate_same_placement ========== [20:29:19] [PASSED] ttm_bo_validate_failed_alloc [20:29:19] [PASSED] ttm_bo_validate_pinned [20:29:19] [PASSED] ttm_bo_validate_busy_placement [20:29:19] ================ ttm_bo_validate_multihop ================= [20:29:19] [PASSED] Buffer object for userspace [20:29:19] [PASSED] Kernel buffer object [20:29:19] [PASSED] Shared buffer object [20:29:19] ============ [PASSED] ttm_bo_validate_multihop ============= [20:29:19] ========== ttm_bo_validate_no_placement_signaled ========== [20:29:19] [PASSED] Buffer object in system domain, no page vector [20:29:19] [PASSED] Buffer object in system domain with an existing page vector [20:29:19] ====== [PASSED] ttm_bo_validate_no_placement_signaled ====== [20:29:19] ======== ttm_bo_validate_no_placement_not_signaled ======== [20:29:19] [PASSED] Buffer object for userspace [20:29:19] [PASSED] Kernel buffer object [20:29:19] [PASSED] Shared buffer object [20:29:19] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ==== [20:29:19] [PASSED] ttm_bo_validate_move_fence_signaled [20:29:19] ========= ttm_bo_validate_move_fence_not_signaled ========= [20:29:19] [PASSED] Waits for GPU [20:29:19] [PASSED] Tries to lock straight away [20:29:19] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled ===== [20:29:19] [PASSED] ttm_bo_validate_happy_evict [20:29:19] [PASSED] ttm_bo_validate_all_pinned_evict [20:29:19] [PASSED] ttm_bo_validate_allowed_only_evict [20:29:19] [PASSED] ttm_bo_validate_deleted_evict [20:29:19] [PASSED] ttm_bo_validate_busy_domain_evict [20:29:19] [PASSED] ttm_bo_validate_evict_gutting [20:29:19] [PASSED] ttm_bo_validate_recrusive_evict stty: 'standard input': Inappropriate ioctl for device [20:29:19] ================= [PASSED] ttm_bo_validate ================= [20:29:19] ============================================================ [20:29:19] Testing complete. Ran 101 tests: passed: 101 [20:29:19] Elapsed time: 11.317s total, 1.619s configuring, 9.481s building, 0.186s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✗ CI.checksparse: warning for drm/i915/dp: Clean up link BW/DSC slice config computation
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915/dp: Clean up link BW/DSC slice config computation
URL : https://patchwork.freedesktop.org/series/158181/
State : warning
== Summary ==
+ trap cleanup EXIT
+ KERNEL=/kernel
+ MT=/root/linux/maintainer-tools
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools /root/linux/maintainer-tools Cloning into '/root/linux/maintainer-tools'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ make -C /root/linux/maintainer-tools
make: Entering directory '/root/linux/maintainer-tools'
cc -O2 -g -Wextra -o remap-log remap-log.c
make: Leaving directory '/root/linux/maintainer-tools'
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ /root/linux/maintainer-tools/dim sparse --fast d858d76d3596e85f00b062a894e38e7fda3d9916 Sparse version: 0.6.4 (Ubuntu: 0.6.4-4ubuntu3)
Fast mode used, each commit won't be checked separately.
-+drivers/gpu/drm/i915/display/intel_alpm.c: note: in included file:+drivers/gpu/drm/i915/display/intel_casf.c:147:21: error: too long token expansion +drivers/gpu/drm/i915/display/intel_cdclk.c: note: in included file:+drivers/gpu/drm/i915/display/intel_ddi.c: note: in included file:+drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2075:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2088:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2088:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_display_types.h:2088:24: warning: unreplaced symbol '<noident>' +drivers/gpu/drm/i915/display/intel_hdcp.c: note: in included file:+drivers/gpu/drm/i915/display/intel_hotplug.c: note: in included file:+drivers/gpu/drm/i915/display/intel_lt_phy.c:1935:35: warning: Using plain integer as NULL pointer +drivers/gpu/drm/i915/display/intel_pps.c: note: in included file:+drivers/gpu/drm/i915/display/intel_psr.c: note: in included file:
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
Patchwork
CI✓ Xe.CI.BAT: success for drm/i915/dp: Clean up link BW/DSC slice config computation
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915/dp: Clean up link BW/DSC slice config computation
URL : https://patchwork.freedesktop.org/series/158181/
State : success
== Summary ==
CI Bug Log - changes from xe-4158-d858d76d3596e85f00b062a894e38e7fda3d9916_BAT -> xe-pw-158181v1_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (12 -> 12)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* Linux: xe-4158-d858d76d3596e85f00b062a894e38e7fda3d9916 -> xe-pw-158181v1
IGT_8642: fa854cbfe25f3d64ad02bfd3f7804b5d7ccda71d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-4158-d858d76d3596e85f00b062a894e38e7fda3d9916: d858d76d3596e85f00b062a894e38e7fda3d9916
xe-pw-158181v1: 158181v1
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-158181v1/index.html