linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Souptick Joarder <jrdr.linux@gmail.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: airlied@linux.ie, Leonard Crestez <leonard.crestez@nxp.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Ajit Linux <ajitn.linux@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH] drm/imx: Convert drm_atomic_helper_suspend/resume()
Date: Tue, 31 Jul 2018 14:53:25 +0530	[thread overview]
Message-ID: <CAFqt6zZOM8oy9bd=NWRJfverev5UFmHm7j9UR9Z780anEVJDyQ@mail.gmail.com> (raw)
In-Reply-To: <1533025785.3444.2.camel@pengutronix.de>

On Tue, Jul 31, 2018 at 1:59 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Hi Souptick,
>
> On Sat, 2018-07-28 at 18:35 +0530, Souptick Joarder wrote:
>> convert drm_atomic_helper_suspend/resume() to use
>> drm_mode_config_helper_suspend/resume().
>>
>> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>> Signed-off-by: Ajit Negi <ajitn.linux@gmail.com>
>
> Leonard pointed out earlier [1] that this makes the struct
> imx_drm_device superfluous, since imxdrm->state is the only remaining
> field and here you are removing its use. Could you remove struct
> imx_drm_device as well?

Sure, Will remove it in v2.
>
> [1] https://patchwork.kernel.org/patch/10531473/
>
> regards
> Philipp
>
>> ---
>>  drivers/gpu/drm/imx/imx-drm-core.c | 26 ++------------------------
>>  1 file changed, 2 insertions(+), 24 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
>> index 1d053bb..cdd83ea 100644
>> --- a/drivers/gpu/drm/imx/imx-drm-core.c
>> +++ b/drivers/gpu/drm/imx/imx-drm-core.c
>> @@ -355,37 +355,15 @@ static int imx_drm_platform_remove(struct platform_device *pdev)
>>  static int imx_drm_suspend(struct device *dev)
>>  {
>>       struct drm_device *drm_dev = dev_get_drvdata(dev);
>> -     struct imx_drm_device *imxdrm;
>> -
>> -     /* The drm_dev is NULL before .load hook is called */
>> -     if (drm_dev == NULL)
>> -             return 0;
>> -
>> -     drm_kms_helper_poll_disable(drm_dev);
>> -
>> -     imxdrm = drm_dev->dev_private;
>> -     imxdrm->state = drm_atomic_helper_suspend(drm_dev);
>> -     if (IS_ERR(imxdrm->state)) {
>> -             drm_kms_helper_poll_enable(drm_dev);
>> -             return PTR_ERR(imxdrm->state);
>> -     }
>>
>> -     return 0;
>> +     return drm_mode_config_helper_suspend(drm_dev);
>>  }
>>
>>  static int imx_drm_resume(struct device *dev)
>>  {
>>       struct drm_device *drm_dev = dev_get_drvdata(dev);
>> -     struct imx_drm_device *imx_drm;
>> -
>> -     if (drm_dev == NULL)
>> -             return 0;
>>
>> -     imx_drm = drm_dev->dev_private;
>> -     drm_atomic_helper_resume(drm_dev, imx_drm->state);
>> -     drm_kms_helper_poll_enable(drm_dev);
>> -
>> -     return 0;
>> +     return drm_mode_config_helper_resume(drm_dev);
>>  }
>>  #endif
>>

      reply	other threads:[~2018-07-31  9:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28 13:05 [PATCH] drm/imx: Convert drm_atomic_helper_suspend/resume() Souptick Joarder
2018-07-31  8:29 ` Philipp Zabel
2018-07-31  9:23   ` Souptick Joarder [this message]

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='CAFqt6zZOM8oy9bd=NWRJfverev5UFmHm7j9UR9Z780anEVJDyQ@mail.gmail.com' \
    --to=jrdr.linux@gmail.com \
    --cc=airlied@linux.ie \
    --cc=ajitn.linux@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).