From patchwork Mon Apr 12 11:34:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 12197763 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 DC509C433B4 for ; Mon, 12 Apr 2021 11:35:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9ABC61261 for ; Mon, 12 Apr 2021 11:35:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240565AbhDLLfx (ORCPT ); Mon, 12 Apr 2021 07:35:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240553AbhDLLfu (ORCPT ); Mon, 12 Apr 2021 07:35:50 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD56AC061574 for ; Mon, 12 Apr 2021 04:35:31 -0700 (PDT) Received: from deskari.lan (91-157-208-71.elisa-laajakaista.fi [91.157.208.71]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BD795E70; Mon, 12 Apr 2021 13:35:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1618227329; bh=Bj+uanVzx5YWUV4c5GD9UxGSnMKHxMyIXmoqYcJj+NU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KcrDTFAAWGfzim5oO5q1YVKd68fkRWr0SIN8q9qDXGyC9EASzHMbqszZb0ZuSBaYu 0DLEpr2koNg9UsfSqFTi3pl+Ifl7lUxKOVAR/VXcM0eiSMP0yTn8057cGMi0PAqSva KrNwkW8zPUPXkQJrdnETMb5vdpF/KWWn3uFdzdrw= From: Tomi Valkeinen To: Benoit Parrot , Laurent Pinchart , Pratyush Yadav , Lokesh Vutla , linux-media@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 16/28] media: ti-vpe: cal: disable ppi and pix proc at ctx_stop Date: Mon, 12 Apr 2021 14:34:45 +0300 Message-Id: <20210412113457.328012-17-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210412113457.328012-1-tomi.valkeinen@ideasonboard.com> References: <20210412113457.328012-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Disable PPI 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 092041ddbcfb..a6ca341c98bd 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 PPI context */ + cal_write(ctx->cal, CAL_CSI2_CTX(ctx->phy->instance, ctx->ppi_ctx), 0); + + /* Disable pix proc */ + cal_write(ctx->cal, CAL_PIX_PROC(ctx->pix_proc), 0); } /* ------------------------------------------------------------------