Message ID | 20240116075636.6121-17-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: (stolen) memory region related fixes | expand |
> -----Original Message----- > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville > Syrjala > Sent: Tuesday, January 16, 2024 1:27 PM > To: intel-gfx@lists.freedesktop.org > Subject: [PATCH v3 16/16] drm/i915: Annotate more of the BIOS fb takeover > failure paths > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Annotate a few more of the failure paths on the initial BIOS fb takeover to avoid > having to guess why things aren't working the way we expect. Looks Good to me. Reviewed-by: Uma Shankar <uma.shankar@intel.com> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > --- > drivers/gpu/drm/i915/display/intel_plane_initial.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c > b/drivers/gpu/drm/i915/display/intel_plane_initial.c > index 00e194ee129a..d9a356d5661b 100644 > --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c > +++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c > @@ -167,14 +167,19 @@ initial_plane_vma(struct drm_i915_private *i915, > */ > if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) && > mem == i915->mm.stolen_region && > - size * 2 > i915->dsm.usable_size) > + size * 2 > i915->dsm.usable_size) { > + drm_dbg_kms(&i915->drm, "Initial FB size exceeds half of stolen, > +discarding\n"); > return NULL; > + } > > obj = i915_gem_object_create_region_at(mem, phys_base, size, > I915_BO_ALLOC_USER | > I915_BO_PREALLOC); > - if (IS_ERR(obj)) > + if (IS_ERR(obj)) { > + drm_dbg_kms(&i915->drm, "Failed to preallocate initial FB in > %s\n", > + mem->region.name); > return NULL; > + } > > /* > * Mark it WT ahead of time to avoid changing the > -- > 2.41.0
On Mon, Jan 22, 2024 at 03:12:01PM +0000, Shankar, Uma wrote: > > > > -----Original Message----- > > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville > > Syrjala > > Sent: Tuesday, January 16, 2024 1:27 PM > > To: intel-gfx@lists.freedesktop.org > > Subject: [PATCH v3 16/16] drm/i915: Annotate more of the BIOS fb takeover > > failure paths > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Annotate a few more of the failure paths on the initial BIOS fb takeover to avoid > > having to guess why things aren't working the way we expect. > > Looks Good to me. > Reviewed-by: Uma Shankar <uma.shankar@intel.com> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Hi Ville, Thank you so much for this incredible series. It solves the issue regarding MTL initial plane readout that Andrzej Hajda and I worked on in https://patchwork.freedesktop.org/patch/570811/?series=127130&rev=2 In addition, it solved the issue with the new GOP. I tested it on two different devices with Meteor Lake and it worked perfectly: no i915 errors, no flickers or observable issues. Tested-by: Paz Zcharya <pazz@chromium.org>
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c index 00e194ee129a..d9a356d5661b 100644 --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c +++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c @@ -167,14 +167,19 @@ initial_plane_vma(struct drm_i915_private *i915, */ if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) && mem == i915->mm.stolen_region && - size * 2 > i915->dsm.usable_size) + size * 2 > i915->dsm.usable_size) { + drm_dbg_kms(&i915->drm, "Initial FB size exceeds half of stolen, discarding\n"); return NULL; + } obj = i915_gem_object_create_region_at(mem, phys_base, size, I915_BO_ALLOC_USER | I915_BO_PREALLOC); - if (IS_ERR(obj)) + if (IS_ERR(obj)) { + drm_dbg_kms(&i915->drm, "Failed to preallocate initial FB in %s\n", + mem->region.name); return NULL; + } /* * Mark it WT ahead of time to avoid changing the