[v4,14/17] media: venus: vdec: Sanitize vdec_set_work_route() per-VPU-version

Message ID 20230228-topic-venus-v4-14-feebb2f6e9b8@linaro.org (mailing list archive)
State Accepted
Delegated to: Stanimir Varbanov
Headers
Series Venus QoL / maintainability fixes |

Commit Message

Konrad Dybcio May 30, 2023, 12:30 p.m. UTC
  Replace the general IS_V6 checks with more specific VPU version checks.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/media/platform/qcom/venus/vdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Vikash Garodia June 1, 2023, 9:17 a.m. UTC | #1
On 5/30/2023 6:00 PM, Konrad Dybcio wrote:
> Replace the general IS_V6 checks with more specific VPU version checks.
> 
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>

> ---
>  drivers/media/platform/qcom/venus/vdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 12a2e99508f5..063a8b0d357b 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -727,7 +727,7 @@ static int vdec_set_work_route(struct venus_inst *inst)
>  	u32 ptype = HFI_PROPERTY_PARAM_WORK_ROUTE;
>  	struct hfi_video_work_route wr;
>  
> -	if (!IS_V6(inst->core))
> +	if (!(IS_IRIS2(inst->core) || IS_IRIS2_1(inst->core)))
>  		return 0;
>  
>  	wr.video_work_route = inst->core->res->num_vpp_pipes;
>
  

Patch

diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 12a2e99508f5..063a8b0d357b 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -727,7 +727,7 @@  static int vdec_set_work_route(struct venus_inst *inst)
 	u32 ptype = HFI_PROPERTY_PARAM_WORK_ROUTE;
 	struct hfi_video_work_route wr;
 
-	if (!IS_V6(inst->core))
+	if (!(IS_IRIS2(inst->core) || IS_IRIS2_1(inst->core)))
 		return 0;
 
 	wr.video_work_route = inst->core->res->num_vpp_pipes;