Lines Matching +full:cmd +full:- +full:max +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0
24 struct drm_mode_fb_cmd2 cmd; member
25 const char *name; member
29 { .buffer_created = 1, .name = "ABGR8888 normal sizes",
30 .cmd = { .width = 600, .height = 600, .pixel_format = DRM_FORMAT_ABGR8888,
34 { .buffer_created = 1, .name = "ABGR8888 max sizes",
35 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
39 { .buffer_created = 1, .name = "ABGR8888 pitch greater than min required",
40 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
44 { .buffer_created = 0, .name = "ABGR8888 pitch less than min required",
45 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
46 .handles = { 1, 0, 0 }, .pitches = { 4 * MAX_WIDTH - 1, 0, 0 },
49 { .buffer_created = 0, .name = "ABGR8888 Invalid width",
50 .cmd = { .width = MAX_WIDTH + 1, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
54 { .buffer_created = 0, .name = "ABGR8888 Invalid buffer handle",
55 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
59 { .buffer_created = 0, .name = "No pixel format",
60 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = 0,
64 { .buffer_created = 0, .name = "ABGR8888 Width 0",
65 .cmd = { .width = 0, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
69 { .buffer_created = 0, .name = "ABGR8888 Height 0",
70 .cmd = { .width = MAX_WIDTH, .height = 0, .pixel_format = DRM_FORMAT_ABGR8888,
74 { .buffer_created = 0, .name = "ABGR8888 Out of bound height * pitch combination",
75 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
76 .handles = { 1, 0, 0 }, .offsets = { UINT_MAX - 1, 0, 0 },
80 { .buffer_created = 1, .name = "ABGR8888 Large buffer offset",
81 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
86 { .buffer_created = 1, .name = "ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers",
87 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
92 { .buffer_created = 1, .name = "ABGR8888 Valid buffer modifier",
93 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
100 .name = "ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)",
101 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
107 { .buffer_created = 1, .name = "ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS",
108 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
113 { .buffer_created = 0, .name = "ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS",
114 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_ABGR8888,
119 { .buffer_created = 1, .name = "NV12 Normal sizes",
120 .cmd = { .width = 600, .height = 600, .pixel_format = DRM_FORMAT_NV12,
124 { .buffer_created = 1, .name = "NV12 Max sizes",
125 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
129 { .buffer_created = 0, .name = "NV12 Invalid pitch",
130 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
131 .handles = { 1, 1, 0 }, .pitches = { MAX_WIDTH, MAX_WIDTH - 1, 0 },
134 { .buffer_created = 0, .name = "NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag",
135 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
140 { .buffer_created = 0, .name = "NV12 different modifier per-plane",
141 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
147 { .buffer_created = 1, .name = "NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE",
148 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
155 { .buffer_created = 0, .name = "NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS",
156 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
162 { .buffer_created = 0, .name = "NV12 Modifier for inexistent plane",
163 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
170 { .buffer_created = 0, .name = "NV12 Handle for inexistent plane",
171 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_NV12,
176 { .buffer_created = 1, .name = "NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS",
177 .cmd = { .width = 600, .height = 600, .pixel_format = DRM_FORMAT_NV12,
181 { .buffer_created = 1, .name = "YVU420 DRM_MODE_FB_MODIFIERS set without modifier",
182 .cmd = { .width = 600, .height = 600, .pixel_format = DRM_FORMAT_YVU420,
187 { .buffer_created = 1, .name = "YVU420 Normal sizes",
188 .cmd = { .width = 600, .height = 600, .pixel_format = DRM_FORMAT_YVU420,
192 { .buffer_created = 1, .name = "YVU420 Max sizes",
193 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
198 { .buffer_created = 0, .name = "YVU420 Invalid pitch",
199 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
200 .handles = { 1, 1, 1 }, .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2) - 1,
204 { .buffer_created = 1, .name = "YVU420 Different pitches",
205 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
210 { .buffer_created = 1, .name = "YVU420 Different buffer offsets/pitches",
211 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
219 .name = "YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS",
220 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
226 .name = "YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS",
227 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
234 .name = "YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS",
235 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
241 { .buffer_created = 1, .name = "YVU420 Valid modifier",
242 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
249 { .buffer_created = 0, .name = "YVU420 Different modifiers per plane",
250 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
257 { .buffer_created = 0, .name = "YVU420 Modifier for inexistent plane",
258 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_YVU420,
265 { .buffer_created = 1, .name = "X0L2 Normal sizes",
266 .cmd = { .width = 600, .height = 600, .pixel_format = DRM_FORMAT_X0L2,
270 { .buffer_created = 1, .name = "X0L2 Max sizes",
271 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_X0L2,
275 { .buffer_created = 0, .name = "X0L2 Invalid pitch",
276 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_X0L2,
277 .handles = { 1, 0, 0 }, .pitches = { 2 * MAX_WIDTH - 1, 0, 0 }
280 { .buffer_created = 1, .name = "X0L2 Pitch greater than minimum required",
281 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_X0L2,
285 { .buffer_created = 0, .name = "X0L2 Handle for inexistent plane",
286 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_X0L2,
292 .name = "X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set",
293 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_X0L2,
298 { .buffer_created = 0, .name = "X0L2 Modifier without DRM_MODE_FB_MODIFIERS set",
299 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_X0L2,
304 { .buffer_created = 1, .name = "X0L2 Valid modifier",
305 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT, .pixel_format = DRM_FORMAT_X0L2,
310 { .buffer_created = 0, .name = "X0L2 Modifier for inexistent plane",
311 .cmd = { .width = MAX_WIDTH, .height = MAX_HEIGHT,
324 int *buffer_created = dev->dev_private; in fb_create_mock()
326 return ERR_PTR(-EINVAL); in fb_create_mock()
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()
352 const struct drm_framebuffer_test *params = test->param_value; in drm_test_framebuffer_create()
353 struct drm_device *mock = test->priv; in drm_test_framebuffer_create()
356 mock->dev_private = &buffer_created; in drm_test_framebuffer_create()
357 drm_internal_framebuffer_create(mock, ¶ms->cmd, NULL); in drm_test_framebuffer_create()
358 KUNIT_EXPECT_EQ(test, params->buffer_created, buffer_created); in drm_test_framebuffer_create()
363 strcpy(desc, t->name); in drm_framebuffer_test_to_desc()
375 .name = "drm_framebuffer",