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-next>] [day] [month] [year] [list]
Message-ID: <e65e3728-406e-ff9c-a8ef-6829666fa573@suse.de>
Date:   Fri, 21 Feb 2020 09:52:01 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Xinliang Liu <xinliang.liu@...aro.org>,
        Tian Tao <tiantao6@...ilicon.com>
Cc:     puck.chen@...ilicon.com, airlied@...ux.ie,
        Daniel Vetter <daniel@...ll.ch>, kraxel@...hat.com,
        alexander.deucher@....com, tglx@...utronix.de,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        linuxarm@...wei.com
Subject: Re: [PATCH] drm/hisilicon: Fixed pcie resource conflict using the
 general API

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 patch.
> Please send patch based on drm-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

> 
> Thanks,
> -Xinliang
> 
> [1] https://anongit.freedesktop.org/git/drm-misc.git
> 
> On Fri, 21 Feb 2020 at 13:56, Tian Tao <tiantao6@...ilicon.com
> <mailto:tiantao6@...ilicon.com>> wrote:
> 
>     the kernel provide the drm_fb_helper_remove_conflicting_pci_framebuffer
>     to remvoe the pcie resource conflict,there is no need to driver it
>     again.
> 
>     Signed-off-by: Tian Tao <tiantao6@...ilicon.com
>     <mailto:tiantao6@...ilicon.com>>
>     ---
>      drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 22
>     +++++-----------------
>      1 file changed, 5 insertions(+), 17 deletions(-)
> 
>     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)
>             return IRQ_HANDLED;
>      }
> 
>     -static void hibmc_remove_framebuffers(struct pci_dev *pdev)
>     -{
>     -       struct apertures_struct *ap;
>     -
>     -       ap = alloc_apertures(1);
>     -       if (!ap)
>     -               return;
>     -
>     -       ap->ranges[0].base = pci_resource_start(pdev, 0);
>     -       ap->ranges[0].size = pci_resource_len(pdev, 0);
>     -
>     -       drm_fb_helper_remove_conflicting_framebuffers(ap,
>     "hibmcdrmfb", false);
>     -
>     -       kfree(ap);
>     -}
>     -
>      static struct drm_driver hibmc_driver = {
>             .driver_features        = DRIVER_GEM | DRIVER_MODESET |
>     DRIVER_ATOMIC,
>             .fops                   = &hibmc_fops,
>     @@ -343,7 +327,11 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
>             struct drm_device *dev;
>             int ret;
> 
>     -       hibmc_remove_framebuffers(pdev);
>     +       ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev,
>     +                                                             
>      "hibmcdrmfb");
>     +       if (ret)
>     +               return ret;
>     +
> 
>             dev = drm_dev_alloc(&hibmc_driver, &pdev->dev);
>             if (IS_ERR(dev)) {
>     -- 
>     2.7.4
> 

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



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ