From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18CCB269B02 for ; Mon, 19 May 2025 09:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747645955; cv=none; b=Cq/OiU/dYDr4oOmYEFwoUx0I5S+Y7iyAa6+UDeGVANbJZ3SqWzcVgwSiYj9z1fZ6KvI2nPyKzDLEUfyqAlvoXES2Rt8/xseP+iUhfoQCO//0wQFFcGtPmnbQomXv4e11kPtJgXyTjPRCZoMeU9iwUR9KPz4Dx/9BwjmOGKSw0YQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747645955; c=relaxed/simple; bh=oRAgfjZjZ1nzEbUbUOLMfziEE0zozxiWcUxmkDiGpM0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Uou8/2Dg+j1YSQ5iL/7gbGLL5GZWsRi6esAC9t5qq/LqFmIwk7DJxsk+65bn964CH9oALUeIILgg8PlLZUsbdOeyjL9/iyW/6ldKm9KvtYyeGe4B+VUfODo9CXlN4uIitsxPVyp7XfT5NlH4Gtc+bWy5vhq8twnYcimlYYK0PIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=BWPcKpg9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=tM1p0OIv; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=l7XNFP3/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=VK75ClBa; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="BWPcKpg9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="tM1p0OIv"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="l7XNFP3/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="VK75ClBa" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B8F582026F; Mon, 19 May 2025 09:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1747645951; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=CxQ89a9q28JTurhDVDxMqnAC8LAbCOepjWefrVxQTkY=; b=BWPcKpg9p6IRKguFfdBOSwzNb4pkYJsyFagIVipJz100ykQ6Gk6W8GXx7jbVsFPKBSloWD spfRgBjk6FC+T/C98q7UnvuOPabDqoFCC+X8xFF6KSCuP6wo2zPWEpJRJk428HCIJrsIph kXkQsXb7GyMZz1Ssnx8vdueXDiLfKDc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1747645951; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=CxQ89a9q28JTurhDVDxMqnAC8LAbCOepjWefrVxQTkY=; b=tM1p0OIvhTm8krEgzW8x2kQjfiobi1OSRcjOjhLjiSox/nWUbTl95bwpEles6KJZ7cH0vQ Vrr13ZYOTlOPBPDw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1747645950; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=CxQ89a9q28JTurhDVDxMqnAC8LAbCOepjWefrVxQTkY=; b=l7XNFP3/sEjhh2tO+iZsKl7jV1UOPf3m7VW/+pzQ8pcLlaFPon9p3xcgoJzr0ApCwBQJMT lSY6+N9cGKIzS7jsD5zekotPrGUJW4ySTRxg/woUjooZD8dU7i/YGMq+eI79wTWmfr/7mv cJ+ygDD9y3V+i5HBTL2P/AcZybWVmbQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1747645950; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=CxQ89a9q28JTurhDVDxMqnAC8LAbCOepjWefrVxQTkY=; b=VK75ClBa3QOoerGkYdkyn4ldKcOGOhBu2tdKTcIzZjn3oY357PZTwQftaXpShxSgr43F20 FvIFy9cftu7eDsAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 806401372E; Mon, 19 May 2025 09:12:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id biT7Hf71KmgKaAAAD6G6ig (envelope-from ); Mon, 19 May 2025 09:12:30 +0000 Message-ID: Date: Mon, 19 May 2025 11:12:30 +0200 Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] dummycon: Trigger redraw when switching consoles with deferred takeover To: Javier Martinez Canillas , gregkh@linuxfoundation.org, hdegoede@redhat.com, arvidjaar@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20250519071026.11133-1-tzimmermann@suse.de> <874ixhotss.fsf@minerva.mail-host-address-is-not-set> Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4Yc hdHm3bkPjz9EErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB 9GluwvIhSezPgnEmimZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEB AAHNJ1Rob21hcyBaaW1tZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmRlPsLAjgQTAQgAOAIb AwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftODH AAoJEGgNwR1TC3ojx1wH/0hKGWugiqDgLNXLRD/4TfHBEKmxIrmfu9Z5t7vwUKfwhFL6hqvo lXPJJKQpQ2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otss.fsf@minerva.mail-host-address-is-not-set> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: -1.30 X-Spamd-Result: default: False [-1.30 / 50.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_SEVEN(0.00)[8]; FREEMAIL_TO(0.00)[redhat.com,linuxfoundation.org,gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; URIBL_BLOCKED(0.00)[suse.de:email,suse.de:mid,suse.com:url,lists.freedesktop.org:email,imap1.dmz-prg2.suse.org:helo]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,lists.freedesktop.org:email,suse.com:url,suse.de:email,suse.de:mid] Am 19.05.25 um 11:04 schrieb Javier Martinez Canillas: > Thomas Zimmermann writes: > > Hello Thomas, > >> Signal vt subsystem to redraw console when switching to dummycon >> with deferred takeover enabled. Makes the console switch to fbcon >> and displays the available output. >> >> With deferred takeover enabled, dummycon acts as the placeholder >> until the first output to the console happens. At that point, fbcon >> takes over. If the output happens while dummycon is not active, it >> cannot inform fbcon. This is the case if the vt subsystem runs in >> graphics mode. >> >> A typical graphical boot starts plymouth, a display manager and a >> compositor; all while leaving out dummycon. Switching to a text-mode >> console leaves the console with dummycon even if a getty terminal >> has been started. >> >> Returning true from dummycon's con_switch helper signals the vt >> subsystem to redraw the screen. If there's output available dummycon's >> con_putc{s} helpers trigger deferred takeover of fbcon, which sets a >> display mode and displays the output. If no output is available, >> dummycon remains active. >> >> Signed-off-by: Thomas Zimmermann >> Reported-by: Andrei Borzenkov >> Closes: https://bugzilla.suse.com/show_bug.cgi?id=1242191 >> Tested-by: Andrei Borzenkov >> Fixes: 83d83bebf401 ("console/fbcon: Add support for deferred console takeover") >> Cc: Hans de Goede >> Cc: linux-fbdev@vger.kernel.org >> Cc: dri-devel@lists.freedesktop.org >> Cc: # v4.19+ >> --- >> drivers/video/console/dummycon.c | 15 ++++++++++----- >> 1 file changed, 10 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c >> index 139049368fdc..afb8e4d2fc34 100644 >> --- a/drivers/video/console/dummycon.c >> +++ b/drivers/video/console/dummycon.c >> @@ -85,6 +85,12 @@ static bool dummycon_blank(struct vc_data *vc, enum vesa_blank_mode blank, >> /* Redraw, so that we get putc(s) for output done while blanked */ >> return true; >> } >> + >> +static bool dummycon_switch(struct vc_data *vc) >> +{ >> + /* Redraw, so that we get putc(s) for output done while switched away */ > Maybe this comment could be a little bit more verbose about why this is needed > for the framebuffer console deferred takeover case? It doesn't have to be as > elaborated as how you have it in the commit message, but more information would > be nice IMO. I copied that from dummycon_blank(), as I assumed that the relevant people know why. But yeah, I can elaborate a bit more. Best regards Thomas > >> + return true; >> +} > Acked-by: Javier Martinez Canillas > -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)