mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Xinliang Liu <xinliang.liu@linaro.org>,
	Tian Tao <tiantao6@hisilicon.com>
Cc: puck.chen@hisilicon.com, airlied@linux.ie,
	Daniel Vetter <daniel@ffwll.ch>,
	kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [PATCH] drm/hisilicon: Fixed pcie resource conflict using the general API
Date: Fri, 21 Feb 2020 09:52:01 +0100	[thread overview]
Message-ID: <e65e3728-406e-ff9c-a8ef-6829666fa573@suse.de> (raw)
In-Reply-To: <CAKoKPbztX8--gWgLDYJFQX1=Wf1jiFKx+H2_RFN90fxOpr_RdQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3115 bytes --]

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@hisilicon.com
> <mailto:tiantao6@hisilicon.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@hisilicon.com
>     <mailto:tiantao6@hisilicon.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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2020-02-21  8:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  5:55 Tian Tao
     [not found] ` <CAKoKPbztX8--gWgLDYJFQX1=Wf1jiFKx+H2_RFN90fxOpr_RdQ@mail.gmail.com>
2020-02-21  8:52   ` Thomas Zimmermann [this message]
2020-02-21  8:56     ` tiantao (H)
2020-02-21  8:55 ` Thomas Zimmermann

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=e65e3728-406e-ff9c-a8ef-6829666fa573@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=linuxarm@huawei.com \
    --cc=puck.chen@hisilicon.com \
    --cc=tglx@linutronix.de \
    --cc=tiantao6@hisilicon.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®