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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 BF894EB64D7 for ; Fri, 23 Jun 2023 14:59:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F15010E0AC; Fri, 23 Jun 2023 14:59:38 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4108D10E0AC for ; Fri, 23 Jun 2023 14:59:36 +0000 (UTC) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 57D41440; Fri, 23 Jun 2023 16:58:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1687532338; bh=UNF4vGYdun0BL/GAZBLgK6Ry2y6OLxCuHlXyuLsgc14=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PxgNCOqeedk+T5onFKGHrGR1B6uHo09Rr5XjVEWKP2Vw6TDJg1PZa9rz0LRBIGc0U LSX3ToThkvkqZWAac65PeBC9maGNmSM0k7KPX4JI9wvUP3wkXwBAt8ud3cgtn+glT8 XqerpJx/S9RVuZUY9gDmuBYdtxdMHT5S1re1ZdX0= Date: Fri, 23 Jun 2023 17:59:33 +0300 From: Laurent Pinchart To: Geert Uytterhoeven Subject: Re: [PATCH 03/39] drm: renesas: shmobile: Fix overlay plane disable Message-ID: <20230623145933.GG2112@pendragon.ideasonboard.com> References: <9feb39aaab796fc4b59c6c83c3d96757482f714d.1687423204.git.geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9feb39aaab796fc4b59c6c83c3d96757482f714d.1687423204.git.geert+renesas@glider.be> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Magnus Damm , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Geert, Thank you for the patch. On Thu, Jun 22, 2023 at 11:21:15AM +0200, Geert Uytterhoeven wrote: > 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; > } > -- Regards, Laurent Pinchart