Bug 106701 - [CI] igt@kms_available_modes_crc@available_mode_test_crc - fail - Failed assertion: __gem_create(fd, size, &handle) == 0
Summary: [CI] igt@kms_available_modes_crc@available_mode_test_crc - fail - Failed asse...
Status: NEEDINFO
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: high normal
Assignee: Juha-Pekka Heikkilä
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-29 08:17 UTC by Martin Peres
Modified: 2019-02-12 09:59 UTC (History)
2 users (show)

See Also:
i915 platform: BSW/CHT, BXT, BYT, CFL
i915 features: display/Other


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Peres 2018-05-29 08:17:12 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_51/fi-byt-j1900/igt@kms_available_modes_crc@available_mode_test_crc.html

https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_51/fi-byt-n2820/igt@kms_available_modes_crc@available_mode_test_crc.html

https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_51/fi-bsw-n3050/igt@kms_available_modes_crc@available_mode_test_crc.html

(kms_available_modes_crc:1242) ioctl_wrappers-CRITICAL: Test assertion failure function gem_create, file ../lib/ioctl_wrappers.c:573:
(kms_available_modes_crc:1242) ioctl_wrappers-CRITICAL: Failed assertion: __gem_create(fd, size, &handle) == 0
(kms_available_modes_crc:1242) ioctl_wrappers-CRITICAL: error: -22 != 0
Subtest available_mode_test_crc failed.

This appears to be a regression introduced in drmtip_51.
Comment 1 Martin Peres 2018-05-29 08:19:44 UTC
Bumping the priority because 4.17 is about to be released.
Comment 2 Martin Peres 2018-08-31 13:51:43 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_92/fi-bsw-kefka/igt@kms_available_modes_crc@available_mode_test_crc.html

(kms_available_modes_crc:1367) ioctl_wrappers-CRITICAL: Test assertion failure function gem_create, file ../lib/ioctl_wrappers.c:573:
(kms_available_modes_crc:1367) ioctl_wrappers-CRITICAL: Failed assertion: __gem_create(fd, size, &handle) == 0
(kms_available_modes_crc:1367) ioctl_wrappers-CRITICAL: error: -22 != 0
Comment 3 Martin Peres 2018-09-07 15:18:33 UTC
Also seen on APL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10123/shard-apl4/igt@kms_available_modes_crc@available_mode_test_crc.html

(kms_available_modes_crc:2718) ioctl_wrappers-CRITICAL: Test assertion failure function gem_create, file ../lib/ioctl_wrappers.c:573:
(kms_available_modes_crc:2718) ioctl_wrappers-CRITICAL: Failed assertion: __gem_create(fd, size, &handle) == 0
(kms_available_modes_crc:2718) ioctl_wrappers-CRITICAL: error: -22 != 0
Comment 4 mwa 2018-11-02 16:28:54 UTC
The only sane way I can see gem_create returning -EINVAL is if the test is trying to create a zero sized object, so doesn't sound like a gem bug...
Comment 5 Martin Peres 2018-11-02 16:42:51 UTC
(In reply to mwa from comment #4)
> The only sane way I can see gem_create returning -EINVAL is if the test is
> trying to create a zero sized object, so doesn't sound like a gem bug...

Thanks for commenting! Do you think you could you check the IGT code? I know this is a KMS test, but the GEM call comes from the lib/, so this is something your team should co-own and there may be a bug there.
Comment 6 Chris Wilson 2018-11-02 16:53:56 UTC
kms_available_modes_crc.c, setup_fb():

        mode = igt_output_get_mode(output);
        if (plane->type != DRM_PLANE_TYPE_CURSOR) {
                w = mode->hdisplay;
                h = mode->vdisplay;
                tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
        } 

is the source.
Comment 7 Juha-Pekka Heikkilä 2018-11-02 19:27:29 UTC
I think problem part is this piece of code in kms_available_modes_crc.c, setup_fb():

	switch (fillers[i].bpp) {
	case NV12:
	case BYTES_PP_1:
		bpp = 8;
		break;

	case P010:
	case BYTES_PP_2:
		bpp = 16;
		break;

	case SKIP4:
	case BYTES_PP_4:
		bpp = 32;
		break;
	}

it's missing default case and leave 'bpp' to zero. To me it look like correct fix is to change in table 'fillers' last element from 

	{ 0, 0, 0, 0 }

to

	{ 0, 0, SKIP4, 0 }

I think this change will fix bug that would follow from creating default case.
Comment 8 Juha-Pekka Heikkilä 2018-11-03 11:33:54 UTC
Waiting for CI results but I think this patch will fix this issue:
https://patchwork.freedesktop.org/series/52000/
Comment 10 Juha-Pekka Heikkilä 2018-12-18 20:44:17 UTC
(In reply to Lakshmi from comment #9)
> https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_173/fi-icl-u3/
> igt@kms_plane_lowres@pipe-c-tiling-yf.html
> 
> This failure needs a separate bug?

Yes. This bug is about error in kms_available_modes_crc which cannot affect kms_plane_lowres. Though, reading comment #4 there is most likely similar bug in kms_plane_lowres where is asked to create zero size object.
Comment 11 Juha-Pekka Heikkilä 2019-01-25 12:40:15 UTC
Patch which contain fix for this https://patchwork.freedesktop.org/series/55727/
Comment 12 CI Bug Log 2019-01-30 16:55:15 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT BSW APL: igt@kms_available_modes_crc@available_mode_test_crc - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 -}
{+ BYT BSW APL CFL: igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-y* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 +}

New failures caught by the filter:

* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_190/fi-cfl-8109u/igt@kms_flip_tiling@flip-y-tiled.html
Comment 13 CI Bug Log 2019-01-31 13:14:48 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT BSW APL CFL: igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-y* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 -}
{+ BYT BSW APL CFL: igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-y* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 +}

New failures caught by the filter:

* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_199/fi-cfl-8109u/igt@kms_flip_tiling@flip-changes-tiling.html
Comment 14 Juha-Pekka Heikkilä 2019-02-01 21:31:58 UTC
(In reply to CI Bug Log from comment #13)
> A CI Bug Log filter associated to this bug has been updated:
> 
> {- BYT BSW APL CFL:
> igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-
> y* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 -}
> {+ BYT BSW APL CFL:
> igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-
> y* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 +}
> 
> New failures caught by the filter:
> 
> *
> https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_199/fi-cfl-8109u/
> igt@kms_flip_tiling@flip-changes-tiling.html

Linked report has absolutely nothing to do with this bug.

This bug is about error in available_modes_crc test while linked report has dmesg talking about powerwells before if fails.
Comment 15 CI Bug Log 2019-02-08 10:45:50 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT BSW APL CFL: igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-y* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 -}
{+ BYT BSW APL CFL: igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 +}

New failures caught by the filter:

* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_205/fi-cfl-8109u/igt@kms_flip_tiling@flip-x-tiled.html
Comment 16 CI Bug Log 2019-02-12 09:58:02 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT BSW APL CFL: igt@kms_available_modes_crc@available_mode_test_crc|igt@kms_flip_tiling@flip-* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 -}
{+ BYT BSW APL CFL: igt@kms_available_modes_crc@*|igt@kms_flip_tiling@*|igt@kms_plane_scaling@* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 +}

New failures caught by the filter:

* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_212/fi-cfl-8109u/igt@kms_plane_scaling@pipe-c-plane-scaling.html
Comment 17 CI Bug Log 2019-02-12 09:59:42 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT BSW APL CFL: igt@kms_available_modes_crc@*|igt@kms_flip_tiling@*|igt@kms_plane_scaling@* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 -}
{+ BYT BSW APL CFL: igt@kms_available_modes_crc@*|igt@kms_flip_tiling@*|igt@kms_plane_scaling@* - fail - Failed assertion: __gem_create(fd, size, &handle) == 0 +}

New failures caught by the filter:

* https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_212/fi-cfl-8109u/igt@kms_plane_scaling@pipe-a-plane-scaling.html


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.