Re: [RFC][PATCH v2] drm: kirin: Add a mutex to avoid fb initialization race

2017-02-27 Thread John Stultz
On Sat, Feb 25, 2017 at 11:36 AM, Daniel Vetter wrote: > On Fri, Feb 24, 2017 at 05:25:16PM -0800, John Stultz wrote: >> In some cases I've been seeing a race where two framebuffers >> would be initialized, as kirin_fbdev_output_poll_changed() >> might get called quickly in succession, resulting i

Re: [RFC][PATCH v2] drm: kirin: Add a mutex to avoid fb initialization race

2017-02-25 Thread Daniel Vetter
On Fri, Feb 24, 2017 at 05:25:16PM -0800, John Stultz wrote: > In some cases I've been seeing a race where two framebuffers > would be initialized, as kirin_fbdev_output_poll_changed() > might get called quickly in succession, resulting in the > initialization happening twice. This could cause the

Re: [RFC][PATCH v2] drm: kirin: Add a mutex to avoid fb initialization race

2017-02-25 Thread liuxinliang
Hi John, The patch seems good to me, except one minus comment. Maybe change fb_lock to fbdev_lock would be better. Thanks, -xinliang On 2017/2/25 9:25, John Stultz wrote: In some cases I've been seeing a race where two framebuffers would be initialized, as kirin_fbdev_output_poll_changed() mig

Re: [RFC][PATCH v2] drm: kirin: Add a mutex to avoid fb initialization race

2017-02-25 Thread liuxinliang
On 2017/2/25 9:39, liuxinliang wrote: Hi John, The patch seems good to me, except one minus comment. Maybe change fb_lock to fbdev_lock would be better. Thanks, -xinliang On 2017/2/25 9:25, John Stultz wrote: In some cases I've been seeing a race where two framebuffers would be initialized,

Re: [RFC][PATCH v2] drm: kirin: Add a mutex to avoid fb initialization race

2017-02-24 Thread John Stultz
On Fri, Feb 24, 2017 at 5:45 PM, liuxinliang wrote: > > > On 2017/2/25 9:39, liuxinliang wrote: >> >> Hi John, >> >> The patch seems good to me, except one minus comment. >> Maybe change fb_lock to fbdev_lock would be better. >> >> Thanks, >> -xinliang >> >> On 2017/2/25 9:25, John Stultz wrote: >

Re: [RFC][PATCH v2] drm: kirin: Add a mutex to avoid fb initialization race

2017-02-24 Thread John Stultz
On Fri, Feb 24, 2017 at 5:39 PM, liuxinliang wrote: > Hi John, > > The patch seems good to me, except one minus comment. > Maybe change fb_lock to fbdev_lock would be better. Sure I'll change that too, but I'll wait before next week before resending to see if anyone else has feedback. thanks -jo

[RFC][PATCH v2] drm: kirin: Add a mutex to avoid fb initialization race

2017-02-24 Thread John Stultz
In some cases I've been seeing a race where two framebuffers would be initialized, as kirin_fbdev_output_poll_changed() might get called quickly in succession, resulting in the initialization happening twice. This could cause the system to boot up with a blank screen. This patch adds a simple mute