Message ID | 1361309508-4901-14-git-send-email-jbarnes@virtuousgeek.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, 2013-02-19 at 13:31 -0800, Jesse Barnes wrote: > If the mode is non-native using the panel fitter, don't try to re-use > the fb the BIOS allocated for it. > > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> > --- > drivers/gpu/drm/i915/intel_fb.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c > index b60f277..9ff12aa 100644 > --- a/drivers/gpu/drm/i915/intel_fb.c > +++ b/drivers/gpu/drm/i915/intel_fb.c > @@ -438,6 +438,18 @@ void intel_fbdev_init_bios(struct drm_device *dev) > width = ((val >> 16) & 0xfff) + 1; > height = ((val >> 0) & 0xfff) + 1; > > + /* Don't bother inheriting panel fitted modes */ > + val = I915_READ(HTOTAL(pipe)); > + if (((val & 0xffff) + 1) != width) { > + DRM_ERROR("BIOS fb not native width (%d vs %d), skipping\n", width, (val & 0xffff) + 1); > + continue; > + } > + val = I915_READ(VTOTAL(pipe)); > + if (((val & 0xffff) + 1) != height) { > + DRM_ERROR("BIOS fb not native width (%d vs %d), skipping\n", height, (val & 0xffff) + 1); s/width/height/ > + continue; > + } > + > DRM_DEBUG_KMS("Found active pipe [%d/%d]: size=%dx%d@%d, offset=%x\n", > pipe, plane, width, height, bpp, offset); > On the series with my comments and the note that I couldn't yet test it: Reviewed-by: Imre Deak <imre.deak@intel.com>
On Wed, 20 Mar 2013 14:51:12 +0200 Imre Deak <imre.deak@intel.com> wrote: > On Tue, 2013-02-19 at 13:31 -0800, Jesse Barnes wrote: > > If the mode is non-native using the panel fitter, don't try to re-use > > the fb the BIOS allocated for it. > > > > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> > > --- > > drivers/gpu/drm/i915/intel_fb.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c > > index b60f277..9ff12aa 100644 > > --- a/drivers/gpu/drm/i915/intel_fb.c > > +++ b/drivers/gpu/drm/i915/intel_fb.c > > @@ -438,6 +438,18 @@ void intel_fbdev_init_bios(struct drm_device *dev) > > width = ((val >> 16) & 0xfff) + 1; > > height = ((val >> 0) & 0xfff) + 1; > > > > + /* Don't bother inheriting panel fitted modes */ > > + val = I915_READ(HTOTAL(pipe)); > > + if (((val & 0xffff) + 1) != width) { > > + DRM_ERROR("BIOS fb not native width (%d vs %d), skipping\n", width, (val & 0xffff) + 1); > > + continue; > > + } > > + val = I915_READ(VTOTAL(pipe)); > > + if (((val & 0xffff) + 1) != height) { > > + DRM_ERROR("BIOS fb not native width (%d vs %d), skipping\n", height, (val & 0xffff) + 1); > > s/width/height/ > > > + continue; > > + } > > + > > DRM_DEBUG_KMS("Found active pipe [%d/%d]: size=%dx%d@%d, offset=%x\n", > > pipe, plane, width, height, bpp, offset); > > > > On the series with my comments and the note that I couldn't yet test it: > Reviewed-by: Imre Deak <imre.deak@intel.com> Fixed, thanks.
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index b60f277..9ff12aa 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c @@ -438,6 +438,18 @@ void intel_fbdev_init_bios(struct drm_device *dev) width = ((val >> 16) & 0xfff) + 1; height = ((val >> 0) & 0xfff) + 1; + /* Don't bother inheriting panel fitted modes */ + val = I915_READ(HTOTAL(pipe)); + if (((val & 0xffff) + 1) != width) { + DRM_ERROR("BIOS fb not native width (%d vs %d), skipping\n", width, (val & 0xffff) + 1); + continue; + } + val = I915_READ(VTOTAL(pipe)); + if (((val & 0xffff) + 1) != height) { + DRM_ERROR("BIOS fb not native width (%d vs %d), skipping\n", height, (val & 0xffff) + 1); + continue; + } + DRM_DEBUG_KMS("Found active pipe [%d/%d]: size=%dx%d@%d, offset=%x\n", pipe, plane, width, height, bpp, offset);
If the mode is non-native using the panel fitter, don't try to re-use the fb the BIOS allocated for it. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> --- drivers/gpu/drm/i915/intel_fb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)