Skip to content

Commit c499f6c

Browse files
icklejnikula
authored andcommitted
drm/i915: Copy default modparams to mock i915_device
Since we use the module parameters stored inside the drm_i915_device itself, we need to ensure the mock i915_device also sets up the right defaults. Fixes: 8a25c4b ("drm/i915/params: switch to device specific parameters") Signed-off-by: Chris Wilson <[email protected]> Cc: Jani Nikula <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]> (cherry picked from commit 98ef067) Signed-off-by: Jani Nikula <[email protected]>
1 parent df3ab3c commit c499f6c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/i915/selftests/mock_gem_device.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ static void mock_device_release(struct drm_device *dev)
7878
drm_mode_config_cleanup(&i915->drm);
7979

8080
out:
81+
i915_params_free(&i915->params);
8182
put_device(&i915->drm.pdev->dev);
8283
i915->drm.pdev = NULL;
8384
}
@@ -165,6 +166,8 @@ struct drm_i915_private *mock_gem_device(void)
165166
i915->drm.pdev = pdev;
166167
drmm_add_final_kfree(&i915->drm, i915);
167168

169+
i915_params_copy(&i915->params, &i915_modparams);
170+
168171
intel_runtime_pm_init_early(&i915->runtime_pm);
169172

170173
/* Using the global GTT may ask questions about KMS users, so prepare */

0 commit comments

Comments
 (0)