Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1056278imm; Fri, 1 Jun 2018 14:33:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIFpHeiXzgvKM9gBB6pbYgeFizaSz7AyMMQ9pWg3R+m1qyK0G+yrtjFLcQ+u8DdzMXSvvLK X-Received: by 2002:a65:5883:: with SMTP id d3-v6mr10183055pgu.131.1527888808334; Fri, 01 Jun 2018 14:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527888808; cv=none; d=google.com; s=arc-20160816; b=pztPpdzLbItCO2ggzKukE+mie+Q1ETyGlp2s0Kd2a2PKn8B3Vrk3XgL8wfeG9L1b8Z E4+z8L4XXHIW1YBHRc9csr9GFxT9GfN/F1uPbJdSY9wQoW4YKBxFYiclzNQDTcxTsDpi AEqIdLDRejoUxSvkaO7QNj/kDYqLvy7QvTo7O9ojaBK39hKPuZpdv8qhEmKD0zmaZhF4 tiT+kJ9ReYA/GLNz0CRK5cGQOGUeUbNKChpIsBVxs855BBUBsyj6gKl/argNLX6W2Gd5 ZejkH/WRqZZVEuZO8rtoddnwKblBt/IFofLdv+NkXZ5UWIK8XAmJ4N/BgtHx9u6AGgSq DYgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dmarc-filter:dkim-signature :dkim-signature:arc-authentication-results; bh=vM3dxJFnRbjhqDfZvw7uLAlUQMl7u06MoBcWa6wCK3A=; b=JxP7qCyosqPet2a7uGS1Q8MtRDyIbh/OU+E0BHCAusSnh0QMPYNIBSn1mYs8dzZjhe LYim/ipfkvUzse9k+eGcg2Fk+GYzqGdTxVwqP13VV5qlSNIKmnYwZCyXtW50HXJ5kS8a FY9EWtOMWr+FRWeeM91uG1FeS0uJcVM7CiA25Dbs5cj81we9m6WVPrNHyuKzNIkDe4AN j8l+tlLtRsoC6dFetGDReUh4nbKbfOofZBUACFICjDRe+3N4QGoL+OtM/Po99EeSyygQ /xwrSjrfUwYsd/rFRFO/2c3qQnH5PVVLo9RH9suAPIF60NrY9CV8UlZ0G9ovNb7mvb8u OAQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fwF/yfzX; dkim=pass header.i=@codeaurora.org header.s=default header.b=oRGLRJv0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd4-v6si21599663plb.338.2018.06.01.14.33.13; Fri, 01 Jun 2018 14:33:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fwF/yfzX; dkim=pass header.i=@codeaurora.org header.s=default header.b=oRGLRJv0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751041AbeFAVcn (ORCPT + 99 others); Fri, 1 Jun 2018 17:32:43 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41384 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbeFAVcl (ORCPT ); Fri, 1 Jun 2018 17:32:41 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7E54960769; Fri, 1 Jun 2018 21:32:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527888760; bh=DfEotnB5fVvDNzxTnMZQGBzLXh83HkzrA1+Dz7rZdCY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fwF/yfzXgxQ1D5pH6m1EKnxb9WvycBxCR4SxXDsdwJDxAB10b0tpVTbmrjqwfNQ6M 4taHgf84ScLjEOzYVc2EDmp+Koz1pLeqegP8Qpo6euIuzHsHI5Q/TORTbHk1G3/JQn jbxn2OzX1/Jx5oGV2VUNf/smQnmlldbC0nh20IWY= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8E31E605BD; Fri, 1 Jun 2018 21:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527888759; bh=DfEotnB5fVvDNzxTnMZQGBzLXh83HkzrA1+Dz7rZdCY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oRGLRJv0kt9CgPVUsbh4zICgi54o9vjYuggbkyjDwE94e5jbDdu2U+gHFq6NSZq71 lowsjL9YDD90Hk6YudoEvyenF+8txlH2cLMJ9CfLLnttRgHQY4UTjtmVAHHYVigbx4 gmtQEnX4MNYZRRAb3EpJmipR6xHwXTBBrWAvSoiE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8E31E605BD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org Date: Fri, 1 Jun 2018 15:32:36 -0600 From: Jordan Crouse To: Vikash Garodia Cc: hverkuil@xs4all.nl, mchehab@kernel.org, robh@kernel.org, mark.rutland@arm.com, andy.gross@linaro.org, bjorn.andersson@linaro.org, stanimir.varbanov@linaro.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, acourbot@chromium.org Subject: Re: [PATCH v2 5/5] venus: register separate driver for firmware device Message-ID: <20180601213236.GG11565@jcrouse-lnx.qualcomm.com> Mail-Followup-To: Vikash Garodia , hverkuil@xs4all.nl, mchehab@kernel.org, robh@kernel.org, mark.rutland@arm.com, andy.gross@linaro.org, bjorn.andersson@linaro.org, stanimir.varbanov@linaro.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, acourbot@chromium.org References: <1527884768-22392-1-git-send-email-vgarodia@codeaurora.org> <1527884768-22392-6-git-send-email-vgarodia@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527884768-22392-6-git-send-email-vgarodia@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 02, 2018 at 01:56:08AM +0530, Vikash Garodia wrote: > A separate child device is added for video firmware. > This is needed to > [1] configure the firmware context bank with the desired SID. > [2] ensure that the iova for firmware region is from 0x0. > > Signed-off-by: Vikash Garodia > --- > .../devicetree/bindings/media/qcom,venus.txt | 8 +++- > drivers/media/platform/qcom/venus/core.c | 48 +++++++++++++++++++--- > drivers/media/platform/qcom/venus/firmware.c | 20 ++++++++- > drivers/media/platform/qcom/venus/firmware.h | 2 + > 4 files changed, 71 insertions(+), 7 deletions(-) > > diff --git a/Documentation/devicetree/bindings/media/qcom,venus.txt b/Documentation/devicetree/bindings/media/qcom,venus.txt > index 00d0d1b..701cbe8 100644 > --- a/Documentation/devicetree/bindings/media/qcom,venus.txt > +++ b/Documentation/devicetree/bindings/media/qcom,venus.txt > @@ -53,7 +53,7 @@ > > * Subnodes > The Venus video-codec node must contain two subnodes representing > -video-decoder and video-encoder. > +video-decoder and video-encoder, one optional firmware subnode. > > Every of video-encoder or video-decoder subnode should have: > > @@ -79,6 +79,8 @@ Every of video-encoder or video-decoder subnode should have: > power domain which is responsible for collapsing > and restoring power to the subcore. > > +The firmware sub node must contain the iommus specifiers for ARM9. > + > * An Example > video-codec@1d00000 { > compatible = "qcom,msm8916-venus"; > @@ -105,4 +107,8 @@ Every of video-encoder or video-decoder subnode should have: > clock-names = "core"; > power-domains = <&mmcc VENUS_CORE1_GDSC>; > }; > + venus-firmware { > + compatible = "qcom,venus-firmware-no-tz"; > + iommus = <&apps_smmu 0x10b2 0x0>; > + } > }; > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c > index 101612b..5cfb3c2 100644 > --- a/drivers/media/platform/qcom/venus/core.c > +++ b/drivers/media/platform/qcom/venus/core.c > @@ -179,6 +179,19 @@ static u32 to_v4l2_codec_type(u32 codec) > } > } > > +static int store_firmware_dev(struct device *dev, void *data) > +{ > + struct venus_core *core = data; > + > + if (!core) > + return -EINVAL; Core is not going to be null here - you don't need to check it. -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project