From: Thomas Zimmermann <tzimmermann@suse.de>
To: "tiantao (H)" <tiantao6@huawei.com>,
Tian Tao <tiantao6@hisilicon.com>,
airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com,
alexander.deucher@amd.com, tglx@linutronix.de,
dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed mode-config init
Date: Mon, 7 Dec 2020 10:53:46 +0100 [thread overview]
Message-ID: <dac52155-b9bb-6a01-7e18-d4dd48f58844@suse.de> (raw)
In-Reply-To: <0d60eccc-907d-6fc2-e1c2-c7fe0facd21e@huawei.com>
[-- Attachment #1.1: Type: text/plain, Size: 3542 bytes --]
Hi
Am 07.12.20 um 10:29 schrieb tiantao (H):
>
>
> 在 2020/12/7 17:22, Thomas Zimmermann 写道:
>> Hi
>>
>> Am 07.12.20 um 10:05 schrieb Tian Tao:
>>> Using drmm_mode_config_init() sets up managed release of modesetting
>>> resources.
>>>
>>
>> Individual patches usually contain a changelog to highlight the
>> difference to previous versions. Please add one before committing the
>
> Just to be sure: I don't need to add a changlog to this individual
> patch, right?
You should. It's supposed to be good style to add a changelog for each
patch and also highlight the series' overall changes in the cover letter.
Best regards
Thomas
>
>> patch. Your cover letter for the series already does this correctly.
>>
>>> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
>>
>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>>
>> Thanks for all these updates.
>
> Thank you for your constant help with the review code and your careful
> guidance!
>
>>
>>> ---
>>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 +++-----------
>>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 -
>>> 2 files changed, 3 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>>> b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>>> index 3687753..7f01213 100644
>>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>>> @@ -96,8 +96,9 @@ static int hibmc_kms_init(struct hibmc_drm_private
>>> *priv)
>>> struct drm_device *dev = &priv->dev;
>>> int ret;
>>> - drm_mode_config_init(dev);
>>> - priv->mode_config_initialized = true;
>>> + ret = drmm_mode_config_init(dev);
>>> + if (ret)
>>> + return ret;
>>> dev->mode_config.min_width = 0;
>>> dev->mode_config.min_height = 0;
>>> @@ -125,14 +126,6 @@ static int hibmc_kms_init(struct
>>> hibmc_drm_private *priv)
>>> return 0;
>>> }
>>> -static void hibmc_kms_fini(struct hibmc_drm_private *priv)
>>> -{
>>> - if (priv->mode_config_initialized) {
>>> - drm_mode_config_cleanup(&priv->dev);
>>> - priv->mode_config_initialized = false;
>>> - }
>>> -}
>>> -
>>> /*
>>> * It can operate in one of three modes: 0, 1 or Sleep.
>>> */
>>> @@ -262,7 +255,6 @@ static int hibmc_unload(struct drm_device *dev)
>>> drm_atomic_helper_shutdown(dev);
>>> pci_disable_msi(dev->pdev);
>>> - hibmc_kms_fini(priv);
>>> dev->dev_private = NULL;
>>> return 0;
>>> }
>>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
>>> b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
>>> index a49c10e..7d263f4 100644
>>> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
>>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
>>> @@ -42,7 +42,6 @@ struct hibmc_drm_private {
>>> struct drm_crtc crtc;
>>> struct drm_encoder encoder;
>>> struct hibmc_connector connector;
>>> - bool mode_config_initialized;
>>> };
>>> static inline struct hibmc_connector *to_hibmc_connector(struct
>>> drm_connector *connector)
>>>
>>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2020-12-07 9:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 9:05 [PATCH drm/hisilicon v2 0/2] Code refactoring Tian Tao
2020-12-07 9:05 ` [PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed mode-config init Tian Tao
2020-12-07 9:22 ` Thomas Zimmermann
2020-12-07 9:29 ` tiantao (H)
2020-12-07 9:53 ` Thomas Zimmermann [this message]
2020-12-07 9:05 ` [PATCH drm/hisilicon v2 2/2] drm/hisilicon: Delete unused local parameters Tian Tao
2020-12-07 11:16 [PATCH drm/hisilicon v2 0/2] Code refactoring Tian Tao
2020-12-07 11:16 ` [PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed mode-config init Tian Tao
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=dac52155-b9bb-6a01-7e18-d4dd48f58844@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tiantao6@hisilicon.com \
--cc=tiantao6@huawei.com \
--cc=xinliang.liu@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®