Re: [PATCH v2] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Tong Zhang
On Sat, Feb 20, 2021 at 7:36 PM Randy Dunlap wrote: > I suppose the rest of the patch is OK since it works for you. > > I don't know any of this code. It would be nice to know what some > of those pm2_RD(par, SOME_REG) mean so that I could sort of > understand what it is doing, but don't go

Re: [PATCH v2] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Randy Dunlap
On 2/20/21 4:00 PM, Tong Zhang wrote: > pm2fb_sync is called when doing /dev/fb read or write. > The original pm2fb_sync wait indefinitely on hardware flags which can > possibly stall kernel and make everything unresponsive. > Instead of waiting indefinitely, we can timeout to give user a chance

[PATCH v2] video: fbdev: pm2fb: avoid stall on fb_sync

2021-02-20 Thread Tong Zhang
pm2fb_sync is called when doing /dev/fb read or write. The original pm2fb_sync wait indefinitely on hardware flags which can possibly stall kernel and make everything unresponsive. Instead of waiting indefinitely, we can timeout to give user a chance to get back control. [ 39.503356] Hardware