Message ID | 20190822090645.25410-4-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm, fbdev: complete remove_conflicting_pci_framebuffers cleanup. | expand |
On Thu, Aug 22, 2019 at 11:06:45AM +0200, Gerd Hoffmann wrote: > No need for a home-grown version, the generic helper should work just > fine. It also handles vgacon removal these days, see commit > 1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically."), > so that can be removed too. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> I think I'd still wait until 5.4-rc1 with merging this one, just to give another full release and people to test it before we pull the trigger. Overabundance of caution and all that. Thanks a lot for doing this! -Daniel > --- > drivers/gpu/drm/i915/i915_drv.c | 41 ++------------------------------- > 1 file changed, 2 insertions(+), 39 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index b99d73c1c4db..ddc317ceb8de 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -766,31 +766,6 @@ static int i915_load_modeset_init(struct drm_device *dev) > return ret; > } > > -static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) > -{ > - struct apertures_struct *ap; > - struct pci_dev *pdev = dev_priv->drm.pdev; > - struct i915_ggtt *ggtt = &dev_priv->ggtt; > - bool primary; > - int ret; > - > - ap = alloc_apertures(1); > - if (!ap) > - return -ENOMEM; > - > - ap->ranges[0].base = ggtt->gmadr.start; > - ap->ranges[0].size = ggtt->mappable_end; > - > - primary = > - pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; > - > - ret = drm_fb_helper_remove_conflicting_framebuffers(ap, "inteldrmfb", primary); > - > - kfree(ap); > - > - return ret; > -} > - > static void intel_init_dpio(struct drm_i915_private *dev_priv) > { > /* > @@ -1570,21 +1545,9 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv) > if (ret) > goto err_perf; > > - /* > - * WARNING: Apparently we must kick fbdev drivers before vgacon, > - * otherwise the vga fbdev driver falls over. > - */ > - ret = i915_kick_out_firmware_fb(dev_priv); > - if (ret) { > - DRM_ERROR("failed to remove conflicting framebuffer drivers\n"); > + ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "inteldrmfb"); > + if (ret) > goto err_ggtt; > - } > - > - ret = vga_remove_vgacon(pdev); > - if (ret) { > - DRM_ERROR("failed to remove conflicting VGA console\n"); > - goto err_ggtt; > - } > > ret = i915_ggtt_init_hw(dev_priv); > if (ret) > -- > 2.18.1 >
On Thu, Aug 22, 2019 at 03:13:14PM +0200, Daniel Vetter wrote: > On Thu, Aug 22, 2019 at 11:06:45AM +0200, Gerd Hoffmann wrote: > > No need for a home-grown version, the generic helper should work just > > fine. It also handles vgacon removal these days, see commit > > 1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically."), > > so that can be removed too. > > > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > I think I'd still wait until 5.4-rc1 with merging this one, just to give > another full release and people to test it before we pull the trigger. > Overabundance of caution and all that. Whole series or just the i915 patch? cheers, Gerd
On Fri, Aug 23, 2019 at 10:14 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > On Thu, Aug 22, 2019 at 03:13:14PM +0200, Daniel Vetter wrote: > > On Thu, Aug 22, 2019 at 11:06:45AM +0200, Gerd Hoffmann wrote: > > > No need for a home-grown version, the generic helper should work just > > > fine. It also handles vgacon removal these days, see commit > > > 1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically."), > > > so that can be removed too. > > > > > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > > > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > > > I think I'd still wait until 5.4-rc1 with merging this one, just to give > > another full release and people to test it before we pull the trigger. > > Overabundance of caution and all that. > > Whole series or just the i915 patch? Ok I just checked and this all landed in 5.1 already, I thought it was more recent. I think that's good enough, push it all without more waiting. -Daniel
On Fri, Aug 23, 2019 at 10:30:35AM +0200, Daniel Vetter wrote: > On Fri, Aug 23, 2019 at 10:14 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > > > > Whole series or just the i915 patch? > > Ok I just checked and this all landed in 5.1 already, I thought it was > more recent. I think that's good enough, push it all without more > waiting. Pushed to drm-misc-next. cheers, Gerd
On Fri, 23 Aug 2019, Gerd Hoffmann <kraxel@redhat.com> wrote: > On Fri, Aug 23, 2019 at 10:30:35AM +0200, Daniel Vetter wrote: >> On Fri, Aug 23, 2019 at 10:14 AM Gerd Hoffmann <kraxel@redhat.com> wrote: >> > >> > Whole series or just the i915 patch? >> >> Ok I just checked and this all landed in 5.1 already, I thought it was >> more recent. I think that's good enough, push it all without more >> waiting. > > Pushed to drm-misc-next. After-the-fact nitpick: i915 maintainers were Cc'd on the original patch, but not on the subsequent discussion on merging, or where to merge. intel-gfx@ mailing list wasn't Cc'd at all, which means this didn't get any pre-merge CI coverage we expect on every patch. I found about this having been merged through a merge conflict. If you don't see the ack from the maintainers, please ask. BR, Jani.
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index b99d73c1c4db..ddc317ceb8de 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -766,31 +766,6 @@ static int i915_load_modeset_init(struct drm_device *dev) return ret; } -static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) -{ - struct apertures_struct *ap; - struct pci_dev *pdev = dev_priv->drm.pdev; - struct i915_ggtt *ggtt = &dev_priv->ggtt; - bool primary; - int ret; - - ap = alloc_apertures(1); - if (!ap) - return -ENOMEM; - - ap->ranges[0].base = ggtt->gmadr.start; - ap->ranges[0].size = ggtt->mappable_end; - - primary = - pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; - - ret = drm_fb_helper_remove_conflicting_framebuffers(ap, "inteldrmfb", primary); - - kfree(ap); - - return ret; -} - static void intel_init_dpio(struct drm_i915_private *dev_priv) { /* @@ -1570,21 +1545,9 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv) if (ret) goto err_perf; - /* - * WARNING: Apparently we must kick fbdev drivers before vgacon, - * otherwise the vga fbdev driver falls over. - */ - ret = i915_kick_out_firmware_fb(dev_priv); - if (ret) { - DRM_ERROR("failed to remove conflicting framebuffer drivers\n"); + ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "inteldrmfb"); + if (ret) goto err_ggtt; - } - - ret = vga_remove_vgacon(pdev); - if (ret) { - DRM_ERROR("failed to remove conflicting VGA console\n"); - goto err_ggtt; - } ret = i915_ggtt_init_hw(dev_priv); if (ret)
No need for a home-grown version, the generic helper should work just fine. It also handles vgacon removal these days, see commit 1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically."), so that can be removed too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- drivers/gpu/drm/i915/i915_drv.c | 41 ++------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-)