From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECED4C77B7F for ; Fri, 27 Jun 2025 14:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=REICrhB/bJid0PPaN/rZiPA06su46y1/x8B9gUCA+yY=; b=eOQMvGTY4R72kEmxkrN+XL5Rf0 bjKB1bByGXygLHNFKd4IX38PAyXOK3sLNKkwImofYQ7/ejUULDl21Fbr8IS7UYSqRwJ/QNP+8Q0xT aBiMJ6aJ9Z40z185UBV/x6eiep9Ek5gypOxSWf5KF9fbRpnk0WuMN8p349n21wLbdVDprwIKTQkDM 6c2LOu5o7vmJmdnebh2UXxsR6IR6wxB7GPE+cBsg2Aexiqiy8qNzsnIwhZRMm1m6aDYQ/vgxaUxPE IrMvPYN5P+lbKyA4Mp/0lX4+WZlkhOdBm5IuSzpbr6c+pZq0G3Rlc/a92eNFFmdT+nOG8GiJm2EcP uPM/cAOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uV9tE-0000000EsVJ-10xE; Fri, 27 Jun 2025 14:17:16 +0000 Received: from layka.disroot.org ([178.21.23.139]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uV9In-0000000EntM-3Bcg for linux-arm-kernel@lists.infradead.org; Fri, 27 Jun 2025 13:39:39 +0000 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0C36E26091; Fri, 27 Jun 2025 15:39:35 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id z_DBtCRPQosI; Fri, 27 Jun 2025 15:39:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1751031574; bh=TEJGRf1FlIgDbcSTQNxCwfvvmdMjzuRrveS8ic9DKO8=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Gd611RXtDUZ0eMsj5UIbALHq5iK/naVa74b1YVOj7JFRHqo5mtjuCj6SVb4R7ZlF3 E/RfVgUSG9gCG6F+kirZgVXVL9zb+soJQe6bl1bzc/g6ZKIGkJZDXd+DVbvBaTdB0k UnVLNZsgX+lWxlVHtv0hartInLi0BGjipjNH0S5tTd1EnWTIgyK8xhXMI4MHSkSfa4 Q4HS5x5/4zSEQB+a59M6MQCtSUte1dl9XC3GotadKWwDod9EsyQswm32ejXt2+Koyh 7UV5ld8aCL5fmXVsKpYs2lhrWdIlPUBlvO8v0jPUcphwmsqPY38Xan9OMyuLddf+NW sIF6VTF7uZIyg== MIME-Version: 1.0 Date: Fri, 27 Jun 2025 13:39:33 +0000 From: Kaustabh Chakraborty To: Inki Dae Cc: Seung-Woo Kim , Kyungmin Park , David Airlie , Simona Vetter , Krzysztof Kozlowski , Alim Akhtar , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Conor Dooley , Ajay Kumar , Akshu Agrawal , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3 2/3] drm/exynos: exynos7_drm_decon: fix call of decon_commit() In-Reply-To: References: <20250627-exynosdrm-decon-v3-0-5b456f88cfea@disroot.org> <20250627-exynosdrm-decon-v3-2-5b456f88cfea@disroot.org> Message-ID: X-Sender: kauschluss@disroot.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250627_063937_931501_31A45647 X-CRM114-Status: GOOD ( 24.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2025-06-27 04:06, Inki Dae wrote: > Hi, > > 2025년 6월 27일 (금) 오전 4:21, Kaustabh Chakraborty > 님이 작성: >> >> decon_commit() has a condition guard at the beginning: >> >> if (ctx->suspended) >> return; >> >> But, when it is being called from decon_atomic_enable(), >> ctx->suspended >> is still set to true, which prevents its execution. decon_commit() is >> vital for setting up display timing values, without which the display >> pipeline fails to function properly. Call the function after >> ctx->suspended is set to false as a fix. > > Good observation. However, I think a more generic solution is needed. > >> >> Cc: stable@vger.kernel.org >> Fixes: 96976c3d9aff ("drm/exynos: Add DECON driver") >> Signed-off-by: Kaustabh Chakraborty >> --- >> drivers/gpu/drm/exynos/exynos7_drm_decon.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c >> b/drivers/gpu/drm/exynos/exynos7_drm_decon.c >> index >> f91daefa9d2bc5e314c279822047e60ee0d7ca99..43bcbe2e2917df43d7c2d27a9771e892628dd682 >> 100644 >> --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c >> +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c >> @@ -583,9 +583,9 @@ static void decon_atomic_enable(struct >> exynos_drm_crtc *crtc) >> if (test_and_clear_bit(0, &ctx->irq_flags)) >> decon_enable_vblank(ctx->crtc); >> >> - decon_commit(ctx->crtc); >> - >> ctx->suspended = false; >> + >> + decon_commit(ctx->crtc); > > There seem to be three possible solutions: > > 1. Remove all code related to ctx->suspended. If the pipeline flow is > properly managed as in the exynos5433_drm_decon.c module, checking the > ctx->suspended state may no longer be necessary. > 2. Remove the ctx->suspended check from decon_commit(). Since the > runtime PM resume is already called before decon_commit() in > decon_atomic_enable(), the DECON controller should already be enabled > at the hardware level, and decon_commit() should work correctly. > 3. Move the code that updates ctx->suspended from > decon_atomic_enable() and decon_atomic_disable() to > exynos7_decon_resume() and exynos7_decon_suspend(), respectively. The > decon_atomic_enable() function calls pm_runtime_resume_and_get(), > which ultimately triggers exynos7_decon_resume(). It would be more > appropriate to set ctx->suspended = false in the > exynos7_decon_resume() function, as this is the standard place to > handle hardware state changes and resume actions. > decon_atomic_enable() is responsible for requesting enablement of the > DECON controller, but actual hardware state transitions will be > handled within exynos7_decon_resume() and exynos7_decon_suspend(). > > > Unfortunately, I do not have hardware to test this patch myself. Would > it be possible for you to try one of these approaches and verify the > behavior? > Option 1 would be the best solution if feasible. Yes, it works fine indeed. Thanks! > > Thanks, > Inki Dae > >> } >> >> static void decon_atomic_disable(struct exynos_drm_crtc *crtc) >> >> -- >> 2.49.0 >> >>