disp: msm: dp: Extend mode filtering to support 8K
Currently DP driver determines if a mode is DSC capable based on a DTSI entry and the required number of DSC to support it. This approach does not scale when there is an overlap in DSC requirement between DSI displays and external DP display, thus causing one of the display to report modes that cannot be supported. This change compares the resources reserved for DP driver calculated at initialization time and the currently available ones to determine the correct number of resources that DP driver can use. It also adds DSC and topology filtering logic and moves DSC hardware specific from DP driver to SDE driver. Change-Id: I8e601de33422b7c6d786826f7bfe152c4af8a6b5 Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
This commit is contained in:
@@ -383,6 +383,7 @@ int dp_connector_get_mode_info(struct drm_connector *connector,
|
||||
struct dp_display_mode dp_mode;
|
||||
struct dp_display *dp_disp = display;
|
||||
struct msm_drm_private *priv;
|
||||
struct msm_resource_caps_info avail_dp_res;
|
||||
int rc = 0;
|
||||
|
||||
if (!drm_mode || !mode_info || !avail_res ||
|
||||
@@ -400,7 +401,14 @@ int dp_connector_get_mode_info(struct drm_connector *connector,
|
||||
|
||||
topology = &mode_info->topology;
|
||||
|
||||
rc = msm_get_mixer_count(priv, drm_mode, avail_res,
|
||||
rc = dp_disp->get_available_dp_resources(dp_disp, avail_res,
|
||||
&avail_dp_res);
|
||||
if (rc) {
|
||||
DP_ERR("error getting max dp resources. rc:%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = msm_get_mixer_count(priv, drm_mode, &avail_dp_res,
|
||||
&topology->num_lm);
|
||||
if (rc) {
|
||||
DP_ERR("error getting mixer count. rc:%d\n", rc);
|
||||
@@ -644,8 +652,10 @@ enum drm_mode_status dp_connector_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode, void *display,
|
||||
const struct msm_resource_caps_info *avail_res)
|
||||
{
|
||||
int rc = 0;
|
||||
struct dp_display *dp_disp;
|
||||
struct sde_connector *sde_conn;
|
||||
struct msm_resource_caps_info avail_dp_res;
|
||||
|
||||
if (!mode || !display || !connector) {
|
||||
DP_ERR("invalid params\n");
|
||||
@@ -661,8 +671,15 @@ enum drm_mode_status dp_connector_mode_valid(struct drm_connector *connector,
|
||||
dp_disp = display;
|
||||
mode->vrefresh = drm_mode_vrefresh(mode);
|
||||
|
||||
rc = dp_disp->get_available_dp_resources(dp_disp, avail_res,
|
||||
&avail_dp_res);
|
||||
if (rc) {
|
||||
DP_ERR("error getting max dp resources. rc:%d\n", rc);
|
||||
return MODE_ERROR;
|
||||
}
|
||||
|
||||
return dp_disp->validate_mode(dp_disp, sde_conn->drv_panel,
|
||||
mode, avail_res);
|
||||
mode, &avail_dp_res);
|
||||
}
|
||||
|
||||
int dp_connector_update_pps(struct drm_connector *connector,
|
||||
|
Reference in New Issue
Block a user