Re: [PATCH v10 1/9] drm/panic: Add drm panic locking

2024-03-15 Thread Jocelyn Falempe
On 15/03/2024 16:28, John Ogness wrote: On 2024-03-15, Jocelyn Falempe wrote: +static inline int drm_panic_trylock(struct drm_device *dev, unsigned long *flags) +{ + return raw_spin_trylock_irqsave(>mode_config.panic_lock, *flags); +} [...] +static inline unsigned long

Re: [PATCH v10 1/9] drm/panic: Add drm panic locking

2024-03-15 Thread John Ogness
On 2024-03-15, Jocelyn Falempe wrote: > +static inline int drm_panic_trylock(struct drm_device *dev, unsigned long > *flags) > +{ > + return raw_spin_trylock_irqsave(>mode_config.panic_lock, *flags); > +} [...] > +static inline unsigned long drm_panic_lock(struct drm_device *dev) > +{ > +

[PATCH v10 1/9] drm/panic: Add drm panic locking

2024-03-15 Thread Jocelyn Falempe
From: Daniel Vetter Rough sketch for the locking of drm panic printing code. The upshot of this approach is that we can pretty much entirely rely on the atomic commit flow, with the pair of raw_spin_lock/unlock providing any barriers we need, without having to create really big critical sections