From patchwork Mon Jul 26 08:01:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 12398779 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93A67C4320A for ; Mon, 26 Jul 2021 08:01:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D8B960F6D for ; Mon, 26 Jul 2021 08:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232772AbhGZHVF (ORCPT ); Mon, 26 Jul 2021 03:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232473AbhGZHVF (ORCPT ); Mon, 26 Jul 2021 03:21:05 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02EB9C061757 for ; Mon, 26 Jul 2021 01:01:34 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id f14-20020a05600c154eb02902519e4abe10so1370234wmg.4 for ; Mon, 26 Jul 2021 01:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=XVU7ml1tVdiZFg6w+28rjELN1plpC5pGFmNpVPCTBNY=; b=pDUI+baGvQhmx8t1mPXkz7Joiv/BQk/c7tVLlGPQgUBLWm8kIYc9t2fVXRPYOjKKdA ZMKekfpBtpH4b8wkyuMKxPQiqDqld1Il1anFrMAytJQrDFwiFQ3YW5bWp5BXxJjxQ+hQ MEs9OmTTU6YOCAijyRnyRD3SnQa7uPhQU3885bOu0CNREjcfclNxVosgEDZmgV7GzC4L MxbmxG/R6s90T6ZhP2Kb8Vx0BW9i9NBvgin3XT0BzsHwGD0pv66Akga/0PBNfrcVEqb1 1NlhGK9ksrrYl4W5fNmaFwCfifjCeMDVa6NIQfUPrrxk9Mabfx0SEemj5ThIAZuxLAJ7 jtDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=XVU7ml1tVdiZFg6w+28rjELN1plpC5pGFmNpVPCTBNY=; b=LR+UOKt1Kf67V/KXsCQO6+7NW/n6WVYCH91TPhuTtZa/7xyLXr9XjEE87Ia2nEFGM3 qmkAdzA+twVjbogrQ0azl8yvipdwMbBbpqCsvj9RNbAUtD2k7g3swPKSBfApWa+YR9Dm MGNEizS0e6WngN/8a908yrKxYJZvski5O/ZV5Rs9Tk59baCdtzdeybTKZPtUg3qg9f73 eVaK0xh/Ig4i3zlz6lJyNGa7YyX4qN9/oYtD3jP9SEskOSo3+p/8MyrbJ54XCwqiCXQa dxQXwSDy+MXDJR+eQUJxavGapXDXh/OP+pSOIRw5xIgZjtdWQ+K1A6bVzzfwKuf8GZlM FB1Q== X-Gm-Message-State: AOAM533xRgrTSTcL2UqtWh/ZiCxj38PH1zCsZl1hhFC3EAeavUwPAzXL JxAJF166Bs/G28uj1pZZlYA2eA== X-Google-Smtp-Source: ABdhPJwGe95SjsyV3ok6otq8qcS4k4naip4HHCx6v+2rDaT3YGyB8YtSNy8gnaVxV/+LJT+S5oeLdA== X-Received: by 2002:a1c:ed0a:: with SMTP id l10mr15858978wmh.151.1627286492553; Mon, 26 Jul 2021 01:01:32 -0700 (PDT) Received: from qcom-hackbox.linaro.org.net (163-172-5-244.rev.poneytelecom.eu. [163.172.5.244]) by smtp.gmail.com with ESMTPSA id n8sm460600wrx.46.2021.07.26.01.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 01:01:32 -0700 (PDT) From: Robert Foss To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Andrey Konovalov , AngeloGioacchino Del Regno Subject: [PATCH v1 1/4] media: camss: vfe: Don't read hardware version needlessly Date: Mon, 26 Jul 2021 10:01:10 +0200 Message-Id: <20210726080113.8378-1-robert.foss@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org vfe_set_power() is invoced a few times, which causes a lot of VFE HW version prints. Secondly there is no real reason for calling hw_version_read() from this location specifically, since it does nothing more than print the VFE HW version. A better location for the hw_version_read() call would be somewhere which is only executed once per VFE unit. Signed-off-by: Robert Foss --- drivers/media/platform/qcom/camss/camss-vfe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c index e0f3a36f3f3f..f6e889c1598e 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -713,8 +713,6 @@ static int vfe_set_power(struct v4l2_subdev *sd, int on) ret = vfe_get(vfe); if (ret < 0) return ret; - - vfe->ops->hw_version_read(vfe, vfe->camss->dev); } else { vfe_put(vfe); } @@ -1301,6 +1299,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe, return -EINVAL; } vfe->ops->subdev_init(dev, vfe); + vfe->ops->hw_version_read(vfe, dev); /* Memory */ From patchwork Mon Jul 26 08:01:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 12398781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66526C4338F for ; Mon, 26 Jul 2021 08:01:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4640060F55 for ; Mon, 26 Jul 2021 08:01:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232818AbhGZHVG (ORCPT ); Mon, 26 Jul 2021 03:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232776AbhGZHVG (ORCPT ); Mon, 26 Jul 2021 03:21:06 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE4C8C0613C1 for ; Mon, 26 Jul 2021 01:01:34 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id b9so9099405wrx.12 for ; Mon, 26 Jul 2021 01:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lnQL+vD1s8HHey3hE2dBo++FOKUFUU+N4j10t+DrCDk=; b=XWI4GT5p6EHHk2ueiJJfqoggE7kTlio8iWxYnh27Gc21fem4ygVKAR7aHOo2XvBbId mv9s8pYQu1ZFH+6ZRAyFyF7LK2nlRMtcm75IJbRYoOnGm7G7o4y3lMnctWLBcnyHVK33 WU8AJrf6SfcmWlRO+sS0KJ1v3T/GNNUVa5yBfphAzOHgw+APsGblzSOCCcpxjuiv7Sfc RWQNxh4xDaomUje0A/DXZKqM8JPY6L544Hs9LNiG3GmN+md+JFSnaDf5DGs6NhxsxRpb dADwamktrC4St17GYr4a4rzOqvvlDvSfgp4srX/W8rvH2V+VPfm5sxbMWDfV7DTToE4J Ptfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lnQL+vD1s8HHey3hE2dBo++FOKUFUU+N4j10t+DrCDk=; b=ft2NRlmv0ywotcaPeSEoal/uptBEtqZG2vY1zYT8eR7hhGnJBA7wlLWnHy6bpmZ22I FQT/XkeS0TlWdgn/bERSf0QgOodS9lGzaeCBwABMlAnZD6S9avWqqeKg+8o3En7h9WSk zVmZkHPiQXsSvBqaRq0GubZjcnBmbDEnHPKJIm+WhgOSfh+db1HMllg0VNIFz3lRqI4i m21bRbQH0mWT0P+wehIv+batxy8CAmf1nc07LqV+ppnnOfc+qZk/8M3Umo/FNfUUWYLX 5T6qyA/JxpWNx6etJSV82CgxFw0hEQawJeh5tiHBHcLtQfp4HJEdVSD3/nKjzxK0sLca Ki9A== X-Gm-Message-State: AOAM531fq2K8CPYkbrqZHoqRQNwjII5C183+foKSXrJLmyRXAzfZUanI slrAc3qyE57eb3dpE9xseUjriQ== X-Google-Smtp-Source: ABdhPJxpnJtDx3oXnLtsf8Ix8hioS0TwBjkk7kkJKWsrScsm74bRFkv3bWLunPHDEpr5Y1wuFy/mQQ== X-Received: by 2002:adf:e610:: with SMTP id p16mr18414406wrm.98.1627286493440; Mon, 26 Jul 2021 01:01:33 -0700 (PDT) Received: from qcom-hackbox.linaro.org.net (163-172-5-244.rev.poneytelecom.eu. [163.172.5.244]) by smtp.gmail.com with ESMTPSA id n8sm460600wrx.46.2021.07.26.01.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 01:01:32 -0700 (PDT) From: Robert Foss To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Andrey Konovalov , AngeloGioacchino Del Regno Subject: [PATCH v1 2/4] media: camss: vfe: Decrease priority of of VFE HW version to 'dbg' Date: Mon, 26 Jul 2021 10:01:11 +0200 Message-Id: <20210726080113.8378-2-robert.foss@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210726080113.8378-1-robert.foss@linaro.org> References: <20210726080113.8378-1-robert.foss@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The HW Version can in no case represent an error, so change the print priority to 'dbg'. Signed-off-by: Robert Foss --- drivers/media/platform/qcom/camss/camss-vfe-170.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe-4-8.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c index 8594d275b41d..1ad502a1c276 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-170.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c @@ -185,7 +185,7 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) u32 rev = (hw_version >> 16) & 0xFFF; u32 step = hw_version & 0xFFFF; - dev_err(dev, "VFE HW Version = %u.%u.%u\n", gen, rev, step); + dev_dbg(dev, "VFE HW Version = %u.%u.%u\n", gen, rev, step); } static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c index a59635217758..13f0fa6a7d60 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c @@ -258,7 +258,7 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); - dev_err(dev, "VFE HW Version = 0x%08x\n", hw_version); + dev_dbg(dev, "VFE HW Version = 0x%08x\n", hw_version); } static u16 vfe_get_ub_size(u8 vfe_id) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-8.c b/drivers/media/platform/qcom/camss/camss-vfe-4-8.c index 998429dbb65c..03f92a6737b0 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-8.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-8.c @@ -251,7 +251,7 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); - dev_err(dev, "VFE HW Version = 0x%08x\n", hw_version); + dev_dbg(dev, "VFE HW Version = 0x%08x\n", hw_version); } static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) From patchwork Mon Jul 26 08:01:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 12398783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D372DC4320A for ; Mon, 26 Jul 2021 08:01:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3B9E60F55 for ; Mon, 26 Jul 2021 08:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232836AbhGZHVH (ORCPT ); Mon, 26 Jul 2021 03:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232807AbhGZHVG (ORCPT ); Mon, 26 Jul 2021 03:21:06 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9768CC0613D3 for ; Mon, 26 Jul 2021 01:01:35 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id q3so10014973wrx.0 for ; Mon, 26 Jul 2021 01:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TMv5pNQLtj3z4HnxrdOEyzC4R0UvS0SYkpbtyPuEbyo=; b=rFl+WRVs4wmrem2xToXADdWytoUjHE0sj7XJ3SYLINwx4TpuSM553Fd7LDPhiqPdsY WiVmSCR/kUOYhicF0qfv1ixQl3piuUv0KXo8wgF+lcN77h9s1ELlXFNi4pO7z2eq0VYN EolAGzqTPIv/L2js3lndvmhmFoAbnt8cz0WZtJhQa6r51Qo9LaFAK5Am5cVI0PfJWQNG jLJnhaBvUJ4ShtPbxgTmDvf4E2wf9rhHR9qGZW3Ty9JfwVvIfB4Y7KBzK8u5GTvjIaur HANX5cxvdAZRKU2Yxl8o+Y4EroLuXYWVJejNpc3TSSx8e1kBwzXjmlE9HDOri1+wJvtu WDbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TMv5pNQLtj3z4HnxrdOEyzC4R0UvS0SYkpbtyPuEbyo=; b=M1HhVlaZiet1JWUxRZiRDnpL6auw32pLT1uBcB17TsZrXloaNe1guc9cvHcQ5NniNF v2ARra6ZvMOjqyEjjI3rsmpAdu4q7dciT9Q7LZWfAYkJn2SvGlfqrk9TOidQzec7zapN W1TC+RpGzJNJKq4c28Hew6ilRGyo5qbnBn/R7dt9A/6qyi3Rz2/1kYg/OSEsJOYw4vem AQYn/hMWOiCd9EWlKw4Ne5rDphD7NTwkBcIPI9caVkSX1aYqbraXURap/LMbUVF4wMdW b8hdCIpv2G6kls5J5gq19fklftAUpnr9AfcPBBmFN1zKwMunDcrG2FLHbTupQvlYYusy 9Jqg== X-Gm-Message-State: AOAM530OfQmiufk3BmqXg9++p+UzGvPSZCxKd/9Dql/fptW7aL4baIc0 y20qP6VzJFpXlsagxDzHs1M+PA== X-Google-Smtp-Source: ABdhPJzlBmkPgJUcR9yrxacto9PbKbi5SBfJwRiYHn14459MqV88YkPeYYKp1doIKsi6IhhqcIC1nQ== X-Received: by 2002:a5d:58c1:: with SMTP id o1mr7078556wrf.6.1627286494233; Mon, 26 Jul 2021 01:01:34 -0700 (PDT) Received: from qcom-hackbox.linaro.org.net (163-172-5-244.rev.poneytelecom.eu. [163.172.5.244]) by smtp.gmail.com with ESMTPSA id n8sm460600wrx.46.2021.07.26.01.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 01:01:33 -0700 (PDT) From: Robert Foss To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Andrey Konovalov , AngeloGioacchino Del Regno Subject: [PATCH v1 3/4] media: camss: vfe: Remove vfe_hw_version_read() argument Date: Mon, 26 Jul 2021 10:01:12 +0200 Message-Id: <20210726080113.8378-3-robert.foss@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210726080113.8378-1-robert.foss@linaro.org> References: <20210726080113.8378-1-robert.foss@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The device argument is not needed, since it is accessible through the vfe_device argument already. Signed-off-by: Robert Foss --- drivers/media/platform/qcom/camss/camss-vfe-170.c | 5 +++-- drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 4 ++-- drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 4 ++-- drivers/media/platform/qcom/camss/camss-vfe-4-8.c | 4 ++-- drivers/media/platform/qcom/camss/camss-vfe.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe.h | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c index 1ad502a1c276..8ef4e80a62a2 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-170.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c @@ -177,7 +177,7 @@ #define VFE_BUS_WM_FRAME_INC(n) (0x2258 + (n) * 0x100) #define VFE_BUS_WM_BURST_LIMIT(n) (0x225c + (n) * 0x100) -static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) +static void vfe_hw_version_read(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_HW_VERSION); @@ -185,7 +185,8 @@ static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) u32 rev = (hw_version >> 16) & 0xFFF; u32 step = hw_version & 0xFFFF; - dev_dbg(dev, "VFE HW Version = %u.%u.%u\n", gen, rev, step); + dev_dbg(vfe->camss->dev, "VFE HW Version = %u.%u.%u\n", + gen, rev, step); } static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c index 53c56a8d4545..614c266e8cd1 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c @@ -210,11 +210,11 @@ #define MSM_VFE_VFE0_UB_SIZE 1023 #define MSM_VFE_VFE0_UB_SIZE_RDI (MSM_VFE_VFE0_UB_SIZE / 3) -static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) +static void vfe_hw_version_read(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); - dev_dbg(dev, "VFE HW Version = 0x%08x\n", hw_version); + dev_dbg(vfe->camss->dev, "VFE HW Version = 0x%08x\n", hw_version); } static u16 vfe_get_ub_size(u8 vfe_id) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c index 13f0fa6a7d60..aa175e0f6331 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c @@ -254,11 +254,11 @@ #define MSM_VFE_VFE1_UB_SIZE 1535 #define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) +static void vfe_hw_version_read(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); - dev_dbg(dev, "VFE HW Version = 0x%08x\n", hw_version); + dev_dbg(vfe->camss->dev, "VFE HW Version = 0x%08x\n", hw_version); } static u16 vfe_get_ub_size(u8 vfe_id) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-8.c b/drivers/media/platform/qcom/camss/camss-vfe-4-8.c index 03f92a6737b0..b897f5163c5d 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-8.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-8.c @@ -247,11 +247,11 @@ #define MSM_VFE_VFE1_UB_SIZE 1535 #define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read(struct vfe_device *vfe, struct device *dev) +static void vfe_hw_version_read(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); - dev_dbg(dev, "VFE HW Version = 0x%08x\n", hw_version); + dev_dbg(vfe->camss->dev, "VFE HW Version = 0x%08x\n", hw_version); } static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c index f6e889c1598e..9b4f8136759c 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -1299,7 +1299,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe, return -EINVAL; } vfe->ops->subdev_init(dev, vfe); - vfe->ops->hw_version_read(vfe, dev); + vfe->ops->hw_version_read(vfe); /* Memory */ diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h index 844b9275031d..cca251816d28 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.h +++ b/drivers/media/platform/qcom/camss/camss-vfe.h @@ -103,7 +103,7 @@ struct vfe_device; struct vfe_hw_ops { void (*enable_irq_common)(struct vfe_device *vfe); void (*global_reset)(struct vfe_device *vfe); - void (*hw_version_read)(struct vfe_device *vfe, struct device *dev); + void (*hw_version_read)(struct vfe_device *vfe); irqreturn_t (*isr)(int irq, void *dev); void (*isr_read)(struct vfe_device *vfe, u32 *value0, u32 *value1); void (*pm_domain_off)(struct vfe_device *vfe); From patchwork Mon Jul 26 08:01:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 12398785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9F95C432BE for ; Mon, 26 Jul 2021 08:01:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D115560F37 for ; Mon, 26 Jul 2021 08:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232182AbhGZHVK (ORCPT ); Mon, 26 Jul 2021 03:21:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232295AbhGZHVI (ORCPT ); Mon, 26 Jul 2021 03:21:08 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75BC0C061757 for ; Mon, 26 Jul 2021 01:01:36 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id c16so88994wrp.13 for ; Mon, 26 Jul 2021 01:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=upzwPoATA2+BpeywH9BXoLQjHHRdyqwMIY4xqkio9lQ=; b=PW3Pk8YRIyJNU7VgYYVV2fBp4io9wtDsiPiQRpwCkCQ30K0IVxpiYsY/Eox1dZWyhH i7QIT1JO9AI6cV9lyE5IABZRZ+bdG2rmu9pmswkSa8AzW3Qb0cHrkBY73ZO3btkM8KXj OKZ54ftbG+fu2qPkG8QF/Fx+/8jIVfwkhhdtH7bioSzEN2Z8q0UrpLFBcLAJWTtE3DLO E7IyYivgaQAJt4ZJAoUetzttgfuXGoJD5bCK+1nusHFS2Y2uqtPVQR4rwyJuDXUhDW7K Thq0eqUG/nwUn7INZg8UW1G3iMLxas3FASLDee8cBEAi45lhvMVrVUrjHCtlHnDkeUrb yCxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=upzwPoATA2+BpeywH9BXoLQjHHRdyqwMIY4xqkio9lQ=; b=MTL5UwY15bwJ8DXg4keysS6USadCe7CshUSb7hzYXUV1gd+YI9ryBNUTlZT9pZpXez a+diIk4EeeP7mOqUP8FcDX/5Ho4NDXzYaJ9CHDRdtQu3FnFz+mWY36g7djeYySIJJHsp MgzKOdhV2oAGhe/fugDbutZMLNpAsneo+HILuY5prGqUBiuK/zihqGkzG3Y35ZUfgl67 pjIGnzdTKJVoPu5Z4O6ZCvy9hBrIx7i/UHdDaCgSHolS+4f72Tuu1U/dwLhOfAphOqOC cAgxjrXwH+SaQcSOFWxeaNmgpzAnH1WQWd7zbT7sex26iMmgEcSx1W0BjtGNG4bi/O16 I05w== X-Gm-Message-State: AOAM5314BJs5kpqbtfmNDjKINlvCTURP1sb2Pd7kJsvFiG2MyXtcpszT UHKsGQH+aFPpzNs77kaghZbmJA== X-Google-Smtp-Source: ABdhPJxryYLJzN6ra6Q6lvG27FVaBbl38pW8NW3STR5BtW8/UUoEpEs3NykpRMFOFcrhPeCdAPiBgg== X-Received: by 2002:adf:dd07:: with SMTP id a7mr4002764wrm.377.1627286495050; Mon, 26 Jul 2021 01:01:35 -0700 (PDT) Received: from qcom-hackbox.linaro.org.net (163-172-5-244.rev.poneytelecom.eu. [163.172.5.244]) by smtp.gmail.com with ESMTPSA id n8sm460600wrx.46.2021.07.26.01.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 01:01:34 -0700 (PDT) From: Robert Foss To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Andrey Konovalov , AngeloGioacchino Del Regno Subject: [PATCH v1 4/4] media: camss: vfe: Rework vfe_hw_version_read() function definition Date: Mon, 26 Jul 2021 10:01:13 +0200 Message-Id: <20210726080113.8378-4-robert.foss@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210726080113.8378-1-robert.foss@linaro.org> References: <20210726080113.8378-1-robert.foss@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Expose the VFE version by returning the value read from the HW_VERSION register. Secondly, change the name of this function to conform with the CSID equivalent. Signed-off-by: Robert Foss --- drivers/media/platform/qcom/camss/camss-vfe-170.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe-4-8.c | 6 ++++-- drivers/media/platform/qcom/camss/camss-vfe.c | 2 +- drivers/media/platform/qcom/camss/camss-vfe.h | 2 +- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c index 8ef4e80a62a2..5c083d70d495 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-170.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c @@ -177,7 +177,7 @@ #define VFE_BUS_WM_FRAME_INC(n) (0x2258 + (n) * 0x100) #define VFE_BUS_WM_BURST_LIMIT(n) (0x225c + (n) * 0x100) -static void vfe_hw_version_read(struct vfe_device *vfe) +static u32 vfe_hw_version(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_HW_VERSION); @@ -187,6 +187,8 @@ static void vfe_hw_version_read(struct vfe_device *vfe) dev_dbg(vfe->camss->dev, "VFE HW Version = %u.%u.%u\n", gen, rev, step); + + return hw_version; } static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) @@ -772,7 +774,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe) const struct vfe_hw_ops vfe_ops_170 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off, diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c index 614c266e8cd1..7b7c9a0aaab2 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-1.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-1.c @@ -210,11 +210,13 @@ #define MSM_VFE_VFE0_UB_SIZE 1023 #define MSM_VFE_VFE0_UB_SIZE_RDI (MSM_VFE_VFE0_UB_SIZE / 3) -static void vfe_hw_version_read(struct vfe_device *vfe) +static u32 vfe_hw_version(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); dev_dbg(vfe->camss->dev, "VFE HW Version = 0x%08x\n", hw_version); + + return hw_version; } static u16 vfe_get_ub_size(u8 vfe_id) @@ -1004,7 +1006,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe) const struct vfe_hw_ops vfe_ops_4_1 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off, diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c index aa175e0f6331..2836b12ec989 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-7.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-7.c @@ -254,11 +254,13 @@ #define MSM_VFE_VFE1_UB_SIZE 1535 #define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read(struct vfe_device *vfe) +static u32 vfe_hw_version(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); dev_dbg(vfe->camss->dev, "VFE HW Version = 0x%08x\n", hw_version); + + return hw_version; } static u16 vfe_get_ub_size(u8 vfe_id) @@ -1196,7 +1198,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe) const struct vfe_hw_ops vfe_ops_4_7 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off, diff --git a/drivers/media/platform/qcom/camss/camss-vfe-4-8.c b/drivers/media/platform/qcom/camss/camss-vfe-4-8.c index b897f5163c5d..19519234f727 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-4-8.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-4-8.c @@ -247,11 +247,13 @@ #define MSM_VFE_VFE1_UB_SIZE 1535 #define MSM_VFE_VFE1_UB_SIZE_RDI (MSM_VFE_VFE1_UB_SIZE / 3) -static void vfe_hw_version_read(struct vfe_device *vfe) +static u32 vfe_hw_version(struct vfe_device *vfe) { u32 hw_version = readl_relaxed(vfe->base + VFE_0_HW_VERSION); dev_dbg(vfe->camss->dev, "VFE HW Version = 0x%08x\n", hw_version); + + return hw_version; } static inline void vfe_reg_clr(struct vfe_device *vfe, u32 reg, u32 clr_bits) @@ -1180,7 +1182,7 @@ static void vfe_subdev_init(struct device *dev, struct vfe_device *vfe) const struct vfe_hw_ops vfe_ops_4_8 = { .global_reset = vfe_global_reset, - .hw_version_read = vfe_hw_version_read, + .hw_version = vfe_hw_version, .isr_read = vfe_isr_read, .isr = vfe_isr, .pm_domain_off = vfe_pm_domain_off, diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c index 9b4f8136759c..6b2f33fc9be2 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -1299,7 +1299,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe, return -EINVAL; } vfe->ops->subdev_init(dev, vfe); - vfe->ops->hw_version_read(vfe); + vfe->ops->hw_version(vfe); /* Memory */ diff --git a/drivers/media/platform/qcom/camss/camss-vfe.h b/drivers/media/platform/qcom/camss/camss-vfe.h index cca251816d28..f166d176cb77 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.h +++ b/drivers/media/platform/qcom/camss/camss-vfe.h @@ -103,7 +103,7 @@ struct vfe_device; struct vfe_hw_ops { void (*enable_irq_common)(struct vfe_device *vfe); void (*global_reset)(struct vfe_device *vfe); - void (*hw_version_read)(struct vfe_device *vfe); + u32 (*hw_version)(struct vfe_device *vfe); irqreturn_t (*isr)(int irq, void *dev); void (*isr_read)(struct vfe_device *vfe, u32 *value0, u32 *value1); void (*pm_domain_off)(struct vfe_device *vfe);