]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: update connector->display_info after read edid
authorHersen Wu <hersenxs.wu@amd.com>
Thu, 13 Feb 2020 17:44:35 +0000 (12:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Mar 2020 04:03:03 +0000 (00:03 -0400)
[Why]
drm_connector->display_info is not passed to amdgpu_dm right way after
read edid.

[How]
display_info is parsed from edid and saved into drm_connector by
drm_connector_update_edid_proerty which is called within
amdgpu_dm_update_connector_after_detect. call this function after read
edid to update drm_connector->display_info

Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

index 40f9da1f3e327da45438ce6bfa8a35279e393d3a..8142e83486641b103320e980ee9d49398cbcf231 100644 (file)
@@ -132,9 +132,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev);
 /* removes and deallocates the drm structures, created by the above function */
 static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm);
 
-static void
-amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector);
-
 static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
                                struct drm_plane *plane,
                                unsigned long possible_crtcs,
@@ -1897,8 +1894,8 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
        caps->aux_min_input_signal = min;
 }
 
-static void
-amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector)
+void amdgpu_dm_update_connector_after_detect(
+               struct amdgpu_dm_connector *aconnector)
 {
        struct drm_connector *connector = &aconnector->base;
        struct drm_device *dev = connector->dev;
index 2bec5e6a3054455b3b6d74f3d4e72607f20c2dba..5cab3e65d9925e6baf89cdadc19bae3c892e356d 100644 (file)
@@ -483,6 +483,9 @@ int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state *crtc);
 int amdgpu_dm_update_plane_color_mgmt(struct dm_crtc_state *crtc,
                                      struct dc_plane_state *dc_plane_state);
 
+void amdgpu_dm_update_connector_after_detect(
+               struct amdgpu_dm_connector *aconnector);
+
 extern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs;
 
 #endif /* __AMDGPU_DM_H__ */
index 2f2b0eb4ebcd922d0c3b9f823beb73598fcb81c4..c20fb08c450be4489f020a1030d20c9fa3791cae 100644 (file)
@@ -580,6 +580,20 @@ enum dc_edid_status dm_helpers_read_local_edid(
                /* We don't need the original edid anymore */
                kfree(edid);
 
+               /* connector->display_info will be parsed from EDID and saved
+                * into drm_connector->display_info from edid by call stack
+                * below:
+                * drm_parse_ycbcr420_deep_color_info
+                * drm_parse_hdmi_forum_vsdb
+                * drm_parse_cea_ext
+                * drm_add_display_info
+                * drm_connector_update_edid_property
+                *
+                * drm_connector->display_info will be used by amdgpu_dm funcs,
+                * like fill_stream_properties_from_drm_display_mode
+                */
+               amdgpu_dm_update_connector_after_detect(aconnector);
+
                edid_status = dm_helpers_parse_edid_caps(
                                                ctx,
                                                &sink->dc_edid,