On 2/13/26 00:09, Hamza Mahfooz wrote:
> We now have a means to respond to page flip timeouts. So, hook up
> support by sending out a wedged event if
> drm_atomic_helper_wait_for_flip_done() fails.
> 
> Signed-off-by: Hamza Mahfooz <[email protected]>
> ---
> v2: send a wedged event instead of attempting a GPU reset.
> v3: read return value of drm_atomic_helper_wait_for_flip_done().
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 7c51d8d7e73c..06d8353cb616 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -87,6 +87,7 @@
>  #include <drm/drm_atomic_uapi.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_blend.h>
> +#include <drm/drm_drv.h>
>  #include <drm/drm_fixed.h>
>  #include <drm/drm_fourcc.h>
>  #include <drm/drm_edid.h>
> @@ -11085,8 +11086,12 @@ static void amdgpu_dm_atomic_commit_tail(struct 
> drm_atomic_state *state)
>       /* Signal HW programming completion */
>       drm_atomic_helper_commit_hw_done(state);
>  
> -     if (wait_for_vblank)
> -             drm_atomic_helper_wait_for_flip_done(dev, state);
> +     if (wait_for_vblank) {
> +             if (drm_atomic_helper_wait_for_flip_done(dev, state))
> +                     drm_dev_wedged_event(dev, DRM_WEDGE_RECOVERY_REBIND |
> +                                          DRM_WEDGE_RECOVERY_BUS_RESET,
> +                                          NULL);

Well that is the worst of all options since it will completely kill userspace.

We need to figure out what exactly is necessary to get the CRTC going again.

Regards,
Christian.

> +     }
>  
>       drm_atomic_helper_cleanup_planes(dev, state);
>  

Reply via email to