On Tue, Jun 18, 2019 at 8:39 PM Fabio Estevam <festevam@gmail.com> wrote:
On Tue, Jun 18, 2019 at 11:46 AM Pintu Agarwal <pintu.ping@gmail.com> wrote:
Thank you so much for your reply. Yes, I already checked the latest mainline kernel changes until 5.2-**. I see that there are many cleanup related changes, but still I see that suspend/resume functions are missing in dw_hdmi-imx driver.
Please see this recently submitted patch: https://lore.kernel.org/patchwork/patch/1084057/
Okay. Thank you for this reference. This can be definitely helpful. But a quick look may be feel, this is slightly different. Anyways, I will have a deeper look.
So, I am trying to implement myself. Also, I see that suspend/resume is missing even in : drivers/gpu/drm/imx/ipuv3-crtc.c I am trying this also (not sure if we need this as well).
Can you point out some specific patches which can be helpful ?
Currently, what I observed is that hdmi bind() functions are not getting called. Not sure who is responsible for triggering this bind function. Or, irq remains disabled after resume, and we need to enable it back again (but how ?) Or, we may need to enable vblank events and thus irqs can be enabled.
So, I am exploring many possibilities. If you have any suggestions please let me know.
The suggestion I have is to try to use latest mainline kernel. If you see any issues with it, please report.
The combination you mentioned in a prior thread (kernel 3.10 + backported drm patches 4.9) is not really something the community can help you.
You can think that the version I am using right now is almost 4.9 itself. Upgrading again to higher kernel version is again difficult, also customer does not want it. BTW, I am not talking about runtime suspend/resume. I know it works normally. I just need some approach and pointers. Like someone said rightly, I may need to re-implement bind() function again in resume path. I already tried doing hdmi_power_on/off and with that I could invoke hdmi_setup() function, but the system hang after that. Another approach I tried is, installing hdmi {dw-hdmi.ko, dw_hdmi-imx.ko} as a module, just after the resume. With this also system hangs during installation of dw_hdmi-imx.ko at below location: imx_drm_driver_load(..) | |--> component_bind_all(...) | |-> component_bind(ipu) | | ipu_drm_bind(..) | |-> ipu_crtc_init(..) | |-> ipu_plane_irq(..) | | ----> << __HANGS HERE__ >> | |-> devm_request_irq(ipu_irq_handler) So, ipu_drm_bind() never returns, and hangs. ---------- So, my question is, which approach is better (as a first trial): 1) Installing hdmi as a module, after resume ? 2) Or, implementing the suspend/resume itself ?