/drivers/platform/chrome/ |
D | cros_ec_proto_test.c | 196 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_normal() local 203 mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data)); in cros_ec_proto_test_query_all_normal() 204 KUNIT_ASSERT_PTR_NE(test, mock, NULL); in cros_ec_proto_test_query_all_normal() 206 data = (struct ec_response_get_protocol_info *)mock->o_data; in cros_ec_proto_test_query_all_normal() 216 mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data)); in cros_ec_proto_test_query_all_normal() 217 KUNIT_ASSERT_PTR_NE(test, mock, NULL); in cros_ec_proto_test_query_all_normal() 219 data = (struct ec_response_get_protocol_info *)mock->o_data; in cros_ec_proto_test_query_all_normal() 227 mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data)); in cros_ec_proto_test_query_all_normal() 228 KUNIT_ASSERT_PTR_NE(test, mock, NULL); in cros_ec_proto_test_query_all_normal() 230 data = (struct ec_response_get_cmd_versions *)mock->o_data; in cros_ec_proto_test_query_all_normal() [all …]
|
D | cros_kunit_util.c | 26 struct ec_xfer_mock *mock; in cros_kunit_ec_xfer_mock() local 28 mock = list_first_entry_or_null(&cros_kunit_ec_xfer_mock_in, struct ec_xfer_mock, list); in cros_kunit_ec_xfer_mock() 29 if (!mock) { in cros_kunit_ec_xfer_mock() 34 list_del(&mock->list); in cros_kunit_ec_xfer_mock() 36 memcpy(&mock->msg, msg, sizeof(*msg)); in cros_kunit_ec_xfer_mock() 38 mock->i_data = kunit_kzalloc(mock->test, msg->outsize, GFP_KERNEL); in cros_kunit_ec_xfer_mock() 39 if (mock->i_data) in cros_kunit_ec_xfer_mock() 40 memcpy(mock->i_data, msg->data, msg->outsize); in cros_kunit_ec_xfer_mock() 43 msg->result = mock->result; in cros_kunit_ec_xfer_mock() 45 memcpy(msg->data, mock->o_data, min(msg->insize, mock->o_data_len)); in cros_kunit_ec_xfer_mock() [all …]
|
/drivers/gpu/drm/tests/ |
D | drm_damage_helper_test.c | 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() [all …]
|
D | drm_framebuffer_test.c | 335 struct drm_device *mock; in drm_framebuffer_test_init() local 337 mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); in drm_framebuffer_test_init() 338 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, mock); in drm_framebuffer_test_init() 340 mock->mode_config.min_width = MIN_WIDTH; in drm_framebuffer_test_init() 341 mock->mode_config.max_width = MAX_WIDTH; in drm_framebuffer_test_init() 342 mock->mode_config.min_height = MIN_HEIGHT; in drm_framebuffer_test_init() 343 mock->mode_config.max_height = MAX_HEIGHT; in drm_framebuffer_test_init() 344 mock->mode_config.funcs = &mock_config_funcs; in drm_framebuffer_test_init() 346 test->priv = mock; in drm_framebuffer_test_init() 353 struct drm_device *mock = test->priv; in drm_test_framebuffer_create() local [all …]
|
/drivers/gpu/drm/i915/gem/selftests/ |
D | mock_dmabuf.c | 12 struct mock_dmabuf *mock = to_mock(attachment->dmabuf); in mock_map_dma_buf() local 21 err = sg_alloc_table(st, mock->npages, GFP_KERNEL); in mock_map_dma_buf() 26 for (i = 0; i < mock->npages; i++) { in mock_map_dma_buf() 27 sg_set_page(sg, mock->pages[i], PAGE_SIZE, 0); in mock_map_dma_buf() 55 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_release() local 58 for (i = 0; i < mock->npages; i++) in mock_dmabuf_release() 59 put_page(mock->pages[i]); in mock_dmabuf_release() 61 kfree(mock); in mock_dmabuf_release() 66 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vmap() local 69 vaddr = vm_map_ram(mock->pages, mock->npages, 0); in mock_dmabuf_vmap() [all …]
|
/drivers/gpu/drm/i915/gt/ |
D | mock_engine.c | 97 mock.link); in first_request() 102 list_del_init(&request->mock.link); in advance() 127 if (request->mock.delay) { in hw_delay_complete() 129 jiffies + request->mock.delay); in hw_delay_complete() 219 INIT_LIST_HEAD(&request->mock.link); in mock_request_alloc() 220 request->mock.delay = 0; in mock_request_alloc() 245 list_add_tail(&request->mock.link, &engine->hw_queue); in mock_submit_request() 246 if (list_is_first(&request->mock.link, &engine->hw_queue)) { in mock_submit_request() 247 if (request->mock.delay) in mock_submit_request() 249 jiffies + request->mock.delay); in mock_submit_request() [all …]
|
D | selftest_execlists.c | 2788 rq->mock.link.next = &(*prev)->mock.link; in create_gang() 3024 struct i915_request *n = list_next_entry(rq, mock.link); in live_preempt_gang()
|
/drivers/gpu/drm/i915/selftests/ |
D | i915_selftest.c | 71 int (*mock)(void); member 76 #define selftest(n, f) [mock_##n] = { .name = #n, { .mock = f } }, 163 err = st->mock(); in __run_selftests() 185 if (!i915_selftest.mock) in i915_mock_selftests() 188 err = run_selftests(mock, NULL); in i915_mock_selftests() 190 i915_selftest.mock = err; in i915_mock_selftests() 194 if (i915_selftest.mock < 0) { in i915_mock_selftests() 195 i915_selftest.mock = -ENOTTY; in i915_mock_selftests() 433 module_param_named_unsafe(mock_selftests, i915_selftest.mock, int, 0400);
|
D | mock_request.c | 40 request->mock.delay = delay; in mock_request() 51 was_queued = !list_empty(&request->mock.link); in mock_cancel_request() 52 list_del_init(&request->mock.link); in mock_cancel_request()
|
/drivers/net/dsa/ |
D | Kconfig | 20 tristate "DSA mock-up Ethernet switch chip support" 23 This enables support for a fake mock-up switch chip which
|
/drivers/gpu/drm/i915/ |
D | i915_selftest.h | 37 int mock; member
|
D | i915_request.h | 354 } mock;)
|