<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 18, 2021 at 2:42 PM Rodrigo Siqueira <<a href="mailto:Rodrigo.Siqueira@amd.com">Rodrigo.Siqueira@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 08/18, Mark Yacoub wrote:<br>
> On Wed, Aug 18, 2021 at 2:18 PM Rodrigo Siqueira<br>
> <<a href="mailto:Rodrigo.Siqueira@amd.com" target="_blank">Rodrigo.Siqueira@amd.com</a>> wrote:<br>
> ><br>
> > On 08/18, Mark Yacoub wrote:<br>
> > > This fails when I run it on freedreno.<br>
> > ><br>
> > > This is the IGT output:<br>
> ><br>
> > Hi Mark,<br>
> ><br>
> > Is freedreno an ARM-based system? I suppose this test was not even<br>
> > passed on pipe-A and others before, right?<br>
> It is, but the test runs just fine without this patch, but with adding<br>
> an earlier patch of mine that fixes the modifier.<br>
<br>
I'm curious, how is it possible that this test pass with i915 modifiers?<br></blockquote><div>it didn't, i had to apply this patch: <a href="https://patchwork.freedesktop.org/patch/443672/?series=92444&rev=1">https://patchwork.freedesktop.org/patch/443672/?series=92444&rev=1</a> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I suppose that the other patch that you're talking about it is this one:<br>
<br>
<a href="https://patchwork.freedesktop.org/patch/450435/?series=93788&rev=1" rel="noreferrer" target="_blank">https://patchwork.freedesktop.org/patch/450435/?series=93788&rev=1</a><br>
<br>
Right?<br>
<br>
If so, could you try to replace DRM_FORMAT_MOD_NONE with<br>
DRM_FORMAT_MOD_LINEAR in this patch? Since I don't have a freedreno<br>
system, could you help me to narrow down the problem?<br></blockquote><div>I remember trying this yesterday but it didn't work either.</div><div>@Abhinav Could you probably help with this? </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks<br>
Siqueira<br>
<br>
> ><br>
> > How about your Zork system?<br>
> I haven't tried it yet, I'm unable to test at the moment.<br>
> ><br>
> > Thanks<br>
> ><br>
> > > Subtest pipe-A: SUCCESS (0.175s)<br>
> > > Starting subtest: pipe-B<br>
> > > Testing resolution with connector eDP-1 using pipe B with seed 1629306399<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: Test assertion failure<br>
> > > function do_display_commit, file<br>
> > > ../igt-gpu-tools-9999/lib/igt_kms.c:3754:<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: Failed assertion: ret == 0<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: Last errno: 22, Invalid argument<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: error: -22 != 0<br>
> > > Stack trace:<br>
> > > Subtest pipe-B failed.<br>
> > > **** DEBUG ****<br>
> > > (kms_concurrent:21753) INFO: Testing resolution with connector eDP-1<br>
> > > using pipe B with seed 1629306399<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: display: eDP-1: set_pipe(B)<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: display: eDP-1: Selecting pipe B<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: display: eDP-1: set_pipe(None)<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: display: eDP-1: Selecting pipe None<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: display: commit {<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: Pipe B: Setting property<br>
> > > "MODE_ID" to 0x0/0<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: Pipe B: Setting property "ACTIVE" to 0x0/0<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: display: eDP-1: preparing<br>
> > > atomic, pipe: None<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: eDP-1: Setting property "CRTC_ID" to 0x0/0<br>
> > > (kms_concurrent:21753) igt_kms-DEBUG: display: }<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: Test assertion failure<br>
> > > function do_display_commit, file<br>
> > > ../igt-gpu-tools-9999/lib/igt_kms.c:3754:<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: Failed assertion: ret == 0<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: Last errno: 22, Invalid argument<br>
> > > (kms_concurrent:21753) igt_kms-CRITICAL: error: -22 != 0<br>
> > > (kms_concurrent:21753) igt_core-INFO: Stack trace:<br>
> > > **** END ****<br>
> > > Subtest pipe-B: FAIL (0.008s)<br>
> > ><br>
> > > This is the kernel log I see:<br>
> > ><br>
> > > [77077.164985] [drm:drm_compat_ioctl] comm="kms_concurrent",<br>
> > > pid=20615, dev=0xe201, auth=1, DRM_IOCTL_VERSION<br>
> > > [77077.164985] [drm:drm_mode_object_put] OBJ ID: 32 (3)<br>
> > > [77077.164990] [drm:drm_ioctl] comm="kms_concurrent" pid=20615,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_MAP_DUMB<br>
> > > [77077.165006] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165026] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165048] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165069] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165093] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165137] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165164] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165184] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165206] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165226] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165247] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165266] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_GETPROPERTY<br>
> > > [77077.165433] [drm:drm_ioctl] comm="kms_concurrent" pid=20611,<br>
> > > dev=0xe201, auth=1, DRM_IOCTL_MODE_ATOMIC<br>
> > > [77077.165459] [drm:drm_atomic_state_init] Allocated atomic state<br>
> > > 0000000056410621<br>
> > > [77077.165486] [drm:drm_mode_object_get] OBJ ID: 32 (3)<br>
> > > [77077.165499] [drm:drm_mode_object_get] OBJ ID: 32 (4)<br>
> > > [77077.165511] [drm:drm_atomic_get_connector_state] Added<br>
> > > [CONNECTOR:32:eDP-1] 00000000d4c72b94 state to 0000000056410621<br>
> > > [77077.165536] [drm:drm_mode_object_get] OBJ ID: 58 (2)<br>
> > > [77077.165548] [drm:drm_atomic_get_crtc_state] Added [CRTC:51:crtc-0]<br>
> > > 00000000f17155a3 state to 0000000056410621<br>
> > > [77077.165564] [drm:drm_mode_object_put] OBJ ID: 32 (5)<br>
> > > [77077.165579] msm ae00000.mdss:<br>
> > > [drm:drm_atomic_set_crtc_for_connector] Link [CONNECTOR:32:eDP-1]<br>
> > > state 00000000d4c72b94 to [NOCRTC]<br>
> > > [77077.165596] [drm:drm_mode_object_put] OBJ ID: 32 (4)<br>
> > > [77077.165612] [drm:drm_atomic_get_crtc_state] Added [CRTC:52:crtc-1]<br>
> > > 00000000d8d16568 state to 0000000056410621<br>
> > > [77077.165635] [drm:drm_atomic_print_new_state] checking 0000000056410621<br>
> > > [77077.165650] msm ae00000.mdss: [drm] crtc[51]: crtc-0<br>
> > > [77077.165672] msm ae00000.mdss: [drm] enable=1<br>
> > > [77077.165685] msm ae00000.mdss: [drm] active=1<br>
> > > [77077.165697] msm ae00000.mdss: [drm] self_refresh_active=0<br>
> > > [77077.165709] msm ae00000.mdss: [drm] planes_changed=0<br>
> > > [77077.165721] msm ae00000.mdss: [drm] mode_changed=0<br>
> > > [77077.165733] msm ae00000.mdss: [drm] active_changed=0<br>
> > > [77077.165744] msm ae00000.mdss: [drm] connectors_changed=0<br>
> > > [77077.165755] msm ae00000.mdss: [drm] color_mgmt_changed=0<br>
> > > [77077.165766] msm ae00000.mdss: [drm] plane_mask=0<br>
> > > [77077.165777] msm ae00000.mdss: [drm] connector_mask=0<br>
> > > [77077.165789] msm ae00000.mdss: [drm] encoder_mask=1<br>
> > > [77077.165801] msm ae00000.mdss: [drm] mode: "1920x1080": 60 147840<br>
> > > 1920 1968 2000 2200 1080 1083 1089 1120 0x48 0x9<br>
> > > [77077.165824] msm ae00000.mdss: [drm] crtc[52]: crtc-1<br>
> > > [77077.165837] msm ae00000.mdss: [drm] enable=0<br>
> > > [77077.165849] msm ae00000.mdss: [drm] active=0<br>
> > > [77077.165860] msm ae00000.mdss: [drm] self_refresh_active=0<br>
> > > [77077.165873] msm ae00000.mdss: [drm] planes_changed=0<br>
> > > [77077.165885] msm ae00000.mdss: [drm] mode_changed=0<br>
> > > [77077.165896] msm ae00000.mdss: [drm] active_changed=0<br>
> > > [77077.165909] msm ae00000.mdss: [drm] connectors_changed=0<br>
> > > [77077.165921] msm ae00000.mdss: [drm] color_mgmt_changed=0<br>
> > > [77077.165932] msm ae00000.mdss: [drm] plane_mask=0<br>
> > > [77077.165944] msm ae00000.mdss: [drm] connector_mask=0<br>
> > > [77077.165956] msm ae00000.mdss: [drm] encoder_mask=0<br>
> > > [77077.165968] msm ae00000.mdss: [drm] mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0<br>
> > > [77077.165986] msm ae00000.mdss: [drm] connector[32]: eDP-1<br>
> > > [77077.166000] msm ae00000.mdss: [drm] crtc=(null)<br>
> > > [77077.166012] msm ae00000.mdss: [drm] self_refresh_aware=0<br>
> > > [77077.166025] [drm:drm_atomic_check_only] checking 0000000056410621<br>
> > > [77077.166043] [drm:drm_atomic_helper_check_modeset] [CRTC:51:crtc-0]<br>
> > > enabled/connectors mismatch<br>
> > > [77077.166059] [drm:drm_atomic_check_only] atomic driver check for<br>
> > > 0000000056410621 failed: -22<br>
> > > [77077.166075] [drm:drm_atomic_state_default_clear] Clearing atomic<br>
> > > state 0000000056410621<br>
> > > [77077.166089] [drm:drm_mode_object_put] OBJ ID: 32 (3)<br>
> > > [77077.166127] [drm:dpu_crtc_destroy_state] crtc51<br>
> > > [77077.166144] [drm:drm_mode_object_put] OBJ ID: 58 (3)<br>
> > > [77077.166157] [drm:dpu_crtc_destroy_state] crtc52<br>
> > > [77077.166168] [drm:__drm_atomic_state_free] Freeing atomic state<br>
> > > 0000000056410621<br>
> > > [77077.166186] [drm:drm_ioctl] comm="kms_concurrent", pid=20611, ret=-22<br>
> > ><br>
> > > On Wed, Aug 18, 2021 at 10:56 AM Rodrigo Siqueira<br>
> > > <<a href="mailto:Rodrigo.Siqueira@amd.com" target="_blank">Rodrigo.Siqueira@amd.com</a>> wrote:<br>
> > > ><br>
> > > > Currently, the "kms_concurrent" does not work in non-intel drivers due<br>
> > > > to using specific modifiers and operations related to i915. This commit<br>
> > > > removes some of these particular codes in order to make them generic for<br>
> > > > other drivers. After applying this change, kms_concurrent passed on AMD<br>
> > > > hardware and VKMS.<br>
> > > ><br>
> > > > Cc: Harry Wentland <<a href="mailto:harry.wentland@amd.com" target="_blank">harry.wentland@amd.com</a>><br>
> > > > Cc: Nicholas Choi <<a href="mailto:Nicholas.Choi@amd.com" target="_blank">Nicholas.Choi@amd.com</a>><br>
> > > > Cc: Sean Paul <<a href="mailto:seanpaul@chromium.org" target="_blank">seanpaul@chromium.org</a>><br>
> > > > Cc: Mark Yacoub <<a href="mailto:markyacoub@chromium.org" target="_blank">markyacoub@chromium.org</a>><br>
> > > > Cc: Melissa Wen <<a href="mailto:melissa.srw@gmail.com" target="_blank">melissa.srw@gmail.com</a>><br>
> > > > Cc: Arkadiusz Hiler <<a href="mailto:arek@hiler.eu" target="_blank">arek@hiler.eu</a>><br>
> > > > Cc: Petri Latvala <<a href="mailto:petri.latvala@intel.com" target="_blank">petri.latvala@intel.com</a>><br>
> > > > Signed-off-by: Rodrigo Siqueira <<a href="mailto:Rodrigo.Siqueira@amd.com" target="_blank">Rodrigo.Siqueira@amd.com</a>><br>
> > > > ---<br>
> > > > tests/kms_concurrent.c | 27 ++++++++++++++-------------<br>
> > > > 1 file changed, 14 insertions(+), 13 deletions(-)<br>
> > > ><br>
> > > > diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c<br>
> > > > index 969f07a7..88372d5c 100644<br>
> > > > --- a/tests/kms_concurrent.c<br>
> > > > +++ b/tests/kms_concurrent.c<br>
> > > > @@ -104,8 +104,7 @@ create_fb_for_mode_position(data_t *data, drmModeModeInfo *mode,<br>
> > > ><br>
> > > > primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);<br>
> > > ><br>
> > > > - fb_id = igt_create_fb(data->drm_fd,<br>
> > > > - mode->hdisplay, mode->vdisplay,<br>
> > > > + fb_id = igt_create_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,<br>
> > > > DRM_FORMAT_XRGB8888,<br>
> > > > tiling,<br>
> > > > &data->fb[primary->index]);<br>
> > > > @@ -138,6 +137,7 @@ prepare_planes(data_t *data, enum pipe pipe, int max_planes,<br>
> > > > int *y;<br>
> > > > int *size;<br>
> > > > int i;<br>
> > > > + int format, modifier;<br>
> > > ><br>
> > > > igt_output_set_pipe(output, pipe);<br>
> > > ><br>
> > > > @@ -161,24 +161,25 @@ prepare_planes(data_t *data, enum pipe pipe, int max_planes,<br>
> > > > for (i = 0; i < max_planes; i++) {<br>
> > > > igt_plane_t *plane = igt_output_get_plane(output, i);<br>
> > > ><br>
> > > > - if (plane->type == DRM_PLANE_TYPE_PRIMARY)<br>
> > > > + if (plane->type == DRM_PLANE_TYPE_PRIMARY) {<br>
> > > > continue;<br>
> > > > - else if (plane->type == DRM_PLANE_TYPE_CURSOR)<br>
> > > > + } else if (plane->type == DRM_PLANE_TYPE_CURSOR) {<br>
> > > > size[i] = SIZE_CURSOR;<br>
> > > > - else<br>
> > > > + format = DRM_FORMAT_ARGB8888;<br>
> > > > + modifier = DRM_FORMAT_MOD_NONE;<br>
> > > > + } else {<br>
> > > > size[i] = SIZE_PLANE;<br>
> > > > + format = DRM_FORMAT_XRGB8888;<br>
> > > > + modifier = DRM_FORMAT_MOD_NONE;<br>
> > > > + }<br>
> > > ><br>
> > > > x[i] = rand() % (mode->hdisplay - size[i]);<br>
> > > > y[i] = rand() % (mode->vdisplay - size[i]);<br>
> > > ><br>
> > > > data->plane[i] = plane;<br>
> > > ><br>
> > > > - igt_create_color_fb(data->drm_fd,<br>
> > > > - size[i], size[i],<br>
> > > > - data->plane[i]->type == DRM_PLANE_TYPE_CURSOR ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,<br>
> > > > - data->plane[i]->type == DRM_PLANE_TYPE_CURSOR ? DRM_FORMAT_MOD_NONE : I915_FORMAT_MOD_X_TILED,<br>
> > > > - 0.0f, 0.0f, 1.0f,<br>
> > > > - &data->fb[i]);<br>
> > > > + igt_create_color_fb(data->drm_fd, size[i], size[i], format, modifier,<br>
> > > > + 0.0f, 0.0f, 1.0f, &data->fb[i]);<br>
> > > ><br>
> > > > igt_plane_set_position(data->plane[i], x[i], y[i]);<br>
> > > > igt_plane_set_fb(data->plane[i], &data->fb[i]);<br>
> > > > @@ -186,8 +187,7 @@ prepare_planes(data_t *data, enum pipe pipe, int max_planes,<br>
> > > ><br>
> > > > /* primary plane */<br>
> > > > data->plane[primary->index] = primary;<br>
> > > > - create_fb_for_mode_position(data, mode, x, y, size, size,<br>
> > > > - I915_FORMAT_MOD_X_TILED,<br>
> > > > + create_fb_for_mode_position(data, mode, x, y, size, size, DRM_FORMAT_MOD_NONE,<br>
> > > > max_planes, output);<br>
> > > ><br>
> > > > igt_plane_set_fb(data->plane[primary->index], &data->fb[primary->index]);<br>
> > > > @@ -268,6 +268,7 @@ test_resolution_with_output(data_t *data, enum pipe pipe, int max_planes, igt_ou<br>
> > > ><br>
> > > > /* switch to lower resolution */<br>
> > > > igt_output_override_mode(output, mode_lo);<br>
> > > > + igt_output_set_pipe(output, PIPE_NONE);<br>
> > > > igt_display_commit2(&data->display, COMMIT_ATOMIC);<br>
> > > ><br>
> > > > /* switch back to higher resolution */<br>
> > > > --<br>
> > > > 2.25.1<br>
> > > ><br>
> ><br>
> > --<br>
> > Rodrigo Siqueira<br>
> > <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsiqueira.tech%2F&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7C75c64aca1c49414a56b508d962752fcf%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637649077723833410%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zTN5OpMmyXGvVylsZA7P27Pp8zrgH1XaP%2BSd%2FVU8Q0k%3D&reserved=0" rel="noreferrer" target="_blank">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsiqueira.tech%2F&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7C75c64aca1c49414a56b508d962752fcf%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637649077723833410%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zTN5OpMmyXGvVylsZA7P27Pp8zrgH1XaP%2BSd%2FVU8Q0k%3D&reserved=0</a><br>
<br>
-- <br>
Rodrigo Siqueira<br>
<a href="https://siqueira.tech" rel="noreferrer" target="_blank">https://siqueira.tech</a><br>
</blockquote></div></div>