disp: msm: sde: expose dnsc_blur connector properties

Add downscale blur connector properties to expose the hw block count,
downscaling filters used and the ratios supported. Add a custom dnsc_blur
property to allow usermode to send the required configuration to program
the hardware. Expose only for the virtual connector as the dnsc_blur is
only supported with writeback block.

Change-Id: I35dd263d9d5aafdb59bacbb3a0528ffd2bcaf6a3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2021-09-13 21:34:32 -07:00
parent c24dd3d172
commit 93ec98a33e
6 changed files with 115 additions and 85 deletions

View File

@@ -167,6 +167,40 @@ void sde_kms_info_stop(struct sde_kms_info *info)
}
}
void sde_kms_info_append_dnsc_blur_filter_info(struct sde_kms_info *info,
struct sde_dnsc_blur_filter_info *filter_info)
{
int i;
uint32_t len, cur_len;
if (!info)
return;
len = snprintf(info->data + info->staged_len, SDE_KMS_INFO_MAX_SIZE - info->staged_len,
info->start ?
"%c/%c/%c/%c/%c/%c/%c/%c/%c/" : " %c/%c/%c/%c/%c/%c/%c/%c/%c/",
filter_info->filter & 0xFF, filter_info->src_min & 0xFF,
filter_info->src_max & 0xFF, filter_info->dst_min & 0xFF,
filter_info->dst_max & 0xFF, filter_info->min_ratio & 0xFF,
filter_info->max_ratio & 0xFF, filter_info->fraction_support & 0xFF,
filter_info->ratio_count & 0xFF);
cur_len = len;
for (i = 0; i < filter_info->ratio_count; i++) {
len = snprintf(info->data + (info->staged_len + cur_len),
SDE_KMS_INFO_MAX_SIZE - (info->staged_len + cur_len),
(i == filter_info->ratio_count - 1) ? "%c" : "%c,",
filter_info->ratio[i]);
cur_len += len;
}
/* check if snprintf truncated the string */
if ((info->staged_len + cur_len) < SDE_KMS_INFO_MAX_SIZE) {
info->staged_len += cur_len;
info->start = false;
}
}
void sde_kms_rect_intersect(const struct sde_rect *r1,
const struct sde_rect *r2,
struct sde_rect *result)