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 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 1CE83FC5908 for ; Thu, 26 Feb 2026 08:09:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7513F10E12F; Thu, 26 Feb 2026 08:09:28 +0000 (UTC) Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id CBB7610E12F for ; Thu, 26 Feb 2026 08:09:26 +0000 (UTC) Received: by mail-vk1-f175.google.com with SMTP id 71dfb90a1353d-56a91a5e64eso187698e0c.3 for ; Thu, 26 Feb 2026 00:09:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772093366; x=1772698166; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FMwst+L/dmOaYbXaIYLxxc9SkmqogXh2haYIQH1PaVs=; b=h+EjR3dC9CX6w3+UjSw8KWFZ4WEN+CPVoyL6NqYxNbYMM2sVguMi9tGKKLGkpW7lv6 WDYYZ5d2jA273ULamkHtPXDbtxc9zBUI7P2CEUfx+JAWMB7oS0WOcm9GjU4F7z5F6hli ZBxHL5DTYpGZ9XIWgPUE/iiTqD5hcrftIHBFcPbOYwYpeCWa+/esarBBnHD0OUE3PbSi bGYLnH7yeBXIZ3IfzDLNG+YoCnkTmR8qPd39hnm/dEQ09IorOb0cK1Yz8Y+CaBoIZguX NvO8fINwaolRuDqRZd2nGOZsP3SylMXMlbrjqTQ6i9wqdNSz4/OYAeXFV7j4UJ7LKyoL 2BCw== X-Forwarded-Encrypted: i=1; AJvYcCVglawjsnmahMWsVlTk9640tPK9PYUrx8fNsAbcxPTcYKUw7Mw/7ccmJLlqvPSKMNVxv/OVbh94/5s=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyEwQeBkWY6RiYPc/zKifpp4VYJjPhOh9d34XyKC2oaXScxDbeA WUJOhhmwfXPAeARikA4LIxNoD40kN0Ix5vvFx2+tQm68Bjsu5mD6DHe2RWtrC9nq X-Gm-Gg: ATEYQzxYQsGhczHI2JgCd5iz/0K/fiYnsXZ5zA4XSgK93XylXftIr14Hyu1UXKIYYcX hHwTjRaZruzp5mRZUWxJvqOSkm6ZdfK4GEZnhqU4/8fdhBIjxShtA1bB8wxwskEagSg21Jjm4kV WNtcO8D/pMFnNNrAhinQtW0awRcKE6/w/axNvNAz/ReK5atZAc1sWXz3GtKhUKq9pz8wPXmexrW ocAGQhRrcQogdHj9Kij9TOG/wJLeuYbkqyaXlea0LUR/B/CCA0Evbwn7FMbG6T7A6SLf5VTU/j1 C7pBj/lERUJ7OSAOQ8ywBEiSN3Ekqy+sax4of2uRirvg9NiANnbOKhebqDGOiMYtl2tRZAMdoaY +7PXW9NuWMofqnfa+TM2kXB6afDMVUkoRCPvzZwxjlvt8ftNGDGdeH1mrvNma7E9apLEM2wSvs1 KUavhLryEkMnURSCu/dQJJdYxBd4EsaF/wqc43sInTI+doPGRy73DAc5TjnR1mSmbY2Eq9O4M= X-Received: by 2002:a05:6122:1d54:b0:566:eb31:4715 with SMTP id 71dfb90a1353d-568e47c487dmr7938927e0c.8.1772093365771; Thu, 26 Feb 2026 00:09:25 -0800 (PST) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com. [209.85.217.49]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-56a91bcc3eesm1722285e0c.8.2026.02.26.00.09.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Feb 2026 00:09:25 -0800 (PST) Received: by mail-vs1-f49.google.com with SMTP id ada2fe7eead31-5ff093cf15eso118569137.0 for ; Thu, 26 Feb 2026 00:09:25 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUj9nooXtdZ8eeJqF4ARaC5YSGoDo2MOLMbfuqYAe1jELIMiALGXVHsuREHznZOsSao1ZGJVKJFvKQ=@lists.freedesktop.org X-Received: by 2002:a05:6102:f14:b0:5ff:1f6e:6269 with SMTP id ada2fe7eead31-5ff1f6e7e68mr545413137.41.1772093364755; Thu, 26 Feb 2026 00:09:24 -0800 (PST) MIME-Version: 1.0 References: <20260226051338.27460-1-phucduc.bui@gmail.com> <20260226054035.30330-1-phucduc.bui@gmail.com> In-Reply-To: <20260226054035.30330-1-phucduc.bui@gmail.com> From: Geert Uytterhoeven Date: Thu, 26 Feb 2026 09:09:13 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AaiRm51XMkux3B1QqgjcHVbFdYag1eq8lj6Y0Kfg2ouDz7vKdp5cWOR8jMqmm4E Message-ID: Subject: Re: [PATCH v2] drm: shmobile: Fix blank screen after resume when LCDC is stopped To: phucduc.bui@gmail.com Cc: airlied@gmail.com, dri-devel@lists.freedesktop.org, laurent.pinchart@ideasonboard.com, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, simona@ffwll.ch, tzimmermann@suse.de Content-Type: text/plain; charset="UTF-8" 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Phucduc, On Thu, 26 Feb 2026 at 06:40, wrote: > From: bui duc phuc > > The LCDC controller on R8A7740 loses its register state during > deep sleep. Upon resume, the driver's Mirror Register mechanism > (MRS) fails to update active registers because the controller is > stopped (DO=0). > > According to the datasheet (Section 38.7.1, Figure 38.13), the > Two-Set Register Switching logic only triggers a change between > Set A and Set B when a Frame End Interrupt occurs at the > completion of a display frame. During resume, as the LCDC is > stopped, no frame is processed and no Frame End pulse is > generated. This leaves the Display Data Start Address (SA) > pending in the standby set, while the active register (Side A) > remains at 0x00000000, preventing the display engine from > starting.Debug logs collected during resume confirm this > behavior, showing the start address written to the standby set > while the active register remains unchanged. > > Prime both register sets when the LCDC is stopped: > > If DO=0: Use lcdc_write() to force the Start Address (SA) > into both Set A and Set B registers. This bypasses the > switching logic and ensures the engine has a valid base > address immediately upon being enabled. > > If DO=1: Maintain the standard Mirror mechanism and MRS > toggle for normal, tear-free operation. > > Verified on R8A7740. > > Signed-off-by: bui duc phuc Thanks for your patch! What do you mean by "deep sleep"? s2ram? In upstream, s2ram behaves the same as s2idle, and the LCD works fine after resume from s2ram on my Amadillo, with and without your patch, What am I missing? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds