2727
2828#include <drm/display/drm_dsc_helper.h>
2929#include <drm/drm_atomic_helper.h>
30+ #include <drm/drm_fixed.h>
3031#include <drm/drm_mipi_dsi.h>
3132
3233#include "i915_reg.h"
@@ -330,7 +331,7 @@ static int afe_clk(struct intel_encoder *encoder,
330331 int bpp ;
331332
332333 if (crtc_state -> dsc .compression_enable )
333- bpp = to_bpp_int (crtc_state -> dsc .compressed_bpp_x16 );
334+ bpp = fxp_q4_to_int (crtc_state -> dsc .compressed_bpp_x16 );
334335 else
335336 bpp = mipi_dsi_pixel_format_to_bpp (intel_dsi -> pixel_format );
336337
@@ -863,7 +864,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,
863864 * compressed and non-compressed bpp.
864865 */
865866 if (crtc_state -> dsc .compression_enable ) {
866- mul = to_bpp_int (crtc_state -> dsc .compressed_bpp_x16 );
867+ mul = fxp_q4_to_int (crtc_state -> dsc .compressed_bpp_x16 );
867868 div = mipi_dsi_pixel_format_to_bpp (intel_dsi -> pixel_format );
868869 }
869870
@@ -887,7 +888,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,
887888 int bpp , line_time_us , byte_clk_period_ns ;
888889
889890 if (crtc_state -> dsc .compression_enable )
890- bpp = to_bpp_int (crtc_state -> dsc .compressed_bpp_x16 );
891+ bpp = fxp_q4_to_int (crtc_state -> dsc .compressed_bpp_x16 );
891892 else
892893 bpp = mipi_dsi_pixel_format_to_bpp (intel_dsi -> pixel_format );
893894
@@ -1470,7 +1471,7 @@ static void gen11_dsi_get_timings(struct intel_encoder *encoder,
14701471 & pipe_config -> hw .adjusted_mode ;
14711472
14721473 if (pipe_config -> dsc .compressed_bpp_x16 ) {
1473- int div = to_bpp_int (pipe_config -> dsc .compressed_bpp_x16 );
1474+ int div = fxp_q4_to_int (pipe_config -> dsc .compressed_bpp_x16 );
14741475 int mul = mipi_dsi_pixel_format_to_bpp (intel_dsi -> pixel_format );
14751476
14761477 adjusted_mode -> crtc_htotal =
0 commit comments