simplefb gets unregister when a proper framebuffer driver comes in and
kicks it out. However the claimed clocks and regulators stay enabled
as they are only released in the platform device remove function, which
in theory would never get called.
Move the clock/regulator cleanup into the framebuffer destroy callback,
which gets called as part of the framebuffer unregister process.
Note this introduces asymmetry in how the resources are claimed and
released.
Signed-off-by: Chen-Yu Tsai <redacted>
---
drivers/video/fbdev/simplefb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
From: Hans de Goede <hidden> Date: 2016-09-07 09:31:54
Hi,
On 07-09-16 11:09, Chen-Yu Tsai wrote:
simplefb gets unregister when a proper framebuffer driver comes in and
kicks it out. However the claimed clocks and regulators stay enabled
as they are only released in the platform device remove function, which
in theory would never get called.
Move the clock/regulator cleanup into the framebuffer destroy callback,
which gets called as part of the framebuffer unregister process.
Note this introduces asymmetry in how the resources are claimed and
released.
Signed-off-by: Chen-Yu Tsai <redacted>
Good catch, patch LGTM:
Reviewed-by: Hans de Goede <redacted>
Regards,
Hans
On Wed, Sep 7, 2016 at 11:09 AM, Chen-Yu Tsai [off-list ref] wrote:
simplefb gets unregister when a proper framebuffer driver comes in and
kicks it out. However the claimed clocks and regulators stay enabled
as they are only released in the platform device remove function, which
in theory would never get called.
Move the clock/regulator cleanup into the framebuffer destroy callback,
which gets called as part of the framebuffer unregister process.
Is this called before or after the new proper framebuffer driver kicks in?
If before, it may cause glitches.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
From: Hans de Goede <hidden> Date: 2016-09-07 11:29:56
Hi,
On 07-09-16 13:12, Geert Uytterhoeven wrote:
On Wed, Sep 7, 2016 at 11:09 AM, Chen-Yu Tsai [off-list ref] wrote:
quoted
simplefb gets unregister when a proper framebuffer driver comes in and
kicks it out. However the claimed clocks and regulators stay enabled
as they are only released in the platform device remove function, which
in theory would never get called.
Move the clock/regulator cleanup into the framebuffer destroy callback,
which gets called as part of the framebuffer unregister process.
Is this called before or after the new proper framebuffer driver kicks in?
If before, it may cause glitches.
It is called by the new proper framebuffer driver's probe method,
so it can make sure that it has already claimed / enabled the
clocks/regulators before it calls remove_conlicting_framebuffers,
avoiding the glitch.
Regards,
Hans
Hi Hans,
On Wed, Sep 7, 2016 at 1:29 PM, Hans de Goede [off-list ref] wrote:
On 07-09-16 13:12, Geert Uytterhoeven wrote:
quoted
On Wed, Sep 7, 2016 at 11:09 AM, Chen-Yu Tsai [off-list ref] wrote:
quoted
simplefb gets unregister when a proper framebuffer driver comes in and
kicks it out. However the claimed clocks and regulators stay enabled
as they are only released in the platform device remove function, which
in theory would never get called.
Move the clock/regulator cleanup into the framebuffer destroy callback,
which gets called as part of the framebuffer unregister process.
Is this called before or after the new proper framebuffer driver kicks in?
If before, it may cause glitches.
It is called by the new proper framebuffer driver's probe method,
so it can make sure that it has already claimed / enabled the
clocks/regulators before it calls remove_conlicting_framebuffers,
avoiding the glitch.
OK, thx!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
From: Tomi Valkeinen <hidden> Date: 2016-09-27 08:22:59
On 07/09/16 12:09, Chen-Yu Tsai wrote:
simplefb gets unregister when a proper framebuffer driver comes in and
kicks it out. However the claimed clocks and regulators stay enabled
as they are only released in the platform device remove function, which
in theory would never get called.
Move the clock/regulator cleanup into the framebuffer destroy callback,
which gets called as part of the framebuffer unregister process.
Note this introduces asymmetry in how the resources are claimed and
released.
Signed-off-by: Chen-Yu Tsai <redacted>
---
drivers/video/fbdev/simplefb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)