disp: msm: sde: dynamic lm reservation for secondary disp
Primary and secondary displays should have first priority when reserving lms. Static reservation can potentially block higher resolutions for the required displays. This patch gets the layer mixer requirement for primary or secondary display if available. It reserves those layer mixers dynamically for the respective display when connector is registered. Change-Id: Id69dac4c72d6b20008049f4aeb71c0f97d0a426b Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:

کامیت شده توسط
Gerrit - the friendly Code Review server

والد
06f8bcc142
کامیت
52855c704a
@@ -1533,8 +1533,8 @@ int sde_connector_helper_reset_custom_properties(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _sde_connector_primary_preference(struct sde_connector *sde_conn,
|
||||
struct sde_kms *sde_kms)
|
||||
static int _sde_connector_lm_preference(struct sde_connector *sde_conn,
|
||||
struct sde_kms *sde_kms, uint32_t disp_type)
|
||||
{
|
||||
int ret = 0;
|
||||
u32 num_lm = 0;
|
||||
@@ -1544,6 +1544,11 @@ static int _sde_connector_primary_preference(struct sde_connector *sde_conn,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!disp_type || disp_type >= SDE_CONNECTOR_MAX) {
|
||||
SDE_DEBUG("invalid display_type");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = sde_conn->ops.get_default_lms(sde_conn->display, &num_lm);
|
||||
if (ret || !num_lm) {
|
||||
SDE_DEBUG("failed to get default lm count");
|
||||
@@ -1557,7 +1562,7 @@ static int _sde_connector_primary_preference(struct sde_connector *sde_conn,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
sde_hw_mixer_set_preference(sde_kms->catalog, num_lm);
|
||||
sde_hw_mixer_set_preference(sde_kms->catalog, num_lm, disp_type);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2453,8 +2458,8 @@ struct drm_connector *sde_connector_init(struct drm_device *dev,
|
||||
goto error_destroy_property;
|
||||
}
|
||||
|
||||
if (display_info.is_primary)
|
||||
_sde_connector_primary_preference(c_conn, sde_kms);
|
||||
_sde_connector_lm_preference(c_conn, sde_kms,
|
||||
display_info.display_type);
|
||||
|
||||
SDE_DEBUG("connector %d attach encoder %d\n",
|
||||
c_conn->base.base.id, encoder->base.id);
|
||||
|
مرجع در شماره جدید
Block a user