/Linux-v6.6/drivers/gpu/drm/msm/disp/dpu1/ |
D | dpu_hw_dsc.c | 36 static void dpu_hw_dsc_disable(struct dpu_hw_dsc *dsc) in dpu_hw_dsc_disable() argument 38 struct dpu_hw_blk_reg_map *c = &dsc->hw; in dpu_hw_dsc_disable() 44 struct drm_dsc_config *dsc, in dpu_hw_dsc_config() argument 59 slice_last_group_size = (dsc->slice_width + 2) % 3; in dpu_hw_dsc_config() 64 data |= (dsc->bits_per_pixel << 8); in dpu_hw_dsc_config() 65 data |= (dsc->block_pred_enable << 7); in dpu_hw_dsc_config() 66 data |= (dsc->line_buf_depth << 3); in dpu_hw_dsc_config() 67 data |= (dsc->simple_422 << 2); in dpu_hw_dsc_config() 68 data |= (dsc->convert_rgb << 1); in dpu_hw_dsc_config() 69 data |= dsc->bits_per_component; in dpu_hw_dsc_config() [all …]
|
D | dpu_hw_dsc_1_2.c | 86 struct drm_dsc_config *dsc, in dpu_hw_dsc_config_1_2() argument 97 if (!hw_dsc || !dsc) in dpu_hw_dsc_config_1_2() 110 num_active_slice_per_enc = dsc->slice_count; in dpu_hw_dsc_config_1_2() 112 num_active_slice_per_enc = dsc->slice_count / 2; in dpu_hw_dsc_config_1_2() 127 data = (dsc->dsc_version_minor & 0xf) << 28; in dpu_hw_dsc_config_1_2() 128 if (dsc->dsc_version_minor == 0x2) { in dpu_hw_dsc_config_1_2() 129 if (dsc->native_422) in dpu_hw_dsc_config_1_2() 131 if (dsc->native_420) in dpu_hw_dsc_config_1_2() 135 bpp = dsc->bits_per_pixel; in dpu_hw_dsc_config_1_2() 139 if (dsc->native_422 || dsc->native_420) in dpu_hw_dsc_config_1_2() [all …]
|
D | dpu_hw_dsc.h | 19 * struct dpu_hw_dsc_ops - interface to the dsc hardware driver functions 24 * dsc_disable - disable dsc 25 * @hw_dsc: Pointer to dsc context 30 * dsc_config - configures dsc encoder 31 * @hw_dsc: Pointer to dsc context 32 * @dsc: panel dsc parameters 33 * @mode: dsc topology mode to be set 37 struct drm_dsc_config *dsc, 43 * @hw_dsc: Pointer to dsc context 44 * @dsc: panel dsc parameters [all …]
|
D | dpu_encoder.c | 131 * @hw_dsc: Handle to the DSC blocks used for the display. 132 * @dsc_mask: Bitmask of used DSC blocks. 165 * @dsc: drm_dsc_config pointer, for DSC-enabled encoders 208 /* DSC configuration */ 209 struct drm_dsc_config *dsc; member 536 if (dpu_enc->dsc) in dpu_encoder_use_dsc_merge() 559 struct drm_dsc_config *dsc) in dpu_encoder_get_topology() argument 591 if (dsc) { in dpu_encoder_get_topology() 593 * In case of Display Stream Compression (DSC), we would use in dpu_encoder_get_topology() 594 * 2 DSC encoders, 2 layer mixers and 1 interface in dpu_encoder_get_topology() [all …]
|
/Linux-v6.6/drivers/gpu/drm/amd/display/dc/dcn20/ |
D | dcn20_dsc.c | 30 #include "dsc/dscc_types.h" 31 #include "dsc/rc_calc.h" 33 static void dsc_write_to_registers(struct display_stream_compressor *dsc, const struct dsc_reg_valu… 36 static void dsc2_read_state(struct display_stream_compressor *dsc, struct dcn_dsc_state *s); 37 static bool dsc2_validate_stream(struct display_stream_compressor *dsc, const struct dsc_config *ds… 38 static void dsc2_set_config(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg, 40 static void dsc2_enable(struct display_stream_compressor *dsc, int opp_pipe); 41 static void dsc2_disable(struct display_stream_compressor *dsc); 42 static void dsc2_disconnect(struct display_stream_compressor *dsc); 66 dsc->ctx->logger [all …]
|
/Linux-v6.6/drivers/gpu/drm/msm/ |
D | msm_dsc_helper.h | 5 * Helper methods for MSM-specific DSC calculations that are common between timing engine, 17 * @dsc: Pointer to drm dsc config struct 21 static inline u32 msm_dsc_get_slices_per_intf(const struct drm_dsc_config *dsc, u32 intf_width) in msm_dsc_get_slices_per_intf() argument 23 return DIV_ROUND_UP(intf_width, dsc->slice_width); in msm_dsc_get_slices_per_intf() 28 * @dsc: Pointer to drm dsc config struct 33 static inline u32 msm_dsc_get_bytes_per_line(const struct drm_dsc_config *dsc) in msm_dsc_get_bytes_per_line() argument 35 return dsc->slice_count * dsc->slice_chunk_size; in msm_dsc_get_bytes_per_line()
|
/Linux-v6.6/drivers/gpu/drm/amd/display/dc/inc/hw/ |
D | dsc.h | 36 /* Input parameters for configuring DSC from the outside of DSC */ 47 /* Output parameters for configuring DSC-related part of OPTC */ 69 /* DSC encoder capabilities 70 * They differ from the DPCD DSC caps because they are based on AMD DSC encoder caps. 76 uint8_t NUM_SLICES_3 : 1; /* This one is not per DSC spec, but our encoder supports it */ 99 void (*dsc_read_state)(struct display_stream_compressor *dsc, struct dcn_dsc_state *s); 100 …bool (*dsc_validate_stream)(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cf… 101 void (*dsc_set_config)(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg, 103 bool (*dsc_get_packed_pps)(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg, 105 void (*dsc_enable)(struct display_stream_compressor *dsc, int opp_pipe); [all …]
|
/Linux-v6.6/drivers/gpu/drm/i915/display/ |
D | intel_vdsc.c | 49 /* There's no pipe A DSC engine on ICL */ in is_pipe_dsc() 69 * We are using the method provided in DSC 1.2a C-Model in codec_main.c 70 * Above method use a common formula to derive values for any combination of DSC 92 * According to DSC 1.2 spec in Section 4.1 if native_420 is set: in calculate_rc_params() 244 struct drm_dsc_config *vdsc_cfg = &pipe_config->dsc.config; in intel_dsc_compute_params() 245 u16 compressed_bpp = pipe_config->dsc.compressed_bpp; in intel_dsc_compute_params() 251 pipe_config->dsc.slice_count); in intel_dsc_compute_params() 261 * According to DSC 1.2 specs if colorspace is YCbCr then convert_rgb is 0 in intel_dsc_compute_params() 280 * According to DSC 1.2 specs in Section 4.1 if native_420 is set in intel_dsc_compute_params() 355 int num_vdsc_instances = (crtc_state->dsc.dsc_split) ? 2 : 1; in intel_dsc_get_num_vdsc_instances() [all …]
|
D | intel_dp_mst.c | 51 bool dsc) in intel_dp_mst_check_constraints() argument 53 if (intel_dp_is_uhbr(crtc_state) && DISPLAY_VER(i915) <= 13 && dsc) { in intel_dp_mst_check_constraints() 76 bool dsc) in intel_dp_mst_find_vcpi_slots_for_bpp() argument 107 ret = intel_dp_mst_check_constraints(i915, bpp, adjusted_mode, crtc_state, dsc); in intel_dp_mst_find_vcpi_slots_for_bpp() 112 dsc ? bpp << 4 : bpp, in intel_dp_mst_find_vcpi_slots_for_bpp() 113 dsc); in intel_dp_mst_find_vcpi_slots_for_bpp() 140 if (!dsc) in intel_dp_mst_find_vcpi_slots_for_bpp() 143 crtc_state->dsc.compressed_bpp = bpp; in intel_dp_mst_find_vcpi_slots_for_bpp() 144 drm_dbg_kms(&i915->drm, "Got %d slots for pipe bpp %d dsc %d\n", slots, bpp, dsc); in intel_dp_mst_find_vcpi_slots_for_bpp() 197 /* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */ in intel_dp_dsc_mst_compute_link_config() [all …]
|
/Linux-v6.6/drivers/gpu/drm/amd/display/dc/dsc/ |
D | dc_dsc.c | 28 #include "dsc.h" 35 /* default DSC policy target bitrate limit is 16bpp */ 38 /* default DSC policy enables DSC only when needed */ 63 if (!timing->flags.DSC) { in apply_128b_132b_stream_overhead() 94 if (timing->flags.DSC) in dc_bandwidth_in_kbps_from_timing() 162 const struct display_stream_compressor *dsc, 198 dm_error("%s: DPCD DSC buffer size not recognized.\n", __func__); in dsc_buff_block_size_from_dpcd() 214 dm_error("%s: DPCD DSC buffer depth not recognized.\n", __func__); in dsc_line_buff_depth_from_dpcd() 274 dm_error("%s: DPCD DSC throughput mode not recognized.\n", __func__); in dsc_throughput_from_dpcd() 305 dm_error("%s: DPCD DSC bits-per-pixel increment not recognized.\n", __func__); in dsc_bpp_increment_div_from_dpcd() [all …]
|
D | Makefile | 3 # Makefile for the 'dsc' sub-component of DAL. 4 DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o macro 6 AMD_DAL_DSC = $(addprefix $(AMDDALPATH)/dc/dsc/,$(DSC))
|
D | rc_calc.c | 30 * @rc: DC internal DSC parameters 31 * @pps: DRM struct with all required DSC values 33 * This function expects a drm_dsc_config data struct with all the required DSC 35 * computes some of the DSC values.
|
/Linux-v6.6/drivers/gpu/drm/amd/display/dc/dcn314/ |
D | dcn314_hwseq.c | 54 #include "dsc.h" 97 struct display_stream_compressor *dsc = pipe_ctx->stream_res.dsc; in update_dsc_on_stream() local 102 ASSERT(dsc); in update_dsc_on_stream() 111 /* Enable DSC hw block */ in update_dsc_on_stream() 121 dsc->funcs->dsc_set_config(dsc, &dsc_cfg, &dsc_optc_cfg); in update_dsc_on_stream() 122 dsc->funcs->dsc_enable(dsc, pipe_ctx->stream_res.opp->inst); in update_dsc_on_stream() 124 struct display_stream_compressor *odm_dsc = odm_pipe->stream_res.dsc; in update_dsc_on_stream() 135 /* Enable DSC in OPTC */ in update_dsc_on_stream() 136 DC_LOG_DSC("Setting optc DSC config for tg instance %d:", pipe_ctx->stream_res.tg->inst); in update_dsc_on_stream() 142 /* disable DSC in OPTC */ in update_dsc_on_stream() [all …]
|
/Linux-v6.6/Documentation/devicetree/bindings/display/mediatek/ |
D | mediatek,dsc.yaml | 4 $id: http://devicetree.org/schemas/display/mediatek/mediatek,dsc.yaml# 7 title: mediatek display DSC controller 14 The DSC standard is a specification of the algorithms used for 17 video bit stream. DSC is designed for real-time systems with 24 - mediatek,mt8195-disp-dsc 34 - description: DSC Wrapper Clock 73 compatible = "mediatek,mt8195-disp-dsc";
|
/Linux-v6.6/drivers/gpu/drm/panel/ |
D | panel-visionox-r66451.c | 196 if (!dsi->dsc) { in visionox_r66451_enable() 197 dev_err(&dsi->dev, "DSC not attached to DSI\n"); in visionox_r66451_enable() 201 drm_dsc_pps_payload_pack(&pps, dsi->dsc); in visionox_r66451_enable() 298 struct drm_dsc_config *dsc; in visionox_r66451_probe() local 305 dsc = devm_kzalloc(dev, sizeof(*dsc), GFP_KERNEL); in visionox_r66451_probe() 306 if (!dsc) in visionox_r66451_probe() 309 /* Set DSC params */ in visionox_r66451_probe() 310 dsc->dsc_version_major = 0x1; in visionox_r66451_probe() 311 dsc->dsc_version_minor = 0x2; in visionox_r66451_probe() 313 dsc->slice_height = 20; in visionox_r66451_probe() [all …]
|
/Linux-v6.6/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | amdgpu_dm_debugfs.c | 36 #include "dsc.h" 1113 * Disable dsc passthrough, i.e.,: have dsc decoding at converver, not external RX 1115 * Enable dsc passthrough, i.e.,: have dsc passthrough to external RX 1244 /* function: Read link's DSC & FEC capabilities 1287 * enable DSC on the sink device or on MST branch in dp_dsc_fec_support_show() 1430 /* function: read DSC status on the connector 1433 * returns current status of DSC clock on the connector. 1442 * 1 - means that DSC is currently enabled 1443 * 0 - means that DSC is disabled 1451 struct display_stream_compressor *dsc; in dp_dsc_clock_en_read() local [all …]
|
/Linux-v6.6/include/drm/display/ |
D | drm_dsc.h | 13 /* VESA Display Stream Compression DSC 1.2 constants */ 21 /* DSC Rate Control Constants */ 27 /* DSC PPS constants and macros */ 48 * struct drm_dsc_rc_range_parameters - DSC Rate Control range parameters 50 * This defines different rate control parameters used by the DSC engine 70 * struct drm_dsc_config - Parameters required to configure DSC 92 * @slice_count: Number fo slices per line used by the DSC encoder 242 * @dsc_version_minor: DSC minor version 246 * @dsc_version_major: DSC major version 279 * The VESA DSC standard defines picture parameter set (PPS) which display [all …]
|
D | drm_dsc_helper.h | 15 DRM_DSC_1_1_PRE_SCR, /* legacy params from DSC 1.1 */ 28 u8 drm_dsc_initial_scale_value(const struct drm_dsc_config *dsc); 29 u32 drm_dsc_flatness_det_thresh(const struct drm_dsc_config *dsc);
|
/Linux-v6.6/drivers/gpu/drm/msm/dsi/ |
D | dsi_host.c | 38 static int dsi_populate_dsc_params(struct msm_dsi_host *msm_host, struct drm_dsc_config *dsc); 162 struct drm_dsc_config *dsc; member 532 const struct drm_dsc_config *dsc) in dsi_adjust_pclk_for_compression() argument 534 int new_hdisplay = DIV_ROUND_UP(mode->hdisplay * drm_dsc_get_bpp_int(dsc), in dsi_adjust_pclk_for_compression() 535 dsc->bits_per_component * 3); in dsi_adjust_pclk_for_compression() 543 const struct drm_dsc_config *dsc, bool is_bonded_dsi) in dsi_get_pclk_rate() argument 549 if (dsc) in dsi_get_pclk_rate() 550 pclk_rate = dsi_adjust_pclk_for_compression(mode, dsc); in dsi_get_pclk_rate() 570 unsigned long pclk_rate = dsi_get_pclk_rate(mode, msm_host->dsc, is_bonded_dsi); in dsi_byte_clk_get_rate() 589 msm_host->pixel_clk_rate = dsi_get_pclk_rate(msm_host->mode, msm_host->dsc, is_bonded_dsi); in dsi_calc_pclk() [all …]
|
/Linux-v6.6/drivers/gpu/drm/amd/display/dc/link/ |
D | link_dpms.c | 55 #include "dsc.h" 737 static void dsc_optc_config_log(struct display_stream_compressor *dsc, in dsc_optc_config_log() argument 744 DC_LOGGER_INIT(dsc->ctx->logger); in dsc_optc_config_log() 746 /* 7 fractional digits decimal precision for bytes per pixel is enough because DSC in dsc_optc_config_log() 772 /* The stream with these settings can be sent (unblanked) only after DSC was enabled on RX first, 777 struct display_stream_compressor *dsc = pipe_ctx->stream_res.dsc; in link_set_dsc_on_stream() local 781 DC_LOGGER_INIT(dsc->ctx->logger); in link_set_dsc_on_stream() 791 /* Enable DSC hw block */ in link_set_dsc_on_stream() 801 dsc->funcs->dsc_set_config(dsc, &dsc_cfg, &dsc_optc_cfg); in link_set_dsc_on_stream() 802 dsc->funcs->dsc_enable(dsc, pipe_ctx->stream_res.opp->inst); in link_set_dsc_on_stream() [all …]
|
/Linux-v6.6/drivers/gpu/drm/tests/ |
D | drm_dp_mst_helper_test.c | 18 const bool dsc; member 26 .dsc = false, 32 .dsc = false, 38 .dsc = false, 44 .dsc = true, 50 .dsc = true, 59 KUNIT_EXPECT_EQ(test, drm_dp_calc_pbn_mode(params->clock, params->bpp, params->dsc), in drm_test_dp_mst_calc_pbn_mode() 65 sprintf(desc, "Clock %d BPP %d DSC %s", t->clock, t->bpp, t->dsc ? "enabled" : "disabled"); in dp_mst_calc_pbn_mode_desc()
|
/Linux-v6.6/drivers/gpu/drm/display/ |
D | drm_dsc_helper.c | 20 * DOC: dsc helpers 23 * Compression (DSC) used to compress the pixel bits before sending it on 24 * DP/eDP/MIPI DSI interface. DSC is required to be enabled so that the existing 29 * Display Stream Compression standard required for DSC on Display Port/eDP or 36 * @pps_header: Secondary data packet header for DSC Picture 81 * drm_dsc_pps_payload_pack() - Populates the DSC PPS 84 * Bitwise struct for DSC Picture Parameter Set. This is defined 87 * DSC Configuration data filled by driver as defined by 90 * DSC source device sends a picture parameter set (PPS) containing the 92 * populates the DSC PPS struct using the DSC configuration parameters in [all …]
|
/Linux-v6.6/drivers/gpu/drm/amd/display/dc/ |
D | dc_hw_types.h | 771 uint32_t DSC : 1; /* Use DSC with this timing */ member 824 uint32_t num_slices_h; /* Number of DSC slices - horizontal */ 825 uint32_t num_slices_v; /* Number of DSC slices - vertical */ 826 uint32_t bits_per_pixel; /* DSC target bitrate in 1/16 of bpp (e.g. 128 -> 8bpp) */ 827 bool block_pred_enable; /* DSC block prediction enable */ 828 uint32_t linebuf_depth; /* DSC line buffer depth */ 829 uint32_t version_minor; /* DSC minor version. Full version is formed as 1.version_minor. */ 830 bool ycbcr422_simple; /* Tell DSC engine to convert YCbCr 4:2:2 to 'YCbCr 4:2:2 simple'. */ 831 int32_t rc_buffer_size; /* DSC RC buffer block size in bytes */ 833 bool is_frl; /* indicate if DSC is applied based on HDMI FRL sink's capability */ [all …]
|
D | dc_dsc.h | 28 /* DP Extended DSC Capabilities */ 70 const struct display_stream_compressor *dsc, 80 const struct display_stream_compressor *dsc, 96 /* TODO - Hardware/specs limitation should be owned by dc dsc and returned to DM,
|
/Linux-v6.6/drivers/gpu/drm/amd/display/dc/dcn32/ |
D | dcn32_hwseq.c | 48 #include "dsc.h" 1000 struct display_stream_compressor *dsc = pipe_ctx->stream_res.dsc; in update_dsc_on_stream() local 1005 ASSERT(dsc); in update_dsc_on_stream() 1014 /* Enable DSC hw block */ in update_dsc_on_stream() 1024 dsc->funcs->dsc_set_config(dsc, &dsc_cfg, &dsc_optc_cfg); in update_dsc_on_stream() 1025 dsc->funcs->dsc_enable(dsc, pipe_ctx->stream_res.opp->inst); in update_dsc_on_stream() 1027 struct display_stream_compressor *odm_dsc = odm_pipe->stream_res.dsc; in update_dsc_on_stream() 1038 /* Enable DSC in OPTC */ in update_dsc_on_stream() 1039 DC_LOG_DSC("Setting optc DSC config for tg instance %d:", pipe_ctx->stream_res.tg->inst); in update_dsc_on_stream() 1045 /* disable DSC in OPTC */ in update_dsc_on_stream() [all …]
|