From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85094606A31F for ; Sat, 5 Dec 2026 16:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=VnWg0kLT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8FFB10E14B; Sat, 5 Dec 2026 16:41:06 +0000 (UTC) Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4B3010E14B for ; Sat, 5 Dec 2026 16:41:00 +0000 (UTC) Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xZsoj-0007z7-7T; Sat, 05 Dec 2026 11:40:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=sdVKaBvyAmpnX70/QIz2bRVKYdWape8k29Gu9pxi1YI=; b=VnWg0kLTKU2vF5rw0d9u DoFjx5ZFTJ4jrb7CRmhYt99mSh94ZL9PUksLeeldUiOTTTyuubiKe6wGMVj6H/28l3RrAy3e7ngsR /gBIDSzs4kPXRt209l5uHvMiRH6G6vm9n7/LML/V3qw2gSUL3jUg4/GB2RxyY5QdERbvb5MzeUZqZ nLg4KAHE6X9B6nl+Eh9v98NAYnclqI5HJ2g9v/YssojQHKRIOX6zxSvmlJUr7NziNEHe2GiJe0Cwa r4Q7OXgrnFXrkC5Jf/z8xJZeOe1TM+KN1D1F026OuxxL8wYg0+A2E48qCv9MiThyd9mZInr3C1T7K QKHU1gGhbG8sKA==; From: Anush V To: sashiko-reviews@lists.linux.dev Cc: dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/fb-helper: Keep blanked outputs off across restore and hotplug In-Reply-To: References: <875wx7rfwp.fsf@gnu.org> Date: Sat, 05 Dec 2026 22:10:45 +0530 Message-ID: <87mrqjhe9e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) X-Archived-By: 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-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 > From: sashiko-bot@kernel.org > Date: Sat, 5 Dec 2026 14:31:21 +0000 > Should the forced restore branch reset fb_helper->dpms_mode to > DRM_MODE_DPMS_ON on success? Yes. v2 sets it at every forced restore, whatever the commit returns, as the field records what fbdev asked for rather than what the hardware did. The outputs then stay lit through the delayed hotplug that sysrq's restore runs, where v1 turned them off again, as you describe. > Can drm_fb_helper_dpms() latch fb_helper->dpms_mode even when > drm_client_modeset_dpms() fails with -EBUSY? It can, and with v1 the close in your scenario turned the outputs off. In v2 the switch back to KD_TEXT forces a restore, which now sets the mode to on, so the close leaves them lit. > Updating fb_helper->dpms_mode only when drm_client_modeset_dpms() returns 0 > would avoid latching a failed blank request. It would also lose requests fbcon has acted on. In KD_TEXT, fbcon counts a blank or an unblank as done even when a program holding the device, such as fwupd, makes its commit fail, and the restore at that program's close is then the only commit left to apply it. With the mode updated only on success, that close lit the outputs after a refused blank, on a console counting itself blanked, and left them dark after a refused unblank, on one counting itself unblanked, which keypresses can't wake either. v2 keeps recording the mode, and a comment says why. v2 is "[PATCH v2] drm/fb-helper: Keep blanked outputs off across restore and hotplug", in a new thread.