disp: msm: sde: use crtc_width instead of hdisplay for crtc/lm
The interface resolution can be different from crtc/layer-mixer WxH when certain features like destination scaler are enabled. Use the sde_crtc_get_width/sde_crtc_get_mixer_width functions throughout to get the correct crtc/lm size based on different features enabled. This will help in validating/configuring lm & plane correctly. Change-Id: I45de5844bf7465a3389cf723479c5449a835fb0a Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Este cometimento está contido em:
@@ -599,6 +599,25 @@ static inline int sde_crtc_get_mixer_height(struct sde_crtc *sde_crtc,
|
||||
cstate->ds_cfg[0].lm_height : mode->vdisplay);
|
||||
}
|
||||
|
||||
/**
|
||||
* sde_crtc_get_width - get the correct crtc width based on the features enabled
|
||||
*/
|
||||
static inline int sde_crtc_get_width(struct sde_crtc *sde_crtc,
|
||||
struct sde_crtc_state *cstate, struct drm_display_mode *mode)
|
||||
{
|
||||
u32 width;
|
||||
|
||||
if (!sde_crtc || !cstate || !mode)
|
||||
return 0;
|
||||
|
||||
if (cstate->num_ds_enabled)
|
||||
width = cstate->ds_cfg[0].lm_width * cstate->num_ds_enabled;
|
||||
else
|
||||
width = mode->hdisplay;
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
/**
|
||||
* sde_crtc_frame_pending - retun the number of pending frames
|
||||
* @crtc: Pointer to drm crtc object
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador