if (control_mask & PIPE_LOCK_CONTROL_MODE)
update_lock_mode = lock_val;
- REG_SET_4(BLND_V_UPDATE_LOCK[blnd_inst], val,
+
+ REG_SET_2(BLND_V_UPDATE_LOCK[blnd_inst], val,
BLND_DCP_GRPH_V_UPDATE_LOCK, dcp_grph,
- BLND_SCL_V_UPDATE_LOCK, scl,
- BLND_BLND_V_UPDATE_LOCK, blnd,
- BLND_V_UPDATE_LOCK_MODE, update_lock_mode);
+ BLND_SCL_V_UPDATE_LOCK, scl);
+
+ if (hws->masks->BLND_BLND_V_UPDATE_LOCK != 0)
+ REG_SET_2(BLND_V_UPDATE_LOCK[blnd_inst], val,
+ BLND_BLND_V_UPDATE_LOCK, blnd,
+ BLND_V_UPDATE_LOCK_MODE, update_lock_mode);
- if (hws->wa.blnd_crtc_trigger)
+ if (hws->wa.blnd_crtc_trigger) {
if (!lock && (control_mask & PIPE_LOCK_CONTROL_BLENDER)) {
uint32_t value = REG_READ(CRTC_H_BLANK_START_END[blnd_inst]);
REG_WRITE(CRTC_H_BLANK_START_END[blnd_inst], value);
}
+ }
}
void dce_set_blender_mode(struct dce_hwseq *hws,
break;
}
- REG_UPDATE_4(BLND_CONTROL[blnd_inst],
- BLND_FEEDTHROUGH_EN, feedthrough,
- BLND_ALPHA_MODE, alpha_mode,
- BLND_MODE, blnd_mode,
- BLND_MULTIPLIED_MODE, multiplied_mode);
+ REG_UPDATE(BLND_CONTROL[blnd_inst],
+ BLND_MODE, blnd_mode);
+
+ if (hws->masks->BLND_ALPHA_MODE != 0) {
+ REG_UPDATE_3(BLND_CONTROL[blnd_inst],
+ BLND_FEEDTHROUGH_EN, feedthrough,
+ BLND_ALPHA_MODE, alpha_mode,
+ BLND_MULTIPLIED_MODE, multiplied_mode);
+ }
}
if (data->taps.h_taps + data->taps.v_taps <= 2) {
/* Set bypass */
- REG_UPDATE_2(SCL_MODE, SCL_MODE, 0, SCL_PSCL_EN, 0);
+ if (xfm_dce->xfm_mask->SCL_PSCL_EN != 0)
+ REG_UPDATE_2(SCL_MODE, SCL_MODE, 0, SCL_PSCL_EN, 0);
+ else
+ REG_UPDATE(SCL_MODE, SCL_MODE, 0);
return false;
}
SCL_V_NUM_OF_TAPS, data->taps.v_taps - 1);
if (data->format <= PIXEL_FORMAT_GRPH_END)
- REG_UPDATE_2(SCL_MODE, SCL_MODE, 1, SCL_PSCL_EN, 1);
+ REG_UPDATE(SCL_MODE, SCL_MODE, 1);
else
- REG_UPDATE_2(SCL_MODE, SCL_MODE, 2, SCL_PSCL_EN, 1);
+ REG_UPDATE(SCL_MODE, SCL_MODE, 2);
+
+ if (xfm_dce->xfm_mask->SCL_PSCL_EN != 0)
+ REG_UPDATE(SCL_MODE, SCL_PSCL_EN, 1);
/* 1 - Replace out of bound pixels with edge */
REG_SET(SCL_CONTROL, 0, SCL_BOUNDARY_MODE, 1);