From patchwork Tue Apr 20 12:04:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 424803 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.8 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, 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 EE08BC43462 for ; Tue, 20 Apr 2021 12:05:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCA1D613C3 for ; Tue, 20 Apr 2021 12:05:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232181AbhDTMF5 (ORCPT ); Tue, 20 Apr 2021 08:05:57 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:57972 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232160AbhDTMF4 (ORCPT ); Tue, 20 Apr 2021 08:05:56 -0400 Received: from deskari.lan (91-157-208-71.elisa-laajakaista.fi [91.157.208.71]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A1B08AD; Tue, 20 Apr 2021 14:05:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1618920322; bh=aYSudZSZeG0nd+xsiqT7UIgusIQ3MceTnlwf69IWO5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qhECIrQ29L35lliA1IrY3tw2fJ/AM8Gri+QVGOBc20FJM8FfPbkSBSNaLC6wUJSLe a4wmWvbd5lr8m2daeYGfeoI19BDH8XeTRYVW9w8F4zJMNnDGpVzN1sfujTN2GoRLZS xc9G9vUNqFm9SdS71cpIdTamg8J7in6SYryUZQaM= From: Tomi Valkeinen To: Benoit Parrot , Laurent Pinchart , Pratyush Yadav , Lokesh Vutla , linux-media@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH v2 16/35] media: ti-vpe: cal: disable csi2 ctx and pix proc at ctx_stop Date: Tue, 20 Apr 2021 15:04:14 +0300 Message-Id: <20210420120433.902394-17-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420120433.902394-1-tomi.valkeinen@ideasonboard.com> References: <20210420120433.902394-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Disable CSI2 context and pix proc in cal_ctx_stop() to ensure they are not used if the same context is used later on a different PHY or without pix proc. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/media/platform/ti-vpe/cal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index 0568677674b4..f47d2fa31a39 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -484,6 +484,12 @@ void cal_ctx_stop(struct cal_ctx *ctx) CAL_HL_IRQ_WDMA_START_MASK(ctx->dma_ctx)); ctx->dma.state = CAL_DMA_STOPPED; + + /* Disable CSI2 context */ + cal_write(ctx->cal, CAL_CSI2_CTX(ctx->phy->instance, ctx->csi2_ctx), 0); + + /* Disable pix proc */ + cal_write(ctx->cal, CAL_PIX_PROC(ctx->pix_proc), 0); } /* ------------------------------------------------------------------