Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1642795ybv; Fri, 21 Feb 2020 00:53:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwWteGSqI1URlds6XXd+UhVOjt5R3ATKXP1T5X4jfanO910TTwpDCRXh2SPMXaMu8ZE0DpD X-Received: by 2002:aca:dc04:: with SMTP id t4mr1046689oig.51.1582275182973; Fri, 21 Feb 2020 00:53:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582275182; cv=none; d=google.com; s=arc-20160816; b=UCjiQBxeNWTgB0wkXWoYq70yPm44gctwrgGy88Yun9Z+XWEYbIvlyQjnVPXPTPMak4 oOl2iUx4A32NSFG1F7jzkfbOm51SSeed0GgfZjxVIgxNRi6T0zGB2AAeGdNIDuS6eHr1 6NE+oNbYSrIUrsfTEY359vObmSPFxMTVCCey1PvrLvad3R+O/Sb65uf28dsr4P2jLWkF RqplSexI2M2Mpr+eR/K+eyNlJRWAGs2daXX4N0sabC3VCJHH/cZy4lxuruPv2Q9+L78z FzKm3Ty/CgVArORrEqhHk5EcicJOomjUivpRJBJq30aYe+0LQBAalwVk+jzxpVMqtE6h v2Tw== 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:cc:to:subject; bh=aW+FlFciGusatvR+DIQmWCqlqyAxqvm80CyP0DiOjZI=; b=aMMAJx4R0jaw6h4D55OrCdY8mkn0Mxa8im+5/itkEkHoBieroQf9AWQXcjeZplVRoO 4fKJY8x4bKkrfoH3K9HW9dF8uQXLUotRpOVDDhaI4Umq1Zi3S0AsGGnrCRH8WCxxOIPK SqUZMyR5PDOHmY1rno0Qu3sZYRMK+dbQ8Z7Rz6psq6uY/mOtohAul1pchUz00vTkkHxD mfGNXTLEH/r+83C3Uoh+MhU1TEbFSTJG2lO9bOT46ixpEKij55aiyaoapczzIFRaN94t LH+ZwYw8iMwkMgR/StNRUE3ENdJh6a1LIljmJ2ujwZPoqbU1lt2jhx0qqlLKw1X41g1Q YivQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si1059805otg.309.2020.02.21.00.52.50; Fri, 21 Feb 2020 00:53:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728008AbgBUIwK (ORCPT + 99 others); Fri, 21 Feb 2020 03:52:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:57720 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbgBUIwK (ORCPT ); Fri, 21 Feb 2020 03:52:10 -0500 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 7330BAAB8; Fri, 21 Feb 2020 08:52:06 +0000 (UTC) Subject: Re: [PATCH] drm/hisilicon: Fixed pcie resource conflict using the general API To: Xinliang Liu , Tian Tao Cc: puck.chen@hisilicon.com, airlied@linux.ie, Daniel Vetter , kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com References: <1582264523-61170-1-git-send-email-tiantao6@hisilicon.com> From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= mQENBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ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gqTqwmaYzsl8UxZKvbaxq0zb ehDda8lvhFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r 12+lqdsAEQEAAYkBPAQYAQgAJhYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJbOdLgAhsMBQkD wmcAAAoJEGgNwR1TC3ojpfcIAInwP5OlcEKokTnHCiDTz4Ony4GnHRP2fXATQZCKxmu4AJY2 h9ifw9Nf2TjCZ6AMvC3thAN0rFDj55N9l4s1CpaDo4J+0fkrHuyNacnT206CeJV1E7NYntxU n+LSiRrOdywn6erjxRi9EYTVLCHcDhBEjKmFZfg4AM4GZMWX1lg0+eHbd5oL1as28WvvI/uI aMyV8RbyXot1r/8QLlWldU3NrTF5p7TMU2y3ZH2mf5suSKHAMtbE4jKJ8ZHFOo3GhLgjVrBW HE9JXO08xKkgD+w6v83+nomsEuf6C6LYrqY/tsZvyEX6zN8CtirPdPWu/VXNRYAl/lat7lSI 3H26qrE= Message-ID: Date: Fri, 21 Feb 2020 09:52:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iynYgojkQVb3wztvybX8DcPKnDzpVeDTz" 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) --iynYgojkQVb3wztvybX8DcPKnDzpVeDTz Content-Type: multipart/mixed; boundary="dWd4QpDv00Fahsdc4n185aYcPsdrURE5E"; protected-headers="v1" From: Thomas Zimmermann To: Xinliang Liu , Tian Tao Cc: puck.chen@hisilicon.com, airlied@linux.ie, Daniel Vetter , kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com Message-ID: Subject: Re: [PATCH] drm/hisilicon: Fixed pcie resource conflict using the general API References: <1582264523-61170-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: --dWd4QpDv00Fahsdc4n185aYcPsdrURE5E Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Am 21.02.20 um 08:06 schrieb Xinliang Liu: > Hi tao, > Are you sending a wrong patch? > Function hibmc_remove_framebuffers is added by your prior reviewing pat= ch. > Please send patch based on=C2=A0drm-misc-next branch[1] or linux-next. There's drm_fb_helper_remove_conflicting_pci_framebuffers() which already implements the functionality. I asked to try using it instead of creating an own implementation. Best regards Thomas >=20 > Thanks, > -Xinliang >=20 > [1]=C2=A0https://anongit.freedesktop.org/git/drm-misc.git >=20 > On Fri, 21 Feb 2020 at 13:56, Tian Tao > wrote: >=20 > the kernel provide the drm_fb_helper_remove_conflicting_pci_framebu= ffer > to remvoe the pcie resource conflict,there is no need to driver it > again. >=20 > Signed-off-by: Tian Tao > > --- > =C2=A0drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 22 > +++++----------------- > =C2=A01 file changed, 5 insertions(+), 17 deletions(-) >=20 > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index 7ebe831..0f7dba7 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > @@ -47,22 +47,6 @@ static irqreturn_t hibmc_drm_interrupt(int irq, > void *arg) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return IRQ_HANDLED; > =C2=A0} >=20 > -static void hibmc_remove_framebuffers(struct pci_dev *pdev) > -{ > -=C2=A0 =C2=A0 =C2=A0 =C2=A0struct apertures_struct *ap; > - > -=C2=A0 =C2=A0 =C2=A0 =C2=A0ap =3D alloc_apertures(1); > -=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!ap) > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return; > - > -=C2=A0 =C2=A0 =C2=A0 =C2=A0ap->ranges[0].base =3D pci_resource_sta= rt(pdev, 0); > -=C2=A0 =C2=A0 =C2=A0 =C2=A0ap->ranges[0].size =3D pci_resource_len= (pdev, 0); > - > -=C2=A0 =C2=A0 =C2=A0 =C2=A0drm_fb_helper_remove_conflicting_frameb= uffers(ap, > "hibmcdrmfb", false); > - > -=C2=A0 =C2=A0 =C2=A0 =C2=A0kfree(ap); > -} > - > =C2=A0static struct drm_driver hibmc_driver =3D { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 .driver_features=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =3D DRIVER_GEM | DRIVER_MODESET | > DRIVER_ATOMIC, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 .fops=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D &hibmc_fops, > @@ -343,7 +327,11 @@ static int hibmc_pci_probe(struct pci_dev *pde= v, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct drm_device *dev; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 int ret; >=20 > -=C2=A0 =C2=A0 =C2=A0 =C2=A0hibmc_remove_framebuffers(pdev); > +=C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D drm_fb_helper_remove_conflictin= g_pci_framebuffers(pdev, > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 > =C2=A0"hibmcdrmfb"); > +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (ret) > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return ret;= > + >=20 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 dev =3D drm_dev_alloc(&hibmc_driver, &p= dev->dev); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (IS_ERR(dev)) { > --=20 > 2.7.4 >=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 --dWd4QpDv00Fahsdc4n185aYcPsdrURE5E-- --iynYgojkQVb3wztvybX8DcPKnDzpVeDTz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl5PmjIACgkQaA3BHVML eiNcbQgAiKUIhgLpwCITPMQNdE3FHFb7GwEFbYPq2ULSgPUnDs6Kzx/bF72uRf/J vx4N/C94JdQoa07fz/TRrjpgYIaH+F/w7TLhT7yV/VpOpbzzySDjmYd1X7uAAxsY UNZOsRo/RqROUdIOKfRytndlK/Ivt1QZSknYUh6d3GptOnC8gBw6hbHn9TRa3rsl KE1SSCPeRr2MZ6fzobJaIhUlQsYRKx01/R2RQgKOJhFN6tyjQ/8Y8EEwiIOnNMgA 8VDrf/xMAdfIWdv51ClJNLoxCIWF+HHlRPqzk2E3Jmjw+7tdkFPCxO9lp/Q3h21w 1S96jmWQXdAQurL2pxDDbabP/0HlYQ== =NnDS -----END PGP SIGNATURE----- --iynYgojkQVb3wztvybX8DcPKnDzpVeDTz--