Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1380508rdh; Mon, 25 Sep 2023 10:55:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaDNHvtcysE8AxgECmcuL4XkJwRYWdzHx1+FGjiEHXOU9BXIAX2VLwxg1RsNBbqzLltoT6 X-Received: by 2002:a17:903:22cb:b0:1bb:d7d4:e2b with SMTP id y11-20020a17090322cb00b001bbd7d40e2bmr9606027plg.0.1695664522195; Mon, 25 Sep 2023 10:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695664522; cv=none; d=google.com; s=arc-20160816; b=j+qnReO6+y667GBlrC76qKs2HdtRq69tPSupSahi+Kzt4hoWCcEl0/RNDD61rLQyI4 QwaIRUoQF6tm6jFSA2L+8WVLNjfUUa042a9fHHErKPuTDoh3E3U+AkgWujsXqUqwCIcV xcClM/C3NpqQsDvdkqUGQjVotfiPF2Y56aLtNvgSi0ZhBHZEwta08qBV7+GGw+eGMRNX KnDTvA4wztlbenhjr6IJs4tvQqzFHbzVEJfVMdKaG47x64uADnQwmCzUOrfXdqbYQrq3 yB7u3eBUIFHMUpGJGyq4TVm5JouyIBr/Xye+ci82x11ks8taAumbkDb/yjCAyTObb496 fVIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3XAtVUAyBOvnRtU7QZlyMg2OvJJmAGTuY+WdBD311GM=; fh=11LKKpIlt6rtONTt+h6X+e6wp8mj+pGxb3/fOJjZKK8=; b=RJrkoJBoNPBXKgn97VxA8nQ0CgcKo/dX8JqCh9NfIqIj+oSgiqPU3fhWJ1ZqNafum9 rmAOuX0CcWMmu/n1IhUKzUxH64WSwGZ/XS51IBPrTZxk2BOtUIswvlPfVMjArhll8qZm kWW8H9djDCfk3O03GOHovx3v4tqoBcz81dK8WVUVgIr16ejw7B3p7VHsE+bu3wPlt10U 1Z9Sf2ArxSRlwi8tw3Sz7YbUynbc0bfclSFstQ5WC2s+YaVrMl1ds7/8s9tMNS20dMt0 Ap/807SGKZNxUVKvrBiYMjswyvdDfEpmAhM0XlvQHlNSxW+5ROUXEjoxEPOuUiCFXrR2 kQkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xnz7pFyZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q6-20020a170902dac600b001c61af1e683si2965684plx.641.2023.09.25.10.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:55:22 -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 header.i=@linaro.org header.s=google header.b=Xnz7pFyZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0758D80D44E2; Mon, 25 Sep 2023 08:42:18 -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 S232820AbjIYPmI (ORCPT + 99 others); Mon, 25 Sep 2023 11:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232568AbjIYPlk (ORCPT ); Mon, 25 Sep 2023 11:41:40 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3241CC8 for ; Mon, 25 Sep 2023 08:41:21 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-404fbfac998so75421815e9.3 for ; Mon, 25 Sep 2023 08:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695656480; x=1696261280; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3XAtVUAyBOvnRtU7QZlyMg2OvJJmAGTuY+WdBD311GM=; b=Xnz7pFyZOCUK3oas2KxJmig/iFPqwGiN85LZmi0ddh0OZ92VL2m1uAcKKQrMeDaN6O WVJqxFJ7/xT/ktc4GHgbzQ7EXzSVWf9cN0zmpkNudAV0CV783EnknC0RhUBzkgGgGNk9 FGapO/XgQH8sni4DPMSU1ljMV0wM+Knw//e0JO+KdS10jHbwTyJ53PUyebO5FI+NiabM fkmK+7mZLhHbfT4/u+JPYUgSKHYLrAeFBCy/raj/Ql6J8AYsfmhNC5WsQrzoaAzjO4Ky lzu3hpwelu7TAPdF+gAYpvcE8SCXoXiGAKvaDoMlUiWqbJR0RJVxVxtj4P8KkXUCM8LV yDsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695656480; x=1696261280; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3XAtVUAyBOvnRtU7QZlyMg2OvJJmAGTuY+WdBD311GM=; b=tQf7FctwR0W9IAJxk8tDTKPc9hnWtvZuHZdH+/UOkrTm3EkeTnAqKrIbZpzheT97Zb XuuwKgsN7GRU2G1D767lMPRE6ns1pEjlT1rFO5F2dRd/yuAAA9KY8lgxABiiPTEnIwMs C/Ozfjt1FiZkJTqm8Pv88ZJw6onYj6ztCCrI0UQHuC/Q8QYNZ+7xWo8g++fmPY1aMUe9 Q5VlskxFWfLokN9RzcqntMoS6ppbOLZRfDi4m6pXQnEjubMmmfHIIRijsEYufb/R3rkp OvrFHRR/dVzKZ7D32s0hOvhynvW86wRaQn8EhvYXWyX8B3WfLVxA22iNXPRsp+SUMr+k ks6w== X-Gm-Message-State: AOJu0YzrPiGtOpY/fFlrei3zBLD9cCgDmFPOzgNUNjUsUZKM3rCOz/mR bCpZjdjVvUyyqwqzJCM8j4XqOQ== X-Received: by 2002:a05:600c:ca:b0:404:757e:c5ba with SMTP id u10-20020a05600c00ca00b00404757ec5bamr5470692wmm.26.1695656480416; Mon, 25 Sep 2023 08:41:20 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id m15-20020a7bca4f000000b003fe4548188bsm15206155wml.48.2023.09.25.08.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:41:20 -0700 (PDT) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org Cc: linux-kernel@vger.kernel.org, Bryan O'Donoghue Subject: [PATCH v6 14/17] media: qcom: camss: Support RDI3 for VFE 17x Date: Mon, 25 Sep 2023 16:40:56 +0100 Message-ID: <20230925154059.837152-15-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230925154059.837152-1-bryan.odonoghue@linaro.org> References: <20230925154059.837152-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_NONE, SPF_HELO_NONE,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 08:42:18 -0700 (PDT) Some VFEs have four RDIs apiece. Right now the ISR code has a hard-coded value which tops-out at RDI2 meaning only three RDIs can be utilised in practice. Extend out the various routines in camss-vfe-17x.c to support the higher RDI count. Signed-off-by: Bryan O'Donoghue Acked-by: Konrad Dybcio Reviewed-by: Laurent Pinchart --- drivers/media/platform/qcom/camss/camss-vfe-170.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-170.c index 2ba7160b3bd1e..a5aa799501861 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe-170.c +++ b/drivers/media/platform/qcom/camss/camss-vfe-170.c @@ -209,7 +209,8 @@ static void vfe_global_reset(struct vfe_device *vfe) GLOBAL_RESET_CMD_IDLE_CGC | GLOBAL_RESET_CMD_RDI0 | GLOBAL_RESET_CMD_RDI1 | - GLOBAL_RESET_CMD_RDI2; + GLOBAL_RESET_CMD_RDI2 | + GLOBAL_RESET_CMD_RDI3; writel_relaxed(BIT(31), vfe->base + VFE_IRQ_MASK_0); @@ -343,7 +344,7 @@ static void vfe_violation_read(struct vfe_device *vfe) static irqreturn_t vfe_isr(int irq, void *dev) { struct vfe_device *vfe = dev; - u32 status0, status1, vfe_bus_status[3]; + u32 status0, status1, vfe_bus_status[VFE_LINE_NUM_MAX]; int i, wm; status0 = readl_relaxed(vfe->base + VFE_IRQ_STATUS_0); @@ -352,7 +353,7 @@ static irqreturn_t vfe_isr(int irq, void *dev) writel_relaxed(status0, vfe->base + VFE_IRQ_CLEAR_0); writel_relaxed(status1, vfe->base + VFE_IRQ_CLEAR_1); - for (i = VFE_LINE_RDI0; i <= VFE_LINE_RDI2; i++) { + for (i = VFE_LINE_RDI0; i < vfe->line_num; i++) { vfe_bus_status[i] = readl_relaxed(vfe->base + VFE_BUS_IRQ_STATUS(i)); writel_relaxed(vfe_bus_status[i], vfe->base + VFE_BUS_IRQ_CLEAR(i)); } @@ -366,11 +367,11 @@ static irqreturn_t vfe_isr(int irq, void *dev) if (status0 & STATUS_0_RESET_ACK) vfe->isr_ops.reset_ack(vfe); - for (i = VFE_LINE_RDI0; i <= VFE_LINE_RDI2; i++) + for (i = VFE_LINE_RDI0; i < vfe->line_num; i++) if (status0 & STATUS_0_RDI_REG_UPDATE(i)) vfe->isr_ops.reg_update(vfe, i); - for (i = VFE_LINE_RDI0; i <= VFE_LINE_RDI2; i++) + for (i = VFE_LINE_RDI0; i < vfe->line_num; i++) if (status0 & STATUS_1_RDI_SOF(i)) vfe->isr_ops.sof(vfe, i); -- 2.42.0