Skip to content

replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

Claudio Suarez amd-gfx dri-devel intel-gfx linux-arm-msm linux-tegra nouveau 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 18 repliesIn review
  2. v115 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- no helper function
- A separate patch is made for amdgpu
- zte patch is removed because that driver no longer exists

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13gpu/drm: make drm_add_edid_modes() consistent when updating connector->display_infodrivers/gpu/drm/drm_edid.c+5 -63 replies
2/13drm/vc4: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/vc4/vc4_hdmi.c+3 -30 replies
3/13drm/radeon: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/radeon/atombios_encoders.c drivers/gpu/drm/radeon/radeon_connectors.c drivers/gpu/drm/radeon/radeon_display.c +1 more+15 -120 replies
4/13drm/tegra: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/tegra/hdmi.c+1 -50 replies
5/13drm/gma500: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/gma500/cdv_intel_hdmi.c drivers/gpu/drm/gma500/psb_intel_sdvo.c+6 -30 replies
6/13drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/exynos/exynos_hdmi.c+4 -23 replies
7/13drm/msm: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/msm/hdmi/hdmi_connector.c+1 -11 reply
8/13drm/sun4i: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/sun4i/sun4i_hdmi_enc.c+2 -20 replies
9/13drm/sti: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/sti/sti_hdmi.c+6 -40 replies
10/13drm/rockchip: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/rockchip/inno_hdmi.c drivers/gpu/drm/rockchip/rk3066_hdmi.c+3 -30 replies
11/13drm/bridge: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/bridge/adv7511/adv7511_drv.c drivers/gpu/drm/bridge/sii902x.c drivers/gpu/drm/bridge/synopsys/dw-hdmi.c+3 -30 replies
12/13drm/nouveau: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/nouveau/dispnv50/disp.c drivers/gpu/drm/nouveau/dispnv50/head.c+3 -90 replies
13/13drm/i915: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmidrivers/gpu/drm/i915/display/intel_hdmi.c drivers/gpu/drm/i915/display/intel_sdvo.c+3 -29 replies

Reviews trailers per patch

3 of 13 patches have a Reviewed-by or Acked-by.

PatchVille SyrjäläInki DaeDmitry Baryshkov
1/13R-b
2/13
3/13
4/13
5/13
6/13A-b
7/13R-b
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/13] replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

Changelog:
v2:
- no helper function
- A separate patch is made for amdgpu
- zte patch is removed because that driver no longer exists

[Why]
Copy&paste from Documentation/gpu/todo.rst
===
Replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
---------------------------------------------------------------

Once EDID is parsed, the monitor HDMI support information is available through drm_display_info.is_hdmi. Many drivers still call drm_detect_hdmi_monitor() to retrieve the same information, which is less efficient.

Audit each individual driver calling drm_detect_hdmi_monitor() and switch to drm_display_info.is_hdmi if applicable.
=====

[How]
I did it in two steps:
- check that drm_display_info has a correct value.
- in that case, replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

Almost all occurrences of drm_detect_hdmi_monitor() could be changed. Some small inconsistencies have been solved.

Stats:

 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |  2 +-
 drivers/gpu/drm/bridge/sii902x.c             |  2 +-
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c    |  2 +-
 drivers/gpu/drm/drm_edid.c                   | 11 +++++------
 drivers/gpu/drm/exynos/exynos_hdmi.c         |  6 ++++--
 drivers/gpu/drm/gma500/cdv_intel_hdmi.c      |  3 ++-
 drivers/gpu/drm/gma500/psb_intel_sdvo.c      |  6 ++++--
 drivers/gpu/drm/i915/display/intel_hdmi.c    |  2 +-
 drivers/gpu/drm/i915/display/intel_sdvo.c    |  3 ++-
 drivers/gpu/drm/msm/hdmi/hdmi_connector.c    |  2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c      |  4 ++--
 drivers/gpu/drm/nouveau/dispnv50/head.c      |  8 +-------
 drivers/gpu/drm/radeon/atombios_encoders.c   |  6 +++---
 drivers/gpu/drm/radeon/radeon_connectors.c   | 15 +++++++++------
 drivers/gpu/drm/radeon/radeon_display.c      |  2 +-
 drivers/gpu/drm/radeon/radeon_encoders.c     |  4 ++--
 drivers/gpu/drm/rockchip/inno_hdmi.c         |  4 ++--
 drivers/gpu/drm/rockchip/rk3066_hdmi.c       |  2 +-
 drivers/gpu/drm/sti/sti_hdmi.c               | 10 ++++++----
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c       |  4 ++--
 drivers/gpu/drm/tegra/hdmi.c                 |  6 +-----
 drivers/gpu/drm/vc4/vc4_hdmi.c               |  6 +++---
 22 files changed, 55 insertions(+), 55 deletions(-)

Best regards.
Claudio Suarez