Commit 4d5d8bc
committed
drm/vc4: tests: Patch up the vc4 kunit tests
Commit [1] removed the dynamic allocation of drm_modeset_acquire_ctx
structures, with clients expected to allocate them by other means,
such as on the stack. This usage model works less well when tests
are split into separate initialisation and run phases, because
a ctx allocated on the stack in the init function will go out of
scope and likely be overwritten by the run function(s).
As kunit tests seem to be single threaded, make ctx static to avoid
the issue.
[1] commit 30188df ("drm/tests: Drop drm_kunit_helper_acquire_ctx_alloc()")
Signed-off-by: Phil Elwell <phil@raspberrypi.com>1 parent 6936a2c commit 4d5d8bc
File tree
2 files changed
+7
-5
lines changed- drivers/gpu/drm/vc4/tests
2 files changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
| 298 | + | |
300 | 299 | | |
301 | 300 | | |
302 | | - | |
| 301 | + | |
303 | 302 | | |
304 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
| 810 | + | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| |||
0 commit comments