Add DSC fractional bpp support
cover Add DSC fractional bpp support
This patch series adds support for DSC fractional compressed bpp for MTL+. The series starts with some fixes, followed by patches that lay groundwork to iterate over valid compressed bpps to select the 'best' compressed bpp with optimal link configuration (taken from upstream series: https://patchwork.freedesktop.org/series/105200/).
The later patches, add changes to accommodate compressed bpp with fractional part, including changes to QP calculations.
To get the 'best' compressed bpp, we iterate over the valid compressed bpp values, but with fractional step size 1/16, 1/8, 1/4 or 1/2 as per sink support.
The last 2 patches add support to depict DSC sink's fractional support, and debugfs to enforce use of fractional bpp, while choosing an appropriate compressed bpp.
Ankit Nautiyal (5):
drm/display/dp: Add helper function to get DSC bpp prescision drm/i915/display: Store compressed bpp in U6.4 format drm/i915/display: Consider fractional vdsc bpp while computing m_n
values
drm/i915/audio : Consider fractional vdsc bpp while computing tu_data drm/i915/dp: Iterate over output bpp with fractional step size
Swati Sharma (2):
drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp drm/i915/dsc: Allow DSC only with fractional bpp when forced from
debugfs
Vandita Kulkarni (1):
drm/i915/dsc/mtl: Add support for fractional bpp
Ankit Nautiyal (5):
drm/display/dp: Add helper function to get DSC bpp prescision drm/i915/display: Store compressed bpp in U6.4 format drm/i915/display: Consider fractional vdsc bpp while computing m_n
values
drm/i915/audio : Consider fractional vdsc bpp while computing tu_data drm/i915/dp: Iterate over output bpp with fractional step size
Swati Sharma (2):
drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp drm/i915/dsc: Allow DSC only with fractional bpp when forced from
debugfs
Vandita Kulkarni (1):
drm/i915/dsc/mtl: Add support for fractional bpp
Ankit Nautiyal (5):
drm/display/dp: Add helper function to get DSC bpp prescision drm/i915/display: Store compressed bpp in U6.4 format drm/i915/display: Consider fractional vdsc bpp while computing m_n
values
drm/i915/audio : Consider fractional vdsc bpp while computing tu_data drm/i915/dp: Iterate over output bpp with fractional step size
Swati Sharma (2):
drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp drm/i915/dsc: Allow DSC only with fractional bpp when forced from
debugfs
Vandita Kulkarni (1):
drm/i915/dsc/mtl: Add support for fractional bpp
drivers/gpu/drm/display/drm_dp_helper.c | 27 ++++++ drivers/gpu/drm/i915/display/icl_dsi.c | 11 +-- drivers/gpu/drm/i915/display/intel_audio.c | 17 ++-- drivers/gpu/drm/i915/display/intel_bios.c | 6 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 5 +- drivers/gpu/drm/i915/display/intel_display.c | 8 +- drivers/gpu/drm/i915/display/intel_display.h | 2 +- .../drm/i915/display/intel_display_debugfs.c | 83 +++++++++++++++++++ .../drm/i915/display/intel_display_types.h | 4 +- drivers/gpu/drm/i915/display/intel_dp.c | 78 ++++++++++------- drivers/gpu/drm/i915/display/intel_dp_mst.c | 28 ++++--- drivers/gpu/drm/i915/display/intel_fdi.c | 2 +- .../i915/display/intel_fractional_helper.h | 36 ++++++++ .../gpu/drm/i915/display/intel_qp_tables.c | 3 - drivers/gpu/drm/i915/display/intel_vdsc.c | 30 +++++-- include/drm/display/drm_dp_helper.h | 1 + 16 files changed, 268 insertions(+), 73 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_fractional_helper.h
Signature · 1 line
2.25.1
PATCH 1/8 drm/display/dp: Add helper function to get DSC bpp prescision
From: Ankit Nautiyal <[email protected]>
Add helper to get the DSC bits_per_pixel precision for the DP sink.
--- drivers/gpu/drm/display/drm_dp_helper.c | 27 +++++++++++++++++++++++++ include/drm/display/drm_dp_helper.h | 1 + 2 files changed, 28 insertions(+)
drivers/gpu/drm/display/drm_dp_helper.c +27 -0
@@ -2323,6 +2323,33 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc, }EXPORT_SYMBOL (drm_dp_read_desc); +/** +* drm_dp_dsc_sink_bpp_incr() - Get bits per pixel increment +* @dsc_dpcd: DSC capabilities from DPCD +* +* Returns the bpp precision supported by the DP sink. +*/ +u8 drm_dp_dsc_sink_bpp_incr (const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ]) +{ +u8 bpp_increment_dpcd = dsc_dpcd[DP_DSC_BITS_PER_PIXEL_INC -DP_DSC_SUPPORT ]; + +switch (bpp_increment_dpcd) { +case DP_DSC_BITS_PER_PIXEL_1_16 : +return 16 ; +case DP_DSC_BITS_PER_PIXEL_1_8 : +return 8 ; +case DP_DSC_BITS_PER_PIXEL_1_4 : +return 4 ; +case DP_DSC_BITS_PER_PIXEL_1_2 : +return 2 ; +case DP_DSC_BITS_PER_PIXEL_1_1 : +return 1 ; + } + +return 0 ; +} +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.
include/drm/display/drm_dp_helper.h +1 -0
@@ -164,6 +164,7 @@ 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 ]);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.25.1
RE: [PATCH 1/8] drm/display/dp: Add helper function to get DSC bpp prescision
Quoted 7 lines
Subject: [PATCH 1/8] drm/display/dp: Add helper function to get DSC bpp prescision
From: Ankit Nautiyal <[email protected]>
Add helper to get the DSC
bits_per_pixelprecision for the DP sink.
LGTM.
Quoted 64 lines
Signed-off-by Ankit Nautiyal <[email protected]>--- drivers/gpu/drm/display/drm_dp_helper.c | 27 +++++++++++++++++++++++++ include/drm/display/drm_dp_helper.h | 1 + 2 files changed, 28 insertions(+)drivers/gpu/drm/display/drm_dp_helper.c +29
-0@@ -2323,6 +2323,33 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc, } EXPORT_SYMBOL(drm_dp_read_desc); +/** +* drm_dp_dsc_sink_bpp_incr() - Get bits per pixel increment +* @dsc_dpcd: DSC capabilities from DPCD +* +* Returns the bpp precision supported by the DP sink. +*/ +u8 drm_dp_dsc_sink_bpp_incr (const u8 +dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE ]) +{ +u8 bpp_increment_dpcd = dsc_dpcd[DP_DSC_BITS_PER_PIXEL_INC - +DP_DSC_SUPPORT ]; + +switch (bpp_increment_dpcd) { +case DP_DSC_BITS_PER_PIXEL_1_16 : +return 16 ; +case DP_DSC_BITS_PER_PIXEL_1_8 : +return 8 ; +case DP_DSC_BITS_PER_PIXEL_1_4 : +return 4 ; +case DP_DSC_BITS_PER_PIXEL_1_2 : +return 2 ; +case DP_DSC_BITS_PER_PIXEL_1_1 : +return 1 ; + } + +return 0 ; +} +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. include/drm/display/drm_dp_helper.h +2
-0@@ -164,6 +164,7 @@ 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 ]);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 u8dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE]);
--
2.25.1
PATCH 2/8 drm/i915/display: Store compressed bpp in U6.4 format
In reply to Mitul GolaniFrom: Ankit Nautiyal <[email protected]>
DSC parameter bits_per_pixel is stored in U6.4 format.
The 4 bits represent the fractional part of the bpp.
Currently we use compressed_bpp member of dsc structure to store only the integral part of the bits_per_pixel.
To store the full bits_per_pixel along with the fractional part, compressed_bpp is changed to store bpp in U6.4 formats. Intergral part is retrieved by simply right shifting the member compressed_bpp by 4.
v2:
-Use to_bpp_int, to_bpp_frac_dec, to_bpp_x16 helpers while dealing
with compressed bpp. (Suraj)
-Fix comment styling. (Suraj)
v3:
-Add separate file for 6.4 fixed point helper(Jani, Nikula) -Add comment for magic values(Suraj)
--- drivers/gpu/drm/i915/display/icl_dsi.c | 11 +++--- drivers/gpu/drm/i915/display/intel_audio.c | 3 +- drivers/gpu/drm/i915/display/intel_bios.c | 6 ++-- drivers/gpu/drm/i915/display/intel_cdclk.c | 5 +-- drivers/gpu/drm/i915/display/intel_display.c | 2 +- .../drm/i915/display/intel_display_types.h | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 29 ++++++++------- drivers/gpu/drm/i915/display/intel_dp_mst.c | 22 ++++++------ .../i915/display/intel_fractional_helper.h | 36 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vdsc.c | 5 +-- 10 files changed, 85 insertions(+), 37 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_fractional_helper.h
drivers/gpu/drm/i915/display/icl_dsi.c +6 -5
@@ -43,6 +43,7 @@#include "intel_de.h" #include "intel_dsi.h" #include "intel_dsi_vbt.h" +#include "intel_fractional_helper.h" #include "intel_panel.h" #include "intel_vdsc.h" #include "intel_vdsc_regs.h"
@@ -330,7 +331,7 @@ static int afe_clk(struct intel_encoder *encoder,int bpp;if (crtc_state->dsc.compression_enable) - bpp = crtc_state->dsc.compressed_bpp; + bpp =intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16);else bpp =mipi_dsi_pixel_format_to_bpp (intel_dsi->pixel_format);
@@ -860,7 +861,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,* compressed and non-compressed bpp. */ if (crtc_state->dsc.compression_enable) { - mul = crtc_state->dsc.compressed_bpp; + mul =intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16); div =mipi_dsi_pixel_format_to_bpp (intel_dsi->pixel_format); }
@@ -884,7 +885,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,int bpp, line_time_us, byte_clk_period_ns;if (crtc_state->dsc.compression_enable) - bpp = crtc_state->dsc.compressed_bpp; + bpp =intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16);else bpp =mipi_dsi_pixel_format_to_bpp (intel_dsi->pixel_format);
@@ -1451,8 +1452,8 @@ static void gen11_dsi_get_timings(struct intel_encoder *encoder,struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; -if (pipe_config->dsc.compressed_bpp) { -int div = pipe_config->dsc.compressed_bpp; +if (pipe_config->dsc.compressed_bpp_x16) { +int div =intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16);int mul =mipi_dsi_pixel_format_to_bpp (intel_dsi->pixel_format); adjusted_mode->crtc_htotal =
drivers/gpu/drm/i915/display/intel_audio.c +2 -1
@@ -35,6 +35,7 @@#include "intel_crtc.h" #include "intel_de.h" #include "intel_display_types.h" +#include "intel_fractional_helper.h" #include "intel_lpe_audio.h" /**
@@ -528,7 +529,7 @@ static unsigned int calc_hblank_early_prog(struct intel_encoder *encoder, h_active = crtc_state->hw.adjusted_mode.crtc_hdisplay; h_total = crtc_state->hw.adjusted_mode.crtc_htotal; pixel_clk = crtc_state->hw.adjusted_mode.crtc_clock; - vdsc_bpp = crtc_state->dsc.compressed_bpp; + vdsc_bpp =intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16); cdclk = i915->display.cdclk.hw.cdclk;/* fec= 0.972261, using rounding multiplier of 1000000 */ fec_coeff =972261 ;
drivers/gpu/drm/i915/display/intel_bios.c +4 -2
@@ -33,6 +33,7 @@#include "i915_reg.h" #include "intel_display.h" #include "intel_display_types.h" +#include "intel_fractional_helper.h" #include "intel_gmbus.h" #define _INTEL_BIOS_PRIVATE
@@ -3384,8 +3385,9 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, crtc_state->pipe_bpp = bpc *3 ; - crtc_state->dsc.compressed_bpp =min (crtc_state->pipe_bpp, -VBT_DSC_MAX_BPP (dsc->max_bpp)); + crtc_state->dsc.compressed_bpp_x16 = +intel_fractional_bpp_to_x16 (min (crtc_state->pipe_bpp, +VBT_DSC_MAX_BPP (dsc->max_bpp)));/* * FIXME: This is ugly, and slice count should take DSC engine
drivers/gpu/drm/i915/display/intel_cdclk.c +3 -2
@@ -34,6 +34,7 @@#include "intel_de.h" #include "intel_dp.h" #include "intel_display_types.h" +#include "intel_fractional_helper.h" #include "intel_mchbar_regs.h" #include "intel_pci_config.h" #include "intel_pcode.h"
@@ -2567,8 +2568,8 @@ static int intel_vdsc_min_cdclk(const struct intel_crtc_state *crtc_state)* => CDCLK >= compressed_bpp * Pixel clock / 2 * Bigjoiner Interface bits */ int bigjoiner_interface_bits =DISPLAY_VER (i915) >13 ?36 :24 ; -int min_cdclk_bj = (crtc_state->dsc.compressed_bpp * pixel_clock) / - (2 * bigjoiner_interface_bits); +int min_cdclk_bj = (intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16) * + pixel_clock) / (2 * bigjoiner_interface_bits); min_cdclk =max (min_cdclk, min_cdclk_bj); }
drivers/gpu/drm/i915/display/intel_display.c +1 -1
@@ -5365,7 +5365,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_I (dsc.compression_enable);PIPE_CONF_CHECK_I (dsc.dsc_split); -PIPE_CONF_CHECK_I (dsc.compressed_bpp); +PIPE_CONF_CHECK_I (dsc.compressed_bpp_x16);PIPE_CONF_CHECK_BOOL (splitter.enable);PIPE_CONF_CHECK_I (splitter.link_count);
drivers/gpu/drm/i915/display/intel_display_types.h +2 -1
@@ -1353,7 +1353,8 @@ struct intel_crtc_state {struct {bool compression_enable;bool dsc_split; -u16 compressed_bpp; +/* 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 +16 -13
@@ -64,6 +64,7 @@#include "intel_dp_mst.h" #include "intel_dpio_phy.h" #include "intel_dpll.h" +#include "intel_fractional_helper.h" #include "intel_fifo_underrun.h" #include "intel_hdcp.h" #include "intel_hdmi.h"
@@ -1863,7 +1864,7 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp, valid_dsc_bpp[i], timeslots);if (ret ==0 ) { - pipe_config->dsc.compressed_bpp = valid_dsc_bpp[i]; + pipe_config->dsc.compressed_bpp_x16 =intel_fractional_bpp_to_x16 (valid_dsc_bpp[i]);return 0 ; } }
@@ -1901,7 +1902,7 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp, compressed_bpp, timeslots);if (ret ==0 ) { - pipe_config->dsc.compressed_bpp = compressed_bpp; + pipe_config->dsc.compressed_bpp_x16 =intel_fractional_bpp_to_x16 (compressed_bpp);return 0 ; } }
@@ -2085,7 +2086,7 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,/* 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 =max (dsc_min_bpp, dsc_max_bpp); + pipe_config->dsc.compressed_bpp_x16 =intel_fractional_bpp_to_x16 (max (dsc_min_bpp, dsc_max_bpp)); pipe_config->pipe_bpp = pipe_bpp;
@@ -2171,18 +2172,19 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, ret =intel_dp_dsc_compute_params (&dig_port->base, pipe_config);if (ret <0 ) {drm_dbg_kms (&dev_priv->drm, -"Cannot compute valid DSC parameters for Input Bpp = %d " -"Compressed BPP = %d\n" , +"Cannot compute valid DSC parameters for Input Bpp = %d Compressed BPP = %d.%d\n" , pipe_config->pipe_bpp, - pipe_config->dsc.compressed_bpp); +intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16), +intel_fractional_bpp_decimal (pipe_config->dsc.compressed_bpp_x16));return ret; } pipe_config->dsc.compression_enable = true; -drm_dbg_kms (&dev_priv->drm,"DP DSC computed with Input Bpp = %d " -"Compressed Bpp = %d Slice Count = %d\n" , +drm_dbg_kms (&dev_priv->drm, +"DP DSC computed with Input Bpp = %d Compressed Bpp = %d.%d Slice Count = %d\n" , pipe_config->pipe_bpp, - pipe_config->dsc.compressed_bpp, +intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16), +intel_fractional_bpp_decimal (pipe_config->dsc.compressed_bpp_x16), pipe_config->dsc.slice_count);return 0 ;
@@ -2261,15 +2263,16 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,if (pipe_config->dsc.compression_enable) {drm_dbg_kms (&i915->drm, -"DP lane count %d clock %d Input bpp %d Compressed bpp %d\n" , +"DP lane count %d clock %d Input bpp %d Compressed bpp %d.%d\n" , pipe_config->lane_count, pipe_config->port_clock, pipe_config->pipe_bpp, - pipe_config->dsc.compressed_bpp); +intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16), +intel_fractional_bpp_decimal (pipe_config->dsc.compressed_bpp_x16));drm_dbg_kms (&i915->drm,"DP link rate required %i available %i\n" ,intel_dp_link_required (adjusted_mode->crtc_clock, - pipe_config->dsc.compressed_bpp), +intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16)),intel_dp_max_data_rate (pipe_config->port_clock, pipe_config->lane_count)); }else {
@@ -2702,7 +2705,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,intel_dp_limited_color_range (pipe_config, conn_state);if (pipe_config->dsc.compression_enable) - link_bpp = pipe_config->dsc.compressed_bpp; + link_bpp = pipe_config->dsc.compressed_bpp_x16;else link_bpp =intel_dp_output_bpp (pipe_config->output_format, pipe_config->pipe_bpp);
drivers/gpu/drm/i915/display/intel_dp_mst.c +12 -10
@@ -41,6 +41,7 @@#include "intel_dp_hdcp.h" #include "intel_dp_mst.h" #include "intel_dpio_phy.h" +#include "intel_fractional_helper.h" #include "intel_hdcp.h" #include "intel_hotplug.h" #include "skl_scaler.h"
@@ -140,7 +141,7 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,if (!dsc) crtc_state->pipe_bpp = bpp;else - crtc_state->dsc.compressed_bpp = bpp; + crtc_state->dsc.compressed_bpp_x16 =intel_fractional_bpp_to_x16 (bpp);drm_dbg_kms (&i915->drm,"Got %d slots for pipe bpp %d dsc %d\n" , slots, bpp, dsc); }
@@ -238,13 +239,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,if (slots <0 )return slots; - last_compressed_bpp = crtc_state->dsc.compressed_bpp; + last_compressed_bpp =intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16); - crtc_state->dsc.compressed_bpp =intel_dp_dsc_nearest_valid_bpp (i915, - last_compressed_bpp, - crtc_state->pipe_bpp); + crtc_state->dsc.compressed_bpp_x16 = +intel_fractional_bpp_to_x16 (intel_dp_dsc_nearest_valid_bpp (i915, + last_compressed_bpp, + crtc_state->pipe_bpp)); -if (crtc_state->dsc.compressed_bpp != last_compressed_bpp) +if (crtc_state->dsc.compressed_bpp_x16 !=intel_fractional_bpp_to_x16 (last_compressed_bpp)) need_timeslot_recalc = true;/*
@@ -253,14 +255,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,*/ if (need_timeslot_recalc) { slots =intel_dp_mst_find_vcpi_slots_for_bpp (encoder, crtc_state, - crtc_state->dsc.compressed_bpp, - crtc_state->dsc.compressed_bpp, - limits, conn_state,2 *3 , true); +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16), +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16), + limits, conn_state,2 *3 , true);if (slots <0 )return slots; } - intel_link_compute_m_n(crtc_state->dsc.compressed_bpp, + intel_link_compute_m_n(intel_fractional_bpp_from_x16(crtc_state->dsc.compressed_bpp_x16), crtc_state->lane_count, adjusted_mode->crtc_clock, crtc_state->port_clock,
drivers/gpu/drm/i915/display/intel_fractional_helper.h new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2023 Intel Corporation +*/ +#ifndef __INTEL_FRACTIONAL_HELPERS_H__ +#define __INTEL_FRACTIONAL_HELPERS_H__ + +/* +* Convert a U6.4 fixed-point bits-per-pixel (bpp) value to an integer bpp value. +*/ +static inline int intel_fractional_bpp_from_x16 (int bpp_x16) +{ +return bpp_x16 >>4 ; +} + +/* +* Extract the fractional part of a U6.4 fixed-point bpp value based on the +* last 4 bits representing fractional bits, obtained by multiplying by 10000 +* and then dividing by 16, as the bpp value is initially left-shifted by 4 +* to allocate 4 bits for the fractional part. +*/ +static inline int intel_fractional_bpp_decimal (int bpp_x16) +{ +return (bpp_x16 &0xf ) *625 ; +} + +/* +* Convert bits-per-pixel (bpp) to a U6.4 fixed-point representation. +*/ +static inline int intel_fractional_bpp_to_x16 (int bpp) +{ +return bpp <<4 ; +} + +#endif /* __INTEL_FRACTIONAL_HELPERS_H__ */ +
drivers/gpu/drm/i915/display/intel_vdsc.c +3 -2
@@ -15,6 +15,7 @@#include "intel_de.h" #include "intel_display_types.h" #include "intel_dsi.h" +#include "intel_fractional_helper.h" #include "intel_qp_tables.h" #include "intel_vdsc.h" #include "intel_vdsc_regs.h"
@@ -248,7 +249,7 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)struct intel_crtc *crtc =to_intel_crtc (pipe_config->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);struct drm_dsc_config *vdsc_cfg = &pipe_config->dsc.config; -u16 compressed_bpp = pipe_config->dsc.compressed_bpp; +u16 compressed_bpp =intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16);int err;int ret;
@@ -874,7 +875,7 @@ static void intel_dsc_get_pps_config(struct intel_crtc_state *crtc_state)if (vdsc_cfg->native_420) vdsc_cfg->bits_per_pixel >>=1 ; - crtc_state->dsc.compressed_bpp = vdsc_cfg->bits_per_pixel >>4 ; + crtc_state->dsc.compressed_bpp_x16 = vdsc_cfg->bits_per_pixel;/* PPS 2 */ pps_temp =intel_dsc_pps_read_and_verify (crtc_state,2 );
Signature · 1 line
2.25.1
RE: [PATCH 2/8] drm/i915/display: Store compressed bpp in U6.4 format
Quoted 12 lines
Subject: [PATCH 2/8] drm/i915/display: Store compressed bpp in U6.4 format
From: Ankit Nautiyal <[email protected]>
DSC parameter
bits_per_pixelis stored in U6.4 format.
The 4 bits represent the fractional part of the bpp.
Currently we usecompressed_bppmember of dsc structure to store only the integral part of thebits_per_pixel.
To store the fullbits_per_pixelalong with the fractional part,compressed_bppis changed to store bpp in U6.4 formats. Intergral part is retrieved by simply right shifting the membercompressed_bppby 4.
Quoted 8 lines
v2:
-Useto_bpp_int,to_bpp_frac_dec,to_bpp_x16helpers while dealing with compressed bpp. (Suraj) -Fix comment styling. (Suraj)v3:
-Add separate file for 6.4 fixed pointhelper(Jani, Nikula)-Add comment for magic values(Suraj)
A lot of checkpatch issues have been created due to the renaming you can fix that. Other than that everything else looks good
Regards,
Suraj Kandpal
Quoted 471 lines
Signed-off-by Ankit Nautiyal <[email protected]>Signed-off-by Mitul Golani <[email protected]>Reviewed-by Suraj Kandpal <[email protected]>--- drivers/gpu/drm/i915/display/icl_dsi.c | 11 +++--- drivers/gpu/drm/i915/display/intel_audio.c | 3 +- drivers/gpu/drm/i915/display/intel_bios.c | 6 ++-- drivers/gpu/drm/i915/display/intel_cdclk.c | 5 +-- drivers/gpu/drm/i915/display/intel_display.c | 2 +- .../drm/i915/display/intel_display_types.h | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 29 ++++++++------- drivers/gpu/drm/i915/display/intel_dp_mst.c | 22 ++++++------ .../i915/display/intel_fractional_helper.h | 36 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vdsc.c | 5 +-- 10 files changed, 85 insertions(+), 37 deletions(-) create mode 100644
drivers/gpu/drm/i915/display/intel_fractional_helper.hdrivers/gpu/drm/i915/display/icl_dsi.c +7
-3@@ -43,6 +43,7 @@#include "intel_de.h" #include "intel_dsi.h" #include "intel_dsi_vbt.h" +#include "intel_fractional_helper.h" #include "intel_panel.h" #include "intel_vdsc.h" #include "intel_vdsc_regs.h" @@ -330,7 +331,7 @@ static int afe_clk(struct intel_encoder *encoder,int bpp;if (crtc_state->dsc.compression_enable) - bpp = crtc_state->dsc.compressed_bpp; + bpp = +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16);else bpp =mipi_dsi_pixel_format_to_bpp (intel_dsi->pixel_format);@@ -860,7 +861,7 @@ gen11_dsi_set_transcoder_timings(structintel_encoder *encoder, * compressed and non-compressed bpp. */ if (crtc_state->dsc.compression_enable) { - mul = crtc_state->dsc.compressed_bpp; + mul = +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16); div =mipi_dsi_pixel_format_to_bpp (intel_dsi->pixel_format); }@@ -884,7 +885,7 @@ gen11_dsi_set_transcoder_timings(structintel_encoder *encoder, int bpp, line_time_us, byte_clk_period_ns;if (crtc_state->dsc.compression_enable) - bpp = crtc_state->dsc.compressed_bpp; + bpp = +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16);else bpp = mipi_dsi_pixel_format_to_bpp(intel_dsi-Quoted 1 line
pixel_format);drivers/gpu/drm/i915/display/icl_dsi.c +3
-2@@ -1451,8 +1452,8 @@ static void gen11_dsi_get_timings(structintel_encoder *encoder, struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode; -if (pipe_config->dsc.compressed_bpp) { -int div = pipe_config->dsc.compressed_bpp; +if (pipe_config->dsc.compressed_bpp_x16) { +int div = +intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16); int mul = mipi_dsi_pixel_format_to_bpp(intel_dsi-Quoted 1 line
pixel_format);drivers/gpu/drm/i915/display/icl_dsi.c +0
-0adjusted_mode->crtc_htotal =drivers/gpu/drm/i915/display/intel_audio.c +3
-1@@ -35,6 +35,7 @@#include "intel_crtc.h" #include "intel_de.h" #include "intel_display_types.h" +#include "intel_fractional_helper.h" #include "intel_lpe_audio.h" /** @@ -528,7 +529,7 @@ static unsigned int calc_hblank_early_prog(structintel_encoder *encoder, h_active = crtc_state->hw.adjusted_mode.crtc_hdisplay; h_total = crtc_state->hw.adjusted_mode.crtc_htotal; pixel_clk = crtc_state->hw.adjusted_mode.crtc_clock; - vdsc_bpp = crtc_state->dsc.compressed_bpp; + vdsc_bpp = +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16); cdclk = i915->display.cdclk.hw.cdclk;/* fec= 0.972261, using rounding multiplier of 1000000 */ fec_coeff =972261 ;drivers/gpu/drm/i915/display/intel_bios.c +4
-2@@ -33,6 +33,7 @@#include "i915_reg.h" #include "intel_display.h" #include "intel_display_types.h" +#include "intel_fractional_helper.h" #include "intel_gmbus.h" #define _INTEL_BIOS_PRIVATE@@ -3384,8 +3385,9 @@ static void fill_dsc(struct intel_crtc_state *crtc_state, crtc_state->pipe_bpp = bpc *3 ; - crtc_state->dsc.compressed_bpp =min (crtc_state->pipe_bpp, -VBT_DSC_MAX_BPP (dsc- >max_bpp)); + crtc_state->dsc.compressed_bpp_x16 = +intel_fractional_bpp_to_x16 (min (crtc_state->pipe_bpp, +VBT_DSC_MAX_BPP (dsc->max_bpp)));/* * FIXME: This is ugly, and slice count should take DSC engine diff --git
a/drivers/gpu/drm/i915/display/intel_cdclk.cb/drivers/gpu/drm/i915/display/intel_cdclk.c
indexad5251ba6fe1..55d46947d7ae100644drivers/gpu/drm/i915/display/intel_cdclk.c +1
-0@@ -34,6 +34,7 @@#include "intel_de.h" #include "intel_dp.h" #include "intel_display_types.h" +#include "intel_fractional_helper.h" #include "intel_mchbar_regs.h" #include "intel_pci_config.h" #include "intel_pcode.h" @@ -2567,8 +2568,8 @@ static int intel_vdsc_min_cdclk(const struct intel_crtc_state *crtc_state) * => CDCLK >= compressed_bpp * Pixel clock / 2 * BigjoinerInterface bits
drivers/gpu/drm/i915/display/intel_cdclk.c +0
-1*/ int bigjoiner_interface_bits =DISPLAY_VER (i915) >13 ?36 :24 ; - int min_cdclk_bj = (crtc_state->dsc.compressed_bpp *
pixel_clock) /drivers/gpu/drm/i915/display/intel_cdclk.c +1
-1- (2 * bigjoiner_interface_bits); + int min_cdclk_bj = (intel_fractional_bpp_from_x16(crtc_state-Quoted 1 line
dsc.compressed_bpp_x16) *
drivers/gpu/drm/i915/display/intel_cdclk.c +1
-0+ pixel_clock) / (2 *
bigjoiner_interface_bits);drivers/gpu/drm/i915/display/intel_cdclk.c +0
-0min_cdclk =max (min_cdclk, min_cdclk_bj); }drivers/gpu/drm/i915/display/intel_display.c +1
-1@@ -5365,7 +5365,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_I (dsc.compression_enable);PIPE_CONF_CHECK_I (dsc.dsc_split); -PIPE_CONF_CHECK_I (dsc.compressed_bpp); +PIPE_CONF_CHECK_I (dsc.compressed_bpp_x16);PIPE_CONF_CHECK_BOOL (splitter.enable);drivers/gpu/drm/i915/display/intel_display.c +0
-0PIPE_CONF_CHECK_I (splitter.link_count);drivers/gpu/drm/i915/display/intel_display_types.h +1
-1@@ -1353,7 +1353,8 @@ struct intel_crtc_state {struct {bool compression_enable;bool dsc_split; -u16 compressed_bpp; +/* Compressed Bpp in U6.4 format (first 4 bits for fractional part) */
drivers/gpu/drm/i915/display/intel_display_types.h +1
-0+u16 compressed_bpp_x16;u8 slice_count;struct drm_dsc_config config; } dsc;drivers/gpu/drm/i915/display/intel_dp.c +7
-4@@ -64,6 +64,7 @@#include "intel_dp_mst.h" #include "intel_dpio_phy.h" #include "intel_dpll.h" +#include "intel_fractional_helper.h" #include "intel_fifo_underrun.h" #include "intel_hdcp.h" #include "intel_hdmi.h" @@ -1863,7 +1864,7 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp, valid_dsc_bpp[i], timeslots);if (ret ==0 ) { - pipe_config->dsc.compressed_bpp = valid_dsc_bpp[i]; + pipe_config->dsc.compressed_bpp_x16 = +intel_fractional_bpp_to_x16 (valid_dsc_bpp[i]);return 0 ; } }@@ -1901,7 +1902,7 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp, compressed_bpp, timeslots);if (ret ==0 ) { - pipe_config->dsc.compressed_bpp = compressed_bpp; + pipe_config->dsc.compressed_bpp_x16 = +intel_fractional_bpp_to_x16 (compressed_bpp);return 0 ; } }@@ -2085,7 +2086,7 @@ static int intel_edp_dsc_compute_pipe_bpp(structintel_dp *intel_dp,/* 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 =max (dsc_min_bpp, dsc_max_bpp); + pipe_config->dsc.compressed_bpp_x16 = +intel_fractional_bpp_to_x16 (max (dsc_min_bpp, dsc_max_bpp)); pipe_config->pipe_bpp = pipe_bpp;@@ -2171,18 +2172,19 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, ret =intel_dp_dsc_compute_params (&dig_port->base, pipe_config);if (ret <0 ) { drm_dbg_kms(&dev_priv->drm, - "Cannot compute valid DSC parameters for InputBpp = %d "
drivers/gpu/drm/i915/display/intel_dp.c +1
-1- "Compressed BPP = %d\n", + "Cannot compute valid DSC parameters for InputBpp = %d
drivers/gpu/drm/i915/display/intel_dp.c +2
-1+Compressed BPP = %d.%d\n", pipe_config->pipe_bpp, - pipe_config->dsc.compressed_bpp); + intel_fractional_bpp_from_x16(pipe_config-Quoted 1 line
dsc.compressed_bpp_x16),
drivers/gpu/drm/i915/display/intel_dp.c +2
-1+ +intel_fractional_bpp_decimal(pipe_config->dsc.compressed_bpp_x16));return ret; } pipe_config->dsc.compression_enable = true; - drm_dbg_kms(&dev_priv->drm, "DP DSC computed with Input Bpp =%d "
drivers/gpu/drm/i915/display/intel_dp.c +2
-1- "Compressed Bpp = %d Slice Count = %d\n", + drm_dbg_kms(&dev_priv->drm, + "DP DSC computed with Input Bpp = %d Compressed Bpp =%d.%d Slice
drivers/gpu/drm/i915/display/intel_dp.c +2
-1+Count = %d\n", pipe_config->pipe_bpp, - pipe_config->dsc.compressed_bpp, + intel_fractional_bpp_from_x16(pipe_config-Quoted 1 line
dsc.compressed_bpp_x16),
drivers/gpu/drm/i915/display/intel_dp.c +6
-3+ +intel_fractional_bpp_decimal (pipe_config->dsc.compressed_bpp_x16), pipe_config->dsc.slice_count);return 0 ;@@ -2261,15 +2263,16 @@ intel_dp_compute_link_config(struct intel_encoder *encoder, if (pipe_config->dsc.compression_enable) {drm_dbg_kms (&i915->drm, - "DP lane count %d clock %d Input bpp %d Compressed bpp %d\n", + "DP lane count %d clock %d Input bpp %d Compressed bpp %d.%d\n", pipe_config->lane_count, pipe_config->port_clock, pipe_config->pipe_bpp, - pipe_config->dsc.compressed_bpp); +intel_fractional_bpp_from_x16 (pipe_config- >dsc.compressed_bpp_x16), + +intel_fractional_bpp_decimal (pipe_config->dsc.compressed_bpp_x16)); drm_dbg_kms(&i915->drm, "DP link rate required %i available %i\n", intel_dp_link_required(adjusted_mode->crtc_clock, - pipe_config-Quoted 1 line
dsc.compressed_bpp),
drivers/gpu/drm/i915/display/intel_dp.c +3
-1+ +intel_fractional_bpp_from_x16(pipe_config->dsc.compressed_bpp_x16)),intel_dp_max_data_rate (pipe_config->port_clock, pipe_config->lane_count)); }else {@@ -2702,7 +2705,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,intel_dp_limited_color_range (pipe_config, conn_state);if (pipe_config->dsc.compression_enable) - link_bpp = pipe_config->dsc.compressed_bpp; + link_bpp = pipe_config->dsc.compressed_bpp_x16;else link_bpp = intel_dp_output_bpp(pipe_config->output_format,drivers/gpu/drm/i915/display/intel_dp.c +0
-0pipe_config->pipe_bpp);drivers/gpu/drm/i915/display/intel_dp_mst.c +3
-1@@ -41,6 +41,7 @@#include "intel_dp_hdcp.h" #include "intel_dp_mst.h" #include "intel_dpio_phy.h" +#include "intel_fractional_helper.h" #include "intel_hdcp.h" #include "intel_hotplug.h" #include "skl_scaler.h" @@ -140,7 +141,7 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder, if (!dsc) crtc_state->pipe_bpp = bpp; else - crtc_state->dsc.compressed_bpp = bpp; + crtc_state->dsc.compressed_bpp_x16 = +intel_fractional_bpp_to_x16 (bpp); drm_dbg_kms(&i915->drm, "Got %d slots for pipe bpp %d dsc%d\n", slots, bpp, dsc);
drivers/gpu/drm/i915/display/intel_dp_mst.c +5
-4}@@ -238,13 +239,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder, if (slots < 0) return slots; - last_compressed_bpp = crtc_state->dsc.compressed_bpp; + last_compressed_bpp = +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16); - crtc_state->dsc.compressed_bpp =intel_dp_dsc_nearest_valid_bpp (i915, - last_compressed_bpp, - crtc_state->pipe_bpp); + crtc_state->dsc.compressed_bpp_x16 = + intel_fractional_bpp_to_x16(intel_dp_dsc_nearest_valid_bpp(i915, +
last_compressed_bpp,drivers/gpu/drm/i915/display/intel_dp_mst.c +1
-0+ crtc_state-Quoted 1 line
pipe_bpp));drivers/gpu/drm/i915/display/intel_dp_mst.c +5
-4-if (crtc_state->dsc.compressed_bpp != last_compressed_bpp) +if (crtc_state->dsc.compressed_bpp_x16 != +intel_fractional_bpp_to_x16 (last_compressed_bpp)) need_timeslot_recalc = true;/* @@ -253,14 +255,14 @@ static intintel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder, */ if (need_timeslot_recalc) { slots =intel_dp_mst_find_vcpi_slots_for_bpp (encoder, crtc_state, - crtc_state- >dsc.compressed_bpp, - crtc_state- >dsc.compressed_bpp, - limits, conn_state,2 *3 , true); +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16), +intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16), + limits, conn_state, 2 * 3, true);if (slots <0 )drivers/gpu/drm/i915/display/intel_dp_mst.c +3
-1return slots; } - intel_link_compute_m_n(crtc_state->dsc.compressed_bpp, + +intel_link_compute_m_n(intel_fractional_bpp_from_x16(crtc_state->dsc.co +mpressed_bpp_x16), crtc_state->lane_count, adjusted_mode->crtc_clock, crtc_state->port_clock,drivers/gpu/drm/i915/display/intel_fractional_helper.h new file +9
-0@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2023 Intel Corporation +*/ +#ifndef __INTEL_FRACTIONAL_HELPERS_H__ +#define __INTEL_FRACTIONAL_HELPERS_H__ + +/* +* Convert a U6.4 fixed-point bits-per-pixel (bpp) value to an integer bpp value.
drivers/gpu/drm/i915/display/intel_fractional_helper.h new file +27
-0+*/ +static inline int intel_fractional_bpp_from_x16 (int bpp_x16) { +return bpp_x16 >>4 ; +} + +/* +* Extract the fractional part of a U6.4 fixed-point bpp value based on +the +* last 4 bits representing fractional bits, obtained by multiplying by +10000 +* and then dividing by 16, as the bpp value is initially left-shifted +by 4 +* to allocate 4 bits for the fractional part. +*/ +static inline int intel_fractional_bpp_decimal (int bpp_x16) { +return (bpp_x16 &0xf ) *625 ; +} + +/* +* Convert bits-per-pixel (bpp) to a U6.4 fixed-point representation. +*/ +static inline int intel_fractional_bpp_to_x16 (int bpp) { +return bpp <<4 ; +} + +#endif /* __INTEL_FRACTIONAL_HELPERS_H__ */ +drivers/gpu/drm/i915/display/intel_vdsc.c +4
-2@@ -15,6 +15,7 @@#include "intel_de.h" #include "intel_display_types.h" #include "intel_dsi.h" +#include "intel_fractional_helper.h" #include "intel_qp_tables.h" #include "intel_vdsc.h" #include "intel_vdsc_regs.h" @@ -248,7 +249,7 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)struct intel_crtc *crtc =to_intel_crtc (pipe_config->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);struct drm_dsc_config *vdsc_cfg = &pipe_config->dsc.config; -u16 compressed_bpp = pipe_config->dsc.compressed_bpp; +u16 compressed_bpp = +intel_fractional_bpp_from_x16 (pipe_config->dsc.compressed_bpp_x16);int err;int ret;@@ -874,7 +875,7 @@ static void intel_dsc_get_pps_config(struct intel_crtc_state *crtc_state)if (vdsc_cfg->native_420) vdsc_cfg->bits_per_pixel >>=1 ; - crtc_state->dsc.compressed_bpp = vdsc_cfg->bits_per_pixel >>4 ; + crtc_state->dsc.compressed_bpp_x16 = vdsc_cfg->bits_per_pixel;/* PPS 2 */
pps_temp=intel_dsc_pps_read_and_verify(crtc_state, 2);
--
2.25.1
PATCH 3/8 drm/i915/display: Consider fractional vdsc bpp while computing m_n values
In reply to Mitul GolaniFrom: Ankit Nautiyal <[email protected]>
MTL+ supports fractional compressed bits_per_pixel, with precision of 1/16. This compressed bpp is stored in U6.4 format. Accommodate this precision while computing m_n values.
--- drivers/gpu/drm/i915/display/intel_display.c | 6 +++++- drivers/gpu/drm/i915/display/intel_display.h | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 5 +++-- drivers/gpu/drm/i915/display/intel_dp_mst.c | 6 ++++-- drivers/gpu/drm/i915/display/intel_fdi.c | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +5 -1
@@ -2380,10 +2380,14 @@ void intel_link_compute_m_n(u16 bits_per_pixel, int nlanes, int pixel_clock, int link_clock, struct intel_link_m_n *m_n, - bool fec_enable) + bool fec_enable, + bool is_dsc_fractional_bpp) { u32 data_clock = bits_per_pixel * pixel_clock; +if (is_dsc_fractional_bpp) + data_clock =DIV_ROUND_UP (bits_per_pixel * pixel_clock,16 ); +if (fec_enable) data_clock =intel_dp_mode_to_fec_clock (data_clock);
drivers/gpu/drm/i915/display/intel_display.h +1 -1
@@ -398,7 +398,7 @@ u8 intel_calc_active_pipes(struct intel_atomic_state *state,void intel_link_compute_m_n (u16 bpp,int nlanes,int pixel_clock,int link_clock,struct intel_link_m_n *m_n, -bool fec_enable); +bool fec_enable,bool is_dsc_fractional_bpp);u32 intel_plane_fb_max_stride (struct drm_i915_private *dev_priv,u32 pixel_format,u64 modifier);enum drm_mode_status
drivers/gpu/drm/i915/display/intel_dp.c +3 -2
@@ -2558,7 +2558,7 @@ intel_dp_drrs_compute_config(struct intel_connector *connector,intel_link_compute_m_n (link_bpp, pipe_config->lane_count, pixel_clock, pipe_config->port_clock, &pipe_config->dp_m2_n2, - pipe_config->fec_enable); + pipe_config->fec_enable, false);/* FIXME: abstract this better */ if (pipe_config->splitter.enable)
@@ -2737,7 +2737,8 @@ intel_dp_compute_config(struct intel_encoder *encoder, adjusted_mode->crtc_clock, pipe_config->port_clock, &pipe_config->dp_m_n, - pipe_config->fec_enable); + pipe_config->fec_enable, + pipe_config->dsc.compression_enable);/* FIXME: abstract this better */ if (pipe_config->splitter.enable)
drivers/gpu/drm/i915/display/intel_dp_mst.c +4 -2
@@ -172,7 +172,8 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, adjusted_mode->crtc_clock, crtc_state->port_clock, &crtc_state->dp_m_n, - crtc_state->fec_enable); + crtc_state->fec_enable, + false); crtc_state->dp_m_n.tu = slots;return 0 ;
@@ -267,7 +268,8 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder, adjusted_mode->crtc_clock, crtc_state->port_clock, &crtc_state->dp_m_n, - crtc_state->fec_enable); + crtc_state->fec_enable, + crtc_state->dsc.compression_enable); crtc_state->dp_m_n.tu = slots;return 0 ;
drivers/gpu/drm/i915/display/intel_fdi.c +1 -1
@@ -259,7 +259,7 @@ int ilk_fdi_compute_config(struct intel_crtc *crtc, pipe_config->fdi_lanes = lane;intel_link_compute_m_n (pipe_config->pipe_bpp, lane, fdi_dotclock, - link_bw, &pipe_config->fdi_m_n, false); + link_bw, &pipe_config->fdi_m_n, false, false); ret =ilk_check_fdi_lanes (dev, crtc->pipe, pipe_config);if (ret == -EDEADLK )
Signature · 1 line
2.25.1
PATCH 4/8 drm/i915/audio : Consider fractional vdsc bpp while computing tu_data
In reply to Mitul GolaniFrom: Ankit Nautiyal <[email protected]>
MTL+ supports fractional compressed bits_per_pixel, with precision of 1/16. This compressed bpp is stored in U6.4 format. Accommodate the precision during calculation of transfer unit data for hblank_early calculation.
v2:
-Fixed tu_data calculation while dealing with U6.4 format. (Stan)
--- drivers/gpu/drm/i915/display/intel_audio.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_audio.c +8 -8
@@ -522,25 +522,25 @@ static unsigned int calc_hblank_early_prog(struct intel_encoder *encoder,unsigned int link_clks_available, link_clks_required;unsigned int tu_data, tu_line, link_clks_active;unsigned int h_active, h_total, hblank_delta, pixel_clk; -unsigned int fec_coeff, cdclk, vdsc_bpp; +unsigned int fec_coeff, cdclk, vdsc_bppx16;unsigned int link_clk, lanes;unsigned int hblank_rise; h_active = crtc_state->hw.adjusted_mode.crtc_hdisplay; h_total = crtc_state->hw.adjusted_mode.crtc_htotal; pixel_clk = crtc_state->hw.adjusted_mode.crtc_clock; - vdsc_bpp =intel_fractional_bpp_from_x16 (crtc_state->dsc.compressed_bpp_x16); + vdsc_bppx16 = crtc_state->dsc.compressed_bpp_x16; cdclk = i915->display.cdclk.hw.cdclk;/* fec= 0.972261, using rounding multiplier of 1000000 */ fec_coeff =972261 ; link_clk = crtc_state->port_clock; lanes = crtc_state->lane_count; -drm_dbg_kms (&i915->drm,"h_active = %u link_clk = %u :" -"lanes = %u vdsc_bpp = %u cdclk = %u\n" , - h_active, link_clk, lanes, vdsc_bpp, cdclk); +drm_dbg_kms (&i915->drm, +"h_active = %u link_clk = %u : lanes = %u vdsc_bppx16 = %u cdclk = %u\n" , + h_active, link_clk, lanes, vdsc_bppx16, cdclk); -if (WARN_ON (!link_clk || !pixel_clk || !lanes || !vdsc_bpp || !cdclk)) +if (WARN_ON (!link_clk || !pixel_clk || !lanes || !vdsc_bppx16 || !cdclk))return 0 ; link_clks_available = (h_total - h_active) * link_clk / pixel_clk -28 ;
@@ -552,8 +552,8 @@ static unsigned int calc_hblank_early_prog(struct intel_encoder *encoder, hblank_delta =DIV64_U64_ROUND_UP (mul_u32_u32 (5 * (link_clk + cdclk), pixel_clk),mul_u32_u32 (link_clk, cdclk)); - tu_data =div64_u64 (mul_u32_u32 (pixel_clk * vdsc_bpp *8 ,1000000 ), -mul_u32_u32 (link_clk * lanes, fec_coeff)); + tu_data =div64_u64 (mul_u32_u32 (pixel_clk * vdsc_bppx16 *8 ,1000000 ), +mul_u32_u32 (link_clk * lanes *16 , fec_coeff)); tu_line =div64_u64 (h_active *mul_u32_u32 (link_clk, fec_coeff),mul_u32_u32 (64 * pixel_clk,1000000 )); link_clks_active = (tu_line -1 ) *64 + tu_data;
Signature · 1 line
2.25.1
PATCH 5/8 drm/i915/dsc/mtl: Add support for fractional bpp
In reply to Mitul GolaniFrom: Vandita Kulkarni <[email protected]>
Consider the fractional bpp while reading the qp values.
v2: Use helpers for fractional, integral bits of bits_per_pixel. (Suraj)
--- .../gpu/drm/i915/display/intel_qp_tables.c | 3 --- drivers/gpu/drm/i915/display/intel_vdsc.c | 25 +++++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_qp_tables.c +0 -3
@@ -34,9 +34,6 @@* These qp tables are as per the C model * and it has the rows pointing to bpps which increment * in steps of 0.5 -* We do not support fractional bpps as of today, -* hence we would skip the fractional bpps during -* our references for qp calclulations. */ static const u8 rc_range_minqp444_8bpc[DSC_NUM_BUF_RANGES ][RC_RANGE_QP444_8BPC_MAX_NUM_BPP ] = { {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,
drivers/gpu/drm/i915/display/intel_vdsc.c +20 -5
@@ -78,8 +78,8 @@ intel_vdsc_set_min_max_qp(struct drm_dsc_config *vdsc_cfg, int buf,static void calculate_rc_params (struct drm_dsc_config *vdsc_cfg) { +int bpp =intel_fractional_bpp_from_x16 (vdsc_cfg->bits_per_pixel);int bpc = vdsc_cfg->bits_per_component; -int bpp = vdsc_cfg->bits_per_pixel >>4 ;int qp_bpc_modifier = (bpc -8 ) *2 ;int uncompressed_bpg_rate;int first_line_bpg_offset;
@@ -149,7 +149,13 @@ calculate_rc_params(struct drm_dsc_config *vdsc_cfg)static const s8 ofs_und8[] = {10 ,8 ,6 ,4 ,2 ,0 ,-2 ,-4 ,-6 ,-8 ,-10 ,-10 ,-12 ,-12 ,-12 }; - +/* +* For 420 format since bits_per_pixel (bpp) is set to target bpp * 2, +* QP table values for target bpp 4.0 to 4.4375 (rounded to 4.0) are +* actually for bpp 8 to 8.875 (rounded to 4.0 * 2 i.e 8). +* Similarly values for target bpp 4.5 to 4.8375 (rounded to 4.5) +* are for bpp 9 to 9.875 (rounded to 4.5 * 2 i.e 9), and so on. +*/ bpp_i = bpp -8 ;for (buf_i =0 ; buf_i <DSC_NUM_BUF_RANGES ; buf_i++) {u8 range_bpg_offset;
@@ -179,6 +185,9 @@ calculate_rc_params(struct drm_dsc_config *vdsc_cfg) range_bpg_offset &DSC_RANGE_BPG_OFFSET_MASK ; } }else { +/* fractional bpp part * 10000 (for precision up to 4 decimal places) */ +int fractional_bits =intel_fractional_bpp_decimal (vdsc_cfg->bits_per_pixel); +static const s8 ofs_und6[] = {0 ,-2 ,-2 ,-4 ,-6 ,-6 ,-8 ,-8 ,-8 ,-10 ,-10 ,-12 ,-12 ,-12 ,-12 };
@@ -192,7 +201,14 @@ calculate_rc_params(struct drm_dsc_config *vdsc_cfg)10 ,8 ,6 ,4 ,2 ,0 ,-2 ,-4 ,-6 ,-8 ,-10 ,-10 ,-12 ,-12 ,-12 }; - bpp_i = (2 * (bpp -6 )); +/* +* QP table rows have values in increment of 0.5. +* So 6.0 bpp to 6.4375 will have index 0, 6.5 to 6.9375 will have index 1, +* and so on. +* 0.5 fractional part with 4 decimal precision becomes 5000 +*/ + bpp_i = ((bpp -6 ) + (fractional_bits <5000 ?0 :1 )); +for (buf_i =0 ; buf_i <DSC_NUM_BUF_RANGES ; buf_i++) {u8 range_bpg_offset;
@@ -280,8 +296,7 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)/* Gen 11 does not support VBR */ vdsc_cfg->vbr_enable = false; -/* Gen 11 only supports integral values of bpp */ - vdsc_cfg->bits_per_pixel = compressed_bpp <<4 ; + vdsc_cfg->bits_per_pixel = pipe_config->dsc.compressed_bpp_x16;/* * According to DSC 1.2 specs in Section 4.1 if native_420 is set
Signature · 1 line
2.25.1
PATCH 6/8 drm/i915/dp: Iterate over output bpp with fractional step size
In reply to Mitul GolaniFrom: Ankit Nautiyal <[email protected]>
This patch adds support to iterate over compressed output bpp as per the fractional step, supported by DP sink.
v2:
-Avoid ending up with compressed bpp, same as pipe bpp. (Stan)
--- drivers/gpu/drm/i915/display/intel_dp.c | 37 +++++++++++++++---------- 1 file changed, 23 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +23 -14
@@ -1716,15 +1716,15 @@ static bool intel_dp_dsc_supports_format(struct intel_dp *intel_dp,return drm_dp_dsc_sink_supports_format (intel_dp->dsc_dpcd, sink_dsc_format); } -static bool is_bw_sufficient_for_dsc_config (u16 compressed_bpp,u32 link_clock, +static bool is_bw_sufficient_for_dsc_config (u16 compressed_bppx16,u32 link_clock,u32 lane_count,u32 mode_clock,enum intel_output_format output_format,int timeslots) {u32 available_bw, required_bw; - available_bw = (link_clock * lane_count * timeslots) /8 ; - required_bw = compressed_bpp * (intel_dp_mode_to_fec_clock (mode_clock)); + available_bw = (link_clock * lane_count * timeslots *16 ) /8 ; + required_bw = compressed_bppx16 * (intel_dp_mode_to_fec_clock (mode_clock));return available_bw > required_bw; }
@@ -1732,7 +1732,7 @@ static bool is_bw_sufficient_for_dsc_config(u16 compressed_bpp, u32 link_clock,static int dsc_compute_link_config (struct intel_dp *intel_dp,struct intel_crtc_state *pipe_config,struct link_config_limits *limits, -u16 compressed_bpp, +u16 compressed_bppx16,int timeslots) {const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
@@ -1747,8 +1747,8 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,for (lane_count = limits->min_lane_count; lane_count <= limits->max_lane_count; lane_count <<=1 ) { -if (!is_bw_sufficient_for_dsc_config (compressed_bpp, link_rate, lane_count, - adjusted_mode->clock, +if (!is_bw_sufficient_for_dsc_config (compressed_bppx16, link_rate, + lane_count, adjusted_mode->clock, pipe_config->output_format, timeslots))continue ;
@@ -1861,7 +1861,7 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp, ret =dsc_compute_link_config (intel_dp, pipe_config, limits, - valid_dsc_bpp[i], + valid_dsc_bpp[i] <<4 , timeslots);if (ret ==0 ) { pipe_config->dsc.compressed_bpp_x16 =intel_fractional_bpp_to_x16 (valid_dsc_bpp[i]);
@@ -1887,22 +1887,31 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp, int pipe_bpp, int timeslots) { -u16 compressed_bpp; +u8 bppx16_incr =drm_dp_dsc_sink_bpp_incr (intel_dp->dsc_dpcd); +struct drm_i915_private *i915 =dp_to_i915 (intel_dp); +u16 compressed_bppx16; +u8 bppx16_step;int ret; +if (DISPLAY_VER (i915) <14 || bppx16_incr <=1 ) + bppx16_step =16 ; +else + bppx16_step =16 / bppx16_incr; +/* Compressed BPP should be less than the Input DSC bpp */ - dsc_max_bpp =min (dsc_max_bpp, pipe_bpp -1 ); + dsc_max_bpp =min (dsc_max_bpp <<4 , (pipe_bpp <<4 ) - bppx16_step); + dsc_min_bpp = dsc_min_bpp <<4 ; -for (compressed_bpp = dsc_max_bpp; - compressed_bpp >= dsc_min_bpp; - compressed_bpp--) { +for (compressed_bppx16 = dsc_max_bpp; + compressed_bppx16 >= dsc_min_bpp; + compressed_bppx16 -= bppx16_step) { ret =dsc_compute_link_config (intel_dp, pipe_config, limits, - compressed_bpp, + compressed_bppx16, timeslots);if (ret ==0 ) { - pipe_config->dsc.compressed_bpp_x16 =intel_fractional_bpp_to_x16 (compressed_bpp); + pipe_config->dsc.compressed_bpp_x16 = compressed_bppx16;return 0 ; } }
Signature · 1 line
2.25.1
PATCH 7/8 drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp
In reply to Mitul GolaniFrom: Swati Sharma <[email protected]>
DSC_Sink_BPP_Precision entry is added to i915_dsc_fec_support_show to depict sink's precision.
Also, new debugfs entry is created to enforce fractional bpp. If Force_DSC_Fractional_BPP_en is set then while iterating over output bpp with fractional step size we will continue if output_bpp is computed as integer. With this approach, we will be able to validate DSC with fractional bpp.
v2:
Add drm_modeset_unlock to new line(Suraj)
--- .../drm/i915/display/intel_display_debugfs.c | 83 +++++++++++++++++++ .../drm/i915/display/intel_display_types.h | 1 + 2 files changed, 84 insertions(+)
drivers/gpu/drm/i915/display/intel_display_debugfs.c +83 -0
@@ -1244,6 +1244,8 @@ static int i915_dsc_fec_support_show(struct seq_file *m, void *data) DP_DSC_YCbCr420_Native)),str_yes_no (drm_dp_dsc_sink_supports_format (intel_dp->dsc_dpcd, DP_DSC_YCbCr444))); +seq_printf (m,"DSC_Sink_BPP_Precision: %d\n" , +drm_dp_dsc_sink_bpp_incr (intel_dp->dsc_dpcd));seq_printf (m,"Force_DSC_Enable: %s\n" ,str_yes_no (intel_dp->force_dsc_en));if (!intel_dp_is_edp (intel_dp))
@@ -1436,6 +1438,84 @@ static const struct file_operations i915_dsc_output_format_fops = { .write = i915_dsc_output_format_write }; +static int i915_dsc_fractional_bpp_show (struct seq_file *m,void *data) +{ +struct drm_connector *connector = m->private; +struct drm_device *dev = connector->dev; +struct drm_crtc *crtc; +struct intel_dp *intel_dp; +struct intel_encoder *encoder =intel_attached_encoder (to_intel_connector (connector)); +int ret; + +if (!encoder) +return -ENODEV ; + + ret =drm_modeset_lock_single_interruptible (&dev->mode_config.connection_mutex); +if (ret) +return ret; + + crtc = connector->state->crtc; +if (connector->status != connector_status_connected || !crtc) { + ret = -ENODEV ; + goto out; + } + + intel_dp =intel_attached_dp (to_intel_connector (connector)); +seq_printf (m,"Force_DSC_Fractional_BPP_Enable: %s\n" , +str_yes_no (intel_dp->force_dsc_fractional_bpp_en)); + +out: +drm_modeset_unlock (&dev->mode_config.connection_mutex); + +return ret; +} + +static ssize_t i915_dsc_fractional_bpp_write (struct file *file, +const char __user *ubuf, +size_t len,loff_t *offp) +{ +struct drm_connector *connector = + ((struct seq_file *)file->private_data)->private; +struct intel_encoder *encoder =intel_attached_encoder (to_intel_connector (connector)); +struct drm_i915_private *i915 =to_i915 (encoder->base.dev); +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +bool dsc_fractional_bpp_enable = false; +int ret; + +if (len ==0 ) +return 0 ; + +drm_dbg (&i915->drm, +"Copied %zu bytes from user to force fractional bpp for DSC\n" , len); + + ret =kstrtobool_from_user (ubuf, len, &dsc_fractional_bpp_enable); +if (ret <0 ) +return ret; + +drm_dbg (&i915->drm,"Got %s for DSC Fractional BPP Enable\n" , + (dsc_fractional_bpp_enable) ?"true" :"false" ); + intel_dp->force_dsc_fractional_bpp_en = dsc_fractional_bpp_enable; + + *offp += len; + +return len; +} + +static int i915_dsc_fractional_bpp_open (struct inode *inode, +struct file *file) +{ +return single_open (file, i915_dsc_fractional_bpp_show, inode->i_private); +} + +static const struct file_operations i915_dsc_fractional_bpp_fops = { + .owner =THIS_MODULE , + .open = i915_dsc_fractional_bpp_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = i915_dsc_fractional_bpp_write +}; +/* * Returns the Current CRTC's bpc. * Example usage: cat /sys/kernel/debug/dri/0/crtc-0/i915_current_bpc
@@ -1513,6 +1593,9 @@ void intel_connector_debugfs_add(struct intel_connector *intel_connector)debugfs_create_file ("i915_dsc_output_format" ,0644 , root, connector, &i915_dsc_output_format_fops); + +debugfs_create_file ("i915_dsc_fractional_bpp" ,0644 , root, + connector, &i915_dsc_fractional_bpp_fops); } if (connector->connector_type == DRM_MODE_CONNECTOR_DSI ||
drivers/gpu/drm/i915/display/intel_display_types.h +1 -0
@@ -1797,6 +1797,7 @@ struct intel_dp {/* Display stream compression testing */ bool force_dsc_en;int force_dsc_output_format; +bool force_dsc_fractional_bpp_en;int force_dsc_bpc;bool hobl_failed;
Signature · 1 line
2.25.1
PATCH 8/8 drm/i915/dsc: Allow DSC only with fractional bpp when forced from debugfs
In reply to Mitul GolaniFrom: Swati Sharma <[email protected]>
If force_dsc_fractional_bpp_en is set through debugfs allow DSC iff compressed bpp is fractional. Continue if the computed compressed bpp turns out to be a integer.
v2:
-Use helpers for fractional, integral bits of bits_per_pixel. (Suraj) -Fix comment (Suraj)
--- drivers/gpu/drm/i915/display/intel_dp.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/i915/display/intel_dp.c +7 -0
@@ -1905,6 +1905,9 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,for (compressed_bppx16 = dsc_max_bpp; compressed_bppx16 >= dsc_min_bpp; compressed_bppx16 -= bppx16_step) { +if (intel_dp->force_dsc_fractional_bpp_en && + !intel_fractional_bpp_decimal (compressed_bppx16)) +continue ; ret = dsc_compute_link_config(intel_dp, pipe_config, limits,
@@ -1912,6 +1915,10 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp, timeslots);if (ret ==0 ) { pipe_config->dsc.compressed_bpp_x16 = compressed_bppx16; +if (intel_dp->force_dsc_fractional_bpp_en && +intel_fractional_bpp_decimal (compressed_bppx16)) +drm_dbg_kms (&i915->drm,"Forcing DSC fractional bpp\n" ); +return 0 ; } }
Signature · 1 line
2.25.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add DSC fractional bpp support (rev6)
In reply to Mitul Golani== Series Details ==
== Series Details ==
Series: Add DSC fractional bpp support (rev6)
URL : https://patchwork.freedesktop.org/series/111391/
State : warning
== Summary ==
Error: dim checkpatch failed7058c3132171 drm/display/dp: Add helper function to get DSC bpp prescision eef79ef63c3a drm/i915/display: Store compressed bpp in U6.4 format Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:118: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #118: FILE: drivers/gpu/drm/i915/display/intel_bios.c:3390:
+ intel_fractional_bpp_to_x16(min(crtc_state->pipe_bpp,
+ VBT_DSC_MAX_BPP(dsc->max_bpp)));
-:140: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #140: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:2571:
+ int min_cdclk_bj = (intel_fractional_bpp_from_x16(crtc_state->dsc.compressed_bpp_x16) *
-:189: WARNING:LONG_LINE: line length of 108 exceeds 100 columns #189: FILE: drivers/gpu/drm/i915/display/intel_dp.c:1867:
+ pipe_config->dsc.compressed_bpp_x16 = intel_fractional_bpp_to_x16(valid_dsc_bpp[i]);
-:198: WARNING:LONG_LINE: line length of 106 exceeds 100 columns #198: FILE: drivers/gpu/drm/i915/display/intel_dp.c:1905:
+ pipe_config->dsc.compressed_bpp_x16 = intel_fractional_bpp_to_x16(compressed_bpp);
-:207: WARNING:LONG_LINE: line length of 105 exceeds 100 columns #207: FILE: drivers/gpu/drm/i915/display/intel_dp.c:2089:
+ pipe_config->dsc.compressed_bpp_x16 = intel_fractional_bpp_to_x16(max(dsc_min_bpp, dsc_max_bpp));
-:253: WARNING:LONG_LINE: line length of 108 exceeds 100 columns #253: FILE: drivers/gpu/drm/i915/display/intel_dp.c:2275:
+ intel_fractional_bpp_from_x16(pipe_config->dsc.compressed_bpp_x16)),
-:299: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #299: FILE: drivers/gpu/drm/i915/display/intel_dp_mst.c:246:
+ intel_fractional_bpp_to_x16(intel_dp_dsc_nearest_valid_bpp(i915,
+ last_compressed_bpp,
-:314: WARNING:LONG_LINE: line length of 106 exceeds 100 columns #314: FILE: drivers/gpu/drm/i915/display/intel_dp_mst.c:258:
+ intel_fractional_bpp_from_x16(crtc_state->dsc.compressed_bpp_x16),
-:315: WARNING:LONG_LINE: line length of 106 exceeds 100 columns #315: FILE: drivers/gpu/drm/i915/display/intel_dp_mst.c:259:
+ intel_fractional_bpp_from_x16(crtc_state->dsc.compressed_bpp_x16),
-:327: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #327:
new file mode 100644
total: 0 errors, 8 warnings, 2 checks, 302 lines checked0f248379263d drm/i915/display: Consider fractional vdsc bpp while computing m_n values 1aaabe03687f drm/i915/audio : Consider fractional vdsc bpp while computing tu_data adcdfae5fce4 drm/i915/dsc/mtl: Add support for fractional bpp d5dfd1cce381 drm/i915/dp: Iterate over output bpp with fractional step size 098bb9e549cb drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp 1c1295360f87 drm/i915/dsc: Allow DSC only with fractional bpp when forced from debugfs
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Add DSC fractional bpp support (rev6)
In reply to Mitul Golani== Series Details ==
== Series Details ==
Series: Add DSC fractional bpp support (rev6)
URL : https://patchwork.freedesktop.org/series/111391/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for Add DSC fractional bpp support (rev6)
In reply to Mitul Golani== Series Details ==
== Series Details ==
Series: Add DSC fractional bpp support (rev6)
URL : https://patchwork.freedesktop.org/series/111391/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13623 -> Patchwork_111391v6
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_111391v6 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_111391v6, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/index.html
Participating hosts (39 -> 39)
------------------------------
Additional (2): bat-adlm-1 bat-adlp-11
Missing (2): fi-hsw-4770 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_111391v6:
### IGT changes ###
#### Possible regressions ####
* igt@debugfs_test@basic-hwmon:
- bat-adlm-1: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlm-1/igt@[email protected]
#### Warnings ####
* igt@gem_exec_suspend@basic-s3@lmem0:
- bat-atsm-1: [DMESG-WARN][2] ([i915#8504] / [i915#8841]) -> [ABORT][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13623/bat-atsm-1/igt@gem_exec_suspend@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-atsm-1/igt@gem_exec_suspend@[email protected]
Known issues
------------
Here are the changes found in Patchwork_111391v6 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- bat-adlp-11: NOTRUN -> [SKIP][4] ([i915#9318])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlp-11/igt@[email protected]
* igt@fbdev@eof:
- bat-adlm-1: NOTRUN -> [SKIP][5] ([i915#2582]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlm-1/igt@[email protected]
* igt@fbdev@info:
- bat-adlm-1: NOTRUN -> [SKIP][6] ([i915#1849] / [i915#2582])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlm-1/igt@[email protected]
* igt@gem_tiled_pread_basic:
- bat-adlm-1: NOTRUN -> [SKIP][7] ([i915#3282])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlm-1/igt@gem_tiled_pread_basic.html
- bat-adlp-11: NOTRUN -> [SKIP][8] ([i915#3282])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlp-11/igt@gem_tiled_pread_basic.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-adlp-11: NOTRUN -> [SKIP][9] ([i915#4103]) +1 other test skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlp-11/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- bat-adlm-1: NOTRUN -> [SKIP][10] ([i915#1845]) +8 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlm-1/igt@[email protected]
* igt@kms_flip@basic-plain-flip:
- bat-adlm-1: NOTRUN -> [SKIP][11] ([i915#3637]) +3 other tests skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlm-1/igt@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-adlp-11: NOTRUN -> [SKIP][12] ([i915#4093]) +3 other tests skip
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlp-11/igt@[email protected]
* igt@kms_hdmi_inject@inject-audio:
- bat-adlp-11: NOTRUN -> [SKIP][13] ([i915#4369])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlp-11/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [PASS][14] -> [ABORT][15] ([i915#8668])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13623/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_psr@primary_page_flip:
- bat-adlp-11: NOTRUN -> [SKIP][16] ([i915#1072]) +3 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlp-11/igt@kms_psr@primary_page_flip.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-adlp-11: NOTRUN -> [ABORT][17] ([i915#8260] / [i915#8668])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-adlp-11/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][18] ([i915#5334]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13623/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@hugepages:
- bat-mtlp-8: [DMESG-WARN][20] ([i915#9121]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13623/bat-mtlp-8/igt@i915_selftest@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/bat-mtlp-8/igt@i915_selftest@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- fi-bsw-nick: [FAIL][22] ([i915#9276]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13623/fi-bsw-nick/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/fi-bsw-nick/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#4093]: https://gitlab.freedesktop.org/drm/intel/issues/4093
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4369]: https://gitlab.freedesktop.org/drm/intel/issues/4369
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#8260]: https://gitlab.freedesktop.org/drm/intel/issues/8260
[i915#8504]: https://gitlab.freedesktop.org/drm/intel/issues/8504
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#8841]: https://gitlab.freedesktop.org/drm/intel/issues/8841
[i915#9121]: https://gitlab.freedesktop.org/drm/intel/issues/9121
[i915#9276]: https://gitlab.freedesktop.org/drm/intel/issues/9276
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
Build changes
-------------
* Linux: CI_DRM_13623 -> Patchwork_111391v6
CI-20190529: 20190529
CI_DRM_13623: eb35627e1c4a3781c161cd04944e403ce6df3e1c @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7480: a8d38db9ac258d7fd71b2cf7607e259a864f95be @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_111391v6: eb35627e1c4a3781c161cd04944e403ce6df3e1c @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
44d4f543cda7 drm/i915/dsc: Allow DSC only with fractional bpp when forced from debugfs 84d5f3fcf954 drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp e21e8867b729 drm/i915/dp: Iterate over output bpp with fractional step size 6c8c5feeb8ef drm/i915/dsc/mtl: Add support for fractional bpp 3a6322013df2 drm/i915/audio : Consider fractional vdsc bpp while computing tu_data 6cdc0b003bf0 drm/i915/display: Consider fractional vdsc bpp while computing m_n values c27eac390726 drm/i915/display: Store compressed bpp in U6.4 format c7d04fc75d28 drm/display/dp: Add helper function to get DSC bpp prescision
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111391v6/index.html