disp: msm: sde: modify check for active datapaths

In some cases like suspend and cwb concurrencies,
the number of mixers in the sde_crtc structure
can become zero. Add support to get the number
of mixers from topology in those cases to
avoid incorrect resource allocation request.

Change-Id: Id9b82e805ff50a107ad06514b4e41c0917abdf33
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
This commit is contained in:
Krishna Manikandan
2020-03-24 15:04:12 +05:30
zatwierdzone przez Nilaan Gunabalachandran
rodzic 7116441b24
commit 5541a20748
3 zmienionych plików z 57 dodań i 13 usunięć

Wyświetl plik

@@ -502,17 +502,6 @@ static inline int sde_crtc_get_mixer_height(struct sde_crtc *sde_crtc,
cstate->ds_cfg[0].lm_height : mode->vdisplay);
}
/**
* sde_crtc_get_num_datapath - get the number of datapath active
* @crtc: Pointer to drm crtc object
*/
static inline int sde_crtc_get_num_datapath(struct drm_crtc *crtc)
{
struct sde_crtc *sde_crtc = to_sde_crtc(crtc);
return sde_crtc ? sde_crtc->num_mixers : 0;
}
/**
* sde_crtc_frame_pending - retun the number of pending frames
* @crtc: Pointer to drm crtc object
@@ -892,4 +881,13 @@ void sde_crtc_static_img_control(struct drm_crtc *crtc,
*/
void sde_crtc_static_cache_read_kickoff(struct drm_crtc *crtc);
/**
* sde_crtc_get_num_datapath - get the number of datapath active
* of primary connector
* @crtc: Pointer to DRM crtc object
* @connector: Pointer to DRM connector object of WB in CWB case
*/
int sde_crtc_get_num_datapath(struct drm_crtc *crtc,
struct drm_connector *connector);
#endif /* _SDE_CRTC_H_ */