Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1278274ybt; Thu, 18 Jun 2020 05:04:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyerbUfAs1P8a7IlBW6qotfVSK0mpzLTeBCvhU4T/CMIVOskoxb3xIdRKigS2LHdIJdw7W2 X-Received: by 2002:a50:c013:: with SMTP id r19mr3510204edb.340.1592481888419; Thu, 18 Jun 2020 05:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592481888; cv=none; d=google.com; s=arc-20160816; b=dHxxKaJJRe47YAlbtI+aHstGRVZI/F6KFaAiZz4aHIt0wq8FZZ6GciR/yrJdVOR/O5 uFhOOsTycyGq2suCjJ8CKnqzBa47exA03CMb5686ttvC4IHc6+QKcXt6f9Ob3WdXrB7k CBn26Gxk33/qM3ccTVXpI0oGkimbqoIHJX+VA1msqhq1RJ0EDWct6TVe3K2Lr6qHBeK2 YF/LtFci+LH3Uv36qNhNBi8E7VP+hYSnr0gVDODTv1qMytvWHcvl9aanqFrQHV8didqz yXS5saWrv44Tq284LSrfCbW/D60RLiuLksRcGAf5NIi/WwPxUm/JfPQN3p/2VZhzYM8m Q8Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:to:subject; bh=rNwSZY3FADl2zoz7kiDBYpVjkVmkrEb+RKcqBoIlgm0=; b=pAowBxBHhgMtBkTT4XiBD9C1oJHOprHpXlaJiR5DsaWTqfc8aeT1JyVKYahM8RR12x fJ/+ajnQ0GVTj18k35pyDBAq+s8GOIEhzpqezBH3+/UmXx8X74PXlE6grUF4CsEtWhHh LRJ93os+zR/QyE373NW6bhFBdqA6VDg+NSlq2WRZwV6jOK44JN6e5srX4yzJ2u5zaxhp 3kbvC5+SDL0+icTEyKO9pYPSEDIZnQu3NLI8P9x1rCb1ZvExfFu/yooLqs14M3r6hJ5r Qu2kqnVhDBMUg6erX0arv4SsbKB2P+Tgbb7LPjvwEMMmCi8ZNWCgng0KxuRKU1bJEnRF /L1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si1771085edy.377.2020.06.18.05.04.25; Thu, 18 Jun 2020 05:04:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729497AbgFRLh2 (ORCPT + 99 others); Thu, 18 Jun 2020 07:37:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:48450 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727825AbgFRLh0 (ORCPT ); Thu, 18 Jun 2020 07:37:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4941FACA7; Thu, 18 Jun 2020 11:37:22 +0000 (UTC) Subject: Re: [PATCH v2] drm/hisilicon: Add the shutdown for hibmc_pci_driver To: Tian Tao , puck.chen@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 References: <1586998974-24234-1-git-send-email-tiantao6@hisilicon.com> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIr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zsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: <42a8f817-7319-fe03-1979-1a5a47bbe26e@suse.de> Date: Thu, 18 Jun 2020 13:37:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <1586998974-24234-1-git-send-email-tiantao6@hisilicon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ol9vxYNx3H2xNuzBDuflgO99LMJGwzPCV" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ol9vxYNx3H2xNuzBDuflgO99LMJGwzPCV Content-Type: multipart/mixed; boundary="VrEBWyRyJ78mNqtFctzS0kAzzRmLvBSfF"; protected-headers="v1" From: Thomas Zimmermann To: Tian Tao , puck.chen@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 Message-ID: <42a8f817-7319-fe03-1979-1a5a47bbe26e@suse.de> Subject: Re: [PATCH v2] drm/hisilicon: Add the shutdown for hibmc_pci_driver References: <1586998974-24234-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: <1586998974-24234-1-git-send-email-tiantao6@hisilicon.com> --VrEBWyRyJ78mNqtFctzS0kAzzRmLvBSfF Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 16.04.20 um 03:02 schrieb Tian Tao: > add the shutdown function to release the resource. Why is this necessary for hibmc? The other PCI drivers don't require a shutdown method. >=20 > v2: > Remove the unnecessary unmap function. >=20 > Signed-off-by: Tian Tao > Reviewed-by: Sam Ravnborg > --- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/= gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index a6fd0c2..0250a10 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > @@ -337,7 +337,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev, > dev->pdev =3D pdev; > pci_set_drvdata(pdev, dev); > =20 > - ret =3D pci_enable_device(pdev); > + ret =3D pcim_enable_device(pdev); This probably makes sense. Best regards Thomas > if (ret) { > DRM_ERROR("failed to enable pci device: %d\n", ret); > goto err_free; > @@ -376,6 +376,11 @@ static void hibmc_pci_remove(struct pci_dev *pdev)= > drm_dev_put(dev); > } > =20 > +static void hibmc_pci_shutdown(struct pci_dev *pdev) > +{ > + hibmc_pci_remove(pdev); > +} > + > static struct pci_device_id hibmc_pci_table[] =3D { > { PCI_VDEVICE(HUAWEI, 0x1711) }, > {0,} > @@ -386,6 +391,7 @@ static struct pci_driver hibmc_pci_driver =3D { > .id_table =3D hibmc_pci_table, > .probe =3D hibmc_pci_probe, > .remove =3D hibmc_pci_remove, > + .shutdown =3D hibmc_pci_shutdown, > .driver.pm =3D &hibmc_pm_ops, > }; > =20 >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --VrEBWyRyJ78mNqtFctzS0kAzzRmLvBSfF-- --ol9vxYNx3H2xNuzBDuflgO99LMJGwzPCV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl7rUe0ACgkQaA3BHVML eiNgeAgAn2zAwsp4nbP1Bkjj2b0uFQjM3LoP3hmR1tf6+2RS/7Fh6O/6Wlt92iLj I7lvk8Xt5yUUU65GkdKSZOhenrlw/5H2dunSQORLOTE2DRusQpMNZAHUsWKQKR44 8J/Gz3SfCsMFsxFsOSla26hWAL3dt80Ak9KdZnAXKZfZwu7HXGIuwHBXf8swbqT4 rfeE2WXBcNdEsZBA6y1ZIh6nU4kYwjXhgF+3YYD0pBRdFH2WPYN8jzYZYaPxVhx2 KvT34LUTk9HEoHJwkgOEPE0ChaPbOZjTLJbgqNsAROM8Waxd+IQTDTvafwvWKDBn 9bNATELq+tTY61NMCk6UZ+ICf0+lDA== =p3bI -----END PGP SIGNATURE----- --ol9vxYNx3H2xNuzBDuflgO99LMJGwzPCV--