disp: msm: sde: add check for layer-mixer width
Add check in layer mixer to avoid odd values as HW does not support it. Change-Id: Ifddd2047c81a016b774712ee52cfceca83374e6d Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
2a3b371021
commit
84d43e8596
@@ -1215,6 +1215,24 @@ static inline int sde_connector_state_get_compression_info(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool sde_connector_is_3d_merge_enabled(struct drm_connector *conn)
|
||||||
|
{
|
||||||
|
enum sde_rm_topology_name topology;
|
||||||
|
|
||||||
|
if (!conn)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
topology = sde_connector_get_topology_name(conn);
|
||||||
|
if ((topology == SDE_RM_TOPOLOGY_DUALPIPE_3DMERGE)
|
||||||
|
|| (topology == SDE_RM_TOPOLOGY_DUALPIPE_3DMERGE_DSC)
|
||||||
|
|| (topology == SDE_RM_TOPOLOGY_DUALPIPE_3DMERGE_VDC)
|
||||||
|
|| (topology == SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE)
|
||||||
|
|| (topology == SDE_RM_TOPOLOGY_QUADPIPE_3DMERGE_DSC))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sde_connector_set_msm_mode - set msm_mode for connector state
|
* sde_connector_set_msm_mode - set msm_mode for connector state
|
||||||
* @conn_state: Pointer to drm connector state structure
|
* @conn_state: Pointer to drm connector state structure
|
||||||
|
@@ -1402,6 +1402,13 @@ static int _sde_crtc_check_rois(struct drm_crtc *crtc,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sde_connector_is_3d_merge_enabled(conn) && (mixer_width % 2)) {
|
||||||
|
SDE_ERROR(
|
||||||
|
"%s: invalid width w/ 3d-merge - mixer_w:%d, crtc_w:%d, num_mixers:%d\n",
|
||||||
|
sde_crtc->name, crtc_width, mixer_width, sde_crtc->num_mixers);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!mode_info.roi_caps.enabled)
|
if (!mode_info.roi_caps.enabled)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user