Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1366329rdh; Mon, 25 Sep 2023 10:25:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6aQW7+sVGEbK5Z3yVPP+OwefGnZxWaytO8y9WskEf9L5y2WWXArSr5FORmBA6tcvRTFnj X-Received: by 2002:a05:6a21:32a7:b0:15c:b7bb:2bd9 with SMTP id yt39-20020a056a2132a700b0015cb7bb2bd9mr10595294pzb.6.1695662739822; Mon, 25 Sep 2023 10:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695662739; cv=none; d=google.com; s=arc-20160816; b=a7WxlH+fNzE9hWynvqDfr3pW0UPc0oOdfuaakEXLvsZEUqQuVBUxJQA4/+Q7ll0USv UyRT2IJg7CKtzZe58oU4dzHtR2VclcdvM0UoicSG23wGs+HMuDyhRLQQDIxN6WG6k3SZ dJ01+5tJzKql3GCr25oogL4idThyfa4c1WSy/+JX6gQdpNtBr2CgSLTn01tcRfBbgI60 1ytdoyRu7JBD+x3qNah0aBXj9nIN0VTUz8fau4Sx2tbotXhvgK5mw+2PJUE4pZevb1Yw 5OFmv7/sngyzth3MSXy8QuxPdv8U/BRVUgkckj5vNNZI0WrsJB1veGNnLeq45QlRayjr t42g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2bHPFUHRQxjgYR+h86FCTsoGHCNfaH6iwQoUr8UNyoo=; fh=VwCX1eNW7K9L5Ilc3l5IRB/HpIXBr5e/485d5CHgOSk=; b=P+sZ8Uh+c2xx2vaImz/IdBqe5HqwvJjxSFd+b3GLu0hMEAPOL0qbPg5qWvo1QJI5/+ pfMKv95gzR0g4T3giLoDSF26S1rKCUCVj5ZiUc91U/U83gM4o4n0UppSZI/Pj5IY5s8Y Ur44F8aAaEYDzfrAXFdDb7Sq4H3fiBDy8JCmyq/0vOyAuUNw41twAnmG5VMix35STwin urNCYl+ne+rAC2ScGiPD7IJVOdu4kdl44TUvVvl/OvPsX+vdM0UNdv0bAyJ7U8JQU4wd COvnTveRAvcR8oPJZFlMoHnjxYeeyluI9F/jT+BGUpkX2Y5ALL2BR88ykZmGwz+dZTbQ Z/sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Ke1gke97; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id by36-20020a056a0205a400b00563796a3ec6si12466360pgb.570.2023.09.25.10.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:25:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Ke1gke97; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2C95780C0A57; Mon, 25 Sep 2023 01:34:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232903AbjIYIeY (ORCPT + 99 others); Mon, 25 Sep 2023 04:34:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232097AbjIYIeX (ORCPT ); Mon, 25 Sep 2023 04:34:23 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1EE19D; Mon, 25 Sep 2023 01:34:16 -0700 (PDT) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E153EB1; Mon, 25 Sep 2023 10:32:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695630755; bh=0QwUbjQUlXfPv/XmeskRAPh2SX5+oNeZWNjuJJ2bi40=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ke1gke97WaCQtADlcgql9ZVjilv8aUaUYAJPObQaTeICFbdX0WNfSlMLqjKE5BfpS O853vMK90rgyqEo2AElK1b3QG0dGxe3H3dwwVE81XJFyNQlfScay/BtU4JffV8+L0K QUxmO7yiBp2tbE62H9tu1wLmty1ToELhkivgI1OU= Date: Mon, 25 Sep 2023 11:34:25 +0300 From: Laurent Pinchart To: Bryan O'Donoghue Cc: rfoss@kernel.org, todor.too@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 09/17] media: qcom: camss: Remove special case for VFE get/put Message-ID: <20230925083425.GB8583@pendragon.ideasonboard.com> References: <20230911131411.196033-1-bryan.odonoghue@linaro.org> <20230911131411.196033-10-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230911131411.196033-10-bryan.odonoghue@linaro.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 01:34:22 -0700 (PDT) Hi Bryan, Thank you for the patch. On Mon, Sep 11, 2023 at 02:14:03PM +0100, Bryan O'Donoghue wrote: > From sdm845 onwards we need to ensure the VFE is powered on prior to > switching on the CSID. > > Currently the code tests for sdm845, sm8250 and then does get/set. This is > not extensible and it turns out is not necessary either since vfe_get and > vfe_set reference count. > > Remove the over-conservative SoC version check. > > Signed-off-by: Bryan O'Donoghue > Suggested-by: Laurent Pinchart > Tested-by: Bryan O'Donoghue # rb3 # db410c > --- > drivers/media/platform/qcom/camss/camss-csid.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c > index 99f651e2021cb..02ae3f5cb0c0e 100644 > --- a/drivers/media/platform/qcom/camss/camss-csid.c > +++ b/drivers/media/platform/qcom/camss/camss-csid.c > @@ -159,15 +159,12 @@ static int csid_set_power(struct v4l2_subdev *sd, int on) > struct camss *camss = csid->camss; > struct device *dev = camss->dev; > struct vfe_device *vfe = &camss->vfe[csid->id]; > - u32 version = camss->res->version; > int ret = 0; > > if (on) { > - if (version == CAMSS_8250 || version == CAMSS_845) { > - ret = vfe_get(vfe); > - if (ret < 0) > - return ret; > - } Maybe a comment to explain why we call vfe_get() could be useful ? /* * From SDM845 onwards, the VFE needs to be powered on before * switching on the CSID. Do so unconditionally, as there is no * drawback in following the same powering order on older SoCs. */ Reviewed-by: Laurent Pinchart > + ret = vfe_get(vfe); > + if (ret < 0) > + return ret; > > ret = pm_runtime_resume_and_get(dev); > if (ret < 0) > @@ -217,8 +214,7 @@ static int csid_set_power(struct v4l2_subdev *sd, int on) > regulator_bulk_disable(csid->num_supplies, > csid->supplies); > pm_runtime_put_sync(dev); > - if (version == CAMSS_8250 || version == CAMSS_845) > - vfe_put(vfe); > + vfe_put(vfe); > } > > return ret; -- Regards, Laurent Pinchart