Lines Matching refs:mock
28 struct drm_damage_mock *mock; in drm_damage_helper_init() local
30 mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); in drm_damage_helper_init()
31 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, mock); in drm_damage_helper_init()
33 mock->fb.width = 2048; in drm_damage_helper_init()
34 mock->fb.height = 2048; in drm_damage_helper_init()
36 mock->state.crtc = ZERO_SIZE_PTR; in drm_damage_helper_init()
37 mock->state.fb = &mock->fb; in drm_damage_helper_init()
38 mock->state.visible = true; in drm_damage_helper_init()
40 mock->old_state.plane = &mock->plane; in drm_damage_helper_init()
41 mock->state.plane = &mock->plane; in drm_damage_helper_init()
44 mock->device.driver = &mock->driver; in drm_damage_helper_init()
45 mock->device.mode_config.prop_fb_damage_clips = &mock->prop; in drm_damage_helper_init()
46 mock->plane.dev = &mock->device; in drm_damage_helper_init()
47 mock->obj_props.count = 0; in drm_damage_helper_init()
48 mock->plane.base.properties = &mock->obj_props; in drm_damage_helper_init()
49 mock->prop.base.id = 1; /* 0 is an invalid id */ in drm_damage_helper_init()
50 mock->prop.dev = &mock->device; in drm_damage_helper_init()
52 drm_plane_enable_fb_damage_clips(&mock->plane); in drm_damage_helper_init()
54 test->priv = mock; in drm_damage_helper_init()
98 struct drm_damage_mock *mock = test->priv; in check_damage_clip() local
99 struct drm_plane_state state = mock->state; in check_damage_clip()
121 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_no_damage() local
127 set_plane_src(&mock->old_state, 0, 0, mock->fb.width << 16, mock->fb.height << 16); in drm_test_damage_iter_no_damage()
128 set_plane_src(&mock->state, 0, 0, mock->fb.width << 16, mock->fb.height << 16); in drm_test_damage_iter_no_damage()
129 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_no_damage()
139 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_no_damage_fractional_src() local
145 set_plane_src(&mock->old_state, 0x3fffe, 0x3fffe, in drm_test_damage_iter_no_damage_fractional_src()
147 set_plane_src(&mock->state, 0x3fffe, 0x3fffe, in drm_test_damage_iter_no_damage_fractional_src()
149 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_no_damage_fractional_src()
160 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_no_damage_src_moved() local
166 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_no_damage_src_moved()
167 set_plane_src(&mock->state, 10 << 16, 10 << 16, in drm_test_damage_iter_no_damage_src_moved()
169 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_no_damage_src_moved()
179 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_no_damage_fractional_src_moved() local
185 set_plane_src(&mock->old_state, 0x3fffe, 0x3fffe, in drm_test_damage_iter_no_damage_fractional_src_moved()
187 set_plane_src(&mock->state, 0x40002, 0x40002, in drm_test_damage_iter_no_damage_fractional_src_moved()
189 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_no_damage_fractional_src_moved()
199 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_no_damage_not_visible() local
204 mock->state.visible = false; in drm_test_damage_iter_no_damage_not_visible()
206 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_no_damage_not_visible()
207 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_no_damage_not_visible()
208 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_no_damage_not_visible()
217 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_no_damage_no_crtc() local
222 mock->state.crtc = NULL; in drm_test_damage_iter_no_damage_no_crtc()
224 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_no_damage_no_crtc()
225 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_no_damage_no_crtc()
226 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_no_damage_no_crtc()
235 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_no_damage_no_fb() local
240 mock->state.fb = NULL; in drm_test_damage_iter_no_damage_no_fb()
242 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_no_damage_no_fb()
243 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_no_damage_no_fb()
244 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_no_damage_no_fb()
253 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_simple_damage() local
260 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_simple_damage()
261 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_simple_damage()
265 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_simple_damage()
266 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_simple_damage()
276 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage() local
283 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_single_damage()
284 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_single_damage()
287 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage()
288 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage()
298 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage_intersect_src() local
305 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_single_damage_intersect_src()
306 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_single_damage_intersect_src()
310 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage_intersect_src()
311 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage_intersect_src()
321 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage_outside_src() local
328 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_single_damage_outside_src()
329 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_single_damage_outside_src()
333 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage_outside_src()
334 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage_outside_src()
343 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage_fractional_src() local
351 set_plane_src(&mock->old_state, 0x40002, 0x40002, in drm_test_damage_iter_single_damage_fractional_src()
353 set_plane_src(&mock->state, 0x40002, 0x40002, in drm_test_damage_iter_single_damage_fractional_src()
357 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage_fractional_src()
358 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage_fractional_src()
368 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage_intersect_fractional_src() local
376 set_plane_src(&mock->old_state, 0x40002, 0x40002, in drm_test_damage_iter_single_damage_intersect_fractional_src()
378 set_plane_src(&mock->state, 0x40002, 0x40002, in drm_test_damage_iter_single_damage_intersect_fractional_src()
383 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage_intersect_fractional_src()
384 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage_intersect_fractional_src()
395 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage_outside_fractional_src() local
403 set_plane_src(&mock->old_state, 0x40002, 0x40002, in drm_test_damage_iter_single_damage_outside_fractional_src()
405 set_plane_src(&mock->state, 0x40002, 0x40002, in drm_test_damage_iter_single_damage_outside_fractional_src()
410 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage_outside_fractional_src()
411 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage_outside_fractional_src()
420 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage_src_moved() local
428 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_single_damage_src_moved()
429 set_plane_src(&mock->state, 10 << 16, 10 << 16, in drm_test_damage_iter_single_damage_src_moved()
433 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage_src_moved()
434 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage_src_moved()
445 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_single_damage_fractional_src_moved() local
453 set_plane_src(&mock->old_state, 0x3fffe, 0x3fffe, in drm_test_damage_iter_single_damage_fractional_src_moved()
455 set_plane_src(&mock->state, 0x40002, 0x40002, in drm_test_damage_iter_single_damage_fractional_src_moved()
460 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_single_damage_fractional_src_moved()
461 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_single_damage_fractional_src_moved()
472 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_damage() local
479 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_damage()
480 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_damage()
485 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_damage()
486 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_damage()
500 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_damage_one_intersect() local
507 set_plane_src(&mock->old_state, 0x40002, 0x40002, in drm_test_damage_iter_damage_one_intersect()
509 set_plane_src(&mock->state, 0x40002, 0x40002, in drm_test_damage_iter_damage_one_intersect()
515 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_damage_one_intersect()
516 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_damage_one_intersect()
530 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_damage_one_outside() local
537 set_plane_src(&mock->old_state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_damage_one_outside()
538 set_plane_src(&mock->state, 0, 0, 1024 << 16, 768 << 16); in drm_test_damage_iter_damage_one_outside()
543 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_damage_one_outside()
544 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_damage_one_outside()
554 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_damage_src_moved() local
561 set_plane_src(&mock->old_state, 0x40002, 0x40002, in drm_test_damage_iter_damage_src_moved()
563 set_plane_src(&mock->state, 0x3fffe, 0x3fffe, in drm_test_damage_iter_damage_src_moved()
569 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_damage_src_moved()
570 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_damage_src_moved()
581 struct drm_damage_mock *mock = test->priv; in drm_test_damage_iter_damage_not_visible() local
588 mock->state.visible = false; in drm_test_damage_iter_damage_not_visible()
590 set_plane_src(&mock->old_state, 0x40002, 0x40002, in drm_test_damage_iter_damage_not_visible()
592 set_plane_src(&mock->state, 0x3fffe, 0x3fffe, in drm_test_damage_iter_damage_not_visible()
598 set_plane_damage(&mock->state, &damage_blob); in drm_test_damage_iter_damage_not_visible()
599 drm_atomic_helper_damage_iter_init(&iter, &mock->old_state, &mock->state); in drm_test_damage_iter_damage_not_visible()