mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
drm/i915/dp: Add intel_dp_dsc_get_slice_config()
Add intel_dp_dsc_get_slice_config() to compute the detailed slice
configuration and determine the slices-per-line value (returned by
intel_dp_dsc_get_slice_count()) using this function.
v2: Fix incorrectly returning false from intel_dp_dsc_min_slice_count()
due to rebase fail. (Jouni)
Cc: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260114162232.92731-15-imre.deak@intel.com
This commit is contained in:
parent
088d06bb17
commit
54cf7900c6
|
|
@ -1019,9 +1019,11 @@ static int intel_dp_dsc_min_slice_count(const struct intel_connector *connector,
|
|||
return min_slice_count;
|
||||
}
|
||||
|
||||
u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
|
||||
int mode_clock, int mode_hdisplay,
|
||||
int num_joined_pipes)
|
||||
static bool
|
||||
intel_dp_dsc_get_slice_config(const struct intel_connector *connector,
|
||||
int mode_clock, int mode_hdisplay,
|
||||
int num_joined_pipes,
|
||||
struct intel_dsc_slice_config *config_ret)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(connector);
|
||||
int min_slice_count =
|
||||
|
|
@ -1058,8 +1060,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
|
|||
if (mode_hdisplay % slices_per_line)
|
||||
continue;
|
||||
|
||||
if (min_slice_count <= slices_per_line)
|
||||
return slices_per_line;
|
||||
if (min_slice_count <= slices_per_line) {
|
||||
*config_ret = config;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Print slice count 1,2,4,..24 if bit#0,1,3,..23 is set in the mask. */
|
||||
|
|
@ -1070,7 +1075,21 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
|
|||
min_slice_count,
|
||||
(int)BITS_PER_TYPE(sink_slice_count_mask), &sink_slice_count_mask);
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
|
||||
int mode_clock, int mode_hdisplay,
|
||||
int num_joined_pipes)
|
||||
{
|
||||
struct intel_dsc_slice_config config;
|
||||
|
||||
if (!intel_dp_dsc_get_slice_config(connector,
|
||||
mode_clock, mode_hdisplay,
|
||||
num_joined_pipes, &config))
|
||||
return 0;
|
||||
|
||||
return intel_dsc_line_slice_count(&config);
|
||||
}
|
||||
|
||||
static bool source_can_output(struct intel_dp *intel_dp,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user