Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp17176imm; Tue, 5 Jun 2018 14:11:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL3LVeJON/92Cp3FGGOfqWjHcXWfHQLLnsU4gwu+R/nPGnwjPEwKR1EcTWJWOiyUfbj5dUp X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr226104plb.297.1528233083083; Tue, 05 Jun 2018 14:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528233083; cv=none; d=google.com; s=arc-20160816; b=fqLRoaZVHqHT5Nlzpnuks2RaHYdRAoKVBqPkz5AxdfGsOtg0B+gQUKKnWfyiwxyyKX raxqjcrittVB5jWER+RUfooc+NxWbK4ep7dBdK4dla5+/pqimBpnn55wIZCbfiNWdmxC iFBS5HeySgGAGjYr0N/jtOzsuZlCYMXJusmEdf+/TUIecfCmKo3obfoVxfEGqgCgVs/i 4SKHK5flTW0jqfzIbKMLYkQntWbGQY7fbTkRKrlSWg3EQ1Oks0Hq2ZVDY57Tx554sJxo 5EjZhwGIPfNDWRmOP/7VvnaZUbNoXTNgW1WCALWtG9/IOjocSMLYYTUGTjEPGiOdQfQp aZXw== 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:message-id:subject:cc :to:from:date:arc-authentication-results; bh=rSqX0Ogg3tCCZ0WjBwz/M1agOf0Ctqz6kCKVpkcz20I=; b=h8ZEA9HK7o7B4y1covHWbXkAapOMngLqvoouQo8DhQxPKN5sBVoaYZe/Hp1zXn3z7F fMMCMR4u1hdRVSbrNwIezEgRkm0a3elj2jyoC/lcFZEVsMZusGA568BlsVrunwN6/sVC tDRwHCrkP6tGooeSIra2OIz85Z1kwEzxn+ol0OAqqeK4rzaLvKa7QbJDizzC52CnV1Aq 7rITsvHiNaIJLqk52B0ehnevJ2ayxOmuC2KWhFiRtcGAoJdLTgIWuL+80J68KZMjePQ2 txGwWqBoOouYxxkesFzfet0lQBmwpOzid7QZycNngZI3gJTBC9LXk4vZzk45FjaTARHp m8pg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si48865162plk.521.2018.06.05.14.11.04; Tue, 05 Jun 2018 14:11:23 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752741AbeFEVIF (ORCPT + 99 others); Tue, 5 Jun 2018 17:08:05 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:38474 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665AbeFEVIB (ORCPT ); Tue, 5 Jun 2018 17:08:01 -0400 Received: by mail-pf0-f196.google.com with SMTP id b74-v6so1966938pfl.5; Tue, 05 Jun 2018 14:08:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rSqX0Ogg3tCCZ0WjBwz/M1agOf0Ctqz6kCKVpkcz20I=; b=kiYQH4yD2ckQRWYBvVOReFN2dpIPNos99zkmTmWLbZ6BVSEM8Q/x724joDYegqUxDL PQqVdXMhhv9iNJKzuOwz9fpi/7B/Lt44hexXxs5W0UGBpK1cnw8av4LCfkYyvLA/BLEy +LzREdHM/ltvGujK0/M84pvYKWktxvyX5Un8S2NBKbqLIdJ4h1GRV3hPK0AnmX4qtU/s 8WHzkmAhFlbvOvzdU1gK8jHdJuY14pg6GTOAvvLMTWZZuEUMiMV9Ki3iWYVnAlDQlHVh GoLlDRvScnkAUT3Ur3sCZwzcqgmTaxlhztxwP74LlBqizqGyKqhtm0CBfG8PVlHDWTaM PaFQ== X-Gm-Message-State: APt69E2KgpxnNIKY0PaB14deIZb81GJZFIWWJJJfZkRzbJX6p7L3nAN7 +TSt7jhSZQnyYw82qmUHgevFx0U= X-Received: by 2002:a65:5807:: with SMTP id g7-v6mr170512pgr.409.1528232880889; Tue, 05 Jun 2018 14:08:00 -0700 (PDT) Received: from localhost (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.gmail.com with ESMTPSA id s1-v6sm13455576pgv.48.2018.06.05.14.07.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 14:07:59 -0700 (PDT) Date: Tue, 5 Jun 2018 15:07:58 -0600 From: Rob Herring To: Vikash Garodia Cc: hverkuil@xs4all.nl, mchehab@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: <20180605210758.GA19888@rob-hp-laptop> 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.9.4 (2018-02-28) 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>; This mostly looks like you are adding a node in order to create a platform device. DT is not the only way to create platform devices and shouldn't be used when the device is not really a separate h/w device. Plus it seems like it is debatable that you even need a driver. For iommus, just move it up to the parent (or add to existing prop). Rob