Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp567396imm; Wed, 4 Jul 2018 02:02:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcX12tI9t8CkgxLqjxySM4f/GOCsxxXX/CFY/DsvxDHH7LQ4j2R5zcS6QlvvnS3jfbOtgX3 X-Received: by 2002:a62:a50e:: with SMTP id v14-v6mr1280708pfm.121.1530694938288; Wed, 04 Jul 2018 02:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530694938; cv=none; d=google.com; s=arc-20160816; b=X6/vJABYaQNJI9kjBMINitrJHxH0rPIMHOfCxwsqPCJ+HwIk4B7z8YfN/ELiM96aTp A3LCXB8jqO/YNAfjiUiRZN+dWrfxRo0HngfyhjPBCAin0J8J6A9B82bS76VFJ8u9q75v rwTy+ksDE0FAL6exEI6t9fxxXdTwR2fCEU7+LE7JsoPfslbiddqLUC4lAqAdTBLvFjAa APsztbGw+RvUEWsqVr1tIMUGaAA8CwAYOB8pEq6nq4x3lPdQWcf6AkBzG8+L57dbRJEP hyH8N3oXTZvq9HCXC6JZHuxjYIbUXFOEK/z1/pLpYexZrwCGpp6cX8TkremD18ctItBO 10OQ== 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=USCZn2bS31NdF/GdGdE1+caSTssCM9tKfpxbUxjcCkQ=; b=tFQxcsA62gXhD4gFT7EMp8FC4Lh0mQmrYZ8/SslP8oCiudePVw6NYEif9KIYEsFq3P 85DJj0xwJxvK5NEZbvJ55SaGWBFwkpF0H7GKYhUWr2cwuGS8v1JtW3UrnG0u0sCVHu9i y/366qWpFSbrY4fZk302+dLYzpxjq+Tmsbl0mx9UJ6SwBTtXPpc6mmkkNnIROydNWYPK kD11k6DGewfq3rMgA/o4eyK9Rp8DTrecwGMIAQMNa+f8Jg4biPVyOuDi0UMdVo9e2J8Z fDmU1XPzlMgbgXwKN2s7IZM7pRv2OGiD3RppDaH8sC2MMGuMo1s0zG3aqMqQ7sZpiGAu 0rPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UYOYCHfn; 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 g70-v6si2752769pfe.4.2018.07.04.02.02.03; Wed, 04 Jul 2018 02:02:18 -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=UYOYCHfn; 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 S934326AbeGDJBS (ORCPT + 99 others); Wed, 4 Jul 2018 05:01:18 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:40572 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934165AbeGDJBP (ORCPT ); Wed, 4 Jul 2018 05:01:15 -0400 Received: by mail-yb0-f196.google.com with SMTP id y11-v6so1814267ybm.7 for ; Wed, 04 Jul 2018 02:01:15 -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=USCZn2bS31NdF/GdGdE1+caSTssCM9tKfpxbUxjcCkQ=; b=UYOYCHfnnFFIAM8Hng/j3QCWZQnYCRYTGLeTjTgKKdLemgS/nOZgiXUvjwn4d51Tk8 Lh9KBDnFti+Z+D5bxdR6xYMDyGwqdb0L3u81t1P9vZpmeXH4sn/5RBByXOd1XBpWp1VS IM59UoSNJ5yoKZ7wAXZF0FRzZMp61kWQZJAl8= 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=USCZn2bS31NdF/GdGdE1+caSTssCM9tKfpxbUxjcCkQ=; b=nQtxmA6aPViKM6wvDxg/WeIO/TLJI7ZfZK9iAsYb0cpQTb2FKWhEb8P6aQHl0Lc4yP mwUtLtQ8apK7O2ma7+voNrVZTI9QTgzcU6k6IFMMw0gnmXmmOCl3RRG/WErBTMjuNrPV bK16KggLH5b7qu7YZxmamXRWX1yMTgXr1dYzF5XLokOpld4qFn/+Ua9jXbq0t4bWBUQX ODL11HPiruCvGPyQudU9zz1jfKGUBFkIQ/qq+KL/zMROO6G30z1MPMrBOwOtcIvpPxKS KgavaeN1mU9Ok3mSR1VWRqxNHXjWf0VjalIjCsPnVZOjbW163pQsrOQXPTzKwgwIXR1r 84Tw== X-Gm-Message-State: APt69E2sdQIcShjQYzISg2HN+vvxlHmQIkYsir16mQ/F2A6AYOn/j63I TCxXzkuDcFb30CuYEogmHj3Tcak1pRI= X-Received: by 2002:a25:d1cc:: with SMTP id i195-v6mr504455ybg.183.1530694874465; Wed, 04 Jul 2018 02:01:14 -0700 (PDT) Received: from mail-yb0-f174.google.com (mail-yb0-f174.google.com. [209.85.213.174]) by smtp.gmail.com with ESMTPSA id p3-v6sm1193450ywh.36.2018.07.04.02.01.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jul 2018 02:01:12 -0700 (PDT) Received: by mail-yb0-f174.google.com with SMTP id x10-v6so1811405ybl.10 for ; Wed, 04 Jul 2018 02:01:11 -0700 (PDT) X-Received: by 2002:a25:5c41:: with SMTP id q62-v6mr521065ybb.332.1530694871256; Wed, 04 Jul 2018 02:01:11 -0700 (PDT) MIME-Version: 1.0 References: <1527884768-22392-1-git-send-email-vgarodia@codeaurora.org> <1527884768-22392-3-git-send-email-vgarodia@codeaurora.org> <20180601212117.GD11565@jcrouse-lnx.qualcomm.com> In-Reply-To: From: Tomasz Figa Date: Wed, 4 Jul 2018 18:00:59 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/5] media: venus: add a routine to set venus state To: vgarodia@codeaurora.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Andy Gross , bjorn.andersson@linaro.org, Stanimir Varbanov , 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 Wed, Jul 4, 2018 at 4:59 PM Vikash Garodia wrote: > On 2018-06-04 18:24, Tomasz Figa wrote: > > On Sat, Jun 2, 2018 at 6:21 AM Jordan Crouse > > wrote: > >> On Sat, Jun 02, 2018 at 01:56:05AM +0530, Vikash Garodia wrote: > > Given that this function is supposed to substitute existing calls into > > qcom_scm_set_remote_state(), why not just do something like this: > > > > if (qcom_scm_is_available()) > > return qcom_scm_set_remote_state(state, 0); > > > > switch (state) { > > case TZBSP_VIDEO_SUSPEND: > > writel_relaxed(1, reg_base + WRAPPER_A9SS_SW_RESET); > > break; > > case TZBSP_VIDEO_RESUME: > > venus_reset_hw(core); > > break; > > } > > > > return 0; > This will not work as driver will write on the register irrespective of > scm > availability. I'm sorry, where would it do so? The second line returns from the function inf SCM is available, so the rest of the function wouldn't be executed. Best regards, Tomasz