mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-21 00:54:52 -04:00
media: iris: Avoid updating frame size to firmware during reconfig
During reconfig, the firmware sends the resolution aligned to 8 bytes.
If the driver sends the same resolution back to the firmware the resolution
will be aligned to 16 bytes not 8.
The alignment mismatch would then subsequently cause the firmware to
send another redundant sequence change event.
Fix this by not setting the resolution property during reconfig.
Cc: stable@vger.kernel.org
Fixes: 3a19d7b9e0 ("media: iris: implement set properties to firmware during streamon")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # on sa8775p-ride
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
committed by
Hans Verkuil
parent
8aadfd4453
commit
caf2055487
@@ -546,14 +546,15 @@ static int iris_hfi_gen1_set_resolution(struct iris_inst *inst)
|
||||
struct hfi_framesize fs;
|
||||
int ret;
|
||||
|
||||
fs.buffer_type = HFI_BUFFER_INPUT;
|
||||
fs.width = inst->fmt_src->fmt.pix_mp.width;
|
||||
fs.height = inst->fmt_src->fmt.pix_mp.height;
|
||||
|
||||
ret = hfi_gen1_set_property(inst, ptype, &fs, sizeof(fs));
|
||||
if (ret)
|
||||
return ret;
|
||||
if (!iris_drc_pending(inst)) {
|
||||
fs.buffer_type = HFI_BUFFER_INPUT;
|
||||
fs.width = inst->fmt_src->fmt.pix_mp.width;
|
||||
fs.height = inst->fmt_src->fmt.pix_mp.height;
|
||||
|
||||
ret = hfi_gen1_set_property(inst, ptype, &fs, sizeof(fs));
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
fs.buffer_type = HFI_BUFFER_OUTPUT2;
|
||||
fs.width = inst->fmt_dst->fmt.pix_mp.width;
|
||||
fs.height = inst->fmt_dst->fmt.pix_mp.height;
|
||||
|
||||
@@ -245,7 +245,7 @@ int iris_inst_sub_state_change_pause(struct iris_inst *inst, u32 plane)
|
||||
return iris_inst_change_sub_state(inst, 0, set_sub_state);
|
||||
}
|
||||
|
||||
static inline bool iris_drc_pending(struct iris_inst *inst)
|
||||
bool iris_drc_pending(struct iris_inst *inst)
|
||||
{
|
||||
return inst->sub_state & IRIS_INST_SUB_DRC &&
|
||||
inst->sub_state & IRIS_INST_SUB_DRC_LAST;
|
||||
|
||||
@@ -140,5 +140,6 @@ int iris_inst_sub_state_change_drain_last(struct iris_inst *inst);
|
||||
int iris_inst_sub_state_change_drc_last(struct iris_inst *inst);
|
||||
int iris_inst_sub_state_change_pause(struct iris_inst *inst, u32 plane);
|
||||
bool iris_allow_cmd(struct iris_inst *inst, u32 cmd);
|
||||
bool iris_drc_pending(struct iris_inst *inst);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user