mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
media: iris: stop encoding PIPE value into fw_caps
The value of the PIPE property depends on the number of pipes available on the platform and is frequently the only difference between several fw_caps. In order to reduce duplication, use num_vpp_pipe from the iris_platform_data rather than hardcoding the value into the fw_cap. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com> Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> [bod: duplciation -> duplication] Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
7a02a8b984
commit
6c67d1cf18
|
|
@ -313,13 +313,23 @@ void iris_session_init_caps(struct iris_core *core)
|
|||
continue;
|
||||
|
||||
core->inst_fw_caps_dec[cap_id].cap_id = caps[i].cap_id;
|
||||
core->inst_fw_caps_dec[cap_id].min = caps[i].min;
|
||||
core->inst_fw_caps_dec[cap_id].max = caps[i].max;
|
||||
core->inst_fw_caps_dec[cap_id].step_or_mask = caps[i].step_or_mask;
|
||||
core->inst_fw_caps_dec[cap_id].value = caps[i].value;
|
||||
core->inst_fw_caps_dec[cap_id].flags = caps[i].flags;
|
||||
core->inst_fw_caps_dec[cap_id].hfi_id = caps[i].hfi_id;
|
||||
core->inst_fw_caps_dec[cap_id].set = caps[i].set;
|
||||
|
||||
if (cap_id == PIPE) {
|
||||
core->inst_fw_caps_dec[cap_id].value =
|
||||
core->iris_platform_data->num_vpp_pipe;
|
||||
core->inst_fw_caps_dec[cap_id].min =
|
||||
core->iris_platform_data->num_vpp_pipe;
|
||||
core->inst_fw_caps_dec[cap_id].max =
|
||||
core->iris_platform_data->num_vpp_pipe;
|
||||
} else {
|
||||
core->inst_fw_caps_dec[cap_id].min = caps[i].min;
|
||||
core->inst_fw_caps_dec[cap_id].max = caps[i].max;
|
||||
core->inst_fw_caps_dec[cap_id].value = caps[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
caps = core->iris_platform_data->inst_fw_caps_enc;
|
||||
|
|
|
|||
|
|
@ -160,10 +160,8 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
|
|||
},
|
||||
{
|
||||
.cap_id = PIPE,
|
||||
.min = PIPE_1,
|
||||
.max = PIPE_4,
|
||||
/* .max, .min and .value are set via platform data */
|
||||
.step_or_mask = 1,
|
||||
.value = PIPE_4,
|
||||
.hfi_id = HFI_PROP_PIPE,
|
||||
.set = iris_set_pipe,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -146,10 +146,8 @@ static const struct platform_inst_fw_cap inst_fw_cap_qcs8300_dec[] = {
|
|||
},
|
||||
{
|
||||
.cap_id = PIPE,
|
||||
.min = PIPE_1,
|
||||
.max = PIPE_2,
|
||||
/* .max, .min and .value are set via platform data */
|
||||
.step_or_mask = 1,
|
||||
.value = PIPE_2,
|
||||
.hfi_id = HFI_PROP_PIPE,
|
||||
.set = iris_set_pipe,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,10 +20,8 @@
|
|||
static const struct platform_inst_fw_cap inst_fw_cap_sm8250_dec[] = {
|
||||
{
|
||||
.cap_id = PIPE,
|
||||
.min = PIPE_1,
|
||||
.max = PIPE_4,
|
||||
/* .max, .min and .value are set via platform data */
|
||||
.step_or_mask = 1,
|
||||
.value = PIPE_4,
|
||||
.hfi_id = HFI_PROPERTY_PARAM_WORK_ROUTE,
|
||||
.set = iris_set_pipe,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user