Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp136189pxv; Wed, 14 Jul 2021 00:03:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs9ywWiTk4lRpyUTOC4VHspSMPV2l5+DjrRLa91NXKhN9hYtmUoYbcmwnYNd7O5SqLQqz+ X-Received: by 2002:a17:906:e088:: with SMTP id gh8mr10642856ejb.125.1626246187468; Wed, 14 Jul 2021 00:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626246187; cv=none; d=google.com; s=arc-20160816; b=bS4leksEShhgyhZx29nISUFK/XuJK9vSQfeQt6t3MwueR76Ynmct+dCBfk7zb+G2OJ 0jN0xDKqWcs7gOgW1s+NxahOuC3ojxeAuGyrXIgb3uCWv7MLpbraIIj3J2RIzKbFTFy6 rSmqmyEwEmAh2mHRbmnJVWrYYrd7bvWKvxeKg4mOgi0M9qUnHmPE2XRc2y2F4zvpPuDj YzDoJMpB3e6flFTljhpXQyI7yypsuS9tUIw3ux9vbLd0exjTePzVe/ZotnkB7Zh4dISJ rGkdgRGq+Ke/FCP8sMXzlZOE08VcB5Jfl+I8FI34AVsbOMKX6Z/lH5IKI5OesMSVCkUo ByUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=5t/tVXSbnrB04CHRBRO/q3lTlRUMNGA46t0Cqp5fM4c=; b=YnQIz0Qk5fNbBiUZzzmTasofruocU/+qdArJXG8x/gmhPtZpOUdxoYLmnlvrS9OB6N DJZ9vijEIaYkqfIQlHK9dMg3q8NvdJVDcPxkg9gddOQEIe7p/6JcnUUnIBW73Mrbt6om 47PkNg0MtdsG4ju2q+C0F177ZQU7NhGX/8E6IwULk64CDTinvbGctLFvlZSF+Q4DhQvs Em7C8Kyh7dQQUXz+162rDdij62UjLYiivRlVhxtA6J0/53uxG8GUCTxWadaTz8JEFR10 r7okz1fX18z87nnn/xe8IP5jfAKi8jun8f00TQAGXdFUqRUIMVPlI0CoMLoBW6PTFeY/ ZFiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h9si1654057edz.433.2021.07.14.00.02.44; Wed, 14 Jul 2021 00:03:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238231AbhGNHEj (ORCPT + 99 others); Wed, 14 Jul 2021 03:04:39 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:57571 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237948AbhGNHEf (ORCPT ); Wed, 14 Jul 2021 03:04:35 -0400 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 14 Jul 2021 00:01:44 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 14 Jul 2021 00:01:43 -0700 X-QCInternal: smtphost Received: from dikshita-linux.qualcomm.com ([10.204.65.237]) by ironmsg01-blr.qualcomm.com with ESMTP; 14 Jul 2021 12:31:31 +0530 Received: by dikshita-linux.qualcomm.com (Postfix, from userid 347544) id 7519E21B6B; Wed, 14 Jul 2021 12:31:30 +0530 (IST) From: Dikshita Agarwal To: linux-media@vger.kernel.org, stanimir.varbanov@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org, Dikshita Agarwal Subject: [PATCH v3 5/7] venus: vdec: set work route to fw Date: Wed, 14 Jul 2021 12:31:06 +0530 Message-Id: <1626246068-21023-6-git-send-email-dikshita@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626246068-21023-1-git-send-email-dikshita@codeaurora.org> References: <1626246068-21023-1-git-send-email-dikshita@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set work route to FW based on num of vpp pipes. Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/venus/hfi_cmds.c | 7 +++++++ drivers/media/platform/qcom/venus/hfi_helper.h | 5 +++++ drivers/media/platform/qcom/venus/vdec.c | 22 ++++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 11a8347..837fb80 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -1290,6 +1290,13 @@ pkt_session_set_property_6xx(struct hfi_session_set_property_pkt *pkt, pkt->shdr.hdr.size += sizeof(u32) + sizeof(*color); break; } + case HFI_PROPERTY_PARAM_WORK_ROUTE: { + struct hfi_video_work_route *in = pdata, *wr = prop_data; + + wr->video_work_route = in->video_work_route; + pkt->shdr.hdr.size += sizeof(u32) + sizeof(*wr); + break; + } default: return pkt_session_set_property_4xx(pkt, cookie, ptype, pdata); } diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index 63cd347..185c302 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -451,6 +451,7 @@ #define HFI_PROPERTY_PARAM_MVC_BUFFER_LAYOUT 0x100f #define HFI_PROPERTY_PARAM_MAX_SESSIONS_SUPPORTED 0x1010 #define HFI_PROPERTY_PARAM_WORK_MODE 0x1015 +#define HFI_PROPERTY_PARAM_WORK_ROUTE 0x1017 /* * HFI_PROPERTY_CONFIG_COMMON_START @@ -864,6 +865,10 @@ struct hfi_video_work_mode { u32 video_work_mode; }; +struct hfi_video_work_route { + u32 video_work_route; +}; + struct hfi_h264_vui_timing_info { u32 enable; u32 fixed_framerate; diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index ddb7cd3..892be8d 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -653,6 +653,24 @@ static int vdec_set_properties(struct venus_inst *inst) return 0; } +static int vdec_set_work_route(struct venus_inst *inst) +{ + struct hfi_video_work_route wr; + u32 ptype; + int ret; + + if(!IS_V6(inst->core)) + return 0; + + wr.video_work_route = inst->core->res->num_vpp_pipes; + + ptype = HFI_PROPERTY_PARAM_WORK_ROUTE; + ret = hfi_session_set_property(inst, ptype, &wr); + if (ret) + return ret; + return 0; +} + #define is_ubwc_fmt(fmt) (!!((fmt) & HFI_COLOR_FORMAT_UBWC_BASE)) static int vdec_output_conf(struct venus_inst *inst) @@ -1039,6 +1057,10 @@ static int vdec_start_output(struct venus_inst *inst) if (ret) return ret; + ret = vdec_set_work_route(inst); + if (ret) + return ret; + ret = vdec_output_conf(inst); if (ret) return ret; -- 2.7.4