From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from MTA-15-3.privateemail.com (mta-15-3.privateemail.com [198.54.122.111]) (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 27E4529A1 for ; Wed, 18 Feb 2026 00:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.54.122.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771375577; cv=none; b=DLchSM8Tbwvrrf+pa74T0w2P9s/jWWXTRfBdbq7GRHBgrUSngKgbmBf1/mNYb86MJmJmi50WNEiawevZ9uOzjQTUVr4rwgfce3leZKI7YsYtK40zCTk2Hw4qIeC9O7EEiuxg8cEj9CZDaUJrU7a3eNUSE4yLSX/1IRByLgiTGQg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771375577; c=relaxed/simple; bh=4jdRwLSYGJsI9FJdL/iAyrVg+wEBWVXIvwxUKJaKGbM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O2k4XEWb9omoBHhZY4qyqNKhHcvKk2D5jjM/HeRKgJK4N3+vmnPEv+oj+SPPzHAOmOinHzjTbXMlb8aqMAj9a5j0xuKXLD2e2KFef2vptN7Ir0itiaG2cN3Zr18Y7jLC3FZunCIk2wqWy4+or3MebeOiF0dGuDWxvVd8yl2OgyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=effective-light.com; spf=pass smtp.mailfrom=effective-light.com; arc=none smtp.client-ip=198.54.122.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=effective-light.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=effective-light.com Received: from mta-15.privateemail.com (localhost [127.0.0.1]) by mta-15.privateemail.com (Postfix) with ESMTP id 4fFyVm4BDgz3hhRv; Tue, 17 Feb 2026 19:46:08 -0500 (EST) Received: from hal-station (unknown [23.129.64.147]) by mta-15.privateemail.com (Postfix) with ESMTPA; Tue, 17 Feb 2026 19:45:37 -0500 (EST) Date: Tue, 17 Feb 2026 19:45:31 -0500 From: Hamza Mahfooz To: Michel =?iso-8859-1?Q?D=E4nzer?= Cc: Mario Limonciello , dri-devel@lists.freedesktop.org, Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Alex Hung , Wayne Lin , Aurabindo Pillai , Ivan Lipski , Timur =?iso-8859-1?Q?Krist=F3f?= , Dominik Kaszewski , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] drm: introduce KMS recovery mechanism Message-ID: References: <20260212230905.688006-1-someguy@effective-light.com> <2e359cd9-0192-44d0-886f-7f93a8b0a4fa@amd.com> <85319290-4027-4eb8-95d1-9009d23f2294@mailbox.org> <7f4a86ad-d642-444c-a576-17ff9caaa934@mailbox.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7f4a86ad-d642-444c-a576-17ff9caaa934@mailbox.org> X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Feb 16, 2026 at 10:28:13AM +0100, Michel Dänzer wrote: > On 2/14/26 23:16, Hamza Mahfooz wrote: > > On Sat, Feb 14, 2026 at 03:02:49PM +0100, Michel Dänzer wrote: > >> Why couldn't a full modeset? > > > > As far as I see it the only reasons why we should be timing out is > > either an interrupt went missing (perhaps due to a race condition in > > driver code) or hung hardware. In either case, the interrupt associated > > with the page flip for the current commit is long gone. > > That's a matter of bookkeeping, the interrupt isn't required to keep track of the commit and complete it. Oh, if you're talking about sending out a "fake" drm_crtc_send_vblank_event(), I had considered that. Though, drivers that have hardware vblank counters take ownership of the relevant `struct drm_pending_vblank_event` [1] pretty early on. So, there wouldn't be a way to ensure that they send that out and that would mean we never get a chance to force a full modeset. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/drm/drm_crtc.h?h=v6.19#n386 > > > >> In principle it's possible to do (the equivalent of) a modeset with the current state for all CRTCs, no need to do it separately per CRTC. > > > > AFAIK that is what the uevent is already doing (unless I'm mistaken). > > This is about just doing a full modeset, which isn't something user space can do in response to a wedged event. I was referring to what compositors are doing in response to `drm_kms_helper_hotplug_event()`. Perhaps, the enum constants should be renamed, since the forced modeset is actually sent when the current reset phase is DRM_KMS_RESET_NONE (the phase is updated before sending out the event though).