@@ -1767,11 +1767,11 @@ static int dsc_compute_link_config(struct intel_dp *intel_dp,
1767
1767
}
1768
1768
1769
1769
static
1770
- u16 intel_dp_dsc_max_sink_compressed_bppx16 (struct intel_dp * intel_dp ,
1770
+ u16 intel_dp_dsc_max_sink_compressed_bppx16 (const struct intel_connector * connector ,
1771
1771
struct intel_crtc_state * pipe_config ,
1772
1772
int bpc )
1773
1773
{
1774
- u16 max_bppx16 = drm_edp_dsc_sink_output_bpp (intel_dp -> dsc_dpcd );
1774
+ u16 max_bppx16 = drm_edp_dsc_sink_output_bpp (connector -> dp . dsc_dpcd );
1775
1775
1776
1776
if (max_bppx16 )
1777
1777
return max_bppx16 ;
@@ -1810,11 +1810,11 @@ static int dsc_sink_min_compressed_bpp(struct intel_crtc_state *pipe_config)
1810
1810
return 0 ;
1811
1811
}
1812
1812
1813
- static int dsc_sink_max_compressed_bpp (struct intel_dp * intel_dp ,
1813
+ static int dsc_sink_max_compressed_bpp (const struct intel_connector * connector ,
1814
1814
struct intel_crtc_state * pipe_config ,
1815
1815
int bpc )
1816
1816
{
1817
- return intel_dp_dsc_max_sink_compressed_bppx16 (intel_dp ,
1817
+ return intel_dp_dsc_max_sink_compressed_bppx16 (connector ,
1818
1818
pipe_config , bpc ) >> 4 ;
1819
1819
}
1820
1820
@@ -1913,6 +1913,7 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,
1913
1913
}
1914
1914
1915
1915
static int dsc_compute_compressed_bpp (struct intel_dp * intel_dp ,
1916
+ const struct intel_connector * connector ,
1916
1917
struct intel_crtc_state * pipe_config ,
1917
1918
struct link_config_limits * limits ,
1918
1919
int pipe_bpp ,
@@ -1930,7 +1931,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,
1930
1931
dsc_min_bpp = max (dsc_min_bpp , to_bpp_int_roundup (limits -> link .min_bpp_x16 ));
1931
1932
1932
1933
dsc_src_max_bpp = dsc_src_max_compressed_bpp (intel_dp );
1933
- dsc_sink_max_bpp = dsc_sink_max_compressed_bpp (intel_dp , pipe_config , pipe_bpp / 3 );
1934
+ dsc_sink_max_bpp = dsc_sink_max_compressed_bpp (connector , pipe_config , pipe_bpp / 3 );
1934
1935
dsc_max_bpp = dsc_sink_max_bpp ? min (dsc_sink_max_bpp , dsc_src_max_bpp ) : dsc_src_max_bpp ;
1935
1936
1936
1937
dsc_joiner_max_bpp = get_max_compressed_bpp_with_joiner (i915 , adjusted_mode -> clock ,
@@ -2002,6 +2003,8 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
2002
2003
int timeslots )
2003
2004
{
2004
2005
struct drm_i915_private * i915 = dp_to_i915 (intel_dp );
2006
+ const struct intel_connector * connector =
2007
+ to_intel_connector (conn_state -> connector );
2005
2008
u8 max_req_bpc = conn_state -> max_requested_bpc ;
2006
2009
u8 dsc_max_bpc , dsc_max_bpp ;
2007
2010
u8 dsc_min_bpc , dsc_min_bpp ;
@@ -2012,7 +2015,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
2012
2015
forced_bpp = intel_dp_force_dsc_pipe_bpp (intel_dp , conn_state , limits );
2013
2016
2014
2017
if (forced_bpp ) {
2015
- ret = dsc_compute_compressed_bpp (intel_dp , pipe_config ,
2018
+ ret = dsc_compute_compressed_bpp (intel_dp , connector , pipe_config ,
2016
2019
limits , forced_bpp , timeslots );
2017
2020
if (ret == 0 ) {
2018
2021
pipe_config -> pipe_bpp = forced_bpp ;
@@ -2041,7 +2044,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
2041
2044
break ;
2042
2045
if (pipe_bpp > dsc_max_bpp )
2043
2046
continue ;
2044
- ret = dsc_compute_compressed_bpp (intel_dp , pipe_config ,
2047
+ ret = dsc_compute_compressed_bpp (intel_dp , connector , pipe_config ,
2045
2048
limits , pipe_bpp , timeslots );
2046
2049
if (ret == 0 ) {
2047
2050
pipe_config -> pipe_bpp = pipe_bpp ;
@@ -2088,7 +2091,7 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
2088
2091
dsc_min_bpp = max (dsc_min_bpp , to_bpp_int_roundup (limits -> link .min_bpp_x16 ));
2089
2092
2090
2093
dsc_src_max_bpp = dsc_src_max_compressed_bpp (intel_dp );
2091
- dsc_sink_max_bpp = dsc_sink_max_compressed_bpp (intel_dp , pipe_config , pipe_bpp / 3 );
2094
+ dsc_sink_max_bpp = dsc_sink_max_compressed_bpp (connector , pipe_config , pipe_bpp / 3 );
2092
2095
dsc_max_bpp = dsc_sink_max_bpp ? min (dsc_sink_max_bpp , dsc_src_max_bpp ) : dsc_src_max_bpp ;
2093
2096
dsc_max_bpp = min (dsc_max_bpp , to_bpp_int (limits -> link .max_bpp_x16 ));
2094
2097
0 commit comments