Re: [PATCH i-g-t 6/6] tests/kms_chv_cursor_fail: Add a test to exercise CHV pipe C cursor fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 21, 2015 at 10:42:53AM +0000, Thomas Wood wrote:
> On 18 December 2015 at 17:25,  <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> >
> > The test tries to anger CHV pipe C cursor by walking the edges of the
> > screen while moving the cursor across the screen edge.
> >
> > The actual hw issue only occurs on pipe C, and only on the left screen
> > edge. The testcase can walk all the edges though, and on all pipes, just
> > so I could make sure the failure doesn't occur there.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  tests/Makefile.sources      |   1 +
> >  tests/kms_chv_cursor_fail.c | 425 ++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 426 insertions(+)
> >  create mode 100644 tests/kms_chv_cursor_fail.c
> >
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index d5940388c483..104ed2be83ed 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -68,6 +68,7 @@ TESTS_progs_M = \
> >         gem_write_read_ring_switch \
> >         kms_addfb_basic \
> >         kms_atomic \
> > +       kms_chv_cursor_fail \
> >         kms_cursor_crc \
> >         kms_draw_crc \
> >         kms_fbc_crc \
> > diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
> > new file mode 100644
> > index 000000000000..2ccdd4106597
> > --- /dev/null
> > +++ b/tests/kms_chv_cursor_fail.c
<snip>
> > +int main(int argc, char **argv)
> > +{
> > +       static const struct option long_opts[] = {
> > +                { .name = "colored", .val = 'c' },
> > +                { .name = "disable", .val = 'd'},
> > +                { .name = "jump", .val = 'j' },
> > +                {}
> > +        };
> > +        static const char *help_str =
> > +               "  --colored\t\tUse a colored cursor (disables CRC checks)\n"
> > +               "  --disable\t\tDisable the cursor between each step\n"
> > +               "  --jump\t\tJump the cursor to middle of the screen between each step)\n";
> > +
> > +       igt_subtest_init_parse_opts(&argc, argv, "", long_opts, help_str,
> > +                                    opt_handler, &data);
> > +
> > +       igt_skip_on_simulation();
> > +
> > +       igt_fixture {
> > +               int ret;
> > +
> > +               data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> > +
> > +               data.devid = intel_get_drm_devid(data.drm_fd);
> 
> Should there be an igt_require(IS_CHERRYVIEW(data.devid)) check here?

The test can be run on any hardware.

> 
> 
> > +
> > +               ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_WIDTH, &max_curw);
> > +               igt_assert(ret == 0 || errno == EINVAL);
> > +               /* Not making use of cursor_height since it is same as width, still reading */
> > +               ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_HEIGHT, &max_curh);
> > +               igt_assert(ret == 0 || errno == EINVAL);
> > +
> > +               kmstest_set_vt_graphics_mode();
> > +
> > +               igt_require_pipe_crc();
> > +
> > +               igt_display_init(&data.display, data.drm_fd);
> > +       }
> > +
> > +       for (data.curw = 64; data.curw <= 256; data.curw *= 2) {
> > +               data.curh = data.curw;
> > +               for (data.pipe = PIPE_A; data.pipe <= PIPE_C; data.pipe++) {
> 
> This test is just for pipes A and B?

A,B,C

> 
> 
> > +                       igt_subtest_f("pipe-%s-%dx%d-left-edge",
> > +                                     kmstest_pipe_name(data.pipe),
> > +                                     data.curw, data.curh) {
> > +                               igt_require(data.curw <= max_curw && data.curh <= max_curh);
> > +                               test_crtc(&data, EDGE_LEFT);
> > +                       }
> > +                       igt_subtest_f("pipe-%s-%dx%d-right-edge",
> > +                                     kmstest_pipe_name(data.pipe),
> > +                                     data.curw, data.curh) {
> > +                               igt_require(data.curw <= max_curw && data.curh <= max_curh);
> > +                               test_crtc(&data, EDGE_RIGHT);
> > +                       }
> > +                       igt_subtest_f("pipe-%s-%dx%d-top-edge",
> > +                                     kmstest_pipe_name(data.pipe),
> > +                                     data.curw, data.curh) {
> > +                               igt_require(data.curw <= max_curw && data.curh <= max_curh);
> > +                               test_crtc(&data, EDGE_TOP);
> > +                       }
> > +                       igt_subtest_f("pipe-%s-%dx%d-bottom-edge",
> > +                                     kmstest_pipe_name(data.pipe),
> > +                                     data.curw, data.curh) {
> > +                               igt_require(data.curw <= max_curw && data.curh <= max_curh);
> > +                               test_crtc(&data, EDGE_BOTTOM);
> > +                       }
> > +               }
> > +       }
> > +
> > +       igt_fixture
> > +               igt_display_fini(&data.display);
> > +
> > +       igt_exit();
> > +}
> > --
> > 2.4.10
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux