disp: msm: sde: add support for hw-fence feature
Starting mdss 9.0, dpu supports triggering the frame fetch through hw-fencing. This change adds support for this hw-fence feature. Change-Id: Icc7d0b69fc2a51103d14612f5ac89b44a47ed826 Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com> Signed-off-by: Christina Oliveira <quic_coliveir@quicinc.com>
This commit is contained in:

gecommit door
Gerrit - the friendly Code Review server

bovenliggende
487e4ebec2
commit
640c8111d3
@@ -178,6 +178,7 @@
|
||||
*************************************************************/
|
||||
enum {
|
||||
SDE_HW_VERSION,
|
||||
SDE_HW_FENCE_VERSION,
|
||||
SDE_HW_PROP_MAX,
|
||||
};
|
||||
|
||||
@@ -574,6 +575,7 @@ struct sde_dt_props {
|
||||
*************************************************************/
|
||||
static struct sde_prop_type sde_hw_prop[] = {
|
||||
{SDE_HW_VERSION, "qcom,sde-hw-version", false, PROP_TYPE_U32},
|
||||
{SDE_HW_FENCE_VERSION, "qcom,hw-fence-sw-version", false, PROP_TYPE_U32},
|
||||
};
|
||||
|
||||
static struct sde_prop_type sde_prop[] = {
|
||||
@@ -5215,6 +5217,22 @@ end:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void _sde_hw_fence_caps(struct sde_mdss_cfg *sde_cfg)
|
||||
{
|
||||
struct sde_ctl_cfg *ctl;
|
||||
int i;
|
||||
|
||||
if (!sde_cfg->hw_fence_rev)
|
||||
return;
|
||||
|
||||
set_bit(SDE_FEATURE_HW_FENCE_IPCC, sde_cfg->features);
|
||||
|
||||
for (i = 0; i < sde_cfg->ctl_count; i++) {
|
||||
ctl = sde_cfg->ctl + i;
|
||||
set_bit(SDE_CTL_HW_FENCE, &ctl->features);
|
||||
}
|
||||
}
|
||||
|
||||
static int _sde_hardware_post_caps(struct sde_mdss_cfg *sde_cfg,
|
||||
uint32_t hw_rev)
|
||||
{
|
||||
@@ -5262,6 +5280,8 @@ static int _sde_hardware_post_caps(struct sde_mdss_cfg *sde_cfg,
|
||||
sde_cfg->min_display_width = MIN_DISPLAY_WIDTH;
|
||||
sde_cfg->max_cwb = min_t(u32, sde_cfg->wb_count, MAX_CWB_SESSIONS);
|
||||
|
||||
_sde_hw_fence_caps(sde_cfg);
|
||||
|
||||
rc = _sde_hw_dnsc_blur_filter_caps(sde_cfg);
|
||||
|
||||
return rc;
|
||||
@@ -5356,6 +5376,11 @@ static int sde_hw_ver_parse_dt(struct drm_device *dev, struct device_node *np,
|
||||
else
|
||||
cfg->hw_rev = sde_kms_get_hw_version(dev);
|
||||
|
||||
if (prop_exists[SDE_HW_FENCE_VERSION])
|
||||
cfg->hw_fence_rev = PROP_VALUE_ACCESS(prop_value, SDE_HW_FENCE_VERSION, 0);
|
||||
else
|
||||
cfg->hw_fence_rev = 0; /* disable hw-fences */
|
||||
|
||||
end:
|
||||
kfree(prop_value);
|
||||
return rc;
|
||||
|
Verwijs in nieuw issue
Block a user