<div dir="ltr"><div>Hi tao,</div><div>Are you sending a wrong patch?</div><div>Function hibmc_remove_framebuffers is added by your prior reviewing patch.<br></div><div>Please send patch based on drm-misc-next branch[1] or linux-next.</div><div><br></div><div>Thanks,</div><div>-Xinliang</div><div><br></div><div>[1] <a rel="vcs-git" href="https://anongit.freedesktop.org/git/drm-misc.git" title="drm-misc Git repository" style="color:black;text-decoration-line:none;font-family:sans-serif;font-size:13.3333px;white-space:nowrap;background-color:rgb(238,238,238)">https://anongit.freedesktop.org/git/drm-misc.git</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 21 Feb 2020 at 13:56, Tian Tao <<a href="mailto:tiantao6@hisilicon.com">tiantao6@hisilicon.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">the kernel provide the drm_fb_helper_remove_conflicting_pci_framebuffer<br>
to remvoe the pcie resource conflict,there is no need to driver it again.<br>
<br>
Signed-off-by: Tian Tao <<a href="mailto:tiantao6@hisilicon.com" target="_blank">tiantao6@hisilicon.com</a>><br>
---<br>
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 22 +++++-----------------<br>
1 file changed, 5 insertions(+), 17 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c<br>
index 7ebe831..0f7dba7 100644<br>
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c<br>
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c<br>
@@ -47,22 +47,6 @@ static irqreturn_t hibmc_drm_interrupt(int irq, void *arg)<br>
return IRQ_HANDLED;<br>
}<br>
<br>
-static void hibmc_remove_framebuffers(struct pci_dev *pdev)<br>
-{<br>
- struct apertures_struct *ap;<br>
-<br>
- ap = alloc_apertures(1);<br>
- if (!ap)<br>
- return;<br>
-<br>
- ap->ranges[0].base = pci_resource_start(pdev, 0);<br>
- ap->ranges[0].size = pci_resource_len(pdev, 0);<br>
-<br>
- drm_fb_helper_remove_conflicting_framebuffers(ap, "hibmcdrmfb", false);<br>
-<br>
- kfree(ap);<br>
-}<br>
-<br>
static struct drm_driver hibmc_driver = {<br>
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,<br>
.fops = &hibmc_fops,<br>
@@ -343,7 +327,11 @@ static int hibmc_pci_probe(struct pci_dev *pdev,<br>
struct drm_device *dev;<br>
int ret;<br>
<br>
- hibmc_remove_framebuffers(pdev);<br>
+ ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev,<br>
+ "hibmcdrmfb");<br>
+ if (ret)<br>
+ return ret;<br>
+<br>
<br>
dev = drm_dev_alloc(&hibmc_driver, &pdev->dev);<br>
if (IS_ERR(dev)) {<br>
-- <br>
2.7.4<br>
<br>
</blockquote></div></div>