lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0d60eccc-907d-6fc2-e1c2-c7fe0facd21e@huawei.com>
Date:   Mon, 7 Dec 2020 17:29:56 +0800
From:   "tiantao (H)" <tiantao6@...wei.com>
To:     Thomas Zimmermann <tzimmermann@...e.de>,
        Tian Tao <tiantao6@...ilicon.com>, <airlied@...ux.ie>,
        <daniel@...ll.ch>, <kraxel@...hat.com>,
        <alexander.deucher@....com>, <tglx@...utronix.de>,
        <dri-devel@...ts.freedesktop.org>, <xinliang.liu@...aro.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed
 mode-config init



在 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?

> patch.  Your cover letter for the series already does this correctly.
> 
>> Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
> 
> Reviewed-by: Thomas Zimmermann <tzimmermann@...e.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)
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ