lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <739a3c0f-13b9-4597-8e76-d8bd2c1a7fe2@amd.com>
Date: Tue, 10 Feb 2026 09:26:29 +0100
From: Christian König <christian.koenig@....com>
To: Hamza Mahfooz <someguy@...ective-light.com>
Cc: dri-devel@...ts.freedesktop.org, Timur Kristóf
 <timur.kristof@...il.com>, Michel Dänzer
 <michel.daenzer@...lbox.org>, Xaver Hugl <xaver.hugl@....org>,
 Harry Wentland <harry.wentland@....com>, Leo Li <sunpeng.li@....com>,
 Rodrigo Siqueira <siqueira@...lia.com>,
 Alex Deucher <alexander.deucher@....com>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 Ivan Lipski <ivan.lipski@....com>, Kenneth Feng <kenneth.feng@....com>,
 Alex Hung <alex.hung@....com>, Tom Chung <chiahsuan.chung@....com>,
 Melissa Wen <mwen@...lia.com>, Michel Dänzer
 <mdaenzer@...hat.com>, Fangzhi Zuo <Jerry.Zuo@....com>,
 amd-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] drm: introduce KMS recovery mechanism

On 2/10/26 00:04, Hamza Mahfooz wrote:
> On Mon, Feb 09, 2026 at 10:35:05AM +0100, Christian König wrote:
>>> +	/**
>>> +	 * @page_flip_timeout:
>>> +	 *
>>> +	 * This optional hook is called if &drm_crtc_commit.flip_done times out,
>>> +	 * and can be used by drivers to attempt to recover from a page flip
>>> +	 * timeout.
>>> +	 */
>>> +	void (*page_flip_timeout)(struct drm_crtc *crtc);
>>
>> As far as I can see a callback is clearly not the right approach.
>>
>> The drm_atomic_helper_wait_for_flip_done() helper is called by the driver, isn't it?
>>
>> So what we need is just to give an error code back to the driver.
>>
> 
> I guess we could just have the function return -ETIMEOUT, but then
> drivers wouldn't know which crtc is timing out and AFAIK drivers aren't
> supposed to touch `drm_crtc_commit`s so they don't really have a
> sanctioned means to figure that out on their own.

Well we can add a helper to allow the driver to query each crtc for pending flips.

What you do here is usually called mid-layering (e.g. driver calls function, function calls back into driver) and is a clear no-go for acceptable upstream code.

Regards,
Christian.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ