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>
This commit is contained in:
Nilaan Gunabalachandran
2021-09-21 10:43:03 -04:00
förälder f1ae36dfab
incheckning 711eabbf43
3 ändrade filer med 42 tillägg och 4 borttagningar

Visa fil

@@ -512,15 +512,23 @@ bool sde_encoder_is_cwb_disabling(struct drm_encoder *drm_enc,
* sde_encoder_is_primary_display - checks if underlying display is primary
* display or not.
* @drm_enc: Pointer to drm encoder structure
* @Return: true if it is primary display. false if secondary display
* @Return: true if it is primary display. false otherwise
*/
bool sde_encoder_is_primary_display(struct drm_encoder *enc);
/**
* sde_encoder_is_built_in_display - checks if underlying display is built in
* display or not.
* @drm_enc: Pointer to drm encoder structure
* @Return: true if it is a built in display. false otherwise
*/
bool sde_encoder_is_built_in_display(struct drm_encoder *enc);
/**
* sde_encoder_is_dsi_display - checks if underlying display is DSI
* display or not.
* @drm_enc: Pointer to drm encoder structure
* @Return: true if it is primary display. false if secondary display
* @Return: true if it is a dsi display. false otherwise
*/
bool sde_encoder_is_dsi_display(struct drm_encoder *enc);