|
43 | 43 | #include <drm/drm_atomic_helper.h> |
44 | 44 | #include <drm/drm_crtc.h> |
45 | 45 | #include <drm/drm_edid.h> |
| 46 | +#include <drm/drm_fixed.h> |
46 | 47 | #include <drm/drm_probe_helper.h> |
47 | 48 |
|
48 | 49 | #include "g4x_dp.h" |
@@ -2022,7 +2023,7 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp, |
2022 | 2023 | timeslots); |
2023 | 2024 | if (ret == 0) { |
2024 | 2025 | pipe_config->dsc.compressed_bpp_x16 = |
2025 | | - to_bpp_x16(valid_dsc_bpp[i]); |
| 2026 | + fxp_q4_from_int(valid_dsc_bpp[i]); |
2026 | 2027 | return 0; |
2027 | 2028 | } |
2028 | 2029 | } |
@@ -2275,7 +2276,7 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, |
2275 | 2276 | dsc_max_bpp = min(dsc_max_bpp, pipe_bpp - 1); |
2276 | 2277 |
|
2277 | 2278 | pipe_config->dsc.compressed_bpp_x16 = |
2278 | | - to_bpp_x16(max(dsc_min_bpp, dsc_max_bpp)); |
| 2279 | + fxp_q4_from_int(max(dsc_min_bpp, dsc_max_bpp)); |
2279 | 2280 |
|
2280 | 2281 | pipe_config->pipe_bpp = pipe_bpp; |
2281 | 2282 |
|
@@ -2407,15 +2408,15 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp, |
2407 | 2408 | int max_link_bpp_x16; |
2408 | 2409 |
|
2409 | 2410 | max_link_bpp_x16 = min(crtc_state->max_link_bpp_x16, |
2410 | | - to_bpp_x16(limits->pipe.max_bpp)); |
| 2411 | + fxp_q4_from_int(limits->pipe.max_bpp)); |
2411 | 2412 |
|
2412 | 2413 | if (!dsc) { |
2413 | | - max_link_bpp_x16 = rounddown(max_link_bpp_x16, to_bpp_x16(2 * 3)); |
| 2414 | + max_link_bpp_x16 = rounddown(max_link_bpp_x16, fxp_q4_from_int(2 * 3)); |
2414 | 2415 |
|
2415 | | - if (max_link_bpp_x16 < to_bpp_x16(limits->pipe.min_bpp)) |
| 2416 | + if (max_link_bpp_x16 < fxp_q4_from_int(limits->pipe.min_bpp)) |
2416 | 2417 | return false; |
2417 | 2418 |
|
2418 | | - limits->link.min_bpp_x16 = to_bpp_x16(limits->pipe.min_bpp); |
| 2419 | + limits->link.min_bpp_x16 = fxp_q4_from_int(limits->pipe.min_bpp); |
2419 | 2420 | } else { |
2420 | 2421 | /* |
2421 | 2422 | * TODO: set the DSC link limits already here, atm these are |
@@ -3061,8 +3062,8 @@ intel_dp_compute_config(struct intel_encoder *encoder, |
3061 | 3062 | if (pipe_config->dsc.compression_enable) |
3062 | 3063 | link_bpp_x16 = pipe_config->dsc.compressed_bpp_x16; |
3063 | 3064 | else |
3064 | | - link_bpp_x16 = to_bpp_x16(intel_dp_output_bpp(pipe_config->output_format, |
3065 | | - pipe_config->pipe_bpp)); |
| 3065 | + link_bpp_x16 = fxp_q4_from_int(intel_dp_output_bpp(pipe_config->output_format, |
| 3066 | + pipe_config->pipe_bpp)); |
3066 | 3067 |
|
3067 | 3068 | if (intel_dp->mso_link_count) { |
3068 | 3069 | int n = intel_dp->mso_link_count; |
|
0 commit comments