Message ID | 20190923102935.5860-8-dhinakaran.pandiyan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Gen12 E2E compression | expand |
On Mon, 2019-09-23 at 03:29 -0700, Dhinakaran Pandiyan wrote: > During framebuffer creation, we pre-compute offsets for 90/270 plane > rotation. However, only Y and Yf modifiers support 90/270 rotation. So, > skip the calculations for other modifiers. > > Cc: Matt Roper <matthew.d.roper@intel.com> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> > --- > drivers/gpu/drm/i915/display/intel_display.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c > b/drivers/gpu/drm/i915/display/intel_display.c > index 7447001c1f85..6f0f38157697 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -2784,7 +2784,9 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, > tile_size); > offset /= tile_size; > > - if (!is_surface_linear(fb->modifier, i)) { > + /* Y or Yf modifiers required for 90/270 rotation */ > + if (fb->modifier == I915_FORMAT_MOD_Y_TILED || > + fb->modifier == I915_FORMAT_MOD_Yf_TILED) { This is wrong, as CI results clearly show igt@kms_addfb_basic@bo-too-small-due-to-tiling fails. Please ignore this patch. -DK > unsigned int tile_width, tile_height; > unsigned int pitch_tiles; > struct drm_rect r;
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 7447001c1f85..6f0f38157697 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2784,7 +2784,9 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, tile_size); offset /= tile_size; - if (!is_surface_linear(fb->modifier, i)) { + /* Y or Yf modifiers required for 90/270 rotation */ + if (fb->modifier == I915_FORMAT_MOD_Y_TILED || + fb->modifier == I915_FORMAT_MOD_Yf_TILED) { unsigned int tile_width, tile_height; unsigned int pitch_tiles; struct drm_rect r;
During framebuffer creation, we pre-compute offsets for 90/270 plane rotation. However, only Y and Yf modifiers support 90/270 rotation. So, skip the calculations for other modifiers. Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)