Lines Matching refs:test

14 static void drm_test_cmdline_force_e_only(struct kunit *test)  in drm_test_cmdline_force_e_only()  argument
19 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_force_e_only()
21 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_force_e_only()
22 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_force_e_only()
23 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_force_e_only()
25 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_force_e_only()
26 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_force_e_only()
27 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_force_e_only()
28 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_force_e_only()
29 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_force_e_only()
32 static void drm_test_cmdline_force_D_only_not_digital(struct kunit *test) in drm_test_cmdline_force_D_only_not_digital() argument
37 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_force_D_only_not_digital()
39 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_force_D_only_not_digital()
40 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_force_D_only_not_digital()
41 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_force_D_only_not_digital()
43 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_force_D_only_not_digital()
44 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_force_D_only_not_digital()
45 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_force_D_only_not_digital()
46 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_force_D_only_not_digital()
47 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_force_D_only_not_digital()
54 static void drm_test_cmdline_force_D_only_hdmi(struct kunit *test) in drm_test_cmdline_force_D_only_hdmi() argument
59 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_force_D_only_hdmi()
61 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_force_D_only_hdmi()
62 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_force_D_only_hdmi()
63 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_force_D_only_hdmi()
65 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_force_D_only_hdmi()
66 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_force_D_only_hdmi()
67 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_force_D_only_hdmi()
68 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_force_D_only_hdmi()
69 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON_DIGITAL); in drm_test_cmdline_force_D_only_hdmi()
76 static void drm_test_cmdline_force_D_only_dvi(struct kunit *test) in drm_test_cmdline_force_D_only_dvi() argument
81 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_force_D_only_dvi()
83 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_force_D_only_dvi()
84 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_force_D_only_dvi()
85 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_force_D_only_dvi()
87 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_force_D_only_dvi()
88 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_force_D_only_dvi()
89 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_force_D_only_dvi()
90 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_force_D_only_dvi()
91 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON_DIGITAL); in drm_test_cmdline_force_D_only_dvi()
94 static void drm_test_cmdline_force_d_only(struct kunit *test) in drm_test_cmdline_force_d_only() argument
99 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_force_d_only()
101 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_force_d_only()
102 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_force_d_only()
103 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_force_d_only()
105 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_force_d_only()
106 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_force_d_only()
107 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_force_d_only()
108 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_force_d_only()
109 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_OFF); in drm_test_cmdline_force_d_only()
112 static void drm_test_cmdline_res(struct kunit *test) in drm_test_cmdline_res() argument
117 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res()
119 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res()
120 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res()
121 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res()
123 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_res()
125 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_res()
127 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res()
128 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res()
129 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res()
130 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res()
131 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res()
134 static void drm_test_cmdline_res_vesa(struct kunit *test) in drm_test_cmdline_res_vesa() argument
139 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_vesa()
141 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_vesa()
142 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_vesa()
143 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_vesa()
145 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_res_vesa()
147 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_res_vesa()
149 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_vesa()
150 KUNIT_EXPECT_TRUE(test, mode.cvt); in drm_test_cmdline_res_vesa()
151 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_vesa()
152 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_vesa()
153 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_vesa()
156 static void drm_test_cmdline_res_vesa_rblank(struct kunit *test) in drm_test_cmdline_res_vesa_rblank() argument
161 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_vesa_rblank()
163 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_vesa_rblank()
164 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_vesa_rblank()
165 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_vesa_rblank()
167 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_res_vesa_rblank()
169 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_res_vesa_rblank()
171 KUNIT_EXPECT_TRUE(test, mode.rb); in drm_test_cmdline_res_vesa_rblank()
172 KUNIT_EXPECT_TRUE(test, mode.cvt); in drm_test_cmdline_res_vesa_rblank()
173 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_vesa_rblank()
174 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_vesa_rblank()
175 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_vesa_rblank()
178 static void drm_test_cmdline_res_rblank(struct kunit *test) in drm_test_cmdline_res_rblank() argument
183 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_rblank()
185 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_rblank()
186 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_rblank()
187 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_rblank()
189 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_res_rblank()
191 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_res_rblank()
193 KUNIT_EXPECT_TRUE(test, mode.rb); in drm_test_cmdline_res_rblank()
194 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_rblank()
195 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_rblank()
196 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_rblank()
197 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_rblank()
200 static void drm_test_cmdline_res_bpp(struct kunit *test) in drm_test_cmdline_res_bpp() argument
205 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp()
207 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp()
208 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp()
209 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp()
211 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp()
213 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp()
214 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp()
216 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp()
217 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp()
218 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_bpp()
219 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_bpp()
220 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_bpp()
223 static void drm_test_cmdline_res_refresh(struct kunit *test) in drm_test_cmdline_res_refresh() argument
228 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_refresh()
230 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_refresh()
231 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_refresh()
232 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_refresh()
234 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_refresh()
235 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_refresh()
237 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_res_refresh()
239 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_refresh()
240 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_refresh()
241 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_refresh()
242 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_refresh()
243 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_refresh()
246 static void drm_test_cmdline_res_bpp_refresh(struct kunit *test) in drm_test_cmdline_res_bpp_refresh() argument
251 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh()
253 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh()
254 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh()
255 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh()
257 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh()
258 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh()
260 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh()
261 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh()
263 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh()
264 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh()
265 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh()
266 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh()
267 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_bpp_refresh()
270 static void drm_test_cmdline_res_bpp_refresh_interlaced(struct kunit *test) in drm_test_cmdline_res_bpp_refresh_interlaced() argument
275 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh_interlaced()
277 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh_interlaced()
278 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh_interlaced()
279 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh_interlaced()
281 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh_interlaced()
282 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh_interlaced()
284 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh_interlaced()
285 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh_interlaced()
287 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh_interlaced()
288 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh_interlaced()
289 KUNIT_EXPECT_TRUE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh_interlaced()
290 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh_interlaced()
291 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_bpp_refresh_interlaced()
294 static void drm_test_cmdline_res_bpp_refresh_margins(struct kunit *test) in drm_test_cmdline_res_bpp_refresh_margins() argument
299 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh_margins()
301 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh_margins()
302 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh_margins()
303 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh_margins()
305 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh_margins()
306 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh_margins()
308 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh_margins()
309 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh_margins()
311 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh_margins()
312 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh_margins()
313 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh_margins()
314 KUNIT_EXPECT_TRUE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh_margins()
315 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_bpp_refresh_margins()
318 static void drm_test_cmdline_res_bpp_refresh_force_off(struct kunit *test) in drm_test_cmdline_res_bpp_refresh_force_off() argument
323 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh_force_off()
325 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh_force_off()
326 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh_force_off()
327 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh_force_off()
329 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh_force_off()
330 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh_force_off()
332 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh_force_off()
333 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh_force_off()
335 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh_force_off()
336 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh_force_off()
337 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh_force_off()
338 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh_force_off()
339 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_OFF); in drm_test_cmdline_res_bpp_refresh_force_off()
342 static void drm_test_cmdline_res_bpp_refresh_force_on(struct kunit *test) in drm_test_cmdline_res_bpp_refresh_force_on() argument
347 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh_force_on()
349 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh_force_on()
350 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh_force_on()
351 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh_force_on()
353 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh_force_on()
354 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh_force_on()
356 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh_force_on()
357 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh_force_on()
359 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh_force_on()
360 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh_force_on()
361 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh_force_on()
362 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh_force_on()
363 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_res_bpp_refresh_force_on()
366 static void drm_test_cmdline_res_bpp_refresh_force_on_analog(struct kunit *test) in drm_test_cmdline_res_bpp_refresh_force_on_analog() argument
371 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh_force_on_analog()
373 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
374 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
375 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
377 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
378 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
380 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
381 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
383 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
384 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
385 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
386 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
387 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_res_bpp_refresh_force_on_analog()
390 static void drm_test_cmdline_res_bpp_refresh_force_on_digital(struct kunit *test) in drm_test_cmdline_res_bpp_refresh_force_on_digital() argument
398 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh_force_on_digital()
400 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
401 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
402 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
404 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
405 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
407 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
408 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
410 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
411 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
412 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
413 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
414 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON_DIGITAL); in drm_test_cmdline_res_bpp_refresh_force_on_digital()
417 static void drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on(struct kunit *test) in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on() argument
422 KUNIT_EXPECT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
424 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
425 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
426 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
428 KUNIT_EXPECT_TRUE(test, mode.refresh_specified); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
429 KUNIT_EXPECT_EQ(test, mode.refresh, 60); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
431 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
432 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
434 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
435 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
436 KUNIT_EXPECT_TRUE(test, mode.interlace); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
437 KUNIT_EXPECT_TRUE(test, mode.margins); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
438 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on()
441 static void drm_test_cmdline_res_margins_force_on(struct kunit *test) in drm_test_cmdline_res_margins_force_on() argument
446 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_margins_force_on()
448 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_margins_force_on()
449 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_margins_force_on()
450 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_margins_force_on()
452 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_res_margins_force_on()
454 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_res_margins_force_on()
456 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_margins_force_on()
457 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_res_margins_force_on()
458 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_margins_force_on()
459 KUNIT_EXPECT_TRUE(test, mode.margins); in drm_test_cmdline_res_margins_force_on()
460 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_res_margins_force_on()
463 static void drm_test_cmdline_res_vesa_margins(struct kunit *test) in drm_test_cmdline_res_vesa_margins() argument
468 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_res_vesa_margins()
470 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_res_vesa_margins()
471 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_res_vesa_margins()
472 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_res_vesa_margins()
474 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_res_vesa_margins()
476 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_res_vesa_margins()
478 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_res_vesa_margins()
479 KUNIT_EXPECT_TRUE(test, mode.cvt); in drm_test_cmdline_res_vesa_margins()
480 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_res_vesa_margins()
481 KUNIT_EXPECT_TRUE(test, mode.margins); in drm_test_cmdline_res_vesa_margins()
482 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_res_vesa_margins()
485 static void drm_test_cmdline_name(struct kunit *test) in drm_test_cmdline_name() argument
490 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_name()
492 KUNIT_EXPECT_STREQ(test, mode.name, "NTSC"); in drm_test_cmdline_name()
493 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_name()
494 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_name()
497 static void drm_test_cmdline_name_bpp(struct kunit *test) in drm_test_cmdline_name_bpp() argument
502 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_name_bpp()
504 KUNIT_EXPECT_STREQ(test, mode.name, "NTSC"); in drm_test_cmdline_name_bpp()
506 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_name_bpp()
508 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_name_bpp()
509 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_name_bpp()
512 static void drm_test_cmdline_name_option(struct kunit *test) in drm_test_cmdline_name_option() argument
517 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_name_option()
519 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_name_option()
520 KUNIT_EXPECT_STREQ(test, mode.name, "NTSC"); in drm_test_cmdline_name_option()
521 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_180); in drm_test_cmdline_name_option()
524 static void drm_test_cmdline_name_bpp_option(struct kunit *test) in drm_test_cmdline_name_bpp_option() argument
529 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_name_bpp_option()
531 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_name_bpp_option()
532 KUNIT_EXPECT_STREQ(test, mode.name, "NTSC"); in drm_test_cmdline_name_bpp_option()
533 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_180); in drm_test_cmdline_name_bpp_option()
534 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_name_bpp_option()
535 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_name_bpp_option()
538 static void drm_test_cmdline_rotate_0(struct kunit *test) in drm_test_cmdline_rotate_0() argument
543 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_rotate_0()
545 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_rotate_0()
546 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_rotate_0()
547 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_rotate_0()
548 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_0); in drm_test_cmdline_rotate_0()
550 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_rotate_0()
552 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_rotate_0()
554 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_rotate_0()
555 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_rotate_0()
556 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_rotate_0()
557 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_rotate_0()
558 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_rotate_0()
561 static void drm_test_cmdline_rotate_90(struct kunit *test) in drm_test_cmdline_rotate_90() argument
566 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_rotate_90()
568 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_rotate_90()
569 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_rotate_90()
570 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_rotate_90()
571 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_90); in drm_test_cmdline_rotate_90()
573 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_rotate_90()
575 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_rotate_90()
577 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_rotate_90()
578 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_rotate_90()
579 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_rotate_90()
580 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_rotate_90()
581 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_rotate_90()
584 static void drm_test_cmdline_rotate_180(struct kunit *test) in drm_test_cmdline_rotate_180() argument
589 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_rotate_180()
591 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_rotate_180()
592 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_rotate_180()
593 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_rotate_180()
594 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_180); in drm_test_cmdline_rotate_180()
596 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_rotate_180()
598 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_rotate_180()
600 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_rotate_180()
601 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_rotate_180()
602 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_rotate_180()
603 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_rotate_180()
604 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_rotate_180()
607 static void drm_test_cmdline_rotate_270(struct kunit *test) in drm_test_cmdline_rotate_270() argument
612 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_rotate_270()
614 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_rotate_270()
615 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_rotate_270()
616 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_rotate_270()
617 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_270); in drm_test_cmdline_rotate_270()
619 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_rotate_270()
621 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_rotate_270()
623 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_rotate_270()
624 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_rotate_270()
625 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_rotate_270()
626 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_rotate_270()
627 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_rotate_270()
630 static void drm_test_cmdline_hmirror(struct kunit *test) in drm_test_cmdline_hmirror() argument
635 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_hmirror()
637 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_hmirror()
638 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_hmirror()
639 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_hmirror()
640 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, (DRM_MODE_ROTATE_0 | DRM_MODE_REFLECT_X)); in drm_test_cmdline_hmirror()
642 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_hmirror()
644 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_hmirror()
646 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_hmirror()
647 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_hmirror()
648 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_hmirror()
649 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_hmirror()
650 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_hmirror()
653 static void drm_test_cmdline_vmirror(struct kunit *test) in drm_test_cmdline_vmirror() argument
658 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_vmirror()
660 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_vmirror()
661 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_vmirror()
662 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_vmirror()
663 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, (DRM_MODE_ROTATE_0 | DRM_MODE_REFLECT_Y)); in drm_test_cmdline_vmirror()
665 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_vmirror()
667 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_vmirror()
669 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_vmirror()
670 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_vmirror()
671 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_vmirror()
672 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_vmirror()
673 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_vmirror()
676 static void drm_test_cmdline_margin_options(struct kunit *test) in drm_test_cmdline_margin_options() argument
682 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_margin_options()
684 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_margin_options()
685 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_margin_options()
686 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_margin_options()
687 KUNIT_EXPECT_EQ(test, mode.tv_margins.right, 14); in drm_test_cmdline_margin_options()
688 KUNIT_EXPECT_EQ(test, mode.tv_margins.left, 24); in drm_test_cmdline_margin_options()
689 KUNIT_EXPECT_EQ(test, mode.tv_margins.bottom, 36); in drm_test_cmdline_margin_options()
690 KUNIT_EXPECT_EQ(test, mode.tv_margins.top, 42); in drm_test_cmdline_margin_options()
692 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_margin_options()
694 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_margin_options()
696 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_margin_options()
697 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_margin_options()
698 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_margin_options()
699 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_margin_options()
700 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_margin_options()
703 static void drm_test_cmdline_multiple_options(struct kunit *test) in drm_test_cmdline_multiple_options() argument
708 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_multiple_options()
710 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_multiple_options()
711 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_multiple_options()
712 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_multiple_options()
713 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, (DRM_MODE_ROTATE_270 | DRM_MODE_REFLECT_X)); in drm_test_cmdline_multiple_options()
715 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_multiple_options()
717 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_multiple_options()
719 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_multiple_options()
720 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_multiple_options()
721 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_multiple_options()
722 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_multiple_options()
723 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_multiple_options()
726 static void drm_test_cmdline_bpp_extra_and_option(struct kunit *test) in drm_test_cmdline_bpp_extra_and_option() argument
731 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_bpp_extra_and_option()
733 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_bpp_extra_and_option()
734 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_bpp_extra_and_option()
735 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_bpp_extra_and_option()
736 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_180); in drm_test_cmdline_bpp_extra_and_option()
738 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_bpp_extra_and_option()
740 KUNIT_EXPECT_TRUE(test, mode.bpp_specified); in drm_test_cmdline_bpp_extra_and_option()
741 KUNIT_EXPECT_EQ(test, mode.bpp, 24); in drm_test_cmdline_bpp_extra_and_option()
743 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_bpp_extra_and_option()
744 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_bpp_extra_and_option()
745 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_bpp_extra_and_option()
746 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_bpp_extra_and_option()
747 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_bpp_extra_and_option()
750 static void drm_test_cmdline_extra_and_option(struct kunit *test) in drm_test_cmdline_extra_and_option() argument
755 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_extra_and_option()
757 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_extra_and_option()
758 KUNIT_EXPECT_EQ(test, mode.xres, 720); in drm_test_cmdline_extra_and_option()
759 KUNIT_EXPECT_EQ(test, mode.yres, 480); in drm_test_cmdline_extra_and_option()
760 KUNIT_EXPECT_EQ(test, mode.rotation_reflection, DRM_MODE_ROTATE_180); in drm_test_cmdline_extra_and_option()
762 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_extra_and_option()
763 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_extra_and_option()
765 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_extra_and_option()
766 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_extra_and_option()
767 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_extra_and_option()
768 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_extra_and_option()
769 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_extra_and_option()
772 static void drm_test_cmdline_freestanding_options(struct kunit *test) in drm_test_cmdline_freestanding_options() argument
777 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_freestanding_options()
779 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_freestanding_options()
780 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_freestanding_options()
781 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_freestanding_options()
783 KUNIT_EXPECT_EQ(test, mode.tv_margins.right, 14); in drm_test_cmdline_freestanding_options()
784 KUNIT_EXPECT_EQ(test, mode.tv_margins.left, 24); in drm_test_cmdline_freestanding_options()
785 KUNIT_EXPECT_EQ(test, mode.tv_margins.bottom, 36); in drm_test_cmdline_freestanding_options()
786 KUNIT_EXPECT_EQ(test, mode.tv_margins.top, 42); in drm_test_cmdline_freestanding_options()
788 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_freestanding_options()
789 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_freestanding_options()
790 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_freestanding_options()
791 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_freestanding_options()
792 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_freestanding_options()
795 static void drm_test_cmdline_freestanding_force_e_and_options(struct kunit *test) in drm_test_cmdline_freestanding_force_e_and_options() argument
800 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_freestanding_force_e_and_options()
802 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_freestanding_force_e_and_options()
803 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_freestanding_force_e_and_options()
804 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_freestanding_force_e_and_options()
806 KUNIT_EXPECT_EQ(test, mode.tv_margins.right, 14); in drm_test_cmdline_freestanding_force_e_and_options()
807 KUNIT_EXPECT_EQ(test, mode.tv_margins.left, 24); in drm_test_cmdline_freestanding_force_e_and_options()
808 KUNIT_EXPECT_EQ(test, mode.tv_margins.bottom, 36); in drm_test_cmdline_freestanding_force_e_and_options()
809 KUNIT_EXPECT_EQ(test, mode.tv_margins.top, 42); in drm_test_cmdline_freestanding_force_e_and_options()
811 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_freestanding_force_e_and_options()
812 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_freestanding_force_e_and_options()
813 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_freestanding_force_e_and_options()
814 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_freestanding_force_e_and_options()
815 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_freestanding_force_e_and_options()
818 static void drm_test_cmdline_panel_orientation(struct kunit *test) in drm_test_cmdline_panel_orientation() argument
823 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_panel_orientation()
825 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_panel_orientation()
826 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_panel_orientation()
827 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_panel_orientation()
829 KUNIT_EXPECT_EQ(test, mode.panel_orientation, DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP); in drm_test_cmdline_panel_orientation()
831 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_panel_orientation()
832 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_panel_orientation()
833 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_panel_orientation()
834 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_panel_orientation()
835 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_panel_orientation()
843 static void drm_test_cmdline_invalid(struct kunit *test) in drm_test_cmdline_invalid() argument
845 const struct drm_cmdline_invalid_test *params = test->param_value; in drm_test_cmdline_invalid()
848 KUNIT_EXPECT_FALSE(test, drm_mode_parse_command_line_for_connector(params->cmdline, in drm_test_cmdline_invalid()
955 static void drm_test_cmdline_tv_options(struct kunit *test) in drm_test_cmdline_tv_options() argument
957 const struct drm_cmdline_tv_option_test *params = test->param_value; in drm_test_cmdline_tv_options()
961 KUNIT_EXPECT_TRUE(test, drm_mode_parse_command_line_for_connector(params->cmdline, in drm_test_cmdline_tv_options()
963 KUNIT_EXPECT_TRUE(test, mode.specified); in drm_test_cmdline_tv_options()
964 KUNIT_EXPECT_EQ(test, mode.xres, expected_mode->hdisplay); in drm_test_cmdline_tv_options()
965 KUNIT_EXPECT_EQ(test, mode.yres, expected_mode->vdisplay); in drm_test_cmdline_tv_options()
966 KUNIT_EXPECT_EQ(test, mode.tv_mode, params->tv_mode); in drm_test_cmdline_tv_options()
968 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_tv_options()
970 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_tv_options()
972 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_tv_options()
973 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_tv_options()
974 KUNIT_EXPECT_EQ(test, mode.interlace, !!(expected_mode->flags & DRM_MODE_FLAG_INTERLACE)); in drm_test_cmdline_tv_options()
975 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_tv_options()
976 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); in drm_test_cmdline_tv_options()