lcdif_power_down() no longer called with DM_VIDEO

Hi Anatolij,
I noticed that after mxsfb has been converted to DM the lcdif_power_down() function is no longer called.
This causes issues in the kernel, where the Linux logo sometimes appears in the incorrect position, for example. I see this issue on a imx6ul-evk board.
If I do the same steps of U-Boot lcdif_power_down() inside the mxsfb driverl I can make the logo to always appear in the correct position, but in order to avoid regressions when booting existing kernels I think that lcdif_power_down() still needs to be called when DM_VIDEO is selected.
Not sure how to do this cleanly though.
Any suggestions?
Thanks,
Fabio Estevam

On Sat, Jan 25, 2020 at 5:52 PM Fabio Estevam festevam@gmail.com wrote:
Hi Anatolij,
I noticed that after mxsfb has been converted to DM the lcdif_power_down() function is no longer called.
This causes issues in the kernel, where the Linux logo sometimes appears in the incorrect position, for example. I see this issue on a imx6ul-evk board.
If I do the same steps of U-Boot lcdif_power_down() inside the mxsfb driverl I can make the logo to always appear in the correct position, but in order to avoid regressions when booting existing kernels I think that lcdif_power_down() still needs to be called when DM_VIDEO is selected.
Not sure how to do this cleanly though.
Or in other words:
How do we make the .remove hook from the mxs_video driver to be invoked prior to booting the kernel?
Thanks

Hi Fabio,
On Sat, 25 Jan 2020 17:52:56 -0300 Fabio Estevam festevam@gmail.com wrote:
Hi Anatolij,
I noticed that after mxsfb has been converted to DM the lcdif_power_down() function is no longer called.
This causes issues in the kernel, where the Linux logo sometimes appears in the incorrect position, for example. I see this issue on a imx6ul-evk board.
If I do the same steps of U-Boot lcdif_power_down() inside the mxsfb driverl I can make the logo to always appear in the correct position, but in order to avoid regressions when booting existing kernels I think that lcdif_power_down() still needs to be called when DM_VIDEO is selected.
Not sure how to do this cleanly though.
Any suggestions?
We must use DM_FLAG_OS_PREPARE driver flag to tell DM to actually invoke the driver's remove() callback. It will run mxs_remove_common() then and this should fix the problem. I've just sent a patch.
-- Anatolij
participants (2)
-
Anatolij Gustschin
-
Fabio Estevam