From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: Douglas Anderson <dianders@chromium.org> Cc: Heiko Stuebner <heiko@sntech.de>, Sandy Huang <hjc@rock-chips.com>, Andrzej Hajda <a.hajda@samsung.com>, linux-rockchip@lists.infradead.org, Neil Armstrong <narmstrong@baylibre.com>, mka@chromium.org, Sean Paul <seanpaul@chromium.org>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>, linux-arm-kernel@lists.infradead.org, Daniel Vetter <daniel@ffwll.ch> Subject: Re: [PATCH 2/2] drm/rockchip: dw_hdmi: Handle suspend/resume Date: Thu, 16 May 2019 13:14:38 +0300 [thread overview] Message-ID: <20190516101438.GD4995@pendragon.ideasonboard.com> (raw) In-Reply-To: <20190502223808.185180-2-dianders@chromium.org> Hi Douglas, Thank you for the patch. On Thu, May 02, 2019 at 03:38:08PM -0700, Douglas Anderson wrote: > On Rockchip rk3288-based Chromebooks when you do a suspend/resume > cycle: > > 1. You lose the ability to detect an HDMI device being plugged in. > > 2. If you're using the i2c bus built in to dw_hdmi then it stops > working. > > Let's call the core dw-hdmi's suspend/resume functions to restore > things. > > NOTE: in downstream Chrome OS (based on kernel 3.14) we used the > "late/early" versions of suspend/resume because we found that the VOP > was sometimes resuming before dw_hdmi and then calling into us before > we were fully resumed. For now I have gone back to the normal > suspend/resume because I can't reproduce the problems. Should this be solved with device links if needed ? > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- > > drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > index 4cdc9f86c2e5..deb0e8c30c03 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > @@ -542,11 +542,31 @@ static int dw_hdmi_rockchip_remove(struct platform_device *pdev) > return 0; > } > > +static int __maybe_unused dw_hdmi_rockchip_suspend(struct device *dev) > +{ > + struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); > + > + return dw_hdmi_suspend(hdmi->hdmi); > +} > + > +static int __maybe_unused dw_hdmi_rockchip_resume(struct device *dev) > +{ > + struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); > + > + return dw_hdmi_resume(hdmi->hdmi); > +} > + > +const struct dev_pm_ops dw_hdmi_rockchip_pm = { Missing static keyword ? Apart from this, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_rockchip_suspend, > + dw_hdmi_rockchip_resume) > +}; > + > struct platform_driver dw_hdmi_rockchip_pltfm_driver = { > .probe = dw_hdmi_rockchip_probe, > .remove = dw_hdmi_rockchip_remove, > .driver = { > .name = "dwhdmi-rockchip", > + .pm = &dw_hdmi_rockchip_pm, > .of_match_table = dw_hdmi_rockchip_dt_ids, > }, > }; -- Regards, Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: Douglas Anderson <dianders@chromium.org> Cc: Heiko Stuebner <heiko@sntech.de>, linux-rockchip@lists.infradead.org, David Airlie <airlied@linux.ie>, Neil Armstrong <narmstrong@baylibre.com>, Sandy Huang <hjc@rock-chips.com>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andrzej Hajda <a.hajda@samsung.com>, mka@chromium.org, Sean Paul <seanpaul@chromium.org>, Daniel Vetter <daniel@ffwll.ch>, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] drm/rockchip: dw_hdmi: Handle suspend/resume Date: Thu, 16 May 2019 13:14:38 +0300 [thread overview] Message-ID: <20190516101438.GD4995@pendragon.ideasonboard.com> (raw) In-Reply-To: <20190502223808.185180-2-dianders@chromium.org> Hi Douglas, Thank you for the patch. On Thu, May 02, 2019 at 03:38:08PM -0700, Douglas Anderson wrote: > On Rockchip rk3288-based Chromebooks when you do a suspend/resume > cycle: > > 1. You lose the ability to detect an HDMI device being plugged in. > > 2. If you're using the i2c bus built in to dw_hdmi then it stops > working. > > Let's call the core dw-hdmi's suspend/resume functions to restore > things. > > NOTE: in downstream Chrome OS (based on kernel 3.14) we used the > "late/early" versions of suspend/resume because we found that the VOP > was sometimes resuming before dw_hdmi and then calling into us before > we were fully resumed. For now I have gone back to the normal > suspend/resume because I can't reproduce the problems. Should this be solved with device links if needed ? > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- > > drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > index 4cdc9f86c2e5..deb0e8c30c03 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c > @@ -542,11 +542,31 @@ static int dw_hdmi_rockchip_remove(struct platform_device *pdev) > return 0; > } > > +static int __maybe_unused dw_hdmi_rockchip_suspend(struct device *dev) > +{ > + struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); > + > + return dw_hdmi_suspend(hdmi->hdmi); > +} > + > +static int __maybe_unused dw_hdmi_rockchip_resume(struct device *dev) > +{ > + struct rockchip_hdmi *hdmi = dev_get_drvdata(dev); > + > + return dw_hdmi_resume(hdmi->hdmi); > +} > + > +const struct dev_pm_ops dw_hdmi_rockchip_pm = { Missing static keyword ? Apart from this, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + SET_SYSTEM_SLEEP_PM_OPS(dw_hdmi_rockchip_suspend, > + dw_hdmi_rockchip_resume) > +}; > + > struct platform_driver dw_hdmi_rockchip_pltfm_driver = { > .probe = dw_hdmi_rockchip_probe, > .remove = dw_hdmi_rockchip_remove, > .driver = { > .name = "dwhdmi-rockchip", > + .pm = &dw_hdmi_rockchip_pm, > .of_match_table = dw_hdmi_rockchip_dt_ids, > }, > }; -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-05-16 10:14 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-02 22:38 [PATCH 1/2] drm: bridge: dw-hdmi: Add hooks for suspend/resume Douglas Anderson 2019-05-02 22:38 ` [PATCH 2/2] drm/rockchip: dw_hdmi: Handle suspend/resume Douglas Anderson 2019-05-02 22:38 ` Douglas Anderson 2019-05-15 20:04 ` Heiko Stübner 2019-05-15 20:04 ` Heiko Stübner 2019-05-15 20:04 ` Heiko Stübner 2019-05-16 10:14 ` Laurent Pinchart [this message] 2019-05-16 10:14 ` Laurent Pinchart 2019-05-15 16:22 ` [PATCH 1/2] drm: bridge: dw-hdmi: Add hooks for suspend/resume Doug Anderson 2019-05-15 16:22 ` Doug Anderson 2019-05-15 17:58 ` Sean Paul 2019-05-15 18:01 ` Doug Anderson 2019-05-15 18:05 ` Sean Paul 2019-05-15 20:03 ` Heiko Stübner 2019-05-15 20:03 ` Heiko Stübner 2019-05-16 10:18 ` Laurent Pinchart
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190516101438.GD4995@pendragon.ideasonboard.com \ --to=laurent.pinchart@ideasonboard.com \ --cc=a.hajda@samsung.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dianders@chromium.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=heiko@sntech.de \ --cc=hjc@rock-chips.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=mka@chromium.org \ --cc=narmstrong@baylibre.com \ --cc=seanpaul@chromium.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.