aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2022-04-20 13:44:59 +0200
committerMaxime Ripard <maxime@cerno.tech>2022-04-21 09:01:12 +0200
commitc3c2f38ce532c6d3efa13e2aaa9d5d52396518b1 (patch)
tree9171a934187ba63bdb15e002f73aa30b29f75999 /drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
parent40d8d4bd06720aed6c1125bab7296c57de4f1157 (diff)
downloadlinux-c3c2f38ce532c6d3efa13e2aaa9d5d52396518b1.tar.gz
linux-c3c2f38ce532c6d3efa13e2aaa9d5d52396518b1.tar.bz2
linux-c3c2f38ce532c6d3efa13e2aaa9d5d52396518b1.zip
drm/vc4: hdmi: Replace drm_detect_hdmi_monitor() with is_hdmi
Once EDID is parsed, the monitor HDMI support information is cached in drm_display_info.is_hdmi by drm_parse_hdmi_vsdb_video(). This driver calls drm_detect_hdmi_monitor() to receive the same information and stores its own cached value in vc4_hdmi_encoder.hdmi_monitor, which is less efficient. Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi instead. This also allows to remove vc4_hdmi_encoder.hdmi_monitor. drm_detect_hdmi_monitor() is called in vc4_hdmi_connector_detect() and vc4_hdmi_connector_get_modes(). In both cases it is safe to rely on drm_display_info.is_hdmi as shown by ftrace: $ sudo trace-cmd record -p function_graph -l "vc4_hdmi_*" -l "drm_*" vc4_hdmi_connector_detect: vc4_hdmi_connector_detect() { drm_get_edid() { drm_connector_update_edid_property() { drm_add_display_info() { drm_reset_display_info(); drm_for_each_detailed_block.part.0(); drm_parse_cea_ext() { drm_find_cea_extension(); drm_parse_hdmi_vsdb_video(); /* drm_display_info.is_hdmi is cached here */ } } } } /* drm_display_info.is_hdmi is used here */ } vc4_hdmi_connector_get_modes: vc4_hdmi_connector_get_modes() { drm_get_edid() { drm_connector_update_edid_property() { drm_add_display_info() { drm_reset_display_info(); drm_for_each_detailed_block.part.0(); drm_parse_cea_ext() { drm_find_cea_extension(); drm_parse_hdmi_vsdb_video(); /* drm_display_info.is_hdmi is cached here */ } } } } /* drm_display_info.is_hdmi is used here */ drm_connector_update_edid_property(); } Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220420114500.187664-2-jose.exposito89@gmail.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c')
0 files changed, 0 insertions, 0 deletions