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

2021-02-24 Thread Tong Zhang
Hi Geert, IMHO - QEMU is irrelevant here. since I can do passthrough -- in fact -- many drivers do use timeout in .fb_sync e.g. i810fb_sync(), nouveau_fbcon_sync(), sm501fb_sync() etc.. I believe the correct behaviour should be a timeout wait instead of waiting indefinitely. - Tong On Wed, Feb

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

2021-02-24 Thread Geert Uytterhoeven
Hi Tong, On Sun, Feb 21, 2021 at 1:05 AM Tong Zhang wrote: > On Sat, Feb 20, 2021 at 6:33 PM Randy Dunlap wrote: > > On 2/20/21 3:02 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 > >

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

2021-02-20 Thread kernel test robot
Hi Tong, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.11 next-20210219] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in

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

2021-02-20 Thread kernel test robot
Hi Tong, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.11 next-20210219] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in

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

2021-02-20 Thread Tong Zhang
Hi Randy, Thanks for the comment. I currently have this problem on my machine. I have submitted a revised patch -- which includes the console log. Thanks! - Tong On Sat, Feb 20, 2021 at 6:33 PM Randy Dunlap wrote: > > Hi-- > > On 2/20/21 3:02 PM, Tong Zhang wrote: > > pm2fb_sync is called when

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

2021-02-20 Thread Randy Dunlap
Hi-- On 2/20/21 3:02 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

[PATCH] 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. Signed-off-by: Tong Zhang