[i.MX6] Suspend/resume implementation for dw_hdmi-imx.c

cancel
Showing results for 
Search instead for 
Did you mean: 

[i.MX6] Suspend/resume implementation for dw_hdmi-imx.c

821 Views
pintukumar
Contributor II

Hi,

I am having imx6 Dual board with Linux Kernel 4.9 running on it. It is also connected to HDMI display.

But, I see that suspend/resume implementation is missing from imx hdmi driver: drivers/gpu/drm/imx/dw_hdmi-imx.c

Now, for some purpose our customer needs suspend/resume functionality for hdmi.

I would like to implement it myself. Can you help me in implementing this functionality with reference from technical manual and peripheral details.

If I am successful, I will help you in contributing this code changes to Linux Kernel mainline (on behalf of NXP).

Please help!

This is some code snippet with dummy implementation.

Can you help me in filling this dummy function...

#ifdef CONFIG_PM_SLEEP
static int dw_hdmi_suspend(struct device *dev)
{

return 0;
}

static int dw_hdmi_resume(struct device *dev)
{

return 0;
}
#endif

+static const struct dev_pm_ops hdmi_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_suspend, dw_hdmi_resume)
+ SET_RUNTIME_PM_OPS(dw_hdmi_runtime_suspend, dw_hdmi_runtime_resume, NULL)
+};
+
static struct platform_driver dw_hdmi_imx_platform_driver = {
.probe = dw_hdmi_imx_probe,
.remove = dw_hdmi_imx_remove,
.driver = {
.name = "dwhdmi-imx",
+ .pm = &hdmi_pm_ops,
.of_match_table = dw_hdmi_imx_dt_ids,
},
};

Regards,

Pintu

Labels (5)
0 Kudos
10 Replies

350 Views
pintukumar
Contributor II
imx6 display‌ imx-drm hdmi-drm imx6q hdmi‌ suspendresume hibernate imx6q-ipu
Dear NXP,
Why there is no reply for my post?
Customer is waiting for our comments.
We are loosing business and afraid that we may have to drop using IMX and move to other vendors.
With your little support, we can achieve this.
Please reply to my comments.
Thanks,
Pintu
0 Kudos

350 Views
pintukumar
Contributor II

Dear NXP,

Can you please reply to my comments?

Currently, I figured out that IRQs are not getting enabled after the resume.

Specially the IPU irq.

Can you please help me which is the right place to enable IRQ (enable_irq(ipu_crtc->irq);) during imx-hdmi driver loading?

Thanks,

Pintu

0 Kudos

350 Views
pintukumar
Contributor II

Dear NXP,

Please reply to my queries.

This is becoming critical now.

I need help in identifying the root cause about why system hangs after we load the imx-hdmi module.

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)

--------

I guess, it hangs because vblanks are not getting triggered.

How do I debug and solve this issue ?

Please help!

Thanks,

Pintu

0 Kudos

350 Views
pintukumar
Contributor II

Hi,

I am facing some problem on iMX6 (3.10.x) kernel, for which I need some help/clarifications.

Basically, before moving on to implement actual suspend/resume support for IMX-HDMI driver, I tried to explore another option.

I made the dw_hdmi-imx as loadable module:
{{{

LD [M] drivers/gpu/drm/bridge/dw-hdmi.ko
LD [M] drivers/gpu/drm/imx/dw_hdmi-imx.ko

}}}

Then, with this Kernel configuration, I took the snapshot of the system (a.k.a Hibernate type) [without loading this modules].

After reboot, I could resume the system.

After this I could able to install this module: dw-hdmi.ko properly.

But, when I try to install this module: dw_hdmi-imx.ko - System is hanging.

I found that it is hanging in: ipu_crtc_init() function, just before ipu_irq_handler register.

This is the logs:

{{{

/# insmod dw_hdmi-imx.ko
dw_hdmi_imx_probe - called
imx_drm_bind: called
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
imx_drm_driver_load - called
ipu_drm_bind: called
ipu_crtc_init: called - before ipu_plane_irq
ipu_crtc_init: called - after ipu_plane_irq

......

<hang>

}}}

What does this indicates? Is vblank events not coming??

Is there any issue here, which is already fixed in later versions?

What can be done to solve this issue?

Please provide some suggestions to proceed further...

If this cannot be done, please suggest an alternative approach.

Regards,

Pintu

0 Kudos

350 Views
pintukumar
Contributor II

Ok, I am able to download this PDF "IMX6DQRM" (IMX6 Applications Processor Reference Manual) from the link you shared.

Currently I am going through it to understand the HDMI interfacing.

But, I am not sure how to support suspend/resume for HDMI.

If will be very helpful if you can describe the steps that needs to be taken care during suspend/resume for IMX HDMI.

I found some reference in exynos_hdmi for suspend/resume here:

exynos_hdmi.c\exynos\drm\gpu\drivers - kernel/git/stable/linux.git - Linux kernel stable tree 

Is this going to be helpful for me?

Regards,

Pintu

0 Kudos

350 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Pintu

seems HDMI module does not support suspend/resume functionality

according to Chapter 33,34 HDMI Transmitter (HDMI), (HDMI_PHY)

i.MX6DQ Reference Manual

http://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

350 Views
pintukumar
Contributor II

Hi,

Thank you for the reference.

However, I am not able to download the PDF.

It says:

>> Note: System is not available to access the information you requested.

But, I need some help in implementing the suspend/resume feature.

It is possible to guide me with the steps here.

What things I should take care during suspend, and how to restore it during resume.

Some reference would be of great help.

Thanks,

Pintu

0 Kudos

350 Views
igorpadykov
NXP TechSupport
NXP TechSupport

document can be found on link

i.MX 6Quad Applications Processors | Quad Arm® Cortex®-A9 | NXP 

Best regards
igor

0 Kudos

350 Views
pintukumar
Contributor II

Hi,

Still I am not able to download it.

Is it possible to send it in email: pintu.ping@gmail.com

Thanks,

Pintu

0 Kudos

350 Views
pintukumar
Contributor II

Also, can you explain the HDMI power off/on sequence with steps here.

Thanks,

Pintu

0 Kudos