Commit a49dcb88 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Use amdgpu mode funcs statically

No need to assign them dynamically. This is much more readable.
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3853c184
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "vid.h" #include "vid.h"
#include "amdgpu.h" #include "amdgpu.h"
#include "amdgpu_display.h"
#include "atom.h" #include "atom.h"
#include "amdgpu_dm.h" #include "amdgpu_dm.h"
#include "amdgpu_dm_types.h" #include "amdgpu_dm_types.h"
...@@ -715,6 +716,8 @@ const struct amdgpu_ip_block_version dm_ip_block = ...@@ -715,6 +716,8 @@ const struct amdgpu_ip_block_version dm_ip_block =
/* TODO: it is temporary non-const, should fixed later */ /* TODO: it is temporary non-const, should fixed later */
static struct drm_mode_config_funcs amdgpu_dm_mode_funcs = { static struct drm_mode_config_funcs amdgpu_dm_mode_funcs = {
.fb_create = amdgpu_user_framebuffer_create,
.output_poll_changed = amdgpu_output_poll_changed,
.atomic_check = amdgpu_dm_atomic_check, .atomic_check = amdgpu_dm_atomic_check,
.atomic_commit = amdgpu_dm_atomic_commit .atomic_commit = amdgpu_dm_atomic_commit
}; };
...@@ -1088,11 +1091,6 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev) ...@@ -1088,11 +1091,6 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev)
adev->mode_info.mode_config_initialized = true; adev->mode_info.mode_config_initialized = true;
amdgpu_dm_mode_funcs.fb_create =
amdgpu_mode_funcs.fb_create;
amdgpu_dm_mode_funcs.output_poll_changed =
amdgpu_mode_funcs.output_poll_changed;
adev->ddev->mode_config.funcs = (void *)&amdgpu_dm_mode_funcs; adev->ddev->mode_config.funcs = (void *)&amdgpu_dm_mode_funcs;
adev->ddev->mode_config.max_width = 16384; adev->ddev->mode_config.max_width = 16384;
......
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