diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-07-31 10:47:10 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-07-31 10:47:10 +0000 |
commit | de4833221f9be663e163cf8a30ad20199ef44e3f (patch) | |
tree | ac0d3f6d2c0ccc6c616f2341b3ac5b48d928fe71 | |
parent | e1f46e7359e92402fe97a8ce3cf50c6238a0869c (diff) |
drm/amd/display: Always allocate initial connector state state
From Nicholas Kazlauskas
11b4e9f3695c155f71cb2bc56d761284bf5e65b1 in linux 4.19.y/4.19.63
f04bee34d6e35df26cbb2d65e801adfd0d8fe20d in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 05fd91cdf15..aea345ed92b 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3648,6 +3648,13 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm, { struct amdgpu_device *adev = dm->ddev->dev_private; + /* + * Some of the properties below require access to state, like bpc. + * Allocate some default initial connector state with our reset helper. + */ + if (aconnector->base.funcs->reset) + aconnector->base.funcs->reset(&aconnector->base); + aconnector->connector_id = link_index; aconnector->dc_link = link; aconnector->base.interlace_allowed = false; @@ -3817,9 +3824,6 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm, &aconnector->base, &amdgpu_dm_connector_helper_funcs); - if (aconnector->base.funcs->reset) - aconnector->base.funcs->reset(&aconnector->base); - amdgpu_dm_connector_init_helper( dm, aconnector, |