disp: msm: sde: update hw configs on dnsc_blur disable
Currently, dnsc_blur hardware block is not updated when the connector dnsc_blur property is set to NULL or when dnsc_blur_count is 0. Update the dnsc_blur hw block configs to avoid stale configs affecting the current frame. Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com> Change-Id: If64dc5548b03edba401fb7f40edf3419dbe57ca3
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
d7c495fba1
commit
728f9d65ca
@@ -1426,23 +1426,32 @@ static void _sde_encoder_phys_wb_setup_dnsc_blur(struct sde_encoder_phys *phys_e
|
|||||||
int i;
|
int i;
|
||||||
bool enable;
|
bool enable;
|
||||||
|
|
||||||
if (!sde_kms->catalog->dnsc_blur_count || !hw_dnsc_blur || !hw_pp
|
if (!sde_kms->catalog->dnsc_blur_count || !hw_pp)
|
||||||
|| !hw_dnsc_blur->ops.setup_dnsc_blur)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sde_conn = to_sde_connector(wb_dev->connector);
|
sde_conn = to_sde_connector(wb_dev->connector);
|
||||||
sde_conn_state = to_sde_connector_state(wb_dev->connector->state);
|
sde_conn_state = to_sde_connector_state(wb_dev->connector->state);
|
||||||
|
|
||||||
if (sde_conn_state->dnsc_blur_count && !hw_dnsc_blur) {
|
if (sde_conn_state->dnsc_blur_count
|
||||||
|
&& (!hw_dnsc_blur || !hw_dnsc_blur->ops.setup_dnsc_blur)) {
|
||||||
SDE_ERROR("[enc:%d wb:%d] invalid config - dnsc_blur block not reserved\n",
|
SDE_ERROR("[enc:%d wb:%d] invalid config - dnsc_blur block not reserved\n",
|
||||||
DRMID(phys_enc->parent), WBID(wb_enc));
|
DRMID(phys_enc->parent), WBID(wb_enc));
|
||||||
sde_kms->catalog->dnsc_blur_count = 0;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* swap between 0 & 1 lut idx on each config change for gaussian lut */
|
/* swap between 0 & 1 lut idx on each config change for gaussian lut */
|
||||||
sde_conn_state->dnsc_blur_lut = 1 - sde_conn_state->dnsc_blur_lut;
|
sde_conn_state->dnsc_blur_lut = 1 - sde_conn_state->dnsc_blur_lut;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* disable dnsc_blur case - safe to update the opmode as dynamic switching of
|
||||||
|
* dnsc_blur hw block between WBs are not supported currently.
|
||||||
|
*/
|
||||||
|
if (hw_dnsc_blur && !sde_conn_state->dnsc_blur_count) {
|
||||||
|
hw_dnsc_blur->ops.setup_dnsc_blur(hw_dnsc_blur, NULL, 0);
|
||||||
|
SDE_EVT32(DRMID(phys_enc->parent), WBID(wb_enc), SDE_EVTLOG_FUNC_CASE1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < sde_conn_state->dnsc_blur_count; i++) {
|
for (i = 0; i < sde_conn_state->dnsc_blur_count; i++) {
|
||||||
cfg = &sde_conn_state->dnsc_blur_cfg[i];
|
cfg = &sde_conn_state->dnsc_blur_cfg[i];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user