From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (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 5AC5C1D5CFB for ; Sat, 14 Feb 2026 14:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771077788; cv=none; b=Kd58MmpnXwrcBFHT0Kq2g8mzIHz+7uawNZ4qXfbbwHVgqUzdNLfNSNw6e7f8AmbbPM34ObP3SfiIl4qR3Umkj/jYw+SCBfOd0f1IB09yPh83GbZCpYG9z1F6rxnmGMtIKcwCX6LWWrFIDuFSF64Pj0Ajcp/mhU93a7kGfjY5nLA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771077788; c=relaxed/simple; bh=BLk0HpYpToq29rHhr3sWXm6qfpmzssKWDEob4/vMdEo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mH+b7eAYVJPNDY2y9foypzBEfsQr58XeV727jU/PIt+27U32yDX54hqPm6XJkkd53ooDtzROMYVIdtlRpVAMvdukl5K4KdYiDut54SEsennTsl8uTbYdxtbbgbmAhPVSNlMTpob3Dw5IAhNJJzvevK/VUXvkQ2nZKQ09xxDh/WU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=sLN3Je3O; arc=none smtp.client-ip=80.241.56.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="sLN3Je3O" Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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 mout-p-101.mailbox.org (Postfix) with ESMTPS id 4fCrN01M4Fz9tMM; Sat, 14 Feb 2026 15:02:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1771077776; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bu4Kh8+07Aj0vR82KnHjswgtePhrB3Pqq1DSTBdM7dU=; b=sLN3Je3OkMeRHLM/EmdLKp3Gs7xpZRrsAP/WHGqopZ44SGxP4Js14SVXWtqrxZxNp50cLD 5wXfzZrB+Ce0wJ/OJcmOuh9hO9VgxpazOzvYtgNDuAmVJGuBNInEUsVWk1x9gW89XEZbyM G8vAke2XwM6Xa/KPDqMLeTJFGt+JcaXT+91FfGlIcQYcO6C4XYlOqrM29W7dTapmOMn1mB +EBS6P4r1aCB9rffv3lAtJj5i+T1cKVLa4JpvvYhDfgJhRphmvoc3ST8CF/rYDJp28OJw6 CV8GdZkqKFGEellt+iPv1Q/eIldP7D/i7wDUOuD0pkRB0/zARGMMqt/piOyT7g== Message-ID: <85319290-4027-4eb8-95d1-9009d23f2294@mailbox.org> Date: Sat, 14 Feb 2026 15:02:49 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v3 1/2] drm: introduce KMS recovery mechanism To: Hamza Mahfooz , Mario Limonciello Cc: dri-devel@lists.freedesktop.org, Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Alex Hung , Wayne Lin , Aurabindo Pillai , Ivan Lipski , =?UTF-8?Q?Timur_Krist=C3=B3f?= , Dominik Kaszewski , amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20260212230905.688006-1-someguy@effective-light.com> <2e359cd9-0192-44d0-886f-7f93a8b0a4fa@amd.com> From: =?UTF-8?Q?Michel_D=C3=A4nzer?= Content-Language: de-CH-frami, en-CA In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: 982611f9b9d2b368ea8 X-MBO-RS-META: txbjk3j3ngpffmqrwtmk5n4bowfz4ce4 On 2/13/26 20:35, Hamza Mahfooz wrote: > On Thu, Feb 12, 2026 at 06:18:17PM -0600, Mario Limonciello wrote: > >>> @@ -1881,13 +1886,43 @@ void drm_atomic_helper_wait_for_flip_done(struct drm_device *dev, >>> continue; >>> ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ); >>> - if (ret == 0) >>> - drm_err(dev, "[CRTC:%d:%s] flip_done timed out\n", >>> - crtc->base.id, crtc->name); >>> + if (!ret) { >>> + switch (dev->reset_phase) { >>> + case DRM_KMS_RESET_NONE: >>> + drm_err(dev, "[CRTC:%d:%s] flip_done timed out\n", >>> + crtc->base.id, crtc->name); >>> + dev->reset_phase = DRM_KMS_RESET_FORCE_MODESET; >>> + drm_kms_helper_hotplug_event(dev); >>> + break; >> >> Since you're iterating multiple CRTCs if you manage to recover from one >> with this call shouldn't you keep iterating the rest? > > Most measures that the can be implemented at the kernel level (including > forcing a full modeset), can't save the the current commit. Why couldn't a full modeset? > So, in all likelihood we will just end up waiting an extra 10 seconds per CRTC > (assuming they haven't completed already, unrelated to the forced > modeset). 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. -- Earthling Michel Dänzer \ GNOME / Xwayland / Mesa developer https://redhat.com \ Libre software enthusiast