From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] imx-drm: imx-drm-core: add suspend/resume support
Date: Mon, 18 Aug 2014 20:38:25 +0800 [thread overview]
Message-ID: <20140818123823.GK2114@dragon> (raw)
In-Reply-To: <53F1AE97.8090807@samsung.com>
Hi Andrzej,
On Mon, Aug 18, 2014 at 09:43:19AM +0200, Andrzej Hajda wrote:
> > diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
> > index def8280d7ee6..ab41152089a3 100644
> > --- a/drivers/staging/imx-drm/imx-drm-core.c
> > +++ b/drivers/staging/imx-drm/imx-drm-core.c
> > @@ -696,6 +696,29 @@ static int imx_drm_platform_remove(struct platform_device *pdev)
> > return 0;
> > }
> >
> > +#ifdef CONFIG_PM_SLEEP
> > +static int imx_drm_suspend(struct device *dev)
> > +{
> > + struct drm_device *drm_dev = dev_get_drvdata(dev);
> > +
> > + drm_kms_helper_poll_disable(drm_dev);
>
> drm_dev can be NULL here. You should add check before.
The drvdata is set to drm_dev in drm_driver .load() hook. So are you
saying that .suspend() hook could possibly be called before the .load()
hook gets called?
Shawn
>
> > +
> > + return 0;
> > +}
> > +
> > +static int imx_drm_resume(struct device *dev)
> > +{
> > + struct drm_device *drm_dev = dev_get_drvdata(dev);
> > +
> > + drm_helper_resume_force_mode(drm_dev);
>
> ditto
WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawn.guo@freescale.com>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, kernel@pengutronix.de,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] imx-drm: imx-drm-core: add suspend/resume support
Date: Mon, 18 Aug 2014 20:38:25 +0800 [thread overview]
Message-ID: <20140818123823.GK2114@dragon> (raw)
In-Reply-To: <53F1AE97.8090807@samsung.com>
Hi Andrzej,
On Mon, Aug 18, 2014 at 09:43:19AM +0200, Andrzej Hajda wrote:
> > diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
> > index def8280d7ee6..ab41152089a3 100644
> > --- a/drivers/staging/imx-drm/imx-drm-core.c
> > +++ b/drivers/staging/imx-drm/imx-drm-core.c
> > @@ -696,6 +696,29 @@ static int imx_drm_platform_remove(struct platform_device *pdev)
> > return 0;
> > }
> >
> > +#ifdef CONFIG_PM_SLEEP
> > +static int imx_drm_suspend(struct device *dev)
> > +{
> > + struct drm_device *drm_dev = dev_get_drvdata(dev);
> > +
> > + drm_kms_helper_poll_disable(drm_dev);
>
> drm_dev can be NULL here. You should add check before.
The drvdata is set to drm_dev in drm_driver .load() hook. So are you
saying that .suspend() hook could possibly be called before the .load()
hook gets called?
Shawn
>
> > +
> > + return 0;
> > +}
> > +
> > +static int imx_drm_resume(struct device *dev)
> > +{
> > + struct drm_device *drm_dev = dev_get_drvdata(dev);
> > +
> > + drm_helper_resume_force_mode(drm_dev);
>
> ditto
next prev parent reply other threads:[~2014-08-18 12:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 6:20 [PATCH v2] imx-drm: imx-drm-core: add suspend/resume support Shawn Guo
2014-07-25 6:20 ` Shawn Guo
2014-08-18 6:25 ` Shawn Guo
2014-08-18 6:25 ` Shawn Guo
2014-08-19 8:08 ` Russell King - ARM Linux
2014-08-19 8:08 ` Russell King - ARM Linux
2014-08-19 9:16 ` Greg KH
2014-08-19 9:16 ` Greg KH
2014-08-19 9:42 ` Russell King - ARM Linux
2014-08-19 9:42 ` Russell King - ARM Linux
2014-08-18 7:43 ` Andrzej Hajda
2014-08-18 7:43 ` Andrzej Hajda
2014-08-18 12:38 ` Shawn Guo [this message]
2014-08-18 12:38 ` Shawn Guo
2014-08-18 12:58 ` Andrzej Hajda
2014-08-18 12:58 ` Andrzej Hajda
2014-08-18 13:11 ` Andrzej Hajda
2014-08-18 13:11 ` Andrzej Hajda
2014-08-19 7:21 ` Shawn Guo
2014-08-19 7:21 ` Shawn Guo
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=20140818123823.GK2114@dragon \
--to=shawn.guo@freescale.com \
--cc=linux-arm-kernel@lists.infradead.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: link
Be 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.