Skip to contentSkip to conversation

drm/bridge: ti-sn65dsi86: ensure bridge suspend happens during PM sleep

PATCH In review Harigovindan P 4 participants 5 messages Jun 9, 2020 – Jun 26, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 drm/bridge: ti-sn65dsi86: ensure bridge suspend happens during PM sleep

ti-sn65dsi86 bridge is enumerated as a runtime device. When suspend is triggered, PM core adds a refcount on all the devices and calls device suspend, since usage count is already incremented, runtime suspend will not be called and it kept the bridge regulators and gpios ON which resulted in platform not entering into XO shutdown.

Add changes to force suspend on the runtime device during pm sleep.

---

Changes in v2:
- Include bridge name in the commit message and remove dependent patchwork link from the commit text as bridge is independent of OEM(Stephen Boyd)

Changes in v3:
- Updating changelog to explain the need for patch

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/bridge/ti-sn65dsi86.c +2 -0
index 6ad688b320ae..2eef755b2917 100644
@@ -159,6 +159,8 @@ static int __maybe_unused ti_sn_bridge_suspend(struct device *dev)
 
 static const struct dev_pm_ops ti_sn_bridge_pm_ops = {
 	SET_RUNTIME_PM_OPS(ti_sn_bridge_suspend, ti_sn_bridge_resume, NULL)
+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+				pm_runtime_force_resume)
 };
 
 static int status_show(struct seq_file *s, void *data)
Signature · 1 line
2.27.0
reviewer Reviewed-by on v3 1/1
#1 lore raw

Hi,

Quoted 7 lines · Harigovindan P

ti-sn65dsi86 bridge is enumerated as a runtime device. When suspend is triggered, PM core adds a refcount on all the devices and calls device suspend, since usage count is already incremented, runtime suspend will not be called and it kept the bridge regulators and gpios ON which resulted in platform not entering into XO shutdown.

The "XO shutdown" concept is a very Qualcomm-specific concept but this bridge chip could be used on any board. ...but I think it's fine to leave it as-is since the meaning is clear enough.

Quoted 10 lines

Add changes to force suspend on the runtime device during pm sleep.

---

Changes in v2:
- Include bridge name in the commit message and remove dependent patchwork link from the commit text as bridge is independent of OEM(Stephen Boyd)

Quoted 5 lines

Changes in v3:
- Updating changelog to explain the need for patch

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 ++
 1 file changed, 2 insertions(+)

Note that it's generally considered nice to CC folks who commented on previous versions of the patch since they are folks who are almost certainly interested in it. In this case that would be me and Stephen Boyd.

You could also, in theory, carry Stephen's Reviewed-by patch from v1 since you have fixed the subject as he requested and you have now also fixed the commit message to have some details.

Reviewed-by on v3 1/1
#2 lore raw
In reply to Harigovindan P

Quoting Harigovindan P (2020-06-09 05:04:55)

Quoted 11 lines

ti-sn65dsi86 bridge is enumerated as a runtime device. When suspend is triggered, PM core adds a refcount on all the devices and calls device suspend, since usage count is already incremented, runtime suspend will not be called and it kept the bridge regulators and gpios ON which resulted in platform not entering into XO shutdown.

Add changes to force suspend on the runtime device during pm sleep.

---

reviewer
#3 lore raw
In reply to Harigovindan P

Hi,

Quoted 18 lines · Harigovindan P

ti-sn65dsi86 bridge is enumerated as a runtime device. When suspend is triggered, PM core adds a refcount on all the devices and calls device suspend, since usage count is already incremented, runtime suspend will not be called and it kept the bridge regulators and gpios ON which resulted in platform not entering into XO shutdown.

Add changes to force suspend on the runtime device during pm sleep.

---

Changes in v2:
- Include bridge name in the commit message and remove dependent patchwork link from the commit text as bridge is independent of OEM(Stephen Boyd)

Quoted 5 lines

Changes in v3:
- Updating changelog to explain the need for patch

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 ++
 1 file changed, 2 insertions(+)

I think this patch is good to go now (has both Stephen's and my reviews). I noticed that Neil landed my other patches to this driver recently (thanks!) and wondered why he didn't land this one. Then, I realized that you didn't send it to him or the other bridge maintainer. :( Have you tried running get_maintainer?

$ ./scripts/get_maintainer.pl -f drivers/gpu/drm/bridge/ti-sn65dsi86.c
Andrzej Hajda <[email protected]> (maintainer:DRM DRIVERS FOR BRIDGE CHIPS)
Neil Armstrong <[email protected]> (maintainer:DRM DRIVERS FOR
BRIDGE CHIPS)
Laurent Pinchart <[email protected]> (reviewer:DRM
DRIVERS FOR BRIDGE CHIPS)
Jonas Karlman <[email protected]> (reviewer:DRM DRIVERS FOR BRIDGE CHIPS)
Jernej Skrabec <[email protected]> (reviewer:DRM DRIVERS FOR BRIDGE CHIPS)
David Airlie <[email protected]> (maintainer:DRM DRIVERS)
Daniel Vetter <[email protected]> (maintainer:DRM DRIVERS)
[email protected] (open list:DRM DRIVERS)
[email protected] (open list)

In any case, unless someone has extra feedback on this patch I think it's ready to land.

Neil: If you're willing to land this patch too, can you let Harigovindan know if it needs to be re-sent with you in the "To:" list or if you can find it on the dri-devel list?

Thanks!

-Doug
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Hi,

Quoted 46 lines · Doug Anderson

Hi,

Quoted 18 lines · Harigovindan P

ti-sn65dsi86 bridge is enumerated as a runtime device. When suspend is triggered, PM core adds a refcount on all the devices and calls device suspend, since usage count is already incremented, runtime suspend will not be called and it kept the bridge regulators and gpios ON which resulted in platform not entering into XO shutdown.

Add changes to force suspend on the runtime device during pm sleep.

---

Changes in v2:
- Include bridge name in the commit message and remove dependent patchwork link from the commit text as bridge is independent of OEM(Stephen Boyd)

Quoted 5 lines

Changes in v3:
- Updating changelog to explain the need for patch

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 ++
 1 file changed, 2 insertions(+)

I think this patch is good to go now (has both Stephen's and my reviews). I noticed that Neil landed my other patches to this driver recently (thanks!) and wondered why he didn't land this one. Then, I realized that you didn't send it to him or the other bridge maintainer. :( Have you tried running get_maintainer?

$ ./scripts/get_maintainer.pl -f drivers/gpu/drm/bridge/ti-sn65dsi86.c
Andrzej Hajda <[email protected]> (maintainer:DRM DRIVERS FOR BRIDGE CHIPS)
Neil Armstrong <[email protected]> (maintainer:DRM DRIVERS FOR
BRIDGE CHIPS)
Laurent Pinchart <[email protected]> (reviewer:DRM
DRIVERS FOR BRIDGE CHIPS)
Jonas Karlman <[email protected]> (reviewer:DRM DRIVERS FOR BRIDGE CHIPS)
Jernej Skrabec <[email protected]> (reviewer:DRM DRIVERS FOR BRIDGE CHIPS)
David Airlie <[email protected]> (maintainer:DRM DRIVERS)
Daniel Vetter <[email protected]> (maintainer:DRM DRIVERS)
[email protected] (open list:DRM DRIVERS)
[email protected] (open list)
Quoted 6 lines

In any case, unless someone has extra feedback on this patch I think it's ready to land.

Neil: If you're willing to land this patch too, can you let Harigovindan know if it needs to be re-sent with you in the "To:" list or if you can find it on the dri-devel list?

Sorry missed this one,

Applying to drm-misc-next

Neil

Quoted 5 lines

Thanks!

-Doug