Message ID | 20210507091210.371132-1-matthew.auld@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/display: relax 2big checking around initial fb | expand |
On Fri, 7 May 2021, Auld, Matthew <matthew.auld@intel.com> wrote: > >From: Chris Wilson <chris@chris-wilson.co.uk> > >The kernel prefers enabling fbc over the initial fb, since this leads to >actual runtime power savings, so if the initial fb is deemed too big >using some heuristic, then we simply skip allocating stolen for it. >However if the kernel is not configured with fbcon then it should be >possible to relax this, since unlike with fbcon the display server >shouldn't preserve it when later replacing it, and so we should be able >to re-use the stolen memory for fbc and friends. This patch is reported >to fix some flicker seen during boot splash on some devices. > >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >Signed-off-by: Matthew Auld <matthew.auld@intel.com> >Cc: Lee Shawn C <shawn.c.lee@intel.com> >Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >Cc: Daniel Vetter <daniel.vetter@intel.com> No more flicker issue seen during boot splash with this patch on my DUT. Thanks! >--- > drivers/gpu/drm/i915/display/intel_display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c >index ec2d3fa60003..0ee1f0213fd9 100644 >--- a/drivers/gpu/drm/i915/display/intel_display.c >+++ b/drivers/gpu/drm/i915/display/intel_display.c >@@ -1455,7 +1455,7 @@ initial_plane_vma(struct drm_i915_private *i915, > * important and we should probably use that space with FBC or other > * features. > */ >- if (size * 2 > i915->stolen_usable_size) >+ if (IS_ENABLED(FRAMEBUFFER_CONSOLE) && size * 2 > >+i915->stolen_usable_size) > return NULL; > > obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size); >-- >2.26.3 >
On Fri, 7 May 2021 at 10:12, Matthew Auld <matthew.auld@intel.com> wrote: > > From: Chris Wilson <chris@chris-wilson.co.uk> > > The kernel prefers enabling fbc over the initial fb, since this leads to > actual runtime power savings, so if the initial fb is deemed too big > using some heuristic, then we simply skip allocating stolen for it. > However if the kernel is not configured with fbcon then it should be > possible to relax this, since unlike with fbcon the display server > shouldn't preserve it when later replacing it, and so we should be able > to re-use the stolen memory for fbc and friends. This patch is reported > to fix some flicker seen during boot splash on some devices. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Signed-off-by: Matthew Auld <matthew.auld@intel.com> > Cc: Lee Shawn C <shawn.c.lee@intel.com> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Daniel Vetter <daniel.vetter@intel.com> Ville, Imre, or somebody else with display experience, does this at least look somewhat reasonable? > --- > drivers/gpu/drm/i915/display/intel_display.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index ec2d3fa60003..0ee1f0213fd9 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -1455,7 +1455,7 @@ initial_plane_vma(struct drm_i915_private *i915, > * important and we should probably use that space with FBC or other > * features. > */ > - if (size * 2 > i915->stolen_usable_size) > + if (IS_ENABLED(FRAMEBUFFER_CONSOLE) && size * 2 > i915->stolen_usable_size) > return NULL; > > obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size); > -- > 2.26.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Tue, May 25, 2021 at 02:25:15PM +0100, Matthew Auld wrote: > On Fri, 7 May 2021 at 10:12, Matthew Auld <matthew.auld@intel.com> wrote: > > > > From: Chris Wilson <chris@chris-wilson.co.uk> > > > > The kernel prefers enabling fbc over the initial fb, since this leads to > > actual runtime power savings, so if the initial fb is deemed too big > > using some heuristic, then we simply skip allocating stolen for it. > > However if the kernel is not configured with fbcon then it should be > > possible to relax this, since unlike with fbcon the display server > > shouldn't preserve it when later replacing it, and so we should be able > > to re-use the stolen memory for fbc and friends. This patch is reported > > to fix some flicker seen during boot splash on some devices. > > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > > Signed-off-by: Matthew Auld <matthew.auld@intel.com> > > Cc: Lee Shawn C <shawn.c.lee@intel.com> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Cc: Daniel Vetter <daniel.vetter@intel.com> > > Ville, Imre, or somebody else with display experience, does this at > least look somewhat reasonable? > > > --- > > drivers/gpu/drm/i915/display/intel_display.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > > index ec2d3fa60003..0ee1f0213fd9 100644 > > --- a/drivers/gpu/drm/i915/display/intel_display.c > > +++ b/drivers/gpu/drm/i915/display/intel_display.c > > @@ -1455,7 +1455,7 @@ initial_plane_vma(struct drm_i915_private *i915, > > * important and we should probably use that space with FBC or other > > * features. > > */ > > - if (size * 2 > i915->stolen_usable_size) > > + if (IS_ENABLED(FRAMEBUFFER_CONSOLE) && size * 2 > i915->stolen_usable_size) Makes sense and aligns with how the FB object is allocated in intelfb_alloc(): Reviewed-by: Imre Deak <imre.deak@intel.com> > > return NULL; > > > > obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size); > > -- > > 2.26.3 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index ec2d3fa60003..0ee1f0213fd9 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1455,7 +1455,7 @@ initial_plane_vma(struct drm_i915_private *i915, * important and we should probably use that space with FBC or other * features. */ - if (size * 2 > i915->stolen_usable_size) + if (IS_ENABLED(FRAMEBUFFER_CONSOLE) && size * 2 > i915->stolen_usable_size) return NULL; obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size);