Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp423946imm; Mon, 4 Jun 2018 21:09:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKlrH+EoKFqYnhAeeFGOJ2oL11h18WLrcnoCGoasMjOj5RRT7M7tGEoG5UfvA9c7eon1ZUo X-Received: by 2002:a63:8dca:: with SMTP id z193-v6mr19380652pgd.451.1528171785250; Mon, 04 Jun 2018 21:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528171785; cv=none; d=google.com; s=arc-20160816; b=Y4qPatMaf5X5LKSP+mMjVtb0n9l4/AjFv9lqj0rR3YeSseVXAs2Yp/ilI9TDnxu+2L g8MxMC7jcFIyCbwinWKysrwcg2tKE0sT/JAiB+fY/M10c7z/1hTpOaAZYF8TNJNW3Lm5 9AAVQPekXp2wX8rkD7DG6TrPVazSYH8M8AcgovLO0LOuSd/ZuakjaFdFDDS06H5g5gGA BQHgMJO7B62Re0kExhUU1YhXQIcuawobQkjdiaCoGfuWfaj64NW60pgHaw5wEsIwJbbM DFne2xGP3cy1xKxH9kS4brddt5uAnkmJ27PMWoudMViNCXVwu5ABu1VNKk456N6Bjrgk fadQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=Csp6juo1Yxy5KutEa8XgqXE5QvNCZdzlEfzRCYqOB30=; b=FnHVEMv3PL2rTgAJUmLDFgAm/LyeRSl11YZFBDAFkolQaZCBH7jhbIM/tb4B+898ae qRVGxK0AwltOEt8U3m5uNhB+nIUn7n1Lzpba53MVK/Rs7OHI+ayeAS+NgWBGqTxTkxSY A/D0WyoT1MTj9VkZhfEbWrBv1DYr8RP4MxC5kxtynRViGDZVHbGeSwacS+CvjozNb1Zn n7b4yw746PSwtm0M+dVUJAGTJv+5J+K/mMlJwLXOdxRoS2xeKFffxRwnkNatWSqR6y1+ T7cMTvhX3DWpwAd7MCoQpMogqtNJ97s5P05Lv3fv+ZV4wFd8AjvACsNJZzvaSvKSNmpf xY+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LgTC7Y/8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si47051628plb.312.2018.06.04.21.09.28; Mon, 04 Jun 2018 21:09:45 -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=@chromium.org header.s=google header.b=LgTC7Y/8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751049AbeFEEJA (ORCPT + 99 others); Tue, 5 Jun 2018 00:09:00 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:34760 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782AbeFEEI6 (ORCPT ); Tue, 5 Jun 2018 00:08:58 -0400 Received: by mail-vk0-f66.google.com with SMTP id q135-v6so561716vkh.1 for ; Mon, 04 Jun 2018 21:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Csp6juo1Yxy5KutEa8XgqXE5QvNCZdzlEfzRCYqOB30=; b=LgTC7Y/8Bwp0RL1Y25Jj277uLvOBhx+1qFMKeOotjLln7xI/zAHbVLVc6rVMaKj7qf WPv22UR+a9FpuxL5c1exUumBJAvgTyf0MRKrEknlV3FXc8nxRJAGkdD76W666jg1eWJ8 VNAzxAP9K70OpwcEI7EV72fyUEXrkEns1JUUg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Csp6juo1Yxy5KutEa8XgqXE5QvNCZdzlEfzRCYqOB30=; b=Cx0gM3EGXldhDFUYaKc6mpTKqJ4wB74CwT1qPxOF8zMfoRl2aUYIduMHod7qewrQ0f LgxYPDUcUQXFXBtA0g5yIfA2uD56FE9jOdkUsPn6v3San/RyMpbUMB5ogDLl79DQRwJf se0fGGELs9MCKIvA9W+xXIvBItxs5cdIXKqVFcchaFMgdI2gjKxnGb4QbQaoOGG2NbpO iEa/3BLNNyaPJX9XaQoS6bEynVQvzDRmqXOhK3Ss9TpH1iuFS5G4otPkK6vI9Rjxmd7B Ku26i+QOTNynKBIbkXVxdWk0rq86fPB1JzPk4GopqLFikGuekCVRtP48AO4CRc9enYE3 dRyA== X-Gm-Message-State: ALKqPwfaM/35EOOKWNj87Iv7w0k+aKhGkKp+Wg3EHH8K+RSMgTVlalcL 1E2YY/z2CXNdGJAwjuJHX0YAm0fK+w0= X-Received: by 2002:a1f:5ed2:: with SMTP id s201-v6mr13423480vkb.51.1528171737103; Mon, 04 Jun 2018 21:08:57 -0700 (PDT) Received: from mail-vk0-f52.google.com (mail-vk0-f52.google.com. [209.85.213.52]) by smtp.gmail.com with ESMTPSA id s3-v6sm7637950uas.34.2018.06.04.21.08.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 21:08:56 -0700 (PDT) Received: by mail-vk0-f52.google.com with SMTP id q135-v6so561689vkh.1 for ; Mon, 04 Jun 2018 21:08:55 -0700 (PDT) X-Received: by 2002:a1f:bd4c:: with SMTP id n73-v6mr140489vkf.183.1528171735528; Mon, 04 Jun 2018 21:08:55 -0700 (PDT) MIME-Version: 1.0 References: <1527884768-22392-1-git-send-email-vgarodia@codeaurora.org> <1527884768-22392-6-git-send-email-vgarodia@codeaurora.org> <2cf4f7e8-f9e6-d62b-45a8-2c348af4aafe@linaro.org> In-Reply-To: <2cf4f7e8-f9e6-d62b-45a8-2c348af4aafe@linaro.org> From: Tomasz Figa Date: Tue, 5 Jun 2018 13:08:44 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/5] venus: register separate driver for firmware device To: Stanimir Varbanov Cc: vgarodia@codeaurora.org, Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , andy.gross@linaro.org, bjorn.andersson@linaro.org, Linux Media Mailing List , Linux Kernel Mailing List , linux-arm-msm , linux-soc@vger.kernel.org, devicetree@vger.kernel.org, Alexandre Courbot Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 4, 2018 at 10:56 PM Stanimir Varbanov wrote: > > Hi Tomasz, > > On 06/04/2018 04:18 PM, Tomasz Figa wrote: > > Hi Vikash, > > > > On Sat, Jun 2, 2018 at 5:27 AM Vikash Garodia wrote: > >> +static int __init venus_init(void) > >> +{ > >> + int ret; > >> + > >> + ret = platform_driver_register(&qcom_video_firmware_driver); > >> + if (ret) > >> + return ret; > > > > Do we really need this firmware driver? As far as I can see, the > > approach used here should work even without any driver bound to the > > firmware device. > > We need device/driver bind because we need to call dma_configure() which > internally doing iommus sID parsing. I can see some drivers calling of_dma_configure() directly: https://elixir.bootlin.com/linux/latest/ident/of_dma_configure I'm not sure if it's more elegant, but should at least require less code. By the way, can we really assume that probe of firmware platform device really completes before we call venus_boot()? Best regards, Tomasz