public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon
Date: Wed, 13 Nov 2013 14:11:32 -0800	[thread overview]
Message-ID: <20131113141132.07291c9e@jbarnes-desktop> (raw)
In-Reply-To: <20131113220726.GD13207@nuc-i3427.alporthouse.com>

On Wed, 13 Nov 2013 22:07:26 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Wed, Nov 13, 2013 at 10:20:47AM -0800, Jesse Barnes wrote:
> > Retrieve current framebuffer config info from the regs and create an fb
> > object for the buffer the BIOS or boot loader left us.  This should
> > allow for smooth transitions to userspace apps once we finish the
> > initial configuration construction.
> > 
> > v2: check for non-native modes and adjust (Jesse)
> >     fixup aperture and cmap frees (Imre)
> >     use unlocked unref if init_bios fails (Jesse)
> >     fix curly brace around DSPADDR check (Imre)
> >     comment failure path for pin_and_fence (Imre)
> > v3: fixup fixup of aperture frees (Chris)
> > v4: update to current bits (locking & pin_and_fence hack) (Jesse)
> > v5: move fb config fetch to display code (Jesse)
> >     re-order hw state readout on initial load to suit fb inherit (Jesse)
> >     re-add pin_and_fence in fbdev code to make sure we refcount properly (Je
> > v6: rename to plane_config (Daniel)
> >     check for valid object when initializing BIOS fb (Jesse)
> >     split from plane_config readout and other display changes (Jesse)
> 
> Weirdness... What happened to calling fbdev_init_bios() prior to
> clobbering the GTT and outputs?

Hm I'll have to check on the outputs, if we're clobbering them that's
definitely not what I intended.

For the GTT though we allocate the buffer in the plane_config readout,
so it should be safe across GTT init.  It does need to be freed though
if we decide against using it, so that's another bug to fix.

> > +bool i915_use_bios_fb __read_mostly = 1;
> > +module_param_named(use_bios_fb, i915_use_bios_fb, bool, 0600);
> 
> mode 0400, there is no point in allowing it to be changed at runtime. Is
> a parameter justified? Do we really foresee circumstances where we want
> fbcon to reallocate?

I'll drop it to be optimistic. :)

> > +MODULE_PARM_DESC(use_bios_fb,
> > +		 "Use BIOS allocated framebuffer for fbcon (default: true)");
> > +
> >  static struct drm_driver driver;
> >  #if IS_ENABLED(CONFIG_AGP_INTEL)
> >  extern int intel_agp_enabled;
> 
> 
> > +void intel_fbdev_init_bios(struct drm_device *dev)
> > +{
> [snip]
> > +out_unref_obj:
> > +	mutex_unlock(&dev->struct_mutex);
> > +	drm_gem_object_unreference_unlocked(&plane_config->obj->base);
> 
> Would be cleaner to reverse these two lines and use
> drm_gem_object_unreference()

Ok.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center

  reply	other threads:[~2013-11-13 22:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 18:20 BIOS fb wrapping Jesse Barnes
2013-11-13 18:20 ` [PATCH 1/5] drm/i915: make pitch_for_width take a tiled arg Jesse Barnes
2013-11-13 21:59   ` Chris Wilson
2013-11-13 22:06     ` Jesse Barnes
2013-11-13 18:20 ` [PATCH 2/5] drm/i915: retrieve current fb config into new plane_config structure at init Jesse Barnes
2013-11-13 22:10   ` Chris Wilson
2013-11-14 15:06   ` Chris Wilson
2013-11-14 16:09     ` Jesse Barnes
2013-11-20 13:10   ` Ville Syrjälä
2013-11-22 21:55     ` Jesse Barnes
2013-11-22 23:08       ` Ville Syrjälä
2013-11-22 23:21         ` Jesse Barnes
2013-11-22 23:26           ` Ville Syrjälä
2013-11-22 23:29             ` Jesse Barnes
2013-11-13 18:20 ` [PATCH 3/5] drm/i915: split fb allocation and initialization Jesse Barnes
2013-11-13 21:58   ` Chris Wilson
2013-11-13 18:20 ` [PATCH 4/5] drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon Jesse Barnes
2013-11-13 22:05   ` Bob Paauwe
2013-11-13 22:08     ` Jesse Barnes
2013-11-13 22:07   ` Chris Wilson
2013-11-13 22:11     ` Jesse Barnes [this message]
2013-11-13 18:20 ` [PATCH 5/5] drm/i915: don't memset the fb buffer Jesse Barnes
2013-11-13 21:56   ` Chris Wilson
2013-11-13 22:05     ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2013-11-15  0:04 [PATCH 1/5] drm/i915: make pitch_for_width take a tiled arg v2 Jesse Barnes
2013-11-15  0:04 ` [PATCH 4/5] drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon Jesse Barnes
2013-11-15  0:29   ` Daniel Vetter
2013-11-15  9:40     ` Chris Wilson

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=20131113141132.07291c9e@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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