Commit 98ef0674 authored by Chris Wilson's avatar Chris Wilson Committed by Rodrigo Vivi

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: 8a25c4be ("drm/i915/params: switch to device specific parameters")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200728150600.4509-1-chris@chris-wilson.co.ukSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 2982ded2
...@@ -77,6 +77,7 @@ static void mock_device_release(struct drm_device *dev) ...@@ -77,6 +77,7 @@ static void mock_device_release(struct drm_device *dev)
drm_mode_config_cleanup(&i915->drm); drm_mode_config_cleanup(&i915->drm);
out: out:
i915_params_free(&i915->params);
put_device(&i915->drm.pdev->dev); put_device(&i915->drm.pdev->dev);
i915->drm.pdev = NULL; i915->drm.pdev = NULL;
} }
...@@ -159,6 +160,8 @@ struct drm_i915_private *mock_gem_device(void) ...@@ -159,6 +160,8 @@ struct drm_i915_private *mock_gem_device(void)
i915->drm.pdev = pdev; i915->drm.pdev = pdev;
drmm_add_final_kfree(&i915->drm, i915); drmm_add_final_kfree(&i915->drm, i915);
i915_params_copy(&i915->params, &i915_modparams);
intel_runtime_pm_init_early(&i915->runtime_pm); intel_runtime_pm_init_early(&i915->runtime_pm);
/* Using the global GTT may ask questions about KMS users, so prepare */ /* Using the global GTT may ask questions about KMS users, so prepare */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment