Lines Matching +full:0 +full:- +full:1023

1 // SPDX-License-Identifier: GPL-2.0
20 DRM_MODE("1024x768", 0, 65000, 1024, 1048,
21 1184, 1344, 0, 768, 771, 777, 806, 0,
49 const struct drm_check_plane_state_test *params = test->param_value; in drm_plane_helper_init()
59 fb->width = 2048; in drm_plane_helper_init()
60 fb->height = 2048; in drm_plane_helper_init()
64 mock->plane = plane; in drm_plane_helper_init()
65 mock->crtc = ZERO_SIZE_PTR; in drm_plane_helper_init()
66 mock->fb = fb; in drm_plane_helper_init()
67 mock->rotation = params->rotation; in drm_plane_helper_init()
68 mock->src_x = params->src.x; in drm_plane_helper_init()
69 mock->src_y = params->src.y; in drm_plane_helper_init()
70 mock->src_w = params->src.w; in drm_plane_helper_init()
71 mock->src_h = params->src.h; in drm_plane_helper_init()
72 mock->crtc_x = params->crtc.x; in drm_plane_helper_init()
73 mock->crtc_y = params->crtc.y; in drm_plane_helper_init()
74 mock->crtc_w = params->crtc.w; in drm_plane_helper_init()
75 mock->crtc_h = params->crtc.h; in drm_plane_helper_init()
77 test->priv = mock; in drm_plane_helper_init()
79 return 0; in drm_plane_helper_init()
88 KUNIT_ASSERT_GE_MSG(test, plane_state->src.x1, 0, in check_src_eq()
89 "src x coordinate %x should never be below 0, src: " DRM_RECT_FP_FMT, in check_src_eq()
90 plane_state->src.x1, DRM_RECT_FP_ARG(&plane_state->src)); in check_src_eq()
92 KUNIT_ASSERT_GE_MSG(test, plane_state->src.y1, 0, in check_src_eq()
93 "src y coordinate %x should never be below 0, src: " DRM_RECT_FP_FMT, in check_src_eq()
94 plane_state->src.y1, DRM_RECT_FP_ARG(&plane_state->src)); in check_src_eq()
96 KUNIT_EXPECT_TRUE_MSG(test, drm_rect_equals(&plane_state->src, &expected), in check_src_eq()
98 DRM_RECT_FP_ARG(&plane_state->src), DRM_RECT_FP_ARG(&expected)); in check_src_eq()
107 KUNIT_EXPECT_TRUE_MSG(test, drm_rect_equals(&plane_state->dst, &expected), in check_crtc_eq()
109 DRM_RECT_ARG(&plane_state->dst), DRM_RECT_ARG(&expected)); in check_crtc_eq()
114 const struct drm_check_plane_state_test *params = test->param_value; in drm_test_check_plane_state()
115 struct drm_plane_state *plane_state = test->priv; in drm_test_check_plane_state()
119 params->min_scale, in drm_test_check_plane_state()
120 params->max_scale, in drm_test_check_plane_state()
121 params->can_position, false), in drm_test_check_plane_state()
122 0, params->msg); in drm_test_check_plane_state()
123 KUNIT_EXPECT_TRUE(test, plane_state->visible); in drm_test_check_plane_state()
124 check_src_eq(test, plane_state, params->src_expected.x, params->src_expected.y, in drm_test_check_plane_state()
125 params->src_expected.w, params->src_expected.h); in drm_test_check_plane_state()
126 check_crtc_eq(test, plane_state, params->crtc_expected.x, params->crtc_expected.y, in drm_test_check_plane_state()
127 params->crtc_expected.w, params->crtc_expected.h); in drm_test_check_plane_state()
133 sprintf(desc, "%s", t->name); in drm_check_plane_state_desc()
140 .src = { 0, 0,
143 .crtc = { 0, 0, 2048, 2048 },
148 .src_expected = { 0, 0, 1024 << 16, 768 << 16 },
149 .crtc_expected = { 0, 0, 1024, 768 },
154 .src = { 0, 0,
157 .crtc = { 0, 0, 2048, 2048 },
162 .src_expected = { 0, 0, 768 << 16, 1024 << 16 },
163 .crtc_expected = { 0, 0, 1024, 768 },
168 .src = { 0, 0, 1023 << 16, 767 << 16 },
169 .crtc = { 0, 0, 1023, 767 },
174 .src_expected = { 0, 0, 1023 << 16, 767 << 16 },
175 .crtc_expected = { 0, 0, 1023, 767 },
180 .src = { 0, 0, 512 << 16, 384 << 16 },
181 .crtc = { 0, 0, 1024, 768 },
183 .min_scale = 0x8000,
186 .src_expected = { 0, 0, 512 << 16, 384 << 16 },
187 .crtc_expected = { 0, 0, 1024, 768 },
192 .src = { 0, 0, 2048 << 16, 1536 << 16 },
193 .crtc = { 0, 0, 1024, 768 },
196 .max_scale = 0x20000,
198 .src_expected = { 0, 0, 2048 << 16, 1536 << 16 },
199 .crtc_expected = { 0, 0, 1024, 768 },
204 .src = { 0, 0, 0x40001, 0x40001 },
208 .max_scale = 0x10001,
210 .src_expected = { 0, 0, 2 << 16, 2 << 16 },
216 .src = { 0x20001, 0x20001, 0x4040001, 0x3040001 },
217 .crtc = { -2, -2, 1028, 772 },
220 .max_scale = 0x10001,
222 .src_expected = { 0x40002, 0x40002, 1024 << 16, 768 << 16 },
223 .crtc_expected = { 0, 0, 1024, 768 },
228 .src = { 0, 0, 0x3ffff, 0x3ffff },
231 .min_scale = 0xffff,
234 /* Should not be rounded to 0x20001, which would be upscaling. */
235 .src_expected = { 0, 0, 2 << 16, 2 << 16 },
241 .src = { 0x1ffff, 0x1ffff, 0x403ffff, 0x303ffff },
242 .crtc = { -2, -2, 1028, 772 },
244 .min_scale = 0xffff,
247 .src_expected = { 0x3fffe, 0x3fffe, 1024 << 16, 768 << 16 },
248 .crtc_expected = { 0, 0, 1024, 768 },
256 const struct drm_check_plane_state_test *params = test->param_value; in drm_test_check_invalid_plane_state()
257 struct drm_plane_state *plane_state = test->priv; in drm_test_check_invalid_plane_state()
261 params->min_scale, in drm_test_check_invalid_plane_state()
262 params->max_scale, in drm_test_check_invalid_plane_state()
263 params->can_position, false), in drm_test_check_invalid_plane_state()
264 0, params->msg); in drm_test_check_invalid_plane_state()
271 .src = { 0, 0, 1023 << 16, 767 << 16 },
272 .crtc = { 0, 0, 1023, 767 },
281 .src = { 0, 0, 512 << 16, 384 << 16 },
282 .crtc = { 0, 0, 1024, 768 },
284 .min_scale = 0x8001,
291 .src = { 0, 0, 2048 << 16, 1536 << 16 },
292 .crtc = { 0, 0, 1024, 768 },
295 .max_scale = 0x1ffff,