* Re: [PATCH 3.16.y-ckt 030/168] drm/i915: Handle failure to kick out a conflicting fb driver [not found] ` <1421012945.19708.27.camel@decadent.org.uk> @ 2015-01-12 17:20 ` Daniel Vetter 2015-01-12 17:28 ` Ben Hutchings 2015-01-12 17:43 ` Luis Henriques 0 siblings, 2 replies; 4+ messages in thread From: Daniel Vetter @ 2015-01-12 17:20 UTC (permalink / raw) To: Ben Hutchings Cc: Luis Henriques, Greg Kroah-Hartman, intel-gfx, Linux Kernel Mailing List, stable, kernel-team On Sun, Jan 11, 2015 at 10:49 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > On Mon, 2014-12-15 at 14:24 +0000, Luis Henriques wrote: >> 3.16.7-ckt3 -stable review patch. If anyone has any objections, please let me know. >> >> ------------------ >> >> From: Chris Wilson <chris@chris-wilson.co.uk> >> >> commit f96de58fc7e7d3d717c7c63975c3b896c906b5e3 upstream. >> >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >> Reviewed-by: Jani Nikula <jani.nikula@intel.com> >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> >> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> > > Should this also be applied to any older stable branches? > > i915_kick_out_firmware_fb() was introduced in 3.6 and it has always been > possible for the alloc_apertures() call to fail. > > remove_conflicting_framebuffers() has returned an error code since 3.14 > (but could silently fail before then!) so this should be applicable to > the 3.14 stable branch too. tbh I don't know why this patch ended up in a stable kernel, at least I didn't find anything where we (drm/i915 maintainers) marked it as such. And there's no bugzilla references added either. Imo the patch doesn't qualify for stable (it's not a real-world bug afaik). -Daniel > > Ben. > >> --- >> drivers/gpu/drm/i915/i915_dma.c | 18 +++++++++++++----- >> 1 file changed, 13 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c >> index d44344140627..0663fb4fa606 100644 >> --- a/drivers/gpu/drm/i915/i915_dma.c >> +++ b/drivers/gpu/drm/i915/i915_dma.c >> @@ -1425,15 +1425,16 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) >> } >> >> #if IS_ENABLED(CONFIG_FB) >> -static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) >> +static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) >> { >> struct apertures_struct *ap; >> struct pci_dev *pdev = dev_priv->dev->pdev; >> bool primary; >> + int ret; >> >> ap = alloc_apertures(1); >> if (!ap) >> - return; >> + return -ENOMEM; >> >> ap->ranges[0].base = dev_priv->gtt.mappable_base; >> ap->ranges[0].size = dev_priv->gtt.mappable_end; >> @@ -1441,13 +1442,16 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) >> primary = >> pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; >> >> - remove_conflicting_framebuffers(ap, "inteldrmfb", primary); >> + ret = remove_conflicting_framebuffers(ap, "inteldrmfb", primary); >> >> kfree(ap); >> + >> + return ret; >> } >> #else >> -static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) >> +static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) >> { >> + return 0; >> } >> #endif >> >> @@ -1664,7 +1668,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) >> goto out_gtt; >> } >> >> - i915_kick_out_firmware_fb(dev_priv); >> + ret = i915_kick_out_firmware_fb(dev_priv); >> + if (ret) { >> + DRM_ERROR("failed to remove conflicting framebuffer drivers\n"); >> + goto out_gtt; >> + } >> } >> >> pci_set_master(dev->pdev); > > -- > Ben Hutchings > One of the nice things about standards is that there are so many of them. -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3.16.y-ckt 030/168] drm/i915: Handle failure to kick out a conflicting fb driver 2015-01-12 17:20 ` [PATCH 3.16.y-ckt 030/168] drm/i915: Handle failure to kick out a conflicting fb driver Daniel Vetter @ 2015-01-12 17:28 ` Ben Hutchings 2015-01-12 17:43 ` Luis Henriques 1 sibling, 0 replies; 4+ messages in thread From: Ben Hutchings @ 2015-01-12 17:28 UTC (permalink / raw) To: Daniel Vetter Cc: Luis Henriques, Chris Wilson, Greg Kroah-Hartman, Linux Kernel Mailing List, stable, kernel-team, Nikula, Jani, intel-gfx [-- Attachment #1: Type: text/plain, Size: 1793 bytes --] On Mon, 2015-01-12 at 18:20 +0100, Daniel Vetter wrote: > On Sun, Jan 11, 2015 at 10:49 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > > On Mon, 2014-12-15 at 14:24 +0000, Luis Henriques wrote: > >> 3.16.7-ckt3 -stable review patch. If anyone has any objections, please let me know. > >> > >> ------------------ > >> > >> From: Chris Wilson <chris@chris-wilson.co.uk> > >> > >> commit f96de58fc7e7d3d717c7c63975c3b896c906b5e3 upstream. > >> > >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > >> Reviewed-by: Jani Nikula <jani.nikula@intel.com> > >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> > >> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> > > > > Should this also be applied to any older stable branches? > > > > i915_kick_out_firmware_fb() was introduced in 3.6 and it has always been > > possible for the alloc_apertures() call to fail. > > > > remove_conflicting_framebuffers() has returned an error code since 3.14 > > (but could silently fail before then!) so this should be applicable to > > the 3.14 stable branch too. > > tbh I don't know why this patch ended up in a stable kernel, at least > I didn't find anything where we (drm/i915 maintainers) marked it as > such. And there's no bugzilla references added either. Imo the patch > doesn't qualify for stable (it's not a real-world bug afaik). [...] It seems to be a dependency of: commit 0485c9dc24ec0939b42ca5104c0373297506b555 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Fri Nov 14 10:09:49 2014 +0100 drm/i915: Kick fbdev before vgacon which was requested for 3.16+. So, neither of these is needed for earlier versions. Sorry for the noise. Ben. -- Ben Hutchings The world is coming to an end. Please log off. [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 811 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3.16.y-ckt 030/168] drm/i915: Handle failure to kick out a conflicting fb driver 2015-01-12 17:20 ` [PATCH 3.16.y-ckt 030/168] drm/i915: Handle failure to kick out a conflicting fb driver Daniel Vetter 2015-01-12 17:28 ` Ben Hutchings @ 2015-01-12 17:43 ` Luis Henriques 2015-01-12 21:43 ` Daniel Vetter 1 sibling, 1 reply; 4+ messages in thread From: Luis Henriques @ 2015-01-12 17:43 UTC (permalink / raw) To: Daniel Vetter Cc: Greg Kroah-Hartman, intel-gfx, Linux Kernel Mailing List, stable, kernel-team, Ben Hutchings On Mon, Jan 12, 2015 at 06:20:22PM +0100, Daniel Vetter wrote: > On Sun, Jan 11, 2015 at 10:49 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > > On Mon, 2014-12-15 at 14:24 +0000, Luis Henriques wrote: > >> 3.16.7-ckt3 -stable review patch. If anyone has any objections, please let me know. > >> > >> ------------------ > >> > >> From: Chris Wilson <chris@chris-wilson.co.uk> > >> > >> commit f96de58fc7e7d3d717c7c63975c3b896c906b5e3 upstream. > >> > >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > >> Reviewed-by: Jani Nikula <jani.nikula@intel.com> > >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> > >> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> > > > > Should this also be applied to any older stable branches? > > > > i915_kick_out_firmware_fb() was introduced in 3.6 and it has always been > > possible for the alloc_apertures() call to fail. > > > > remove_conflicting_framebuffers() has returned an error code since 3.14 > > (but could silently fail before then!) so this should be applicable to > > the 3.14 stable branch too. > > tbh I don't know why this patch ended up in a stable kernel, at least > I didn't find anything where we (drm/i915 maintainers) marked it as > such. And there's no bugzilla references added either. Imo the patch > doesn't qualify for stable (it's not a real-world bug afaik). You're right, this patch was not tagged for stable. While applying 0485c9dc24ec ("drm/i915: Kick fbdev before vgacon") to the 3.16 kernel, I found that cherry-picking f96de58fc7e7 would make it apply cleanly and it didn't shock me to have it in a stable kernel. That's why I applied it for release 3.16.7-ckt3. I guess I should have added a note in the commit text justifying its presence. Cheers, -- Luís > -Daniel > > > > > Ben. > > > >> --- > >> drivers/gpu/drm/i915/i915_dma.c | 18 +++++++++++++----- > >> 1 file changed, 13 insertions(+), 5 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > >> index d44344140627..0663fb4fa606 100644 > >> --- a/drivers/gpu/drm/i915/i915_dma.c > >> +++ b/drivers/gpu/drm/i915/i915_dma.c > >> @@ -1425,15 +1425,16 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) > >> } > >> > >> #if IS_ENABLED(CONFIG_FB) > >> -static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) > >> +static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) > >> { > >> struct apertures_struct *ap; > >> struct pci_dev *pdev = dev_priv->dev->pdev; > >> bool primary; > >> + int ret; > >> > >> ap = alloc_apertures(1); > >> if (!ap) > >> - return; > >> + return -ENOMEM; > >> > >> ap->ranges[0].base = dev_priv->gtt.mappable_base; > >> ap->ranges[0].size = dev_priv->gtt.mappable_end; > >> @@ -1441,13 +1442,16 @@ static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) > >> primary = > >> pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; > >> > >> - remove_conflicting_framebuffers(ap, "inteldrmfb", primary); > >> + ret = remove_conflicting_framebuffers(ap, "inteldrmfb", primary); > >> > >> kfree(ap); > >> + > >> + return ret; > >> } > >> #else > >> -static void i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) > >> +static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) > >> { > >> + return 0; > >> } > >> #endif > >> > >> @@ -1664,7 +1668,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) > >> goto out_gtt; > >> } > >> > >> - i915_kick_out_firmware_fb(dev_priv); > >> + ret = i915_kick_out_firmware_fb(dev_priv); > >> + if (ret) { > >> + DRM_ERROR("failed to remove conflicting framebuffer drivers\n"); > >> + goto out_gtt; > >> + } > >> } > >> > >> pci_set_master(dev->pdev); > > > > -- > > Ben Hutchings > > One of the nice things about standards is that there are so many of them. > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3.16.y-ckt 030/168] drm/i915: Handle failure to kick out a conflicting fb driver 2015-01-12 17:43 ` Luis Henriques @ 2015-01-12 21:43 ` Daniel Vetter 0 siblings, 0 replies; 4+ messages in thread From: Daniel Vetter @ 2015-01-12 21:43 UTC (permalink / raw) To: Luis Henriques Cc: Greg Kroah-Hartman, intel-gfx, Linux Kernel Mailing List, stable, kernel-team, Ben Hutchings On Mon, Jan 12, 2015 at 6:43 PM, Luis Henriques <luis.henriques@canonical.com> wrote: > On Mon, Jan 12, 2015 at 06:20:22PM +0100, Daniel Vetter wrote: >> On Sun, Jan 11, 2015 at 10:49 PM, Ben Hutchings <ben@decadent.org.uk> wrote: >> > On Mon, 2014-12-15 at 14:24 +0000, Luis Henriques wrote: >> >> 3.16.7-ckt3 -stable review patch. If anyone has any objections, please let me know. >> >> >> >> ------------------ >> >> >> >> From: Chris Wilson <chris@chris-wilson.co.uk> >> >> >> >> commit f96de58fc7e7d3d717c7c63975c3b896c906b5e3 upstream. >> >> >> >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >> >> Reviewed-by: Jani Nikula <jani.nikula@intel.com> >> >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> >> >> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> >> > >> > Should this also be applied to any older stable branches? >> > >> > i915_kick_out_firmware_fb() was introduced in 3.6 and it has always been >> > possible for the alloc_apertures() call to fail. >> > >> > remove_conflicting_framebuffers() has returned an error code since 3.14 >> > (but could silently fail before then!) so this should be applicable to >> > the 3.14 stable branch too. >> >> tbh I don't know why this patch ended up in a stable kernel, at least >> I didn't find anything where we (drm/i915 maintainers) marked it as >> such. And there's no bugzilla references added either. Imo the patch >> doesn't qualify for stable (it's not a real-world bug afaik). > > You're right, this patch was not tagged for stable. > > While applying 0485c9dc24ec ("drm/i915: Kick fbdev before vgacon") to > the 3.16 kernel, I found that cherry-picking f96de58fc7e7 would make > it apply cleanly and it didn't shock me to have it in a stable kernel. > That's why I applied it for release 3.16.7-ckt3. I guess I should > have added a note in the commit text justifying its presence. Ah makes sense. Usually we try to tag cc: stable patches with their depencies (and I looked for that but didn't find anything). As a rule I only scan stable patches from Greg's kernels since there's way too much going on (and this time around too much vacation and conferences on top). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-12 21:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1418653622-21105-1-git-send-email-luis.henriques@canonical.com>
[not found] ` <1418653622-21105-31-git-send-email-luis.henriques@canonical.com>
[not found] ` <1421012945.19708.27.camel@decadent.org.uk>
2015-01-12 17:20 ` [PATCH 3.16.y-ckt 030/168] drm/i915: Handle failure to kick out a conflicting fb driver Daniel Vetter
2015-01-12 17:28 ` Ben Hutchings
2015-01-12 17:43 ` Luis Henriques
2015-01-12 21:43 ` Daniel Vetter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox