Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7148027rwp; Tue, 18 Jul 2023 10:43:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlGsNLJrFA5ruXp9agGrU9Imh6PRz+j41ytRgrh3ObP/rbb/laqB91/MScKE7fJDZ3TtreS1 X-Received: by 2002:a17:906:258:b0:991:d5ad:f1b1 with SMTP id 24-20020a170906025800b00991d5adf1b1mr566192ejl.47.1689702185760; Tue, 18 Jul 2023 10:43:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689702185; cv=none; d=google.com; s=arc-20160816; b=MzhyixHZ1dSBIEKIpIsshW4u8VkVV8JrVTR4BnLaQR3s0Ls+Ibwm+Xjb0fneU/VIFP Sr+FRSVQJoW+8MG3WP2hMzD2PMOnTlR4UytRquXQ4j9frLFp4KuU4JA6zNmeB8Kg3rvU w3AioSEYdLwh5iISqybj7XCQxP5y9y6FH2b8NYr1y3Zdx1g87JYj+lOmTl3d875BJ9Iv 37lYb2VQ27n0lUYQIrFkybmHqeAqjP9GoAxY2pSy/+y5UdHF5mRmsyp94E2fZEaQFEmC VGEk8Nt+4zRVE6g8RMiRdMyfsK/GnNTFHZYGYG2VdTMrGRepkx57qalfIIqqglCKyztp Nhnw== 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; bh=iFU3t77TWgC4Kyw1IIR6BPNe9qRv7X5vc1Feykejtv8=; fh=Ople2ijcDVdvBJwvAg2RvyZp0qNZK7It46SN0LxlrVk=; b=wF0XtL5p6bB9vKe2fugMeiWIWvrdxR1tYC+Yn4u2dhXCDEzxEeZPwH751zsCuN10st IUAoE3zhRN3gK0CtouDC8xNsS4s+hJCcWS1LQu9vTRdDU1orrzH6B/XYqz6QmprAHN2z wTBHMmpmhyzYPBimeOXWakLkP6X9c/Vyyk+bMqwSJrA08hSsvoZrIg+r7FcNxAgEZNrX ZMdm3Mm+Gd0lBLOkmAnJyCMZoA06aOlyWh8+ggMhDCzxen4AxQlugQtgBTFke4LuA5JA 24scDWXl7cs+ie8F+6oDzSuqgA+/mJSHBLW6VEWrdRAX4Og08emASogC4p8/1sFTtCDq Z+Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id le11-20020a170907170b00b00991f96678cesi1598335ejc.615.2023.07.18.10.42.41; Tue, 18 Jul 2023 10:43:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233227AbjGRQzP (ORCPT + 99 others); Tue, 18 Jul 2023 12:55:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbjGRQy6 (ORCPT ); Tue, 18 Jul 2023 12:54:58 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0526D199D for ; Tue, 18 Jul 2023 09:54:54 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5803:2d6d:5bbc:e252]) by albert.telenet-ops.be with bizsmtp id Ngur2A0080ucMBo06gurSX; Tue, 18 Jul 2023 18:54:52 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qLnyD-001nXe-30; Tue, 18 Jul 2023 18:54:51 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qLnyN-000gbQ-4A; Tue, 18 Jul 2023 18:54:51 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Laurent Pinchart Subject: [PATCH v2 04/41] drm: renesas: shmobile: Fix overlay plane disable Date: Tue, 18 Jul 2023 18:54:09 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Merely writing zero to the CHn Source Image Format Register is not sufficient to disable a plane, as the programmed register value is not propagated immediately to the current side. This can be seen when using the -P option of modetest: the extra plane is displayed correctly, but does not disappear after exit. Fix this by doing the full update dance using the Blend Control Register, like is done when enabling the plane. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c index 850986cee848226a..0e34573c3cb3d032 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c @@ -215,7 +215,10 @@ static int shmob_drm_plane_disable(struct drm_plane *plane, splane->format = NULL; + lcdc_write(sdev, LDBCR, LDBCR_UPC(splane->index)); lcdc_write(sdev, LDBnBSIFR(splane->index), 0); + lcdc_write(sdev, LDBCR, + LDBCR_UPF(splane->index) | LDBCR_UPD(splane->index)); return 0; } -- 2.34.1