On Thu, Aug 31, 2017 at 04:52:15PM -0300, Gabriel Krisman Bertazi wrote: > With this patch the new testcase igt@kms_ccs@pipe-X-invalid-ccs-offset > succeeds. I don't think we actually want to reject overlap. I had a patch for that years ago, but I decided to drop it because people might want to interleave the planes in some interesting ways. Making the overlap check accurate enough to allow that would be to total overkill. So IMO it's perfectly fine to let the user shoot himself in the foot if they mess up the offsets. > > Signed-off-by: Gabriel Krisman Bertazi <krisman@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_display.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index b28f076f98bc..ff1ed67a9eff 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -13989,6 +13989,11 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, > DRM_DEBUG_KMS("RC supported only with RGB8888 formats\n"); > goto err; > } > + > + if (mode_cmd->offsets[1] < mode_cmd->pitches[0]) { > + DRM_DEBUG_KMS("CCS and color buffers overlap\n"); > + return -EINVAL; > + } > /* fall through */ > case I915_FORMAT_MOD_Y_TILED: > case I915_FORMAT_MOD_Yf_TILED: > -- > 2.11.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx