Commit c437b9d6 authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/amdgpu: Move init flag to after init in sw_init() (DCEv11)

Don't set config_init to true until all config statements pass.
Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bcc71beb
...@@ -2978,8 +2978,6 @@ static int dce_v11_0_sw_init(void *handle) ...@@ -2978,8 +2978,6 @@ static int dce_v11_0_sw_init(void *handle)
if (r) if (r)
return r; return r;
adev->mode_info.mode_config_initialized = true;
adev->ddev->mode_config.funcs = &amdgpu_mode_funcs; adev->ddev->mode_config.funcs = &amdgpu_mode_funcs;
adev->ddev->mode_config.max_width = 16384; adev->ddev->mode_config.max_width = 16384;
...@@ -2997,6 +2995,7 @@ static int dce_v11_0_sw_init(void *handle) ...@@ -2997,6 +2995,7 @@ static int dce_v11_0_sw_init(void *handle)
adev->ddev->mode_config.max_width = 16384; adev->ddev->mode_config.max_width = 16384;
adev->ddev->mode_config.max_height = 16384; adev->ddev->mode_config.max_height = 16384;
/* allocate crtcs */ /* allocate crtcs */
for (i = 0; i < adev->mode_info.num_crtc; i++) { for (i = 0; i < adev->mode_info.num_crtc; i++) {
r = dce_v11_0_crtc_init(adev, i); r = dce_v11_0_crtc_init(adev, i);
...@@ -3018,7 +3017,8 @@ static int dce_v11_0_sw_init(void *handle) ...@@ -3018,7 +3017,8 @@ static int dce_v11_0_sw_init(void *handle)
drm_kms_helper_poll_init(adev->ddev); drm_kms_helper_poll_init(adev->ddev);
return r; adev->mode_info.mode_config_initialized = true;
return 0;
} }
static int dce_v11_0_sw_fini(void *handle) static int dce_v11_0_sw_fini(void *handle)
......
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