From patchwork Thu Jun 22 09:21:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 111557 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4937551vqr; Thu, 22 Jun 2023 02:33:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5QNFaPtyr1ylzsSDAHuu4TjR4Nt4nrMp5184VT7+xy5BkAjPkIjmz3ZNCRnQx3boMcjrDp X-Received: by 2002:a05:6358:cc13:b0:12f:1fea:7118 with SMTP id gx19-20020a056358cc1300b0012f1fea7118mr14108399rwb.30.1687426415539; Thu, 22 Jun 2023 02:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687426415; cv=none; d=google.com; s=arc-20160816; b=BxsIT4auD6/ZpTcHylgVrGsm5noy+J5m0YoEAXQGh4PQtreLKF3Ss7zSZ0aWUSn1K4 +i/ByTkWmzHUypWqrsM0QL1qCXfD/d5iaGOC5hFoMaefBVyQaYw8vLD6T3SpT+YkiDMQ X6KdTmGXGO95RjgeboKm+fhOy5SbGbMp264FSVgQCa8KSDzO9wAXlIAX6ZAqnqvLViON EisMxrz911idKGe1kakttdBplnokPEMRSoVs8CaDL6w56Ixkdx8/YbfWhnNw8kfEmC2F Nf/qBT3QoFxvVIHBViDpVOvRyUoaCK3BcN/Ps8PBD9Z2pGVNammCGD3hggXCqwHIku5r OOHw== 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=A6kDunl//DlUMhzxywEO+v1JnwHwkeSiOMAek8jQnUQ=; b=r8xQ09P0jJJDbIAHAKt+6GZ0y0OGhIXM90GfwyoEkJyQy+cfMyZG2L5ax8q6YSIg47 ZrU/qydOAn8zssxgFvJv8uNPcHoUj0tfzjJokvpc9MkMbvWTUufvdEyGsJwJOwrir0GJ YLOpoAg6+WxJqFBbBHOSL3EIUXwFyB63aSqn1NcaE+9q7czTl5F4tnJ6UINgVYFeYX0H 5M0SS4vD+faCGZ4foyEIjkILUfl4oD9cUqNhDvR4p07V6m4rmewIzdumEY+tFla/78zj OP+H2LZa3kgdu2W4S6y9a07T1A74DMUwG9KrmR3gyOlkIrTVc87Je96cVjAyDeoftj9K H5zg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i24-20020a633c58000000b0054fec1e94d7si5989346pgn.705.2023.06.22.02.33.07; Thu, 22 Jun 2023 02:33:35 -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 S232375AbjFVJbK (ORCPT + 99 others); Thu, 22 Jun 2023 05:31:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232333AbjFVJ3t (ORCPT ); Thu, 22 Jun 2023 05:29:49 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F9264C3D for ; Thu, 22 Jun 2023 02:22:46 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:991a:a831:ea4b:6058]) by baptiste.telenet-ops.be with bizsmtp id C9Nj2A0011yfRTD019Njq6; Thu, 22 Jun 2023 11:22:43 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qCGWX-000BvR-BY; Thu, 22 Jun 2023 11:22:43 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qCGWY-003Vvq-Uo; Thu, 22 Jun 2023 11:22:42 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 03/39] drm: renesas: shmobile: Fix overlay plane disable Date: Thu, 22 Jun 2023 11:21:15 +0200 Message-Id: <9feb39aaab796fc4b59c6c83c3d96757482f714d.1687423204.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769394840709594139?= X-GMAIL-MSGID: =?utf-8?q?1769394840709594139?= 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 --- 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; }