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 5206FD132DF for ; Mon, 4 Nov 2024 15:32:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EC5210E2B8; Mon, 4 Nov 2024 15:32:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.b="daeSv8Tg"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AqNqZMao"; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9168910E2B8 for ; Mon, 4 Nov 2024 15:32:56 +0000 (UTC) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730734374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2QC0Bk9OJEyHVHN98ZgrsyfJ80PseBVAS8n2MGRAkbE=; b=daeSv8TgZ7xUmG8BTCmaQePdaALze5WlrjITCDmHwhXIUJrkLv198NZSwZesNKGq7Jtmjq pCcmBcImbEs2yjvLlTz75oJmPsfcySaNWB/ZWYcEeOUUzYQatm4r/O8ZNP/8MWItfDElCc gCISbBgHtl6nDb4xGzZNiCPg8n14tnc+fjwrYMagSSxdxTJgEbA8aWBz6lG5aMijVKSmkN ZV9K/+b22XzzpjbE+TmeXtryQaGIamCre9+W5c0ZRwIC3ZodYkRVG3fWCGGcuU4qluEhJS 5O03alLzK1lmkfQUsFR/WDIJztLgAOxrxH9nIaYKxenfKX2L6HtVLvttm/9U9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730734374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2QC0Bk9OJEyHVHN98ZgrsyfJ80PseBVAS8n2MGRAkbE=; b=AqNqZMaoJ2vVi6NRGqEZuTp+ac1oMg1xnbuWnO7eJtuZcWGRDLRJ1mZ/ydUMu94Kkz0ysD IEN/eW61I5+vdEDA== To: Petr Mladek Cc: Jocelyn Falempe , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Javier Martinez Canillas , "Guilherme G . Piccoli" , bluescreen_avenger@verizon.net, Caleb Connolly , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 5/6] drm/log: Implement suspend/resume In-Reply-To: References: <20241023121145.1321921-1-jfalempe@redhat.com> <20241023121145.1321921-6-jfalempe@redhat.com> <27c1a6bf-d1e4-469f-a0d4-3e74ab0d0a07@redhat.com> <84o72vcm46.fsf@jogness.linutronix.de> Date: Mon, 04 Nov 2024 16:38:53 +0106 Message-ID: <84ikt3c8uy.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain 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" On 2024-11-04, Petr Mladek wrote: > I wonder whether console_start()/console_stop() should really > manipulate CON_ENABLE flag. It might be historical solution when > @console_suspended was a global variable. > > But it has changed with the commit 9e70a5e109a4a2336 ("printk: Add > per-console suspended state"). > > It might make more sense when console_start()/console_stop() > manipulates CON_SUSPENDED flag. Then it would make sense > to rename them suspend_this_console()/resume_this_console(). I worry about letting console drivers and printk.c both modify this flag during normal runtime. One might clear CON_SUSPENDED too soon and cause trouble. CON_ENABLE and @console_suspended were always orthogonal. Moving @console_suspended to CON_SUSPENDED did not change that relationship. IMHO we should continue to keep them separate. But your point about the console not being registered is a good one. We should update console_stop()/console_start() to only operate on @console if it is registered. Since those functions take the console_list_lock anyway, it would be a simple change. John