disp: msm: sde: account for pref lm when exposing avail resources

If an external display, such as DP, requests for the available
resources, resource manager (RM) will provide a count of all unused
mixers. If the primary/secondary display(s) are not active, the RM
will report the associated preferred mixers as free resources.
However, RM will not allow preferred mixers to be allocated to other
displays. DP driver could look at these available resources and assume
a high resolution mode is possible and fail during resource allocation.

This change updates the available resources info API to account for
primary/secondary preferences while exposing available resources.

Change-Id: I134a1047f24ac9f1fcee695aa14a1d3e43c1571f
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
这个提交包含在:
Nilaan Gunabalachandran
2021-09-21 10:43:03 -04:00
父节点 f1ae36dfab
当前提交 711eabbf43
修改 3 个文件,包含 42 行新增4 行删除

查看文件

@@ -342,6 +342,15 @@ bool sde_encoder_is_primary_display(struct drm_encoder *drm_enc)
SDE_CONNECTOR_PRIMARY);
}
bool sde_encoder_is_built_in_display(struct drm_encoder *drm_enc)
{
struct sde_encoder_virt *sde_enc = to_sde_encoder_virt(drm_enc);
return sde_enc &&
(sde_enc->disp_info.display_type == SDE_CONNECTOR_PRIMARY ||
sde_enc->disp_info.display_type == SDE_CONNECTOR_SECONDARY);
}
bool sde_encoder_is_dsi_display(struct drm_encoder *drm_enc)
{
struct sde_encoder_virt *sde_enc = to_sde_encoder_virt(drm_enc);