Lines Matching refs:dsc
37 static int dsi_populate_dsc_params(struct msm_dsi_host *msm_host, struct drm_dsc_config *dsc);
164 struct drm_dsc_config *dsc; member
845 struct drm_dsc_config *dsc = msm_host->dsc; in dsi_update_dsc_timing() local
854 slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width); in dsi_update_dsc_timing()
860 if (slice_per_intf > dsc->slice_count) in dsi_update_dsc_timing()
861 dsc->slice_count = 1; in dsi_update_dsc_timing()
863 total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf; in dsi_update_dsc_timing()
866 pkt_per_line = slice_per_intf / dsc->slice_count; in dsi_update_dsc_timing()
889 reg_ctrl2 |= DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH(dsc->slice_chunk_size); in dsi_update_dsc_timing()
931 if (msm_host->dsc) { in dsi_timing_setup()
932 struct drm_dsc_config *dsc = msm_host->dsc; in dsi_timing_setup() local
935 if (!dsc || !mode->hdisplay || !mode->vdisplay) { in dsi_timing_setup()
941 dsc->pic_width = mode->hdisplay; in dsi_timing_setup()
942 dsc->pic_height = mode->vdisplay; in dsi_timing_setup()
943 DBG("Mode %dx%d\n", dsc->pic_width, dsc->pic_height); in dsi_timing_setup()
948 ret = dsi_populate_dsc_params(msm_host, dsc); in dsi_timing_setup()
962 if (msm_host->dsc) in dsi_timing_setup()
983 if (msm_host->dsc) in dsi_timing_setup()
987 if (!msm_host->dsc) in dsi_timing_setup()
1603 if (dsi->dsc) in dsi_host_attach()
1604 msm_host->dsc = dsi->dsc; in dsi_host_attach()
1754 static int dsi_populate_dsc_params(struct msm_dsi_host *msm_host, struct drm_dsc_config *dsc) in dsi_populate_dsc_params() argument
1757 u16 bpp = dsc->bits_per_pixel >> 4; in dsi_populate_dsc_params()
1759 if (dsc->bits_per_pixel & 0xf) { in dsi_populate_dsc_params()
1764 if (dsc->bits_per_component != 8) { in dsi_populate_dsc_params()
1769 dsc->rc_model_size = 8192; in dsi_populate_dsc_params()
1770 dsc->first_line_bpg_offset = 12; in dsi_populate_dsc_params()
1771 dsc->rc_edge_factor = 6; in dsi_populate_dsc_params()
1772 dsc->rc_tgt_offset_high = 3; in dsi_populate_dsc_params()
1773 dsc->rc_tgt_offset_low = 3; in dsi_populate_dsc_params()
1774 dsc->simple_422 = 0; in dsi_populate_dsc_params()
1775 dsc->convert_rgb = 1; in dsi_populate_dsc_params()
1776 dsc->vbr_enable = 0; in dsi_populate_dsc_params()
1780 dsc->rc_buf_thresh[i] = dsi_dsc_rc_buf_thresh[i]; in dsi_populate_dsc_params()
1783 dsc->rc_range_params[i].range_min_qp = min_qp[i]; in dsi_populate_dsc_params()
1784 dsc->rc_range_params[i].range_max_qp = max_qp[i]; in dsi_populate_dsc_params()
1789 dsc->rc_range_params[i].range_bpg_offset = bpg_offset[i] & DSC_RANGE_BPG_OFFSET_MASK; in dsi_populate_dsc_params()
1792 dsc->initial_offset = 6144; /* Not bpp 12 */ in dsi_populate_dsc_params()
1794 dsc->initial_offset = 2048; /* bpp = 12 */ in dsi_populate_dsc_params()
1796 if (dsc->bits_per_component <= 10) in dsi_populate_dsc_params()
1797 dsc->mux_word_size = DSC_MUX_WORD_SIZE_8_10_BPC; in dsi_populate_dsc_params()
1799 dsc->mux_word_size = DSC_MUX_WORD_SIZE_12_BPC; in dsi_populate_dsc_params()
1801 dsc->initial_xmit_delay = 512; in dsi_populate_dsc_params()
1802 dsc->initial_scale_value = 32; in dsi_populate_dsc_params()
1803 dsc->first_line_bpg_offset = 12; in dsi_populate_dsc_params()
1804 dsc->line_buf_depth = dsc->bits_per_component + 1; in dsi_populate_dsc_params()
1807 dsc->flatness_min_qp = 3; in dsi_populate_dsc_params()
1808 dsc->flatness_max_qp = 12; in dsi_populate_dsc_params()
1809 dsc->rc_quant_incr_limit0 = 11; in dsi_populate_dsc_params()
1810 dsc->rc_quant_incr_limit1 = 11; in dsi_populate_dsc_params()
1812 return drm_dsc_compute_rc_parameters(dsc); in dsi_populate_dsc_params()
2502 struct drm_dsc_config *dsc = msm_host->dsc; in msm_dsi_host_check_dsc() local
2506 if (!msm_host->dsc) in msm_dsi_host_check_dsc()
2509 if (pic_width % dsc->slice_width) { in msm_dsi_host_check_dsc()
2511 pic_width, dsc->slice_width); in msm_dsi_host_check_dsc()
2515 if (pic_height % dsc->slice_height) { in msm_dsi_host_check_dsc()
2517 pic_height, dsc->slice_height); in msm_dsi_host_check_dsc()
2606 return msm_host->dsc; in msm_dsi_host_get_dsc_config()