tests/kms_display_modes: Fix the plane setup in extended-mode-basic
PATCH 1/1 tests/kms_display_modes: Fix the plane setup in extended-mode-basic
From: Ville Syrjälä <[email protected]>
The test forgets to set the output size of the planes. The default plane output size will be taken from the fb dimensions which means we end up upscaling the planes, which may not work on all hardware.
Set the planes' output size to match the input size to avoid this. The frambuffer was specifically created wide enough to cover both outputs with 1:1 scaling.
--- tests/kms_display_modes.c | 2 ++ 1 file changed, 2 insertions(+)
tests/kms_display_modes.c +2 -0
@@ -180,10 +180,12 @@ static void run_extendedmode_basic(data_t *data,igt_plane_set_fb (plane[0 ], &fb);igt_fb_set_position (&fb, plane[0 ],0 ,0 );igt_fb_set_size (&fb, plane[0 ], mode[0 ]->hdisplay, mode[0 ]->vdisplay); +igt_plane_set_size (plane[0 ], mode[0 ]->hdisplay, mode[0 ]->vdisplay);igt_plane_set_fb (plane[1 ], &fb);igt_fb_set_position (&fb, plane[1 ], mode[0 ]->hdisplay,0 );igt_fb_set_size (&fb, plane[1 ], mode[1 ]->hdisplay, mode[1 ]->vdisplay); +igt_plane_set_size (plane[1 ], mode[1 ]->hdisplay, mode[1 ]->vdisplay);igt_display_commit2 (display,COMMIT_ATOMIC );
Signature · 1 line
2.41.0
Quoted 7 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
The test forgets to set the output size of the planes. The default plane output size will be taken from the fb dimensions which means we end up upscaling the planes, which may not work on all hardware.
Quoted 6 lines
Set the planes' output size to match the input size to avoid this. The frambuffer was specifically created wide enough to cover both outputs with 1:1 scaling.
Quoted 21 lines
--- tests/kms_display_modes.c | 2 ++ 1 file changed, 2 insertions(+)tests/kms_display_modes.c +2
-0@@ -180,10 +180,12 @@ static void run_extendedmode_basic(data_t *data,igt_plane_set_fb (plane[0 ], &fb);igt_fb_set_position (&fb, plane[0 ],0 ,0 );igt_fb_set_size (&fb, plane[0 ], mode[0 ]->hdisplay, mode[0 ]->vdisplay); +igt_plane_set_size (plane[0 ], mode[0 ]->hdisplay, mode[0 ]->vdisplay);igt_plane_set_fb (plane[1 ], &fb);igt_fb_set_position (&fb, plane[1 ], mode[0 ]->hdisplay,0 );igt_fb_set_size (&fb, plane[1 ], mode[1 ]->hdisplay, mode[1 ]->vdisplay); +igt_plane_set_size (plane[1 ], mode[1 ]->hdisplay, mode[1 ]->vdisplay);igt_display_commit2 (display,COMMIT_ATOMIC );