[igt-dev] [PATCH i-g-t] tests/addfb: Switch to Y tiling for "bo-too-small-due-to-tiling" test
Dhinakaran Pandiyan
dhinakaran.pandiyan at intel.com
Thu Oct 3 21:24:27 UTC 2019
On Fri, 2019-09-27 at 20:19 +0300, Ville Syrjälä wrote:
> On Wed, Sep 25, 2019 at 10:45:03PM -0700, Dhinakaran Pandiyan wrote:
> > The test kms_addfb_basic/bo-too-small-due-to-tiling creates an X tiled
> > buffer that's smaller than what's needed to support rotation.
> > Correspondingly, the driver assumes all non-linear buffers can support
> > 90/270 rotation and rejects the smaller X tiled buffer. However, only Y/Yf
> > can support 90/270 rotation, which means the driver should not be
> > expecting a buffer than what's needed for X tiled buffers. Fix this
> > negative test case by switching to Y tiling.
>
> I don't get it. What does this test have to do with rotation?
Nothing, I inferred a wrong transitive relation between X tile, rotation and buffer size. Got
confused with fb size calculation using rot_info, which in turn is only needed for 90/270 rotation.
Specifically, this line
size = rot_info->plane[i].stride * rot_info->plane[i].height;
Please ignore this patch.
-DK
>
> >
> > Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> > Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> > ---
> > tests/kms_addfb_basic.c | 11 +++++++++--
> > 1 file changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> > index 666e7165..61067ee0 100644
> > --- a/tests/kms_addfb_basic.c
> > +++ b/tests/kms_addfb_basic.c
> > @@ -449,8 +449,15 @@ static void size_tests(int fd)
> > }
> >
> > igt_subtest("bo-too-small-due-to-tiling") {
> > - igt_require_intel(fd);
> > - gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
> > + int gen;
> > +
> > + igt_require_fb_modifiers(fd);
> > + gen = intel_gen(intel_get_drm_devid(fd));
> > + igt_require(gen >= 9);
> > +
> > + gem_set_tiling(fd, gem_bo_small, I915_TILING_Y, 1024*4);
> > + f.modifier[0] = LOCAL_I915_FORMAT_MOD_Y_TILED;
> > + f.flags = LOCAL_DRM_MODE_FB_MODIFIERS;
> > igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > errno == EINVAL);
> > }
> > --
> > 2.17.1
>
>
More information about the igt-dev
mailing list