disp: msm: dp: filter modes based on sde resource availability
Not considering the currently available sde resources and caps while filtering/validating a mode will report unavailable modes and result in an atomic commit failure. DP should calculate the number of required lms and verify if lms/3dmux are available before a validating a mode. Change-Id: Idadcc655c30f5a831c47cf22b60085052b5b9fcd Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:
@@ -1860,7 +1860,8 @@ end:
|
||||
|
||||
static enum drm_mode_status dp_display_validate_mode(
|
||||
struct dp_display *dp_display,
|
||||
void *panel, struct drm_display_mode *mode)
|
||||
void *panel, struct drm_display_mode *mode,
|
||||
const struct msm_resource_caps_info *avail_res)
|
||||
{
|
||||
struct dp_display_private *dp;
|
||||
struct drm_dp_link *link_info;
|
||||
@@ -1873,8 +1874,10 @@ static enum drm_mode_status dp_display_validate_mode(
|
||||
int hdis, vdis, vref, ar, _hdis, _vdis, _vref, _ar, rate;
|
||||
struct dp_display_mode dp_mode;
|
||||
bool dsc_en;
|
||||
u32 num_lm = 0;
|
||||
|
||||
if (!dp_display || !mode || !panel) {
|
||||
if (!dp_display || !mode || !panel ||
|
||||
!avail_res || !avail_res->max_mixer_width) {
|
||||
pr_err("invalid params\n");
|
||||
return mode_status;
|
||||
}
|
||||
@@ -1917,6 +1920,15 @@ static enum drm_mode_status dp_display_validate_mode(
|
||||
goto end;
|
||||
}
|
||||
|
||||
num_lm = (avail_res->max_mixer_width <= mode->hdisplay) ?
|
||||
2 : 1;
|
||||
if (num_lm > avail_res->num_lm ||
|
||||
(num_lm == 2 && !avail_res->num_3dmux)) {
|
||||
DP_MST_DEBUG("num_lm:%d, req lm:%d 3dmux:%d\n", num_lm,
|
||||
avail_res->num_lm, avail_res->num_3dmux);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the connector exists in the mst connector list and if debug is
|
||||
* enabled for that connector, use the mst connector settings from the
|
||||
|
Viittaa uudesa ongelmassa
Block a user