From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E132A35B128 for ; Wed, 22 Oct 2025 16:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761151055; cv=none; b=OHDR+raX1wnDvr79cpdSwtjXpz6wLd2vkYZSZm9F52sDf61eDU7JwZUNR46wqHVFBw7Hzkiif+77MAccTN4gJayJi7aWBJosyEzP0SuPusEvLr1CRGLDIbQ4I/QOocsdWNql/XJFiGhlDeUOp7zYi9ABrEPyKTZJ6iSebm5ThBQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761151055; c=relaxed/simple; bh=c6iXq2CXhRSiU/zyPKgk/97y67GG3wPx5D49DMmb4mA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=no1DFdkNIC/2rrEsdhTjXFCcsFOVyKkhJ/yJxo/mY3Lh3FyzfXM6x4KFgk8wgsXcbLS7cp78f/vGI0jvgixpcf6Y4OsqJRSCs2cErW6G85k9VeZ6xlSlAOuH4i1+M6wpWKNpUtkbk1YZMsdWrmmwgPt4VGp0yclMsXx+bgRZswk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=l/WRi5Z4; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="l/WRi5Z4" Received: from [192.168.88.20] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 98CB98FA; Wed, 22 Oct 2025 18:35:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761150946; bh=c6iXq2CXhRSiU/zyPKgk/97y67GG3wPx5D49DMmb4mA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=l/WRi5Z4ycRNSf9pqsvs2Q3ABA2mElozQDXLWHcQUvbKhIaYza2AnUZ6PmTon8Hj4 A/ayI/sIpY6c9PClpYHGQSYXigtRWYvY7MC6G9MXtyqVXgtatcs/OKX5Lhnce4XBYx 6EGQGGXReu6M24rqCa8mvK0HIerqDAQ9lyvmHVvc= Message-ID: <7ebf501a-68f5-4644-9419-49e391caacd8@ideasonboard.com> Date: Wed, 22 Oct 2025 19:37:27 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] drm/tidss: Add some support for splash-screen To: Thomas Zimmermann , Maxime Ripard , Devarsh Thakkar Cc: Jyri Sarha , Maarten Lankhorst , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, Laurent Pinchart , linux-kernel@vger.kernel.org References: <20250908-tidss-splash-v2-1-e388b0581dfa@ideasonboard.com> <348086ac-b5bc-4ca9-9e5b-82106d319eeb@ti.com> <0d1affe1-1e3c-452a-9052-104acaabef62@suse.de> Content-Language: en-US From: Tomi Valkeinen Autocrypt: addr=tomi.valkeinen@ideasonboard.com; keydata= xsFNBE6ms0cBEACyizowecZqXfMZtnBniOieTuFdErHAUyxVgtmr0f5ZfIi9Z4l+uUN4Zdw2 wCEZjx3o0Z34diXBa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mvQcsFS7d3eGVI6eyjCFdcAO8eMAEQEAAcLBXwQYAQIACQUCTqazRwIbDAAKCRD6PaqMvJYe 9fA7EACS6exUedsBKmt4pT7nqXBcRsqm6YzT6DeCM8PWMTeaVGHiR4TnNFiT3otD5UpYQI7S suYxoTdHrrrBzdlKe5rUWpzoZkVK6p0s9OIvGzLT0lrb0HC9iNDWT3JgpYDnk4Z2mFi6tTbq xKMtpVFRA6FjviGDRsfkfoURZI51nf2RSAk/A8BEDDZ7lgJHskYoklSpwyrXhkp9FHGMaYII m9EKuUTX9JPDG2FTthCBrdsgWYPdJQvM+zscq09vFMQ9Fykbx5N8z/oFEUy3ACyPqW2oyfvU CH5WDpWBG0s5BALp1gBJPytIAd/pY/5ZdNoi0Cx3+Z7jaBFEyYJdWy1hGddpkgnMjyOfLI7B CFrdecTZbR5upjNSDvQ7RG85SnpYJTIin+SAUazAeA2nS6gTZzumgtdw8XmVXZwdBfF+ICof 92UkbYcYNbzWO/GHgsNT1WnM4sa9lwCSWH8Fw1o/3bX1VVPEsnESOfxkNdu+gAF5S6+I6n3a ueeIlwJl5CpT5l8RpoZXEOVtXYn8zzOJ7oGZYINRV9Pf8qKGLf3Dft7zKBP832I3PQjeok7F yjt+9S+KgSFSHP3Pa4E7lsSdWhSlHYNdG/czhoUkSCN09C0rEK93wxACx3vtxPLjXu6RptBw 3dRq7n+mQChEB1am0BueV1JZaBboIL0AGlSJkm23kw== In-Reply-To: <0d1affe1-1e3c-452a-9052-104acaabef62@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, On 22/10/2025 17:59, Thomas Zimmermann wrote: > Hi > > Am 22.10.25 um 16:06 schrieb Maxime Ripard: >> Hi, >> >> On Wed, Oct 22, 2025 at 07:25:10PM +0530, Devarsh Thakkar wrote: >>> On 08/09/25 14:43, Tomi Valkeinen wrote: >>>> Currently when the driver's probe is called, we do a full DSS reset. If >>>> the bootloader has set up a splash-screen, the reset will disable the >>>> video output, and after that it may still take time until the >>>> display is >>>> usable (all the kernel modules have been loaded) and even more time >>>> until the userspace is able to use the display. >>>> >>>> If fbdev is enabled, in a perfect case tidss would take over the fb >>>> memory set up by the bootloader, and use that memory for tidss's fbdev, >>>> thus retaining the splash-screen. However, we're not there yet. >>>> >>>> As a partial solution, this patch changes the driver so that the driver >>>> will not reset (or change) the DSS registers until tidss_runtime_get() >>>> is called when the display is being set up (because of fbdev >>>> modesetting >>>> or modesetting from the userspace). >>>> >>>> This is achieved in two parts: >>>> >>>> 1. Probe >>>> >>>> At probe time, in dispc_init_hw(), we check if the DSS is idle >>>> (videoports disabled). If yes, do a reset and continue as before. If >>>> not, we know that there's a splash-screen, and we set the >>>> 'tidss->boot_enabled_vp_mask' field to reflect the enabled VPs. >>>> >>>> We then enable the corresponding VP clocks (to ensure they stay on), >>>> set >>>> the IRQENABLE to 0 to make sure we won't get any interrupts, and then >>>> exit leaving the fclk and VP clocks enabled, and the runtime PM status >>>> active. >>>> >>>> 2. Runtime get >>>> >>>> Later, when the tidss_runtime_get() is called the first time, we check >>>> the 'boot_enabled_vp_mask'. If set, we know that we have the >>>> splash-screen showing on the screen, and thus the clocks are enabled >>>> and >>>> runtime PM status is active. This indicates that >>>> pm_runtime_resume_and_get() call just before in tidss_runtime_get() did >>>> not cause a runtime_resume callback to get called, so we need to do >>>> that >>>> manually. >>>> >>>> We call dispc_splash_fini() which essentially returns the DSS into the >>>> state where it would be in a non-splash-screen case: >>>> dispc_splash_fini() >>>> will do a DSS reset, manually call the runtime_resume callback, and >>>> then >>>> call clk_disable_unprepare() and pm_runtime_put_noidle() to counter the >>>> actions at probe time. >>>> >>>> Finally 'boot_enabled_vp_mask' is set to zero to mark that we're no >>>> longer in the "splash-screen mode". >>>> >>>> A note about fbdev emulation: >>>> >>>> If fbdev emulation is enabled in the DRM, tidss will set up an fbdev. >>>> This will cause a modeset, and the blank framebuffer from tidss's fbdev >>>> will be shown instead of the splash-screen. >>>> >>>> I see two improvements to this: either we should memcpy the pixel data >>>> from the bootloader's splash-screen to the new fbdev buffer, or the >>>> fbdev could use the splash-screen directly as its buffer. I have done >>>> some hacks for the former, but I'm not sure how to implement either of >>>> these properly. >> I still think it's not the kind of driver-specific driver behaviour we >> want to have. >> >> Even more so when we have a generic solution to this problem in the >> works. > > I agree with that sentiment. We want atomic-state readout plus a > bootsplash DRM client. This would give us flicker-free booting with > smooth transitions across drivers and user space. I like the sound of it. What does a bootsplash DRM client do? Would this give us the ability for the userspace to do some small modifications to the fb (e.g. progress bar), and would it work with a built-in dummy driver (simpledrm), and the main DRM driver as a module? Tomi