Re: [PATCH v2 1/2] drm: introduce KMS recovery mechanism
From: Hamza Mahfooz
Date: Mon Feb 09 2026 - 18:05:03 EST
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.