drm: Introduce display-helper library
Subsystems (33)
Thomas Zimmermann
maintainercover drm: Introduce display-helper library
Move DisplayPort, HDMI and various other display helpers from KMS helpers into a new module. Adapt all drivers.
This patch is part of an on-going effort to reduce the minimum size of DRM when linked into the kernel binary. The helpers for various display and video-output standards are not required for minimal graphics output and can be moved into a separate module.
The DisplayPort code was already part of the DP module, which now forms the base of the display-helper module. Moving other helpers into the new module reduces KMS helpers by ~14 KiB (from 243 KiB to 229 KiB). More importantly, restructuring the code allows for a more fine-grained selection of helpers and dependencies.
Built on x64-64, i586, aarch64, and arm.
Thomas Zimmermann (8):
drm: Put related statements next to each other in Makefile
drm: Rename dp/ to display/
drm/display: Introduce a DRM display-helper module drm/display: Split DisplayPort header into core and helper drm/display: Move DSC header and helpers into display-helper module drm/display: Move HDCP helpers into display-helper module drm/display: Move HDMI helpers into display-helper module drm/display: Move SCDC helpers into display-helper library
Documentation/gpu/drm-kms-helpers.rst | 43 +-
drivers/gpu/drm/Kconfig | 23 +
drivers/gpu/drm/Makefile | 29 +-
.../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 +-
drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 +-
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 +
drivers/gpu/drm/amd/display/Kconfig | 1 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +-
.../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 2 +-
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 +-
.../drm/amd/display/dc/core/dc_link_dpcd.c | 2 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 +
.../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 2 +-
.../drm/amd/display/dc/dml/dsc/rc_calc_fpu.h | 2 +-
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 4 +-
.../gpu/drm/amd/display/dc/dsc/dscc_types.h | 2 +-
.../gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c | 2 +-
drivers/gpu/drm/amd/display/dc/os_types.h | 2 +-
.../gpu/drm/amd/display/include/dpcd_defs.h | 2 +-
.../gpu/drm/amd/display/modules/hdcp/hdcp.h | 4 +-
drivers/gpu/drm/bridge/Kconfig | 5 +
drivers/gpu/drm/bridge/analogix/Kconfig | 2 +
.../drm/bridge/analogix/analogix-anx6345.c | 2 +-
.../drm/bridge/analogix/analogix-anx78xx.c | 4 +-
.../drm/bridge/analogix/analogix-i2c-dptx.c | 2 +-
.../drm/bridge/analogix/analogix_dp_core.h | 2 +-
drivers/gpu/drm/bridge/analogix/anx7625.c | 6 +-
drivers/gpu/drm/bridge/cadence/Kconfig | 1 +
.../drm/bridge/cadence/cdns-mhdp8546-core.c | 4 +-
.../drm/bridge/cadence/cdns-mhdp8546-core.h | 2 +-
.../drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 2 +-
drivers/gpu/drm/bridge/ite-it6505.c | 4 +-
drivers/gpu/drm/bridge/parade-ps8640.c | 4 +-
drivers/gpu/drm/bridge/sii902x.c | 2 +-
drivers/gpu/drm/bridge/sil-sii8620.c | 2 +-
drivers/gpu/drm/bridge/synopsys/Kconfig | 1 +
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +-
drivers/gpu/drm/bridge/tc358767.c | 2 +-
drivers/gpu/drm/bridge/tc358775.c | 2 +-
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 +-
drivers/gpu/drm/display/Makefile | 13 +
.../drm_display_helper_mod.c} | 10 +-
.../gpu/drm/{dp => display}/drm_dp_aux_bus.c | 4 +-
.../gpu/drm/{dp => display}/drm_dp_aux_dev.c | 4 +-
drivers/gpu/drm/{dp => display}/drm_dp_cec.c | 2 +-
.../{dp => display}/drm_dp_dual_mode_helper.c | 2 +-
.../{dp/drm_dp.c => display/drm_dp_helper.c} | 4 +-
.../{dp => display}/drm_dp_helper_internal.h | 0
.../drm/{dp => display}/drm_dp_mst_topology.c | 2 +-
.../drm_dp_mst_topology_internal.h | 2 +-
.../{drm_dsc.c => display/drm_dsc_helper.c} | 5 +-
.../{drm_hdcp.c => display/drm_hdcp_helper.c} | 4 +-
drivers/gpu/drm/display/drm_hdmi_helper.c | 463 +++++++++++
.../gpu/drm/{ => display}/drm_scdc_helper.c | 3 +-
drivers/gpu/drm/dp/Makefile | 9 -
drivers/gpu/drm/drm_connector.c | 34 -
drivers/gpu/drm/drm_edid.c | 439 +----------
drivers/gpu/drm/drm_mipi_dsi.c | 6 +-
drivers/gpu/drm/exynos/Kconfig | 1 +
drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +-
drivers/gpu/drm/gma500/intel_bios.c | 3 +-
drivers/gpu/drm/hdmi/Makefile | 4 +
drivers/gpu/drm/i2c/Kconfig | 1 +
drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
drivers/gpu/drm/i915/Kconfig | 2 +
drivers/gpu/drm/i915/display/icl_dsi.c | 1 +
drivers/gpu/drm/i915/display/intel_bios.c | 3 +-
drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
drivers/gpu/drm/i915/display/intel_display.c | 2 +-
.../drm/i915/display/intel_display_types.h | 6 +-
drivers/gpu/drm/i915/display/intel_dp.c | 5 +-
drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 6 +-
.../drm/i915/display/intel_dp_link_training.h | 2 +-
drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +-
drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +-
drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +-
drivers/gpu/drm/i915/display/intel_lspcon.c | 4 +-
.../gpu/drm/i915/display/intel_qp_tables.c | 2 +-
drivers/gpu/drm/i915/display/intel_sdvo.c | 1 +
drivers/gpu/drm/i915/display/intel_vdsc.c | 2 +
drivers/gpu/drm/mediatek/Kconfig | 1 +
drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +-
drivers/gpu/drm/msm/Kconfig | 1 +
drivers/gpu/drm/msm/dp/dp_audio.c | 2 +-
drivers/gpu/drm/msm/dp/dp_aux.h | 2 +-
drivers/gpu/drm/msm/dp/dp_catalog.c | 2 +-
drivers/gpu/drm/msm/dp/dp_ctrl.c | 3 +-
drivers/gpu/drm/msm/edp/edp.h | 3 +-
drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 +-
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +
drivers/gpu/drm/nouveau/Kconfig | 1 +
drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 +-
drivers/gpu/drm/nouveau/nouveau_connector.h | 2 +-
drivers/gpu/drm/nouveau/nouveau_dp.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_encoder.h | 6 +-
drivers/gpu/drm/omapdrm/Kconfig | 2 +
drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 +
drivers/gpu/drm/panel/panel-edp.c | 4 +-
.../gpu/drm/panel/panel-samsung-atna33xc20.c | 4 +-
drivers/gpu/drm/radeon/atombios_dp.c | 2 +-
drivers/gpu/drm/radeon/radeon_audio.c | 1 +
drivers/gpu/drm/radeon/radeon_connectors.c | 2 +-
drivers/gpu/drm/radeon/radeon_dp_mst.c | 2 +-
drivers/gpu/drm/radeon/radeon_mode.h | 4 +-
drivers/gpu/drm/rockchip/Kconfig | 2 +
.../gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +-
drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
drivers/gpu/drm/rockchip/cdn-dp-core.h | 2 +-
drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +-
drivers/gpu/drm/rockchip/rk3066_hdmi.c | 1 +
drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_rgb.c | 2 +-
.../drm/selftests/test-drm_dp_mst_helper.c | 4 +-
drivers/gpu/drm/sti/Kconfig | 1 +
drivers/gpu/drm/sti/sti_hdmi.c | 2 +-
drivers/gpu/drm/sun4i/Kconfig | 1 +
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 +-
drivers/gpu/drm/tegra/Kconfig | 1 +
drivers/gpu/drm/tegra/dp.c | 2 +-
drivers/gpu/drm/tegra/dpaux.c | 4 +-
drivers/gpu/drm/tegra/hdmi.c | 1 +
drivers/gpu/drm/tegra/sor.c | 5 +-
drivers/gpu/drm/vc4/Kconfig | 1 +
drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +-
drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
drivers/misc/mei/hdcp/mei_hdcp.h | 2 +-
.../{dp/drm_dp_helper.h => display/drm_dp.h} | 695 +----------------
include/drm/{dp => display}/drm_dp_aux_bus.h | 0
.../{dp => display}/drm_dp_dual_mode_helper.h | 0
include/drm/display/drm_dp_helper.h | 719 ++++++++++++++++++
.../drm/{dp => display}/drm_dp_mst_helper.h | 2 +-
include/drm/{ => display}/drm_dsc.h | 8 +-
include/drm/display/drm_dsc_helper.h | 20 +
include/drm/{ => display}/drm_hdcp.h | 14 +-
include/drm/display/drm_hdcp_helper.h | 22 +
include/drm/display/drm_hdmi_helper.h | 36 +
.../{drm_scdc_helper.h => display/drm_scdc.h} | 52 +-
include/drm/display/drm_scdc_helper.h | 79 ++
include/drm/drm_connector.h | 2 -
include/drm/drm_edid.h | 31 +-
include/drm/i915_mei_hdcp_interface.h | 2 +-
147 files changed, 1631 insertions(+), 1428 deletions(-)
create mode 100644 drivers/gpu/drm/display/Makefile
rename drivers/gpu/drm/{dp/drm_dp_helper_mod.c => display/drm_display_helper_mod.c} (51%)
rename drivers/gpu/drm/{dp => display}/drm_dp_aux_bus.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_aux_dev.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_cec.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_dual_mode_helper.c (99%)
rename drivers/gpu/drm/{dp/drm_dp.c => display/drm_dp_helper.c} (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_helper_internal.h (100%)
rename drivers/gpu/drm/{dp => display}/drm_dp_mst_topology.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_mst_topology_internal.h (94%)
rename drivers/gpu/drm/{drm_dsc.c => display/drm_dsc_helper.c} (99%)
rename drivers/gpu/drm/{drm_hdcp.c => display/drm_hdcp_helper.c} (99%)
create mode 100644 drivers/gpu/drm/display/drm_hdmi_helper.c
rename drivers/gpu/drm/{ => display}/drm_scdc_helper.c (99%)
delete mode 100644 drivers/gpu/drm/dp/Makefile
create mode 100644 drivers/gpu/drm/hdmi/Makefile
rename include/drm/{dp/drm_dp_helper.h => display/drm_dp.h} (74%)
rename include/drm/{dp => display}/drm_dp_aux_bus.h (100%)
rename include/drm/{dp => display}/drm_dp_dual_mode_helper.h (100%)
create mode 100644 include/drm/display/drm_dp_helper.h
rename include/drm/{dp => display}/drm_dp_mst_helper.h (99%)
rename include/drm/{ => display}/drm_dsc.h (97%)
create mode 100644 include/drm/display/drm_dsc_helper.h
rename include/drm/{ => display}/drm_hdcp.h (95%)
create mode 100644 include/drm/display/drm_hdcp_helper.h
create mode 100644 include/drm/display/drm_hdmi_helper.h
rename include/drm/{drm_scdc_helper.h => display/drm_scdc.h} (65%)
create mode 100644 include/drm/display/drm_scdc_helper.hbase-commit: fe83949cd4316608ea785fc376b6ed444224adad
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: 6e1032c6302461624f33194c8b8f37103a3fa6ef
Signature · 1 line
2.35.1
Thomas Zimmermann
maintainerPATCH 1/8 drm: Put related statements next to each other in Makefile
Give the Makefile a bit more structure by putting rules for core, helpers, drivers, etc next to each other.
--- drivers/gpu/drm/Makefile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/gpu/drm/Makefile +17 -6
@@ -18,7 +18,6 @@ drm-y := drm_aperture.o drm_auth.o drm_cache.o \ drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \ drm_client_modeset.o drm_atomic_uapi.o \ drm_managed.o drm_vblank_work.o - drm-$(CONFIG_DRM_LEGACY) += drm_agpsupport.o drm_bufs.o drm_context.o drm_dma.o \ drm_hashtab.o drm_irq.o drm_legacy_misc.o drm_lock.o \ drm_memory.o drm_scatter.o drm_vm.o
@@ -30,8 +29,16 @@ drm-$(CONFIG_PCI) += drm_pci.o drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86.o +obj-$(CONFIG_DRM) += drm.o obj-$(CONFIG_DRM_NOMODESET) += drm_nomodeset.o +obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o + +# +# Memory-management helpers +# + +obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o drm_cma_helper-y := drm_gem_cma_helper.o drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_cma_helper.o
@@ -40,14 +47,16 @@ obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o drm_shmem_helper-y := drm_gem_shmem_helper.o obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o -obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o - drm_vram_helper-y := drm_gem_vram_helper.o obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o drm_ttm_helper-y := drm_gem_ttm_helper.o obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o +# +# Modesetting helpers +# + drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ drm_dsc.o drm_encoder_slave.o drm_flip_work.o drm_hdcp.o \ drm_probe_helper.o \
@@ -60,14 +69,16 @@ drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ drm_format_helper.o drm_self_refresh_helper.o drm_rect.o drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o - obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o + +# +# Drivers and the rest +# + obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/ -obj-$(CONFIG_DRM) += drm.o obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o -obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o obj-y += arm/ obj-y += dp/ obj-$(CONFIG_DRM_TTM) += ttm/
Signature · 1 line
2.35.1
Jani Nikula
maintainerRe: [PATCH 1/8] drm: Put related statements next to each other in Makefile
Quoted 2 lines · Thomas Zimmermann
Give the
Makefilea bit more structure by putting rules for core, helpers, drivers, etc next to each other.
If you're up for it, I think it would be time to split these one per line, in alphabetical order, to make the diffs nicer:
drm-y := \ drm_aperture.o \ drm_auth.o \ ...
Sure it takes up a lot of vertical screen estate, but IMO makes life easier in the long run.
Definitely can be a follow-up, I don't really want to make the series harder to land than it already is.
BR,
Jani.
Quoted 74 lines
Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/Makefile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)drivers/gpu/drm/Makefile +17
-6@@ -18,7 +18,6 @@ drm-y := drm_aperture.o drm_auth.o drm_cache.o \ drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \ drm_client_modeset.o drm_atomic_uapi.o \ drm_managed.o drm_vblank_work.o - drm-$(CONFIG_DRM_LEGACY) += drm_agpsupport.o drm_bufs.o drm_context.o drm_dma.o \ drm_hashtab.o drm_irq.o drm_legacy_misc.o drm_lock.o \ drm_memory.o drm_scatter.o drm_vm.o@@ -30,8 +29,16 @@ drm-$(CONFIG_PCI) += drm_pci.o drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86.o +obj-$(CONFIG_DRM) += drm.o obj-$(CONFIG_DRM_NOMODESET) += drm_nomodeset.o +obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o + +# +# Memory-management helpers +# + +obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o drm_cma_helper-y := drm_gem_cma_helper.o drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_cma_helper.o@@ -40,14 +47,16 @@ obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o drm_shmem_helper-y := drm_gem_shmem_helper.o obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o -obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o - drm_vram_helper-y := drm_gem_vram_helper.o obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o drm_ttm_helper-y := drm_gem_ttm_helper.o obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o +# +# Modesetting helpers +# + drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ drm_dsc.o drm_encoder_slave.o drm_flip_work.o drm_hdcp.o \ drm_probe_helper.o \@@ -60,14 +69,16 @@ drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ drm_format_helper.o drm_self_refresh_helper.o drm_rect.o drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o - obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o + +# +# Drivers and the rest +# + obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/ -obj-$(CONFIG_DRM) += drm.o obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o -obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o obj-y += arm/ obj-y += dp/ obj-$(CONFIG_DRM_TTM) += ttm/
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [PATCH 1/8] drm: Put related statements next to each other in Makefile
In reply to Thomas ZimmermannHello Thomas,
Quoted 5 lines · Thomas Zimmermann
Give the
Makefilea bit more structure by putting rules for core, helpers, drivers, etc next to each other.Signed-off-by Thomas Zimmermann <[email protected]>---
This is a nice cleanup.
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat
Thomas Zimmermann
maintainerPATCH 2/8 drm: Rename dp/ to display/
In reply to Thomas ZimmermannRename dp/ to display/ to account for additional display-related helpers, such as HDMI. Update all related include statements. No functional changes.
Various drivers, such as i915 and amdgpu, use similar naming scheme by putting code for video-output standards into a local display/ directory. The new directory's name is aligned with that policy.
---
Documentation/gpu/drm-kms-helpers.rst | 26 +++++++++----------
drivers/gpu/drm/Makefile | 2 +-
.../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 +--
drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 ++-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +-
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 +--
.../drm/amd/display/dc/core/dc_link_dpcd.c | 2 +-
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 2 +-
drivers/gpu/drm/amd/display/dc/os_types.h | 2 +-
.../gpu/drm/amd/display/include/dpcd_defs.h | 2 +-
.../gpu/drm/amd/display/modules/hdcp/hdcp.h | 2 +-
.../drm/bridge/analogix/analogix-anx6345.c | 2 +-
.../drm/bridge/analogix/analogix-anx78xx.c | 2 +-
.../drm/bridge/analogix/analogix-i2c-dptx.c | 2 +-
.../drm/bridge/analogix/analogix_dp_core.h | 2 +-
drivers/gpu/drm/bridge/analogix/anx7625.c | 4 +--
.../drm/bridge/cadence/cdns-mhdp8546-core.c | 2 +-
.../drm/bridge/cadence/cdns-mhdp8546-core.h | 2 +-
drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
drivers/gpu/drm/bridge/parade-ps8640.c | 4 +--
drivers/gpu/drm/bridge/tc358767.c | 2 +-
drivers/gpu/drm/bridge/tc358775.c | 2 +-
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 +--
drivers/gpu/drm/{dp => display}/Makefile | 0
drivers/gpu/drm/{dp => display}/drm_dp.c | 4 +--
.../gpu/drm/{dp => display}/drm_dp_aux_bus.c | 4 +--
.../gpu/drm/{dp => display}/drm_dp_aux_dev.c | 4 +--
drivers/gpu/drm/{dp => display}/drm_dp_cec.c | 2 +-
.../{dp => display}/drm_dp_dual_mode_helper.c | 2 +-
.../{dp => display}/drm_dp_helper_internal.h | 0
.../drm/{dp => display}/drm_dp_helper_mod.c | 0
.../drm/{dp => display}/drm_dp_mst_topology.c | 2 +-
.../drm_dp_mst_topology_internal.h | 2 +-
drivers/gpu/drm/drm_dsc.c | 3 ++-
drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +-
drivers/gpu/drm/gma500/intel_bios.c | 3 ++-
drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
drivers/gpu/drm/i915/display/intel_display.c | 2 +-
.../drm/i915/display/intel_display_types.h | 4 +--
drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 4 +--
.../drm/i915/display/intel_dp_link_training.h | 2 +-
drivers/gpu/drm/i915/display/intel_lspcon.c | 2 +-
drivers/gpu/drm/msm/dp/dp_audio.c | 2 +-
drivers/gpu/drm/msm/dp/dp_aux.h | 2 +-
drivers/gpu/drm/msm/dp/dp_catalog.c | 2 +-
drivers/gpu/drm/msm/dp/dp_ctrl.c | 3 ++-
drivers/gpu/drm/msm/edp/edp.h | 3 ++-
drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 ++-
drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_connector.h | 2 +-
drivers/gpu/drm/nouveau/nouveau_dp.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_encoder.h | 6 +++--
drivers/gpu/drm/panel/panel-edp.c | 4 +--
.../gpu/drm/panel/panel-samsung-atna33xc20.c | 4 +--
drivers/gpu/drm/radeon/atombios_dp.c | 2 +-
drivers/gpu/drm/radeon/radeon_connectors.c | 2 +-
drivers/gpu/drm/radeon/radeon_dp_mst.c | 2 +-
drivers/gpu/drm/radeon/radeon_mode.h | 4 +--
.../gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +-
drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
drivers/gpu/drm/rockchip/cdn-dp-core.h | 2 +-
drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_rgb.c | 2 +-
.../drm/selftests/test-drm_dp_mst_helper.c | 4 +--
drivers/gpu/drm/tegra/dp.c | 2 +-
drivers/gpu/drm/tegra/dpaux.c | 4 +--
drivers/gpu/drm/tegra/sor.c | 2 +-
drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
include/drm/{dp => display}/drm_dp_aux_bus.h | 0
.../{dp => display}/drm_dp_dual_mode_helper.h | 0
include/drm/{dp => display}/drm_dp_helper.h | 0
.../drm/{dp => display}/drm_dp_mst_helper.h | 2 +-
include/drm/drm_dsc.h | 2 +-
76 files changed, 106 insertions(+), 98 deletions(-)
rename drivers/gpu/drm/{dp => display}/Makefile (100%)
rename drivers/gpu/drm/{dp => display}/drm_dp.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_aux_bus.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_aux_dev.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_cec.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_dual_mode_helper.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_helper_internal.h (100%)
rename drivers/gpu/drm/{dp => display}/drm_dp_helper_mod.c (100%)
rename drivers/gpu/drm/{dp => display}/drm_dp_mst_topology.c (99%)
rename drivers/gpu/drm/{dp => display}/drm_dp_mst_topology_internal.h (94%)
rename include/drm/{dp => display}/drm_dp_aux_bus.h (100%)
rename include/drm/{dp => display}/drm_dp_dual_mode_helper.h (100%)
rename include/drm/{dp => display}/drm_dp_helper.h (100%)
rename include/drm/{dp => display}/drm_dp_mst_helper.h (99%)Documentation/gpu/drm-kms-helpers.rst +13 -13
@@ -232,34 +232,34 @@ HDCP Helper Functions Reference Display Port Helper Functions Reference ======================================= -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c :doc: dp helpers -.. kernel-doc:: include/drm/dp/drm_dp_helper.h +.. kernel-doc:: include/drm/display/drm_dp_helper.h :internal: -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c :export: Display Port CEC Helper Functions Reference =========================================== -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_cec.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c :doc: dp cec helpers -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_cec.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_cec.c :export: Display Port Dual Mode Adaptor Helper Functions Reference ========================================================= -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_dual_mode_helper.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c :doc: dp dual mode helpers -.. kernel-doc:: include/drm/dp/drm_dp_dual_mode_helper.h +.. kernel-doc:: include/drm/display/drm_dp_dual_mode_helper.h :internal: -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_dual_mode_helper.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_dual_mode_helper.c :export: Display Port MST Helpers
@@ -268,19 +268,19 @@ Display Port MST Helpers Overview -------- -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_mst_topology.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c :doc: dp mst helper -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_mst_topology.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c :doc: Branch device and port refcounting Functions Reference ------------------- -.. kernel-doc:: include/drm/dp/drm_dp_mst_helper.h +.. kernel-doc:: include/drm/display/drm_dp_mst_helper.h :internal: -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_mst_topology.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c :export: Topology Lifetime Internals
@@ -289,7 +289,7 @@ Topology Lifetime Internals These functions aren't exported to drivers, but are documented here to help make the MST topology helpers easier to understand -.. kernel-doc:: drivers/gpu/drm/dp/drm_dp_mst_topology.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dp_mst_topology.c :functions: drm_dp_mst_topology_try_get_mstb drm_dp_mst_topology_get_mstb drm_dp_mst_topology_put_mstb drm_dp_mst_topology_try_get_port drm_dp_mst_topology_get_port
drivers/gpu/drm/Makefile +1 -1
@@ -80,7 +80,7 @@ obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/ obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o obj-y += arm/ -obj-y += dp/ +obj-y += display/ obj-$(CONFIG_DRM_TTM) += ttm/ obj-$(CONFIG_DRM_SCHED) += scheduler/ obj-$(CONFIG_DRM_TDFX) += tdfx/
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +1 -1
@@ -24,9 +24,9 @@* Alex Deucher */ +#include <drm/display/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_fb_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_probe_helper.h> #include <drm/amdgpu_drm.h> #include "amdgpu.h"
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +2 -2
@@ -30,10 +30,10 @@#ifndef AMDGPU_MODE_H #define AMDGPU_MODE_H +#include <drm/display/drm_dp_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h> #include <drm/drm_encoder.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_fixed.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h>
@@ -44,7 +44,7 @@#include <linux/hrtimer.h> #include "amdgpu_irq.h" -#include <drm/dp/drm_dp_mst_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include "modules/inc/mod_freesync.h" #include "amdgpu_dm_irq_params.h"
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +2 -1
@@ -26,6 +26,8 @@*/ #include <drm/amdgpu_drm.h> +#include <drm/display/drm_dp_helper.h> +#include "amdgpu.h" #include "atom.h"
@@ -34,7 +36,6 @@#include "atombios_dp.h" #include "amdgpu_connectors.h" #include "amdgpu_atombios.h" -#include <drm/dp/drm_dp_helper.h> /* move these to drm_dp_helper.c/h */ #define DP_LINK_CONFIGURATION_SIZE 9
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -73,10 +73,10 @@#include <linux/firmware.h> #include <linux/component.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_uapi.h> #include <drm/drm_atomic_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_edid.h>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -1
@@ -26,10 +26,10 @@#ifndef __AMDGPU_DM_H__#define __AMDGPU_DM_H__ +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_connector.h> #include <drm/drm_crtc.h> -#include <drm/dp/drm_dp_mst_helper.h> #include <drm/drm_plane.h> /*
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +2 -2
@@ -23,10 +23,10 @@* */ +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> -#include <drm/dp/drm_dp_helper.h> #include "dm_services.h" #include "amdgpu.h" #include "amdgpu_dm.h"
drivers/gpu/drm/amd/display/dc/core/dc_link_dpcd.c +1 -1
@@ -27,8 +27,8 @@#include <dc_link.h> #include <inc/link_hwss.h> #include <inc/link_dpcd.h> -#include <drm/dp/drm_dp_helper.h> #include <dc_dp_types.h> +#include <drm/display/drm_dp_helper.h> #include "dm_helpers.h" #define END_ADDRESS (start, size) (start + size - 1)
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +1 -1
@@ -25,7 +25,7 @@#include <drm/drm_dsc.h> #include "dc_hw_types.h" #include "dsc.h" -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include "dc.h" #include "rc_calc.h" #include "fixed31_32.h"
drivers/gpu/drm/amd/display/dc/os_types.h +1 -1
@@ -35,8 +35,8 @@#include <asm/byteorder.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_print.h> -#include <drm/dp/drm_dp_helper.h> #include "cgs_common.h"
drivers/gpu/drm/amd/display/include/dpcd_defs.h +1 -1
@@ -26,7 +26,7 @@#ifndef __DAL_DPCD_DEFS_H__#define __DAL_DPCD_DEFS_H__ -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #ifndef DP_SINK_HW_REVISION_START // can remove this once the define gets into linux drm_dp_helper.h #define DP_SINK_HW_REVISION_START 0x409#endif
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h +1 -1
@@ -29,8 +29,8 @@#include "mod_hdcp.h" #include "hdcp_log.h" +#include <drm/display/drm_dp_helper.h> #include <drm/drm_hdcp.h> -#include <drm/dp/drm_dp_helper.h> enum mod_hdcp_trans_input_result {UNKNOWN =0 ,
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +1 -1
@@ -18,11 +18,11 @@#include <linux/regulator/consumer.h> #include <linux/types.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +1 -1
@@ -18,10 +18,10 @@#include <linux/regulator/consumer.h> #include <linux/types.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c +1 -1
@@ -7,8 +7,8 @@*/ #include <linux/regmap.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_print.h> #include "analogix-i2c-dptx.h"
drivers/gpu/drm/bridge/analogix/analogix_dp_core.h +1 -1
@@ -9,8 +9,8 @@#ifndef _ANALOGIX_DP_CORE_H#define _ANALOGIX_DP_CORE_H +#include <drm/display/drm_dp_helper.h> #include <drm/drm_crtc.h> -#include <drm/dp/drm_dp_helper.h> #define DP_TIMEOUT_LOOP_COUNT 100#define MAX_CR_LOOP 5
drivers/gpu/drm/bridge/analogix/anx7625.c +2 -2
@@ -21,11 +21,11 @@#include <linux/of_graph.h> #include <linux/of_platform.h> +#include <drm/display/drm_dp_aux_bus.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc_helper.h> -#include <drm/dp/drm_dp_aux_bus.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_hdcp.h> #include <drm/drm_mipi_dsi.h>
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +1 -1
@@ -35,13 +35,13 @@#include <linux/slab.h> #include <linux/wait.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_state_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_connector.h> #include <drm/drm_crtc_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_hdcp.h> #include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_print.h>
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h +1 -1
@@ -15,9 +15,9 @@#include <linux/mutex.h> #include <linux/spinlock.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_connector.h> -#include <drm/dp/drm_dp_helper.h> struct clk ;struct device ;
drivers/gpu/drm/bridge/ite-it6505.c +1 -1
@@ -21,7 +21,7 @@#include <crypto/hash.h> -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h>
drivers/gpu/drm/bridge/parade-ps8640.c +2 -2
@@ -13,9 +13,9 @@#include <linux/regmap.h> #include <linux/regulator/consumer.h> +#include <drm/display/drm_dp_aux_bus.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_bridge.h> -#include <drm/dp/drm_dp_aux_bus.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/bridge/tc358767.c +1 -1
@@ -25,9 +25,9 @@#include <linux/regmap.h> #include <linux/slab.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/bridge/tc358775.c +1 -1
@@ -19,10 +19,10 @@#include <asm/unaligned.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/bridge/ti-sn65dsi86.c +2 -2
@@ -23,12 +23,12 @@#include <asm/unaligned.h> +#include <drm/display/drm_dp_aux_bus.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_bridge_connector.h> -#include <drm/dp/drm_dp_aux_bus.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/display/Makefile renamed from drivers/gpu/drm/dp/Makefile +0 -0
drivers/gpu/drm/display/drm_dp.c renamed from drivers/gpu/drm/dp/drm_dp.c +2 -2
@@ -30,10 +30,10 @@#include <linux/seq_file.h> #include <linux/string_helpers.h> -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_print.h> #include <drm/drm_vblank.h> -#include <drm/dp/drm_dp_mst_helper.h> #include <drm/drm_panel.h> #include "drm_dp_helper_internal.h"
drivers/gpu/drm/display/drm_dp_aux_bus.c renamed from drivers/gpu/drm/dp/drm_dp_aux_bus.c +2 -2
@@ -19,8 +19,8 @@#include <linux/pm_domain.h> #include <linux/pm_runtime.h> -#include <drm/dp/drm_dp_aux_bus.h> -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_aux_bus.h> +#include <drm/display/drm_dp_helper.h> /** * dp_aux_ep_match() - The match function for the dp_aux_bus.
drivers/gpu/drm/display/drm_dp_aux_dev.c renamed from drivers/gpu/drm/dp/drm_dp_aux_dev.c +2 -2
@@ -35,9 +35,9 @@#include <linux/uaccess.h> #include <linux/uio.h> +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_crtc.h> -#include <drm/dp/drm_dp_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> #include <drm/drm_print.h> #include "drm_dp_helper_internal.h"
drivers/gpu/drm/display/drm_dp_cec.c renamed from drivers/gpu/drm/dp/drm_dp_cec.c +1 -1
@@ -11,9 +11,9 @@#include <media/cec.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_connector.h> #include <drm/drm_device.h> -#include <drm/dp/drm_dp_helper.h> /* * Unfortunately it turns out that we have a chicken-and-egg situation
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c renamed from drivers/gpu/drm/dp/drm_dp_dual_mode_helper.c +1 -1
@@ -27,8 +27,8 @@#include <linux/slab.h> #include <linux/string.h> +#include <drm/display/drm_dp_dual_mode_helper.h> #include <drm/drm_device.h> -#include <drm/dp/drm_dp_dual_mode_helper.h> #include <drm/drm_print.h> /**
drivers/gpu/drm/display/drm_dp_helper_internal.h renamed from drivers/gpu/drm/dp/drm_dp_helper_internal.h +0 -0
drivers/gpu/drm/display/drm_dp_helper_mod.c renamed from drivers/gpu/drm/dp/drm_dp_helper_mod.c +0 -0
drivers/gpu/drm/display/drm_dp_mst_topology.c renamed from drivers/gpu/drm/dp/drm_dp_mst_topology.c +1 -1
@@ -38,7 +38,7 @@#include <linux/math64.h> #endif -#include <drm/dp/drm_dp_mst_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h>
drivers/gpu/drm/display/drm_dp_mst_topology_internal.h renamed from drivers/gpu/drm/dp/drm_dp_mst_topology_internal.h +1 -1
@@ -10,7 +10,7 @@#ifndef _DRM_DP_MST_HELPER_INTERNAL_H_#define _DRM_DP_MST_HELPER_INTERNAL_H_ -#include <drm/dp/drm_dp_mst_helper.h> +#include <drm/display/drm_dp_mst_helper.h> void drm_dp_encode_sideband_req(const struct drm_dp_sideband_msg_req_body *req,
drivers/gpu/drm/drm_dsc.c +2 -1
@@ -11,8 +11,9 @@#include <linux/init.h> #include <linux/errno.h> #include <linux/byteorder/generic.h> + +#include <drm/display/drm_dp_helper.h> #include <drm/drm_print.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_dsc.h> /**
drivers/gpu/drm/gma500/cdv_intel_dp.c +1 -1
@@ -29,9 +29,9 @@#include <linux/module.h> #include <linux/slab.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_simple_kms_helper.h> #include "gma_display.h"
drivers/gpu/drm/gma500/intel_bios.c +2 -1
@@ -5,8 +5,9 @@* Authors: * Eric Anholt <[email protected]> */ + +#include <drm/display/drm_dp_helper.h> #include <drm/drm.h> -#include <drm/dp/drm_dp_helper.h> #include "intel_bios.h" #include "psb_drv.h"
drivers/gpu/drm/i915/display/intel_bios.c +1 -1
@@ -25,7 +25,7 @@* */ -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include "display/intel_display.h" #include "display/intel_display_types.h"
drivers/gpu/drm/i915/display/intel_display.c +1 -1
@@ -35,11 +35,11 @@#include <linux/string_helpers.h> #include <linux/vga_switcheroo.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_uapi.h> #include <drm/drm_damage_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_fourcc.h> #include <drm/drm_plane_helper.h>
drivers/gpu/drm/i915/display/intel_display_types.h +2 -2
@@ -31,8 +31,8 @@#include <linux/pwm.h> #include <linux/sched/clock.h> -#include <drm/dp/drm_dp_dual_mode_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> +#include <drm/display/drm_dp_dual_mode_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_crtc.h> #include <drm/drm_dsc.h>
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
@@ -35,9 +35,9 @@#include <asm/byteorder.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/i915/display/intel_dp_hdcp.c +2 -2
@@ -6,8 +6,8 @@* Sean Paul <[email protected]> */ -#include <drm/dp/drm_dp_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_hdcp.h> #include <drm/drm_print.h>
drivers/gpu/drm/i915/display/intel_dp_link_training.h +1 -1
@@ -6,7 +6,7 @@#ifndef __INTEL_DP_LINK_TRAINING_H__#define __INTEL_DP_LINK_TRAINING_H__ -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> struct intel_crtc_state ;struct intel_dp ;
drivers/gpu/drm/i915/display/intel_lspcon.c +1 -1
@@ -23,8 +23,8 @@* */ +#include <drm/display/drm_dp_dual_mode_helper.h> #include <drm/drm_atomic_helper.h> -#include <drm/dp/drm_dp_dual_mode_helper.h> #include <drm/drm_edid.h> #include "intel_de.h"
drivers/gpu/drm/msm/dp/dp_audio.c +1 -1
@@ -8,7 +8,7 @@#include <linux/of_platform.h> -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_edid.h> #include "dp_catalog.h"
drivers/gpu/drm/msm/dp/dp_aux.h +1 -1
@@ -7,7 +7,7 @@#define _DP_AUX_H_#include "dp_catalog.h" -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> int dp_aux_register (struct drm_dp_aux *dp_aux);void dp_aux_unregister (struct drm_dp_aux *dp_aux);
drivers/gpu/drm/msm/dp/dp_catalog.c +1 -1
@@ -10,7 +10,7 @@#include <linux/phy/phy.h> #include <linux/phy/phy-dp.h> #include <linux/rational.h> -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_print.h> #include "dp_catalog.h"
drivers/gpu/drm/msm/dp/dp_ctrl.c +2 -1
@@ -11,8 +11,9 @@#include <linux/phy/phy.h> #include <linux/phy/phy-dp.h> #include <linux/pm_opp.h> + +#include <drm/display/drm_dp_helper.h> #include <drm/drm_fixed.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_print.h> #include "dp_reg.h"
drivers/gpu/drm/msm/edp/edp.h +2 -1
@@ -10,7 +10,8 @@#include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/platform_device.h> -#include <drm/dp/drm_dp_helper.h> + +#include <drm/display/drm_dp_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h>
drivers/gpu/drm/msm/edp/edp_ctrl.c +2 -1
@@ -6,7 +6,8 @@#include <linux/clk.h> #include <linux/gpio/consumer.h> #include <linux/regulator/consumer.h> -#include <drm/dp/drm_dp_helper.h> + +#include <drm/display/drm_dp_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h>
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -1
@@ -33,9 +33,9 @@#include <linux/component.h> #include <linux/iopoll.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_fb_helper.h> #include <drm/drm_plane_helper.h>
drivers/gpu/drm/nouveau/nouveau_connector.h +1 -1
@@ -33,10 +33,10 @@#include <nvhw/class/cl907d.h> #include <nvhw/drf.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h> #include <drm/drm_encoder.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_util.h> #include "nouveau_crtc.h"
drivers/gpu/drm/nouveau/nouveau_dp.c +1 -1
@@ -22,7 +22,7 @@* Authors: Ben Skeggs */ -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include "nouveau_drv.h" #include "nouveau_connector.h"
drivers/gpu/drm/nouveau/nouveau_encoder.h +4 -2
@@ -29,10 +29,12 @@#include <subdev/bios/dcb.h> +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_encoder_slave.h> -#include <drm/dp/drm_dp_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> +#include "dispnv04/disp.h" +struct nv50_head_atom ;struct nouveau_connector ;
drivers/gpu/drm/panel/panel-edp.c +2 -2
@@ -35,10 +35,10 @@#include <video/of_display_timing.h> #include <video/videomode.h> +#include <drm/display/drm_dp_aux_bus.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_device.h> -#include <drm/dp/drm_dp_aux_bus.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_panel.h> /**
drivers/gpu/drm/panel/panel-samsung-atna33xc20.c +2 -2
@@ -14,8 +14,8 @@#include <linux/pm_runtime.h> #include <linux/regulator/consumer.h> -#include <drm/dp/drm_dp_aux_bus.h> -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_aux_bus.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_panel.h>
drivers/gpu/drm/radeon/atombios_dp.c +1 -1
@@ -30,7 +30,7 @@#include "atom.h" #include "atom-bits.h" -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> /* move these to drm_dp_helper.c/h */ #define DP_LINK_CONFIGURATION_SIZE 9
drivers/gpu/drm/radeon/radeon_connectors.c +1 -1
@@ -24,10 +24,10 @@* Alex Deucher */ +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_edid.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> #include <drm/drm_probe_helper.h> #include <drm/radeon_drm.h> #include "radeon.h"
drivers/gpu/drm/radeon/radeon_dp_mst.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: MIT -#include <drm/dp/drm_dp_mst_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_file.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/radeon/radeon_mode.h +2 -2
@@ -30,11 +30,11 @@#ifndef RADEON_MODE_H #define RADEON_MODE_H +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h> #include <drm/drm_encoder.h> -#include <drm/dp/drm_dp_helper.h> -#include <drm/dp/drm_dp_mst_helper.h> #include <drm/drm_fixed.h> #include <drm/drm_crtc_helper.h> #include <linux/i2c.h>
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +1 -1
@@ -19,10 +19,10 @@#include <video/of_videomode.h> #include <video/videomode.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/bridge/analogix_dp.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/rockchip/cdn-dp-core.c +1 -1
@@ -15,8 +15,8 @@#include <sound/hdmi-codec.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/rockchip/cdn-dp-core.h +1 -1
@@ -7,7 +7,7 @@#ifndef _CDN_DP_CORE_H#define _CDN_DP_CORE_H -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_panel.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/rockchip/rockchip_lvds.c +1 -1
@@ -17,10 +17,10 @@#include <linux/regmap.h> #include <linux/reset.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_bridge_connector.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/rockchip/rockchip_rgb.c +1 -1
@@ -8,10 +8,10 @@#include <linux/component.h> #include <linux/of_graph.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_bridge_connector.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c +2 -2
@@ -7,10 +7,10 @@#include <linux/random.h> -#include <drm/dp/drm_dp_mst_helper.h> +#include <drm/display/drm_dp_mst_helper.h> #include <drm/drm_print.h> -#include "../dp/drm_dp_mst_topology_internal.h" +#include "../display/drm_dp_mst_topology_internal.h" #include "test-drm_modeset_common.h" int igt_dp_mst_calc_pbn_mode (void *ignored)
drivers/gpu/drm/tegra/dp.c +1 -1
@@ -4,8 +4,8 @@* Copyright (C) 2015 Rob Clark */ +#include <drm/display/drm_dp_helper.h> #include <drm/drm_crtc.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_print.h> #include "dp.h"
drivers/gpu/drm/tegra/dpaux.c +2 -2
@@ -18,8 +18,8 @@#include <linux/reset.h> #include <linux/workqueue.h> -#include <drm/dp/drm_dp_helper.h> -#include <drm/dp/drm_dp_aux_bus.h> +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp_aux_bus.h> #include <drm/drm_panel.h> #include "dp.h"
drivers/gpu/drm/tegra/sor.c +1 -1
@@ -16,9 +16,9 @@#include <soc/tegra/pmc.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_debugfs.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_file.h> #include <drm/drm_panel.h> #include <drm/drm_scdc_helper.h>
drivers/gpu/drm/xlnx/zynqmp_dp.c +1 -1
@@ -9,11 +9,11 @@* - Laurent Pinchart <[email protected]> */ +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_connector.h> #include <drm/drm_crtc.h> #include <drm/drm_device.h> -#include <drm/dp/drm_dp_helper.h> #include <drm/drm_edid.h> #include <drm/drm_encoder.h> #include <drm/drm_managed.h>
include/drm/display/drm_dp_aux_bus.h renamed from include/drm/dp/drm_dp_aux_bus.h +0 -0
include/drm/display/drm_dp_dual_mode_helper.h renamed from include/drm/dp/drm_dp_dual_mode_helper.h +0 -0
include/drm/display/drm_dp_helper.h renamed from include/drm/dp/drm_dp_helper.h +0 -0
include/drm/display/drm_dp_mst_helper.h renamed from include/drm/dp/drm_dp_mst_helper.h +1 -1
@@ -23,7 +23,7 @@#define _DRM_DP_MST_HELPER_H_#include <linux/types.h> -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> #include <drm/drm_atomic.h> #if IS_ENABLED (CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS )
include/drm/drm_dsc.h +1 -1
@@ -8,7 +8,7 @@#ifndef DRM_DSC_H_ #define DRM_DSC_H_ -#include <drm/dp/drm_dp_helper.h> +#include <drm/display/drm_dp_helper.h> /* VESA Display Stream Compression DSC 1.2 constants */ #define DSC_NUM_BUF_RANGES 15
Signature · 1 line
2.35.1
Re: [PATCH 2/8] drm: Rename dp/ to display/
Quoted 8 lines · Thomas Zimmermann
Rename dp/ to display/ to account for additional display-related helpers, such as HDMI. Update all related include statements. No functional changes.
Various drivers, such as i915 and amdgpu, use similar naming scheme by putting code for video-output standards into a local display/ directory. The new directory's name is aligned with that policy.
It is really a policy or just a convention ?
Quoted 3 lines
Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat
Thomas Zimmermann
maintainerRe: [PATCH 2/8] drm: Rename dp/ to display/
Hi
Am 30.03.22 um 11:04 schrieb Javier Martinez Canillas:
Quoted 11 lines · Thomas Zimmermann
Quoted 8 lines
Rename dp/ to display/ to account for additional display-related helpers, such as HDMI. Update all related include statements. No functional changes.
Various drivers, such as i915 and amdgpu, use similar naming scheme by putting code for video-output standards into a local display/ directory. The new directory's name is aligned with that policy.
It is really a policy or just a convention ?
Convention, I think. I'll update the wording.
Best regards
Thomas
Quoted 7 lines
Quoted 4 lines
Signed-off-by Thomas Zimmermann <[email protected]>---
Reviewed-by Javier Martinez Canillas <[email protected]>
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Re: [PATCH 2/8] drm: Rename dp/ to display/
In reply to Thomas ZimmermannQuoted 10 lines · Thomas Zimmermann
Rename dp/ to display/ to account for additional display-related helpers, such as HDMI. Update all related include statements. No functional changes.
Various drivers, such as i915 and amdgpu, use similar naming scheme by putting code for video-output standards into a local display/ directory. The new directory's name is aligned with that policy.
Signed-off-by Thomas Zimmermann <[email protected]>
Thomas Zimmermann
maintainerPATCH 3/8 drm/display: Introduce a DRM display-helper module
In reply to Thomas ZimmermannReplace the DP-helper module with a display-helper module. Update all related Kconfig and Makefile rules.
Besides the existing code for DisplayPort, the new module will contain helpers for other video-output standards, such as HDMI. Drivers will still be able to select the required video-output helpers. Linking all such code into a single module avoids the proliferation of small kernel modules.
---
drivers/gpu/drm/Kconfig | 7 +++++++
drivers/gpu/drm/display/Makefile | 9 +++++----
.../{drm_dp_helper_mod.c => drm_display_helper_mod.c} | 10 +++++-----
drivers/gpu/drm/display/{drm_dp.c => drm_dp_helper.c} | 0
4 files changed, 17 insertions(+), 9 deletions(-)
rename drivers/gpu/drm/display/{drm_dp_helper_mod.c => drm_display_helper_mod.c} (51%)
rename drivers/gpu/drm/display/{drm_dp.c => drm_dp_helper.c} (100%)drivers/gpu/drm/Kconfig +7 -0
@@ -82,9 +82,16 @@ config DRM_DEBUG_SELFTEST If in doubt, say "N". +config DRM_DISPLAY_HELPER + tristate + depends on DRM + help + DRM helpers for display adapters. + config DRM_DP_HELPER tristate depends on DRM + select DRM_DISPLAY_HELPER help DRM helpers for DisplayPort.
drivers/gpu/drm/display/Makefile +5 -4
@@ -2,8 +2,9 @@ obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o -drm_dp_helper-y := drm_dp.o drm_dp_dual_mode_helper.o drm_dp_helper_mod.o drm_dp_mst_topology.o -drm_dp_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o -drm_dp_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o +drm_display_helper-y := drm_display_helper_mod.o +drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_helper.o drm_dp_mst_topology.o +drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o +drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o -obj-$(CONFIG_DRM_DP_HELPER) += drm_dp_helper.o +obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.o
drivers/gpu/drm/display/drm_display_helper_mod.c renamed from drivers/gpu/drm/display/drm_dp_helper_mod.c +5 -5
@@ -4,19 +4,19 @@#include "drm_dp_helper_internal.h" -MODULE_DESCRIPTION ("DRM DisplayPort helper" ); +MODULE_DESCRIPTION ("DRM display adapter helper" );MODULE_LICENSE ("GPL and additional rights" ); -static int __init drm_dp_helper_module_init (void ) +static int __init drm_display_helper_module_init (void ) {return drm_dp_aux_dev_init (); } -static void __exit drm_dp_helper_module_exit(void) +static void __exit drm_display_helper_module_exit(void) {/* Call exit functions from specific dp helpers here */ drm_dp_aux_dev_exit (); } -module_init (drm_dp_helper_module_init); -module_exit (drm_dp_helper_module_exit); +module_init (drm_display_helper_module_init); +module_exit (drm_display_helper_module_exit);
drivers/gpu/drm/display/drm_dp_helper.c renamed from drivers/gpu/drm/display/drm_dp.c +0 -0
Signature · 1 line
2.35.1
Re: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
Quoted 11 lines · Thomas Zimmermann
Replace the DP-helper module with a display-helper module. Update all related
KconfigandMakefilerules.Besides the existing code for DisplayPort, the new module will contain helpers for other video-output standards, such as HDMI. Drivers will still be able to select the required video-output helpers. Linking all such code into a single module avoids the proliferation of small kernel modules.
Signed-off-by Thomas Zimmermann <[email protected]>---
[snip]
drivers/gpu/drm/Kconfig config DRM_DEBUG_SELFTEST · line 96
Quoted 13 lines
drivers/gpu/drm/Kconfig +7
-0+config DRM_DISPLAY_HELPER + tristate + depends on DRM + help + DRM helpers for display adapters. + config DRM_DP_HELPER tristate depends on DRM + select DRM_DISPLAY_HELPER help DRM helpers for DisplayPort.
I was about to ask why this would still be needed but then re-read the commit message that says drivers will still be able to select required video-output helpers.
That makes sense since the fact that all helpers will be in the same module would be transparent to drivers.
Quoted 8 lines
drivers/gpu/drm/display/Makefile +0
-0@@ -2,8 +2,9 @@ obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o
drivers/gpu/drm/display/Makefile line 10
Quoted 10 lines
drivers/gpu/drm/display/Makefile +5
-4-drm_dp_helper-y := drm_dp.o drm_dp_dual_mode_helper.o drm_dp_helper_mod.o drm_dp_mst_topology.o -drm_dp_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o -drm_dp_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o +drm_display_helper-y := drm_display_helper_mod.o +drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_helper.o drm_dp_mst_topology.o +drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o +drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o -obj-$(CONFIG_DRM_DP_HELPER) += drm_dp_helper.o +obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.o
The drm_dp_helper.ko module has some parameters and this change will break existing kernel cmdline that are using it:
$ modinfo drivers/gpu/drm/dp/drm_dp_helper.ko | grep parm | cut -d : -f2
drm_dp_cec_unregister_delay
dp_aux_i2c_speed_khz
dp_aux_i2c_transfer_sizeI don't know whether those are considered a kernel ABI or not though, and some already changed when the DP helpers were moved from drm_kms_helper.ko
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat
Thomas Zimmermann
maintainerRe: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
Hi
Am 30.03.22 um 11:23 schrieb Javier Martinez Canillas:
Quoted 58 lines · Thomas Zimmermann
Quoted 11 lines
Replace the DP-helper module with a display-helper module. Update all related
KconfigandMakefilerules.Besides the existing code for DisplayPort, the new module will contain helpers for other video-output standards, such as HDMI. Drivers will still be able to select the required video-output helpers. Linking all such code into a single module avoids the proliferation of small kernel modules.
Signed-off-by Thomas Zimmermann <[email protected]>---
[snip]
drivers/gpu/drm/Kconfig config DRM_DEBUG_SELFTEST · line 96
Quoted 13 lines
drivers/gpu/drm/Kconfig +7
-0+config DRM_DISPLAY_HELPER + tristate + depends on DRM + help + DRM helpers for display adapters. + config DRM_DP_HELPER tristate depends on DRM + select DRM_DISPLAY_HELPER help DRM helpers for DisplayPort.I was about to ask why this would still be needed but then re-read the commit message that says drivers will still be able to select required video-output helpers.
That makes sense since the fact that all helpers will be in the same module would be transparent to drivers.
Quoted 8 lines
drivers/gpu/drm/display/Makefile +0
-0@@ -2,8 +2,9 @@ obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.odrivers/gpu/drm/display/Makefile line 10
Quoted 10 lines
drivers/gpu/drm/display/Makefile +5
-4-drm_dp_helper-y := drm_dp.o drm_dp_dual_mode_helper.o drm_dp_helper_mod.o drm_dp_mst_topology.o -drm_dp_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o -drm_dp_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o +drm_display_helper-y := drm_display_helper_mod.o +drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_helper.o drm_dp_mst_topology.o +drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o +drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o -obj-$(CONFIG_DRM_DP_HELPER) += drm_dp_helper.o +obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.oThe drm_dp_helper.ko module has some parameters and this change will break existing kernel cmdline that are using it:
Quoted 7 lines
$ modinfo drivers/gpu/drm/dp/drm_dp_helper.ko | grep parm | cut -d : -f2 drm_dp_cec_unregister_delay dp_aux_i2c_speed_khz dp_aux_i2c_transfer_sizeI don't know whether those are considered a kernel ABI or not though, and some already changed when the DP helpers were moved from drm_kms_helper.ko
Good point. I'll mention it in the commit message andcheck the documentation as well.
At least, no one complained when these functions moved from kms helpers into dp helpers. Moving them again is unfortunate, but I hope that the new library will stick.
I somehow expected that HDMI, HDCP et al would require their own libraries. But introducing several new and tiny kernel modules for such small helpers wasn't worth it. Hence, there's the display library that can collect all such helpers in a single place.
It looks like MIPI DSI could be another candidate to be moved into the display library; at least partially. I have go through the codebase to see if there are drivers that would benefit from such a change.
Best regards
Thomas
Quoted 1 line
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Javier Martinez Canillas
Reviewed-byRe: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
Hello Thomas,
Quoted 2 lines · Thomas Zimmermann
Hi
[snip]
Quoted 15 lines
Quoted 7 lines
drivers/gpu/drm/display/Makefile line 10
Quoted 3 lines
drivers/gpu/drm/display/Makefile +1
-1-obj-$(CONFIG_DRM_DP_HELPER) += drm_dp_helper.o +obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.oThe drm_dp_helper.ko module has some parameters and this change will break existing kernel cmdline that are using it:
Quoted 7 lines
$ modinfo drivers/gpu/drm/dp/drm_dp_helper.ko | grep parm | cut -d : -f2 drm_dp_cec_unregister_delay dp_aux_i2c_speed_khz dp_aux_i2c_transfer_sizeI don't know whether those are considered a kernel ABI or not though, and some already changed when the DP helpers were moved from drm_kms_helper.ko
Quoted 7 lines
Good point. I'll mention it in the commit message andcheck the documentation as well.
At least, no one complained when these functions moved from kms helpers into dp helpers. Moving them again is unfortunate, but I hope that the new library will stick.
I was just pointing out because honestly I didn't know what was the kernel policy around changing kernel command line parameters. It seems that isn't documented anywhere.
But since no one complained when these were moved from drm_kms_helper.ko and the current drm_dp_helper.ko is so recent, I would say that's fine.
If you re-spin feel free to add,
Quoted 5 lines
I somehow expected that HDMI, HDCP et al would require their own libraries. But introducing several new and tiny kernel modules for such small helpers wasn't worth it. Hence, there's the display library that can collect all such helpers in a single place.
Yes, I agree with your approach to have all helpers into a single module.
Quoted 4 lines
It looks like MIPI DSI could be another candidate to be moved into the display library; at least partially. I have go through the codebase to see if there are drivers that would benefit from such a change.
Great.
Quoted 5 lines
Best regards
ThomasQuoted 1 line
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat
Thomas Zimmermann
maintainerRe: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
In reply to Javier Martinez CanillasHi Javier
Am 30.03.22 um 11:23 schrieb Javier Martinez Canillas:
Quoted 33 lines · Thomas Zimmermann
Quoted 11 lines
Replace the DP-helper module with a display-helper module. Update all related
KconfigandMakefilerules.Besides the existing code for DisplayPort, the new module will contain helpers for other video-output standards, such as HDMI. Drivers will still be able to select the required video-output helpers. Linking all such code into a single module avoids the proliferation of small kernel modules.
Signed-off-by Thomas Zimmermann <[email protected]>---
[snip]
drivers/gpu/drm/Kconfig config DRM_DEBUG_SELFTEST · line 96
Quoted 13 lines
drivers/gpu/drm/Kconfig +7
-0+config DRM_DISPLAY_HELPER + tristate + depends on DRM + help + DRM helpers for display adapters. + config DRM_DP_HELPER tristate depends on DRM + select DRM_DISPLAY_HELPER help DRM helpers for DisplayPort.I was about to ask why this would still be needed but then re-read the commit message that says drivers will still be able to select required video-output helpers.
Quoted 2 lines
That makes sense since the fact that all helpers will be in the same module would be transparent to drivers.
After some more testing, it turns out to be not so easy. For example, if we have DP_HELPER=m and HDMI_HELPER=y, then DISPLAY_HELPER would be auto-selected as 'y'. The code for DP_HELPER would not be linked correctly.
I'm going to make drivers select DISPLAY_HELPER and the rsp helpers explicitly. The individual helpers would be covered boolean options that enable the feature in the display-helper library.
If you know some Kconfig magic to enable the original design, let me know.
Best regards
Thomas
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Re: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
Quoted 43 lines · Thomas Zimmermann
Hi Javier
Am 30.03.22 um 11:23 schrieb Javier Martinez Canillas:
Quoted 33 lines · Thomas Zimmermann
Quoted 11 lines
Replace the DP-helper module with a display-helper module. Update all related
KconfigandMakefilerules.Besides the existing code for DisplayPort, the new module will contain helpers for other video-output standards, such as HDMI. Drivers will still be able to select the required video-output helpers. Linking all such code into a single module avoids the proliferation of small kernel modules.
Signed-off-by Thomas Zimmermann <[email protected]>---
[snip]
drivers/gpu/drm/Kconfig config DRM_DEBUG_SELFTEST · line 96
Quoted 13 lines
drivers/gpu/drm/Kconfig +7
-0+config DRM_DISPLAY_HELPER + tristate + depends on DRM + help + DRM helpers for display adapters. + config DRM_DP_HELPER tristate depends on DRM + select DRM_DISPLAY_HELPER help DRM helpers for DisplayPort.I was about to ask why this would still be needed but then re-read the commit message that says drivers will still be able to select required video-output helpers.
Quoted 2 lines
That makes sense since the fact that all helpers will be in the same module would be transparent to drivers.
After some more testing, it turns out to be not so easy. For example, if we have DP_HELPER=m and HDMI_HELPER=y, then
DISPLAY_HELPERwould be auto-selected as 'y'. The code forDP_HELPERwould not be linked correctly.
Quoted 6 lines
I'm going to make drivers select
DISPLAY_HELPERand the rsp helpers explicitly. The individual helpers would be covered boolean options that enable the feature in the display-helper library.If you know some
Kconfigmagic to enable the original design, let me know.
I do not. But I wonder if the problem here is the usage of select rather than depends and if with the later the original design could still be achieved...
But yes, probably the only way to prevent that issue is to make the drivers to explicitly select both DRM_DISPLAY_HELPER and respective helpers symbol.
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
Thomas Zimmermann
maintainerRe: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
Hi Javier
Am 07.04.22 um 09:43 schrieb Javier Martinez Canillas:
Quoted 48 lines · Thomas Zimmermann
Quoted 47 lines
Hi Javier
Am 30.03.22 um 11:23 schrieb Javier Martinez Canillas:
Quoted 33 lines · Thomas Zimmermann
Quoted 11 lines
Replace the DP-helper module with a display-helper module. Update all related
KconfigandMakefilerules.Besides the existing code for DisplayPort, the new module will contain helpers for other video-output standards, such as HDMI. Drivers will still be able to select the required video-output helpers. Linking all such code into a single module avoids the proliferation of small kernel modules.
Signed-off-by Thomas Zimmermann <[email protected]>---
[snip]
drivers/gpu/drm/Kconfig config DRM_DEBUG_SELFTEST · line 96
Quoted 13 lines
drivers/gpu/drm/Kconfig +7
-0+config DRM_DISPLAY_HELPER + tristate + depends on DRM + help + DRM helpers for display adapters. + config DRM_DP_HELPER tristate depends on DRM + select DRM_DISPLAY_HELPER help DRM helpers for DisplayPort.I was about to ask why this would still be needed but then re-read the commit message that says drivers will still be able to select required video-output helpers.
Quoted 2 lines
That makes sense since the fact that all helpers will be in the same module would be transparent to drivers.
After some more testing, it turns out to be not so easy. For example, if we have DP_HELPER=m and HDMI_HELPER=y, then
DISPLAY_HELPERwould be auto-selected as 'y'. The code forDP_HELPERwould not be linked correctly.I'm going to make drivers select
DISPLAY_HELPERand the rsp helpers explicitly. The individual helpers would be covered boolean options that enable the feature in the display-helper library.
Quoted 5 lines
Quoted 2 lines
If you know some
Kconfigmagic to enable the original design, let me know.I do not. But I wonder if the problem here is the usage of select rather than depends and if with the later the original design could still be achieved...
With 'depends DRM_DISPLAY_HELPER' users would need to explictly enable DRM_DISPLAY_HELPER, I think.
Quoted 3 lines
But yes, probably the only way to prevent that issue is to make the drivers to explicitly select both
DRM_DISPLAY_HELPERand respective helpers symbol.
I'll remake the patches with the new style.
I think another idea that could work is to use an intermediate symbol. For DP, drivers would select the tristate DP_HELPER, which in turn selects tristate DISPLAY_HELPER and boolean DISPLAY_DP_HELPER. But this would require a 'useless' symbol DP_HELPER only for convenience. It's an even less optimal solution, it seems.
Best regards
Thomas
Quoted 7 lines
--
Best regards,Javier Martinez Canillas
Linux Engineering
Red Hat
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Jani Nikula
maintainerRe: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
Quoted 64 lines · Thomas Zimmermann
Hi Javier
Am 07.04.22 um 09:43 schrieb Javier Martinez Canillas:
Quoted 48 lines · Thomas Zimmermann
Quoted 47 lines
Hi Javier
Am 30.03.22 um 11:23 schrieb Javier Martinez Canillas:
Quoted 33 lines · Thomas Zimmermann
Quoted 11 lines
Replace the DP-helper module with a display-helper module. Update all related
KconfigandMakefilerules.Besides the existing code for DisplayPort, the new module will contain helpers for other video-output standards, such as HDMI. Drivers will still be able to select the required video-output helpers. Linking all such code into a single module avoids the proliferation of small kernel modules.
Signed-off-by Thomas Zimmermann <[email protected]>---
[snip]
drivers/gpu/drm/Kconfig config DRM_DEBUG_SELFTEST · line 96
Quoted 13 lines
drivers/gpu/drm/Kconfig +7
-0+config DRM_DISPLAY_HELPER + tristate + depends on DRM + help + DRM helpers for display adapters. + config DRM_DP_HELPER tristate depends on DRM + select DRM_DISPLAY_HELPER help DRM helpers for DisplayPort.I was about to ask why this would still be needed but then re-read the commit message that says drivers will still be able to select required video-output helpers.
Quoted 2 lines
That makes sense since the fact that all helpers will be in the same module would be transparent to drivers.
After some more testing, it turns out to be not so easy. For example, if we have DP_HELPER=m and HDMI_HELPER=y, then
DISPLAY_HELPERwould be auto-selected as 'y'. The code forDP_HELPERwould not be linked correctly.I'm going to make drivers select
DISPLAY_HELPERand the rsp helpers explicitly. The individual helpers would be covered boolean options that enable the feature in the display-helper library.Quoted 5 lines
Quoted 2 lines
If you know some
Kconfigmagic to enable the original design, let me know.I do not. But I wonder if the problem here is the usage of select rather than depends and if with the later the original design could still be achieved...
With 'depends
DRM_DISPLAY_HELPER' users would need to explictly enableDRM_DISPLAY_HELPER, I think.Quoted 3 lines
But yes, probably the only way to prevent that issue is to make the drivers to explicitly select both
DRM_DISPLAY_HELPERand respective helpers symbol.
Quoted 7 lines
I'll remake the patches with the new style.
I think another idea that could work is to use an intermediate symbol. For DP, drivers would select the tristate
DP_HELPER, which in turn selects tristateDISPLAY_HELPERand booleanDISPLAY_DP_HELPER. But this would require a 'useless' symbolDP_HELPERonly for convenience. It's an even less optimal solution, it seems.
Documentation/kbuild/kconfig-language.rst:
Note:
select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set.
--> In general use select only for non-visible symbols
--> (no prompts anywhere) and for symbols with no dependencies.
That will limit the usefulness but on the other hand avoid the illegal configurations all over.
Most of the difficult Kconfig issues I've encountered over the years come from not following the above two rules. People break those rules for "convenience", causing a lot of inconvenience down the line.
BR,
Jani.
Quoted 11 lines
Best regards
ThomasQuoted 7 lines
--
Best regards,Javier Martinez Canillas
Linux Engineering
Red Hat
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Thomas Zimmermann
maintainerRe: [PATCH 3/8] drm/display: Introduce a DRM display-helper module
Hi Jani
Am 07.04.22 um 10:45 schrieb Jani Nikula:
...
Quoted 19 lines
Quoted 6 lines
I think another idea that could work is to use an intermediate symbol. For DP, drivers would select the tristate
DP_HELPER, which in turn selects tristateDISPLAY_HELPERand booleanDISPLAY_DP_HELPER. But this would require a 'useless' symbolDP_HELPERonly for convenience. It's an even less optimal solution, it seems.
Documentation/kbuild/kconfig-language.rst:Note:
select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set.
--> In general use select only for non-visible symbols
--> (no prompts anywhere) and for symbols with no dependencies.
That will limit the usefulness but on the other hand avoid the illegal configurations all over.
Quoted 3 lines
Most of the difficult
Kconfigissues I've encountered over the years come from not following the above two rules. People break those rules for "convenience", causing a lot of inconvenience down the line.
I have meanwhile updated the patchset and all new boolean options are internal. No select will be performed on 'visible' symbols. So it should be fine.
Best regards
Thomas
Quoted 18 lines
BR,
Jani.Quoted 11 lines
Best regards
ThomasQuoted 7 lines
--Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Thomas Zimmermann
maintainerPATCH 4/8 drm/display: Split DisplayPort header into core and helper
In reply to Thomas ZimmermannMove DisplayPort protocol constants and structures into the new header drm_dp.h, which can be used by DRM core components. The existing header drm_dp_helper.h now only contains helper code for graphics drivers. No functional changes.
--- Documentation/gpu/drm-kms-helpers.rst | 3 + include/drm/display/drm_dp.h | 1688 +++++++++++++++++++++++++ include/drm/display/drm_dp_helper.h | 1662 +----------------------- 3 files changed, 1693 insertions(+), 1660 deletions(-) create mode 100644 include/drm/display/drm_dp.h
Documentation/gpu/drm-kms-helpers.rst +3 -0
@@ -235,6 +235,9 @@ Display Port Helper Functions Reference .. kernel-doc:: drivers/gpu/drm/display/drm_dp_helper.c :doc: dp helpers +.. kernel-doc:: include/drm/display/drm_dp.h + :internal: + .. kernel-doc:: include/drm/display/drm_dp_helper.h :internal:
include/drm/display/drm_dp.h new file +1688 -0
1,688 lines not on this page · raw message
include/drm/display/drm_dp_helper.h +2 -1660
1,303 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.35.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH 4/8] drm/display: Split DisplayPort header into core and helper
Quoted 7 lines · Thomas Zimmermann
Move DisplayPort protocol constants and structures into the new header
drm_dp.h, which can be used by DRM core components. The existing headerdrm_dp_helper.hnow only contains helper code for graphics drivers. No functional changes.Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat
Thomas Zimmermann
maintainerPATCH 5/8 drm/display: Move DSC header and helpers into display-helper module
In reply to Thomas ZimmermannDSC is the Display Stream Compression standard for DisplayPort. Move the DSC code into display/ and split the header into files for protocol core and DRM helpers. Adapt all users of the code. No functional changes.
To avoid the proliferation of Kconfig options, DSC is part of DRM's support for DisplayPort. If necessary, a new option could make DSC an independent feature.
---
Documentation/gpu/drm-kms-helpers.rst | 6 +++---
drivers/gpu/drm/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 ++
.../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 2 +-
.../drm/amd/display/dc/dml/dsc/rc_calc_fpu.h | 2 +-
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 4 ++--
.../gpu/drm/amd/display/dc/dsc/dscc_types.h | 2 +-
.../gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c | 2 +-
drivers/gpu/drm/display/Makefile | 3 ++-
.../{drm_dsc.c => display/drm_dsc_helper.c} | 2 +-
drivers/gpu/drm/drm_mipi_dsi.c | 6 +++---
drivers/gpu/drm/i915/display/icl_dsi.c | 1 +
drivers/gpu/drm/i915/display/intel_bios.c | 1 +
.../drm/i915/display/intel_display_types.h | 2 +-
drivers/gpu/drm/i915/display/intel_dp.c | 1 +
.../gpu/drm/i915/display/intel_qp_tables.c | 2 +-
drivers/gpu/drm/i915/display/intel_vdsc.c | 2 ++
include/drm/{ => display}/drm_dsc.h | 8 +-------
include/drm/display/drm_dsc_helper.h | 20 +++++++++++++++++++
19 files changed, 46 insertions(+), 24 deletions(-)
rename drivers/gpu/drm/{drm_dsc.c => display/drm_dsc_helper.c} (99%)
rename include/drm/{ => display}/drm_dsc.h (97%)
create mode 100644 include/drm/display/drm_dsc_helper.hDocumentation/gpu/drm-kms-helpers.rst +3 -3
@@ -326,13 +326,13 @@ MIPI DSI Helper Functions Reference Display Stream Compression Helper Functions Reference ===================================================== -.. kernel-doc:: drivers/gpu/drm/drm_dsc.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c :doc: dsc helpers -.. kernel-doc:: include/drm/drm_dsc.h +.. kernel-doc:: include/drm/display/drm_dsc.h :internal: -.. kernel-doc:: drivers/gpu/drm/drm_dsc.c +.. kernel-doc:: drivers/gpu/drm/display/drm_dsc_helper.c :export: Output Probing Helper Functions Reference
drivers/gpu/drm/Makefile +1 -1
@@ -58,7 +58,7 @@ obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o # drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ - drm_dsc.o drm_encoder_slave.o drm_flip_work.o drm_hdcp.o \ + drm_encoder_slave.o drm_flip_work.o drm_hdcp.o \ drm_probe_helper.o \ drm_plane_helper.o drm_atomic_helper.o \ drm_kms_helper_common.o \
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c +2 -0
@@ -23,6 +23,8 @@* */ +#include <drm/display/drm_dsc_helper.h> +#include "reg_helper.h" #include "dcn20_dsc.h" #include "dsc/dscc_types.h"
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h +1 -1
@@ -26,7 +26,7 @@#include "dsc.h" #include "dsc/dscc_types.h" -#include <drm/drm_dsc.h> +#include <drm/display/drm_dsc.h> #define TO_DCN20_DSC (dsc)\ container_of(dsc, struct dcn20_dsc, base)
drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.h +1 -1
@@ -27,7 +27,7 @@#define __RC_CALC_FPU_H__#include "os_types.h" -#include <drm/drm_dsc.h> +#include <drm/display/drm_dsc.h> #define QP_SET_SIZE 15
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +2 -2
@@ -22,10 +22,10 @@* Author: AMD */ -#include <drm/drm_dsc.h> +#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dsc_helper.h> #include "dc_hw_types.h" #include "dsc.h" -#include <drm/display/drm_dp_helper.h> #include "dc.h" #include "rc_calc.h" #include "fixed31_32.h"
drivers/gpu/drm/amd/display/dc/dsc/dscc_types.h +1 -1
@@ -26,7 +26,7 @@#ifndef __DSCC_TYPES_H__#define __DSCC_TYPES_H__ -#include <drm/drm_dsc.h> +#include <drm/display/drm_dsc.h> #ifndef NUM_BUF_RANGES #define NUM_BUF_RANGES 15
drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c +1 -1
@@ -22,7 +22,7 @@* Authors: AMD * */ -#include <drm/drm_dsc.h> +#include <drm/display/drm_dsc_helper.h> #include "dscc_types.h" #include "rc_calc.h"
drivers/gpu/drm/display/Makefile +2 -1
@@ -3,7 +3,8 @@ obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o drm_display_helper-y := drm_display_helper_mod.o -drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_helper.o drm_dp_mst_topology.o +drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_helper.o \ + drm_dp_mst_topology.o drm_dsc_helper.o drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o
drivers/gpu/drm/display/drm_dsc_helper.c renamed from drivers/gpu/drm/drm_dsc.c +1 -1
@@ -13,8 +13,8 @@#include <linux/byteorder/generic.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dsc_helper.h> #include <drm/drm_print.h> -#include <drm/drm_dsc.h> /** * DOC: dsc helpers
drivers/gpu/drm/drm_mipi_dsi.c +3 -3
@@ -25,16 +25,16 @@* USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include <drm/drm_mipi_dsi.h> -#include <linux/device.h> #include <linux/module.h> #include <linux/of_device.h> #include <linux/pm_runtime.h> #include <linux/slab.h> -#include <drm/drm_dsc.h> +#include <drm/display/drm_dsc.h> +#include <drm/drm_mipi_dsi.h> #include <drm/drm_print.h> +#include <video/mipi_display.h> /**
drivers/gpu/drm/i915/display/icl_dsi.c +1 -0
@@ -25,6 +25,7 @@* Jani Nikula <[email protected]> */ +#include <drm/display/drm_dsc_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_mipi_dsi.h>
drivers/gpu/drm/i915/display/intel_bios.c +1 -0
@@ -26,6 +26,7 @@*/ #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dsc_helper.h> #include "display/intel_display.h" #include "display/intel_display_types.h"
drivers/gpu/drm/i915/display/intel_display_types.h +1 -1
@@ -33,9 +33,9 @@#include <drm/display/drm_dp_dual_mode_helper.h> #include <drm/display/drm_dp_mst_helper.h> +#include <drm/display/drm_dsc.h> #include <drm/drm_atomic.h> #include <drm/drm_crtc.h> -#include <drm/drm_dsc.h> #include <drm/drm_encoder.h> #include <drm/drm_fourcc.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/i915/display/intel_dp.c +1 -0
@@ -36,6 +36,7 @@#include <asm/byteorder.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dsc_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h>
drivers/gpu/drm/i915/display/intel_qp_tables.c +1 -1
@@ -3,7 +3,7 @@* Copyright © 2021 Intel Corporation */ -#include <drm/drm_dsc.h> +#include <drm/display/drm_dsc.h> #include "i915_utils.h" #include "intel_qp_tables.h"
drivers/gpu/drm/i915/display/intel_vdsc.c +2 -0
@@ -7,6 +7,8 @@*/ #include <linux/limits.h> +#include <drm/display/drm_dsc_helper.h> +#include "i915_drv.h" #include "intel_crtc.h" #include "intel_de.h"
include/drm/display/drm_dsc.h renamed from include/drm/drm_dsc.h +1 -7
@@ -8,7 +8,7 @@#ifndef DRM_DSC_H_ #define DRM_DSC_H_ -#include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_dp.h> /* VESA Display Stream Compression DSC 1.2 constants */ #define DSC_NUM_BUF_RANGES 15
@@ -602,10 +602,4 @@ struct drm_dsc_pps_infoframe { struct drm_dsc_picture_parameter_set pps_payload; } __packed; -void drm_dsc_dp_pps_header_init (struct dp_sdp_header *pps_header); -int drm_dsc_dp_rc_buffer_size (u8 rc_buffer_block_size,u8 rc_buffer_size); -void drm_dsc_pps_payload_pack (struct drm_dsc_picture_parameter_set *pps_sdp, -const struct drm_dsc_config *dsc_cfg); -int drm_dsc_compute_rc_parameters (struct drm_dsc_config *vdsc_cfg); -#endif /* _DRM_DSC_H_ */
include/drm/display/drm_dsc_helper.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: MIT +* Copyright (C) 2018 Intel Corp. +* +* Authors: +* Manasi Navare <[email protected]> +*/ + +#ifndef DRM_DSC_HELPER_H_ +#define DRM_DSC_HELPER_H_ + +#include <drm/display/drm_dsc.h> + +void drm_dsc_dp_pps_header_init (struct dp_sdp_header *pps_header); +int drm_dsc_dp_rc_buffer_size (u8 rc_buffer_block_size,u8 rc_buffer_size); +void drm_dsc_pps_payload_pack (struct drm_dsc_picture_parameter_set *pps_sdp, +const struct drm_dsc_config *dsc_cfg); +int drm_dsc_compute_rc_parameters (struct drm_dsc_config *vdsc_cfg); + +#endif /* _DRM_DSC_HELPER_H_ */ +
Signature · 1 line
2.35.1
Re: [PATCH 5/8] drm/display: Move DSC header and helpers into display-helper module
Quoted 11 lines · Thomas Zimmermann
DSC is the Display Stream Compression standard for DisplayPort. Move the DSC code into display/ and split the header into files for protocol core and DRM helpers. Adapt all users of the code. No functional changes.
To avoid the proliferation of
Kconfigoptions, DSC is part of DRM's support for DisplayPort. If necessary, a new option could make DSC an independent feature.Signed-off-by Thomas Zimmermann <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat
Thomas Zimmermann
maintainerPATCH 6/8 drm/display: Move HDCP helpers into display-helper module
In reply to Thomas ZimmermannMove DRM's HDCP helper library into the display/ subdirectory and add it to DRM's display helpers. Split the header file into core and helpers. Update all affected drivers. No functional changes.
---
Documentation/gpu/drm-kms-helpers.rst | 2 +-
drivers/gpu/drm/Kconfig | 7 ++++++
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/amd/display/Kconfig | 1 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
.../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 2 +-
.../gpu/drm/amd/display/modules/hdcp/hdcp.h | 2 +-
drivers/gpu/drm/bridge/Kconfig | 1 +
drivers/gpu/drm/bridge/analogix/Kconfig | 1 +
drivers/gpu/drm/bridge/analogix/anx7625.c | 2 +-
drivers/gpu/drm/bridge/cadence/Kconfig | 1 +
.../drm/bridge/cadence/cdns-mhdp8546-core.c | 2 +-
.../drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 2 +-
drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
drivers/gpu/drm/display/Makefile | 1 +
.../{drm_hdcp.c => display/drm_hdcp_helper.c} | 4 ++--
drivers/gpu/drm/i915/Kconfig | 1 +
drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 2 +-
drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +-
drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +-
drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
drivers/misc/mei/hdcp/mei_hdcp.h | 2 +-
include/drm/{ => display}/drm_hdcp.h | 14 ++----------
include/drm/display/drm_hdcp_helper.h | 22 +++++++++++++++++++
include/drm/i915_mei_hdcp_interface.h | 2 +-
25 files changed, 54 insertions(+), 29 deletions(-)
rename drivers/gpu/drm/{drm_hdcp.c => display/drm_hdcp_helper.c} (99%)
rename include/drm/{ => display}/drm_hdcp.h (95%)
create mode 100644 include/drm/display/drm_hdcp_helper.hDocumentation/gpu/drm-kms-helpers.rst +1 -1
@@ -226,7 +226,7 @@ Panel Self Refresh Helper Reference HDCP Helper Functions Reference =============================== -.. kernel-doc:: drivers/gpu/drm/drm_hdcp.c +.. kernel-doc:: drivers/gpu/drm/display/drm_hdcp_helper.c :export: Display Port Helper Functions Reference
drivers/gpu/drm/Kconfig +7 -0
@@ -95,6 +95,13 @@ config DRM_DP_HELPER help DRM helpers for DisplayPort. +config DRM_HDCP_HELPER + tristate + depends on DRM + select DRM_DISPLAY_HELPER + help + DRM helpers for HDCP. + config DRM_KMS_HELPER tristate depends on DRM
drivers/gpu/drm/Makefile +1 -1
@@ -58,7 +58,7 @@ obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o # drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ - drm_encoder_slave.o drm_flip_work.o drm_hdcp.o \ + drm_encoder_slave.o drm_flip_work.o \ drm_probe_helper.o \ drm_plane_helper.o drm_atomic_helper.o \ drm_kms_helper_common.o \
drivers/gpu/drm/amd/display/Kconfig +1 -0
@@ -20,6 +20,7 @@ config DRM_AMD_DC_DCN config DRM_AMD_DC_HDCP bool "Enable HDCP support in DC" depends on DRM_AMD_DC + select DRM_HDCP_HELPER help Choose this option if you want to support HDCP authentication.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -48,7 +48,7 @@#include "amdgpu_dm.h" #ifdef CONFIG_DRM_AMD_DC_HDCP #include "amdgpu_dm_hdcp.h" -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #endif #include "amdgpu_pm.h" #include "amdgpu_atombios.h"
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +1 -1
@@ -27,7 +27,7 @@#include "amdgpu.h" #include "amdgpu_dm.h" #include "dm_helpers.h" -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #include "hdcp_psp.h" /*
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h +1 -1
@@ -30,7 +30,7 @@#include "hdcp_log.h" #include <drm/display/drm_dp_helper.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> enum mod_hdcp_trans_input_result {UNKNOWN =0 ,
drivers/gpu/drm/bridge/Kconfig +1 -0
@@ -77,6 +77,7 @@ config DRM_DISPLAY_CONNECTOR config DRM_ITE_IT6505 tristate "ITE IT6505 DisplayPort bridge" depends on OF + select DRM_HDCP_HELPER select DRM_KMS_HELPER select EXTCON help
drivers/gpu/drm/bridge/analogix/Kconfig +1 -0
@@ -34,6 +34,7 @@ config DRM_ANALOGIX_ANX7625 depends on OF select DRM_DP_AUX_BUS select DRM_DP_HELPER + select DRM_HDCP_HELPER select DRM_MIPI_DSI help ANX7625 is an ultra-low power 4K mobile HD transmitter
drivers/gpu/drm/bridge/analogix/anx7625.c +1 -1
@@ -23,11 +23,11 @@#include <drm/display/drm_dp_aux_bus.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdcp_helper_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_edid.h> -#include <drm/drm_hdcp.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/bridge/cadence/Kconfig +1 -0
@@ -2,6 +2,7 @@ config DRM_CDNS_MHDP8546 tristate "Cadence DPI/DP bridge" select DRM_DP_HELPER + select DRM_HDCP_HELPER select DRM_KMS_HELPER select DRM_PANEL_BRIDGE depends on OF
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +1 -1
@@ -36,13 +36,13 @@#include <linux/wait.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdcp_helper_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_state_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_connector.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_hdcp.h> #include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c +1 -1
@@ -11,7 +11,7 @@#include <asm/unaligned.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #include "cdns-mhdp8546-hdcp.h"
drivers/gpu/drm/bridge/ite-it6505.c +1 -1
@@ -22,12 +22,12 @@#include <crypto/hash.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdcp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_edid.h> -#include <drm/drm_hdcp.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/display/Makefile +1 -0
@@ -7,5 +7,6 @@ drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_h drm_dp_mst_topology.o drm_dsc_helper.o drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o +drm_display_helper-$(CONFIG_DRM_HDCP_HELPER) += drm_hdcp_helper.o obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.o
drivers/gpu/drm/display/drm_hdcp_helper.c renamed from drivers/gpu/drm/drm_hdcp.c +2 -2
@@ -13,7 +13,7 @@#include <linux/slab.h> #include <linux/firmware.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #include <drm/drm_sysfs.h> #include <drm/drm_print.h> #include <drm/drm_device.h>
@@ -21,7 +21,7 @@#include <drm/drm_mode_object.h> #include <drm/drm_connector.h> -#include "drm_internal.h" +#include "../drm_internal.h" static inline void drm_hdcp_print_ksv (const u8 *ksv) {
drivers/gpu/drm/i915/Kconfig +1 -0
@@ -10,6 +10,7 @@ config DRM_I915 # the shmem_readpage() which depends upon tmpfs select SHMEM select TMPFS + select DRM_HDCP_HELPER select DRM_DP_HELPER select DRM_KMS_HELPER select DRM_PANEL
drivers/gpu/drm/i915/display/intel_dp_hdcp.c +1 -1
@@ -8,7 +8,7 @@#include <drm/display/drm_dp_helper.h> #include <drm/display/drm_dp_mst_helper.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #include <drm/drm_print.h> #include "intel_ddi.h"
drivers/gpu/drm/i915/display/intel_gmbus.c +1 -1
@@ -31,7 +31,7 @@#include <linux/i2c-algo-bit.h> #include <linux/i2c.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #include "i915_drv.h" #include "intel_de.h"
drivers/gpu/drm/i915/display/intel_hdcp.c +1 -1
@@ -12,7 +12,7 @@#include <linux/i2c.h> #include <linux/random.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #include <drm/i915_component.h> #include "i915_drv.h"
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -1
@@ -32,10 +32,10 @@#include <linux/slab.h> #include <linux/string_helpers.h> +#include <drm/display/drm_hdcp_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h> -#include <drm/drm_hdcp.h> #include <drm/drm_scdc_helper.h> #include <drm/intel_lpe_audio.h>
drivers/misc/mei/hdcp/mei_hdcp.h +1 -1
@@ -9,7 +9,7 @@#ifndef __MEI_HDCP_H__#define __MEI_HDCP_H__ -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp.h> /* me_hdcp_status: Enumeration of all HDCP Status Codes */ enum me_hdcp_status {
include/drm/display/drm_hdcp.h renamed from include/drm/drm_hdcp.h +2 -12
@@ -6,8 +6,8 @@* Sean Paul <[email protected]> */ -#ifndef _DRM_HDCP_H_INCLUDED_ -#define _DRM_HDCP_H_INCLUDED_ +#ifndef _DRM_HDCP_H_ +#define _DRM_HDCP_H_#include <linux/types.h>
@@ -291,16 +291,6 @@ struct hdcp_srm_header {u8 srm_gen_no; } __packed; -struct drm_device ; -struct drm_connector ; - -int drm_hdcp_check_ksvs_revoked (struct drm_device *dev, -u8 *ksvs,u32 ksv_count); -int drm_connector_attach_content_protection_property ( -struct drm_connector *connector,bool hdcp_content_type); -void drm_hdcp_update_content_protection (struct drm_connector *connector, -u64 val); -/* Content Type classification for HDCP2.2 vs others */ #define DRM_MODE_HDCP_CONTENT_TYPE0 0#define DRM_MODE_HDCP_CONTENT_TYPE1 1
include/drm/display/drm_hdcp_helper.h new file +22 -0
@@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright (C) 2017 Google, Inc. +* +* Authors: +* Sean Paul <[email protected]> +*/ + +#ifndef _DRM_HDCP_HELPER_H_INCLUDED_ +#define _DRM_HDCP_HELPER_H_INCLUDED_ + +#include <drm/display/drm_hdcp.h> + +struct drm_device ; +struct drm_connector ; + +int drm_hdcp_check_ksvs_revoked (struct drm_device *dev,u8 *ksvs,u32 ksv_count); +int drm_connector_attach_content_protection_property (struct drm_connector *connector, +bool hdcp_content_type); +void drm_hdcp_update_content_protection (struct drm_connector *connector,u64 val); + +#endif
include/drm/i915_mei_hdcp_interface.h +1 -1
@@ -11,7 +11,7 @@#include <linux/mutex.h> #include <linux/device.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp.h> /** * enum hdcp_port_type - HDCP port implementation type defined by ME FW
Signature · 1 line
2.35.1
Jani Nikula
maintainerRe: [PATCH 6/8] drm/display: Move HDCP helpers into display-helper module
drivers/gpu/drm/bridge/analogix/anx7625.c line 26
Quoted 9 lines · Thomas Zimmermann
drivers/gpu/drm/bridge/analogix/anx7625.c +1
-0@@ -23,11 +23,11 @@#include <drm/display/drm_dp_aux_bus.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdcp_helper_helper.h>
This helper helper crept in a few places.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Thomas Zimmermann
maintainerRe: [PATCH 6/8] drm/display: Move HDCP helpers into display-helper module
Hi Jani
Am 30.03.22 um 09:12 schrieb Jani Nikula:
Quoted 7 lines · Thomas Zimmermann
Quoted 6 lines
drivers/gpu/drm/bridge/analogix/anx7625.c +0
-0@@ -23,11 +23,11 @@
Quoted 5 lines
drivers/gpu/drm/bridge/analogix/anx7625.c line 26
Quoted 3 lines
drivers/gpu/drm/bridge/analogix/anx7625.c +1
-0#include <drm/display/drm_dp_aux_bus.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdcp_helper_helper.h> This helper helper crept in a few places.
Thanks for reporting. I'll try to enable more drivers for the patches' next iteration in order to find such issues.
Best regards
Thomas
Quoted 4 lines
BR,
Jani.
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Re: [PATCH 6/8] drm/display: Move HDCP helpers into display-helper module
In reply to Thomas ZimmermannQuoted 6 lines · Thomas Zimmermann
Move DRM's HDCP helper library into the display/ subdirectory and add it to DRM's display helpers. Split the header file into core and helpers. Update all affected drivers. No functional changes.
Signed-off-by Thomas Zimmermann <[email protected]>---
After fixing Jani's comment about the drm_hdcp_helper_helper.h typo:
[snip]
Quoted 17 lines
drivers/gpu/drm/display/drm_hdcp_helper.c renamed from drivers/gpu/drm/drm_hdcp.c +1
-1@@ -13,7 +13,7 @@#include <linux/slab.h> #include <linux/firmware.h> -#include <drm/drm_hdcp.h> +#include <drm/display/drm_hdcp_helper.h> #include <drm/drm_sysfs.h> #include <drm/drm_print.h> #include <drm/drm_device.h>
drivers/gpu/drm/display/drm_hdcp_helper.c line 25
Quoted 6 lines
drivers/gpu/drm/display/drm_hdcp_helper.c renamed from drivers/gpu/drm/drm_hdcp.c +1
-1@@ -21,7 +21,7 @@#include <drm/drm_mode_object.h> #include <drm/drm_connector.h> -#include "drm_internal.h" +#include "../drm_internal.h"
As far as I can tell drivers/gpu/drm/drm_hdcp.c doesn't use any of the symbols declared in "drm_internal.h" and this inclusion could just be removed.
If you agree and add a preparatory patch in v2, feel free to also add my R-B.
Signature · 5 lines
Best regards, Javier Martinez Canillas Linux Engineering Red Hat
Thomas Zimmermann
maintainerPATCH 7/8 drm/display: Move HDMI helpers into display-helper module
In reply to Thomas ZimmermannMove DRM's HMDI helpers into the display/ subdirectoy and add it to DRM's display helpers. Update all affected drivers. No functional changes.
The HDMI helpers were implemented in the EDID and connector code, but are actually unrelated. With the move to the display-helper library, we can remove the dependency on drm_edid.{c,h} in many driver's HDMI source files.
--- drivers/gpu/drm/Kconfig | 9 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/bridge/Kconfig | 4 + drivers/gpu/drm/bridge/analogix/Kconfig | 1 + .../drm/bridge/analogix/analogix-anx78xx.c | 2 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/bridge/sil-sii8620.c | 2 +- drivers/gpu/drm/bridge/synopsys/Kconfig | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +- drivers/gpu/drm/display/Makefile | 1 + drivers/gpu/drm/display/drm_hdmi_helper.c | 463 ++++++++++++++++++ drivers/gpu/drm/drm_connector.c | 34 -- drivers/gpu/drm/drm_edid.c | 438 +---------------- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/hdmi/Makefile | 4 + drivers/gpu/drm/i2c/Kconfig | 1 + drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- drivers/gpu/drm/i915/Kconfig | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 1 + drivers/gpu/drm/i915/display/intel_lspcon.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 1 + drivers/gpu/drm/mediatek/Kconfig | 1 + drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 + drivers/gpu/drm/nouveau/Kconfig | 1 + drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 + drivers/gpu/drm/omapdrm/Kconfig | 2 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 + drivers/gpu/drm/radeon/radeon_audio.c | 1 + drivers/gpu/drm/rockchip/Kconfig | 2 + drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 1 + drivers/gpu/drm/sti/Kconfig | 1 + drivers/gpu/drm/sti/sti_hdmi.c | 2 +- drivers/gpu/drm/sun4i/Kconfig | 1 + drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 +- drivers/gpu/drm/tegra/Kconfig | 1 + drivers/gpu/drm/tegra/hdmi.c | 1 + drivers/gpu/drm/tegra/sor.c | 1 + drivers/gpu/drm/vc4/Kconfig | 1 + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- include/drm/display/drm_hdmi_helper.h | 36 ++ include/drm/drm_connector.h | 2 - include/drm/drm_edid.h | 31 +- 51 files changed, 572 insertions(+), 507 deletions(-) create mode 100644 drivers/gpu/drm/display/drm_hdmi_helper.c create mode 100644 drivers/gpu/drm/hdmi/Makefile create mode 100644 include/drm/display/drm_hdmi_helper.h
drivers/gpu/drm/Kconfig +9 -0
@@ -102,6 +102,13 @@ config DRM_HDCP_HELPER help DRM helpers for HDCP. +config DRM_HDMI_HELPER + tristate + depends on DRM + select DRM_DISPLAY_HELPER + help + DRM helpers for HDMI. + config DRM_KMS_HELPER tristate depends on DRM
@@ -265,6 +272,7 @@ config DRM_RADEON depends on AGP || !AGP select FW_LOADER select DRM_DP_HELPER + select DRM_HDMI_HELPER select DRM_KMS_HELPER select DRM_TTM select DRM_TTM_HELPER
@@ -285,6 +293,7 @@ config DRM_AMDGPU tristate "AMD GPU" depends on DRM && PCI && MMU select FW_LOADER + select DRM_HDMI_HELPER select DRM_DP_HELPER select DRM_KMS_HELPER select DRM_SCHED
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -0
@@ -21,6 +21,7 @@* */ +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -0
@@ -21,6 +21,7 @@* */ +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -0
@@ -23,6 +23,7 @@#include <linux/pci.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -0
@@ -21,6 +21,7 @@* */ +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -74,6 +74,7 @@#include <linux/component.h> #include <drm/display/drm_dp_mst_helper.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_uapi.h> #include <drm/drm_atomic_helper.h>
drivers/gpu/drm/bridge/Kconfig +4 -0
@@ -103,6 +103,7 @@ config DRM_LONTIUM_LT9611 tristate "Lontium LT9611 DSI/HDMI bridge" select SND_SOC_HDMI_CODEC if SND_SOC depends on OF + select DRM_HDMI_HELPER select DRM_PANEL_BRIDGE select DRM_KMS_HELPER select DRM_MIPI_DSI
@@ -130,6 +131,7 @@ config DRM_LONTIUM_LT9611UXC config DRM_ITE_IT66121 tristate "ITE IT66121 HDMI bridge" depends on OF + select DRM_HDMI_HELPER select DRM_KMS_HELPER select REGMAP_I2C help
@@ -204,6 +206,7 @@ config DRM_PARADE_PS8640 config DRM_SIL_SII8620 tristate "Silicon Image SII8620 HDMI/MHL bridge" depends on OF + select DRM_HDMI_HELPER select DRM_KMS_HELPER select EXTCON depends on RC_CORE || !RC_CORE
@@ -213,6 +216,7 @@ config DRM_SIL_SII8620 config DRM_SII902X tristate "Silicon Image sii902x RGB/HDMI bridge" depends on OF + select DRM_HDMI_HELPER select DRM_KMS_HELPER select REGMAP_I2C select I2C_MUX
drivers/gpu/drm/bridge/analogix/Kconfig +1 -0
@@ -15,6 +15,7 @@ config DRM_ANALOGIX_ANX6345 config DRM_ANALOGIX_ANX78XX tristate "Analogix ANX78XX bridge" select DRM_ANALOGIX_DP + select DRM_HDMI_HELPER select DRM_DP_HELPER select DRM_KMS_HELPER select REGMAP_I2C
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +1 -1
@@ -19,10 +19,10 @@#include <linux/types.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h> -#include <drm/drm_edid.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/bridge/sii902x.c +1 -1
@@ -20,10 +20,10 @@#include <linux/regulator/consumer.h> #include <linux/clk.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_drv.h> -#include <drm/drm_edid.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/bridge/sil-sii8620.c +1 -1
@@ -9,9 +9,9 @@#include <asm/unaligned.h> #include <drm/bridge/mhl.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h> -#include <drm/drm_edid.h> #include <drm/drm_encoder.h> #include <linux/clk.h>
drivers/gpu/drm/bridge/synopsys/Kconfig +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_DW_HDMI tristate + select DRM_HDMI_HELPER select DRM_KMS_HELPER select REGMAP_MMIO select CEC_CORE if CEC_NOTIFIER
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +1 -1
@@ -25,10 +25,10 @@#include <uapi/linux/videodev2.h> #include <drm/bridge/dw_hdmi.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> -#include <drm/drm_edid.h> #include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/display/Makefile +1 -0
@@ -8,5 +8,6 @@ drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_h drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o drm_display_helper-$(CONFIG_DRM_HDCP_HELPER) += drm_hdcp_helper.o +drm_display_helper-$(CONFIG_DRM_HDMI_HELPER) += drm_hdmi_helper.o obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.o
drivers/gpu/drm/display/drm_hdmi_helper.c new file +463 -0
463 lines not on this page · raw message
drivers/gpu/drm/drm_connector.c +0 -34
@@ -1486,40 +1486,6 @@ int drm_connector_attach_content_type_property(struct drm_connector *connector) }EXPORT_SYMBOL (drm_connector_attach_content_type_property); - -/** -* drm_hdmi_avi_infoframe_content_type() - fill the HDMI AVI infoframe -* content type information, based -* on correspondent DRM property. -* @frame: HDMI AVI infoframe -* @conn_state: DRM display connector state -* -*/ -void drm_hdmi_avi_infoframe_content_type (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state) -{ -switch (conn_state->content_type) { -case DRM_MODE_CONTENT_TYPE_GRAPHICS : - frame->content_type =HDMI_CONTENT_TYPE_GRAPHICS ; -break ; -case DRM_MODE_CONTENT_TYPE_CINEMA : - frame->content_type =HDMI_CONTENT_TYPE_CINEMA ; -break ; -case DRM_MODE_CONTENT_TYPE_GAME : - frame->content_type =HDMI_CONTENT_TYPE_GAME ; -break ; -case DRM_MODE_CONTENT_TYPE_PHOTO : - frame->content_type =HDMI_CONTENT_TYPE_PHOTO ; -break ; -default : -/* Graphics is the default(0) */ - frame->content_type =HDMI_CONTENT_TYPE_GRAPHICS ; - } - - frame->itc = conn_state->content_type !=DRM_MODE_CONTENT_TYPE_NO_DATA ; -} -EXPORT_SYMBOL (drm_hdmi_avi_infoframe_content_type); -/** * drm_connector_attach_tv_margin_properties - attach TV connector margin * properties
drivers/gpu/drm/drm_edid.c +7 -431
478 lines not on this page · raw message
drivers/gpu/drm/exynos/Kconfig +1 -0
@@ -76,6 +76,7 @@ config DRM_EXYNOS_HDMI bool "HDMI" depends on DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON select CEC_CORE if CEC_NOTIFIER + select DRM_HDMI_HELPER help Choose this option if you want to use Exynos HDMI for DRM.
drivers/gpu/drm/exynos/exynos_hdmi.c +1 -1
@@ -33,9 +33,9 @@#include <sound/hdmi-codec.h> #include <media/cec-notifier.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> -#include <drm/drm_edid.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h>
drivers/gpu/drm/hdmi/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT + +drm_hdmi_helper-y := drm_hdmi.o +obj-$(CONFIG_DRM_HDMI_HELPER) += drm_hdmi_helper.o
drivers/gpu/drm/i2c/Kconfig +1 -0
@@ -23,6 +23,7 @@ config DRM_I2C_SIL164 config DRM_I2C_NXP_TDA998X tristate "NXP Semiconductors TDA998X HDMI encoder" default m if DRM_TILCDC + select DRM_HDMI_HELPER select CEC_CORE if CEC_NOTIFIER select SND_SOC_HDMI_CODEC if SND_SOC help
drivers/gpu/drm/i2c/tda998x_drv.c +1 -1
@@ -13,9 +13,9 @@#include <sound/asoundef.h> #include <sound/hdmi-codec.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> -#include <drm/drm_edid.h> #include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/i915/Kconfig +1 -0
@@ -11,6 +11,7 @@ config DRM_I915 select SHMEM select TMPFS select DRM_HDCP_HELPER + select DRM_HDMI_HELPER select DRM_DP_HELPER select DRM_KMS_HELPER select DRM_PANEL
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
@@ -37,9 +37,9 @@#include <drm/display/drm_dp_helper.h> #include <drm/display/drm_dsc_helper.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_edid.h> #include <drm/drm_probe_helper.h> #include "g4x_dp.h"
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -0
@@ -33,6 +33,7 @@#include <linux/string_helpers.h> #include <drm/display/drm_hdcp_helper.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h>
drivers/gpu/drm/i915/display/intel_lspcon.c +1 -1
@@ -24,8 +24,8 @@*/ #include <drm/display/drm_dp_dual_mode_helper.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_edid.h> #include "intel_de.h" #include "intel_display_types.h"
drivers/gpu/drm/i915/display/intel_sdvo.c +1 -0
@@ -31,6 +31,7 @@#include <linux/i2c.h> #include <linux/slab.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h>
drivers/gpu/drm/mediatek/Kconfig +1 -0
@@ -24,6 +24,7 @@ config DRM_MEDIATEK config DRM_MEDIATEK_HDMI tristate "DRM HDMI Support for Mediatek SoCs" depends on DRM_MEDIATEK + select DRM_HDMI_HELPER select SND_SOC_HDMI_CODEC if SND_SOC select PHY_MTK_HDMI help
drivers/gpu/drm/mediatek/mtk_hdmi.c +1 -1
@@ -24,10 +24,10 @@#include <sound/hdmi-codec.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc.h> -#include <drm/drm_edid.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/msm/Kconfig +1 -0
@@ -13,6 +13,7 @@ config DRM_MSM select QCOM_MDT_LOADER if ARCH_QCOM select REGULATOR select DRM_DP_HELPER + select DRM_HDMI_HELPER select DRM_KMS_HELPER select DRM_PANEL select DRM_BRIDGE
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +2 -0
@@ -5,6 +5,8 @@*/ #include <linux/delay.h> + +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_bridge_connector.h> #include "msm_kms.h"
drivers/gpu/drm/nouveau/Kconfig +1 -0
@@ -5,6 +5,7 @@ config DRM_NOUVEAU select IOMMU_API select FW_LOADER select DRM_DP_HELPER + select DRM_HDMI_HELPER select DRM_KMS_HELPER select DRM_TTM select DRM_TTM_HELPER
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -0
@@ -34,6 +34,7 @@#include <linux/iopoll.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_edid.h>
drivers/gpu/drm/omapdrm/Kconfig +2 -0
@@ -58,6 +58,7 @@ config OMAP2_DSS_HDMI_COMMON config OMAP4_DSS_HDMI bool "HDMI support for OMAP4" default y + select DRM_HDMI_HELPER select OMAP2_DSS_HDMI_COMMON help HDMI support for OMAP4 based SoCs.
@@ -73,6 +74,7 @@ config OMAP4_DSS_HDMI_CEC config OMAP5_DSS_HDMI bool "HDMI support for OMAP5" default n + select DRM_HDMI_HELPER select OMAP2_DSS_HDMI_COMMON help HDMI Interface for OMAP5 and similar cores. This adds the High
drivers/gpu/drm/omapdrm/dss/hdmi4.c +1 -0
@@ -27,6 +27,7 @@#include <sound/omap-hdmi-audio.h> #include <media/cec.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_state_helper.h>
drivers/gpu/drm/radeon/radeon_audio.c +1 -0
@@ -24,6 +24,7 @@#include <linux/gcd.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_crtc.h> #include "dce6_afmt.h" #include "evergreen_hdmi.h"
drivers/gpu/drm/rockchip/Kconfig +2 -0
@@ -58,6 +58,7 @@ config ROCKCHIP_DW_MIPI_DSI config ROCKCHIP_INNO_HDMI bool "Rockchip specific extensions for Innosilicon HDMI" + select DRM_HDMI_HELPER help This selects support for Rockchip SoC specific extensions for the Innosilicon HDMI driver. If you want to enable
@@ -86,6 +87,7 @@ config ROCKCHIP_RGB config ROCKCHIP_RK3066_HDMI bool "Rockchip specific extensions for RK3066 HDMI" depends on DRM_ROCKCHIP + select DRM_HDMI_HELPER help This selects support for Rockchip SoC specific extensions for the RK3066 HDMI driver. If you want to enable
drivers/gpu/drm/rockchip/inno_hdmi.c +1 -1
@@ -15,8 +15,8 @@#include <linux/mutex.h> #include <linux/of_device.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_edid.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h>
drivers/gpu/drm/rockchip/rk3066_hdmi.c +1 -0
@@ -4,6 +4,7 @@* Zheng Yang <[email protected]> */ +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h>
drivers/gpu/drm/sti/Kconfig +1 -0
@@ -3,6 +3,7 @@ config DRM_STI tristate "DRM Support for STMicroelectronics SoC stiH4xx Series" depends on OF && DRM && (ARCH_STI || ARCH_MULTIPLATFORM) select RESET_CONTROLLER + select DRM_HDMI_HELPER select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER select DRM_PANEL
drivers/gpu/drm/sti/sti_hdmi.c +1 -1
@@ -13,11 +13,11 @@#include <linux/platform_device.h> #include <linux/reset.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_debugfs.h> #include <drm/drm_drv.h> -#include <drm/drm_edid.h> #include <drm/drm_file.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/sun4i/Kconfig +1 -0
@@ -18,6 +18,7 @@ if DRM_SUN4I config DRM_SUN4I_HDMI tristate "Allwinner A10 HDMI Controller Support" default DRM_SUN4I + select DRM_HDMI_HELPER help Choose this option if you have an Allwinner SoC with an HDMI controller.
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +1 -1
@@ -15,8 +15,8 @@#include <linux/regmap.h> #include <linux/reset.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_edid.h> #include <drm/drm_encoder.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
drivers/gpu/drm/tegra/Kconfig +1 -0
@@ -7,6 +7,7 @@ config DRM_TEGRA depends on OF select DRM_DP_AUX_BUS select DRM_DP_HELPER + select DRM_HDMI_HELPER select DRM_KMS_HELPER select DRM_MIPI_DSI select DRM_PANEL
drivers/gpu/drm/tegra/hdmi.c +1 -0
@@ -19,6 +19,7 @@#include <soc/tegra/common.h> #include <sound/hdmi-codec.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_debugfs.h>
drivers/gpu/drm/tegra/sor.c +1 -0
@@ -17,6 +17,7 @@#include <soc/tegra/pmc.h> #include <drm/display/drm_dp_helper.h> +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_debugfs.h> #include <drm/drm_file.h>
drivers/gpu/drm/vc4/Kconfig +1 -0
@@ -5,6 +5,7 @@ config DRM_VC4 depends on DRM depends on SND && SND_SOC depends on COMMON_CLK + select DRM_HDMI_HELPER select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER select DRM_PANEL_BRIDGE
drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -31,8 +31,8 @@* encoder block has CEC support. */ +#include <drm/display/drm_hdmi_helper.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_edid.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h> #include <drm/drm_scdc_helper.h>
include/drm/display/drm_hdmi_helper.h new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef DRM_HDMI_HELPER +#define DRM_HDMI_HELPER + +#include <linux/hdmi.h> + +struct drm_connector ; +struct drm_connector_state ; +struct drm_display_mode ; + +int drm_hdmi_avi_infoframe_from_display_mode (struct hdmi_avi_infoframe *frame, +const struct drm_connector *connector, +const struct drm_display_mode *mode); +int drm_hdmi_vendor_infoframe_from_display_mode (struct hdmi_vendor_infoframe *frame, +const struct drm_connector *connector, +const struct drm_display_mode *mode); + +void drm_hdmi_avi_infoframe_colorimetry (struct hdmi_avi_infoframe *frame, +const struct drm_connector_state *conn_state); + +void drm_hdmi_avi_infoframe_bars (struct hdmi_avi_infoframe *frame, +const struct drm_connector_state *conn_state); + +void drm_hdmi_avi_infoframe_content_type (struct hdmi_avi_infoframe *frame, +const struct drm_connector_state *conn_state); + +void drm_hdmi_avi_infoframe_quant_range (struct hdmi_avi_infoframe *frame, +const struct drm_connector *connector, +const struct drm_display_mode *mode, +enum hdmi_quantization_range rgb_quant_range); + +int drm_hdmi_infoframe_set_hdr_metadata (struct hdmi_drm_infoframe *frame, +const struct drm_connector_state *conn_state); + +#endif
include/drm/drm_connector.h +0 -2
@@ -1784,8 +1784,6 @@ int drm_mode_create_aspect_ratio_property(struct drm_device *dev);int drm_mode_create_hdmi_colorspace_property (struct drm_connector *connector);int drm_mode_create_dp_colorspace_property (struct drm_connector *connector);int drm_mode_create_content_type_property (struct drm_device *dev); -void drm_hdmi_avi_infoframe_content_type (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state);int drm_mode_create_suggested_offset_properties (struct drm_device *dev);
include/drm/drm_edid.h +4 -27
@@ -391,33 +391,6 @@ drm_load_edid_firmware(struct drm_connector *connector)bool drm_edid_are_equal (const struct edid *edid1,const struct edid *edid2); -int -drm_hdmi_avi_infoframe_from_display_mode (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); -int -drm_hdmi_vendor_infoframe_from_display_mode (struct hdmi_vendor_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); - -void -drm_hdmi_avi_infoframe_colorimetry (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_bars (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_quant_range (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode, -enum hdmi_quantization_range rgb_quant_range); - -int -drm_hdmi_infoframe_set_hdr_metadata (struct hdmi_drm_infoframe *frame, -const struct drm_connector_state *conn_state); -/** * drm_eld_mnl - Get ELD monitor name length in bytes. * @eld: pointer to an eld memory structure with mnl set
@@ -587,6 +560,10 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name,struct drm_display_mode *drm_mode_find_dmt (struct drm_device *dev,int hsize,int vsize,int fresh,bool rb); + +u8 drm_match_hdmi_mode (const struct drm_display_mode *to_match); +enum hdmi_picture_aspect drm_get_cea_aspect_ratio (const u8 video_code); +enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio (const u8 video_code);struct drm_display_mode *drm_display_mode_from_cea_vic (struct drm_device *dev,u8 video_code);
Signature · 1 line
2.35.1
Jani Nikula
maintainerRe: [PATCH 7/8] drm/display: Move HDMI helpers into display-helper module
Quoted 39 lines · Thomas Zimmermann
include/drm/drm_edid.h +0
-27@@ -391,33 +391,6 @@ drm_load_edid_firmware(struct drm_connector *connector)bool drm_edid_are_equal (const struct edid *edid1,const struct edid *edid2); -int -drm_hdmi_avi_infoframe_from_display_mode (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); -int -drm_hdmi_vendor_infoframe_from_display_mode (struct hdmi_vendor_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); - -void -drm_hdmi_avi_infoframe_colorimetry (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_bars (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_quant_range (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode, -enum hdmi_quantization_range rgb_quant_range); - -int -drm_hdmi_infoframe_set_hdr_metadata (struct hdmi_drm_infoframe *frame, -const struct drm_connector_state *conn_state); -/** * drm_eld_mnl - Get ELD monitor name length in bytes. * @eld: pointer to an eld memory structure with mnl set
include/drm/drm_edid.h void drm_edid_get_monitor_name(struct edid *edid, char *name, · line 566
Quoted 7 lines
include/drm/drm_edid.h +4
-0@@ -587,6 +560,10 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name,struct drm_display_mode *drm_mode_find_dmt (struct drm_device *dev,int hsize,int vsize,int fresh,bool rb); + +u8 drm_match_hdmi_mode (const struct drm_display_mode *to_match); +enum hdmi_picture_aspect drm_get_cea_aspect_ratio (const u8 video_code); +enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio (const u8 video_code);
I think these were fine as static, but not really great interfaces to export. There's zero input checking on the vic in the latter, because internally we could be sure they were fine.
I also wish we could limit the usage to the module you're adding; this is now available to all drivers which should be discouraged.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Thomas Zimmermann
maintainerRe: [PATCH 7/8] drm/display: Move HDMI helpers into display-helper module
Hi
Am 30.03.22 um 12:35 schrieb Jani Nikula:
Quoted 43 lines · Thomas Zimmermann
Quoted 42 lines
include/drm/drm_edid.h +0
-27@@ -391,33 +391,6 @@ drm_load_edid_firmware(struct drm_connector *connector)bool drm_edid_are_equal (const struct edid *edid1,const struct edid *edid2); -int -drm_hdmi_avi_infoframe_from_display_mode (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); -int -drm_hdmi_vendor_infoframe_from_display_mode (struct hdmi_vendor_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); - -void -drm_hdmi_avi_infoframe_colorimetry (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_bars (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_quant_range (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode, -enum hdmi_quantization_range rgb_quant_range); - -int -drm_hdmi_infoframe_set_hdr_metadata (struct hdmi_drm_infoframe *frame, -const struct drm_connector_state *conn_state); -/** * drm_eld_mnl - Get ELD monitor name length in bytes. * @eld: pointer to an eld memory structure with mnl set @@ -587,6 +560,10 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name,struct drm_display_mode *drm_mode_find_dmt (struct drm_device *dev,int hsize,int vsize,int fresh,bool rb);
Quoted 8 lines
include/drm/drm_edid.h void drm_edid_get_monitor_name(struct edid *edid, char *name, · line 566
Quoted 4 lines
include/drm/drm_edid.h +4
-0+ +u8 drm_match_hdmi_mode (const struct drm_display_mode *to_match); +enum hdmi_picture_aspect drm_get_cea_aspect_ratio (const u8 video_code); +enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio (const u8 video_code);I think these were fine as static, but not really great interfaces to export. There's zero input checking on the vic in the latter, because internally we could be sure they were fine.
I see. If nothing else, HDMI could be removed from the patchset. OTOH having these HDMI functions as part of the edid code doesn't seem right either.
Quoted 3 lines
I also wish we could limit the usage to the module you're adding; this is now available to all drivers which should be discouraged.
Why is that discouraged? Quite a few drivers use these interfaces.
Best regards
Thomas
Quoted 6 lines
BR,
Jani.
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Jani Nikula
maintainerRe: [PATCH 7/8] drm/display: Move HDMI helpers into display-helper module
Quoted 60 lines · Thomas Zimmermann
Hi
Am 30.03.22 um 12:35 schrieb Jani Nikula:
Quoted 43 lines · Thomas Zimmermann
Quoted 42 lines
include/drm/drm_edid.h +0
-27@@ -391,33 +391,6 @@ drm_load_edid_firmware(struct drm_connector *connector)bool drm_edid_are_equal (const struct edid *edid1,const struct edid *edid2); -int -drm_hdmi_avi_infoframe_from_display_mode (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); -int -drm_hdmi_vendor_infoframe_from_display_mode (struct hdmi_vendor_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); - -void -drm_hdmi_avi_infoframe_colorimetry (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_bars (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_quant_range (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode, -enum hdmi_quantization_range rgb_quant_range); - -int -drm_hdmi_infoframe_set_hdr_metadata (struct hdmi_drm_infoframe *frame, -const struct drm_connector_state *conn_state); -/** * drm_eld_mnl - Get ELD monitor name length in bytes. * @eld: pointer to an eld memory structure with mnl set @@ -587,6 +560,10 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name,struct drm_display_mode *drm_mode_find_dmt (struct drm_device *dev,int hsize,int vsize,int fresh,bool rb);Quoted 8 lines
include/drm/drm_edid.h void drm_edid_get_monitor_name(struct edid *edid, char *name, · line 566
Quoted 4 lines
include/drm/drm_edid.h +4
-0+ +u8 drm_match_hdmi_mode (const struct drm_display_mode *to_match); +enum hdmi_picture_aspect drm_get_cea_aspect_ratio (const u8 video_code); +enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio (const u8 video_code);I think these were fine as static, but not really great interfaces to export. There's zero input checking on the vic in the latter, because internally we could be sure they were fine.
I see. If nothing else, HDMI could be removed from the patchset. OTOH having these HDMI functions as part of the edid code doesn't seem right either.
Quoted 1 line
Quoted 4 lines
Quoted 2 lines
I also wish we could limit the usage to the module you're adding; this is now available to all drivers which should be discouraged.
Why is that discouraged? Quite a few drivers use these interfaces.
No driver needed to directly use the functions you're now additionally exporting from drm_edid.c. I'd hope no driver starts to use them either.
BR,
Jani.
Quoted 9 lines
Best regards
ThomasQuoted 6 lines
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Jani Nikula
maintainerRe: [PATCH 7/8] drm/display: Move HDMI helpers into display-helper module
Quoted 56 lines · Jani Nikula
Quoted 55 lines · Thomas Zimmermann
Hi
Am 30.03.22 um 12:35 schrieb Jani Nikula:
Quoted 51 lines · Thomas Zimmermann
Quoted 39 lines
include/drm/drm_edid.h +0
-27@@ -391,33 +391,6 @@ drm_load_edid_firmware(struct drm_connector *connector)bool drm_edid_are_equal (const struct edid *edid1,const struct edid *edid2); -int -drm_hdmi_avi_infoframe_from_display_mode (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); -int -drm_hdmi_vendor_infoframe_from_display_mode (struct hdmi_vendor_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); - -void -drm_hdmi_avi_infoframe_colorimetry (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_bars (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_quant_range (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode, -enum hdmi_quantization_range rgb_quant_range); - -int -drm_hdmi_infoframe_set_hdr_metadata (struct hdmi_drm_infoframe *frame, -const struct drm_connector_state *conn_state); -/** * drm_eld_mnl - Get ELD monitor name length in bytes. * @eld: pointer to an eld memory structure with mnl set include/drm/drm_edid.h void drm_edid_get_monitor_name(struct edid *edid, char *name, · line 566
Quoted 7 lines
include/drm/drm_edid.h +4
-0@@ -587,6 +560,10 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name,struct drm_display_mode *drm_mode_find_dmt (struct drm_device *dev,int hsize,int vsize,int fresh,bool rb); + +u8 drm_match_hdmi_mode (const struct drm_display_mode *to_match); +enum hdmi_picture_aspect drm_get_cea_aspect_ratio (const u8 video_code); +enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio (const u8 video_code);I think these were fine as static, but not really great interfaces to export. There's zero input checking on the vic in the latter, because internally we could be sure they were fine.
Quoted 3 lines
Quoted 3 lines
I see. If nothing else, HDMI could be removed from the patchset. OTOH having these HDMI functions as part of the edid code doesn't seem right either.
To clarify, I think the HDMI functionality should probably be moved. It's just the new interfaces I'm worried about.
BR,
Jani.
Quoted 24 lines
Quoted 6 lines
Quoted 4 lines
I also wish we could limit the usage to the module you're adding; this is now available to all drivers which should be discouraged.
Why is that discouraged? Quite a few drivers use these interfaces.
No driver needed to directly use the functions you're now additionally exporting from
drm_edid.c. I'd hope no driver starts to use them either.BR,
Jani.Quoted 9 lines
Best regards
ThomasQuoted 6 lines
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Thomas Zimmermann
maintainerRe: [PATCH 7/8] drm/display: Move HDMI helpers into display-helper module
Hi
Am 07.04.22 um 09:34 schrieb Jani Nikula:
Quoted 61 lines · Jani Nikula
Quoted 56 lines · Thomas Zimmermann
Quoted 55 lines
Hi
Am 30.03.22 um 12:35 schrieb Jani Nikula:
Quoted 51 lines · Thomas Zimmermann
Quoted 39 lines
include/drm/drm_edid.h +0
-27@@ -391,33 +391,6 @@ drm_load_edid_firmware(struct drm_connector *connector)bool drm_edid_are_equal (const struct edid *edid1,const struct edid *edid2); -int -drm_hdmi_avi_infoframe_from_display_mode (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); -int -drm_hdmi_vendor_infoframe_from_display_mode (struct hdmi_vendor_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode); - -void -drm_hdmi_avi_infoframe_colorimetry (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_bars (struct hdmi_avi_infoframe *frame, -const struct drm_connector_state *conn_state); - -void -drm_hdmi_avi_infoframe_quant_range (struct hdmi_avi_infoframe *frame, -const struct drm_connector *connector, -const struct drm_display_mode *mode, -enum hdmi_quantization_range rgb_quant_range); - -int -drm_hdmi_infoframe_set_hdr_metadata (struct hdmi_drm_infoframe *frame, -const struct drm_connector_state *conn_state); -/** * drm_eld_mnl - Get ELD monitor name length in bytes. * @eld: pointer to an eld memory structure with mnl set include/drm/drm_edid.h void drm_edid_get_monitor_name(struct edid *edid, char *name, · line 566
Quoted 7 lines
include/drm/drm_edid.h +4
-0@@ -587,6 +560,10 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name,struct drm_display_mode *drm_mode_find_dmt (struct drm_device *dev,int hsize,int vsize,int fresh,bool rb); + +u8 drm_match_hdmi_mode (const struct drm_display_mode *to_match); +enum hdmi_picture_aspect drm_get_cea_aspect_ratio (const u8 video_code); +enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio (const u8 video_code);I think these were fine as static, but not really great interfaces to export. There's zero input checking on the vic in the latter, because internally we could be sure they were fine.
Quoted 3 lines
Quoted 3 lines
I see. If nothing else, HDMI could be removed from the patchset. OTOH having these HDMI functions as part of the edid code doesn't seem right either.
Quoted 16 lines
To clarify, I think the HDMI functionality should probably be moved. It's just the new interfaces I'm worried about.
BR,
Jani.Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
I also wish we could limit the usage to the module you're adding; this is now available to all drivers which should be discouraged.
Why is that discouraged? Quite a few drivers use these interfaces.
No driver needed to directly use the functions you're now additionally exporting from
drm_edid.c. I'd hope no driver starts to use them either.
I see. I'll reduce the code in the display library, even if that means that some potential helper remains in drm_edid.c for now.
Best regards
Thomas
Quoted 16 lines
Quoted 15 lines
BR,
Jani.Quoted 9 lines
Best regards
ThomasQuoted 6 lines
BR,
Jani.
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Thomas Zimmermann
maintainerPATCH 8/8 drm/display: Move SCDC helpers into display-helper library
In reply to Thomas ZimmermannSCDC is the Status and Control Data Channel for HDMI. Move the SCDC helpers into display/ and split the header into files for core and helpers. Update all affected drivers. No functional changes.
To avoid the proliferation of Kconfig options, SCDC is part of DRM's support for HDMI. If necessary, a new option could make SCDC an independent feature.
---
Documentation/gpu/drm-kms-helpers.rst | 6 +-
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
drivers/gpu/drm/display/Makefile | 2 +-
.../gpu/drm/{ => display}/drm_scdc_helper.c | 3 +-
drivers/gpu/drm/drm_edid.c | 1 -
drivers/gpu/drm/i915/display/intel_ddi.c | 2 +-
drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +-
drivers/gpu/drm/tegra/sor.c | 2 +-
drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
.../{drm_scdc_helper.h => display/drm_scdc.h} | 52 +-----------
include/drm/display/drm_scdc_helper.h | 79 +++++++++++++++++++
13 files changed, 94 insertions(+), 63 deletions(-)
rename drivers/gpu/drm/{ => display}/drm_scdc_helper.c (99%)
rename include/drm/{drm_scdc_helper.h => display/drm_scdc.h} (65%)
create mode 100644 include/drm/display/drm_scdc_helper.hDocumentation/gpu/drm-kms-helpers.rst +3 -3
@@ -356,13 +356,13 @@ EDID Helper Functions Reference SCDC Helper Functions Reference =============================== -.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c +.. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c :doc: scdc helpers -.. kernel-doc:: include/drm/drm_scdc_helper.h +.. kernel-doc:: include/drm/display/drm_scdc_helper.h :internal: -.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c +.. kernel-doc:: drivers/gpu/drm/display/drm_scdc_helper.c :export: HDMI Infoframes Helper Reference
drivers/gpu/drm/Makefile +1 -1
@@ -63,7 +63,7 @@ drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ drm_plane_helper.o drm_atomic_helper.o \ drm_kms_helper_common.o \ drm_simple_kms_helper.o drm_modeset_helper.o \ - drm_scdc_helper.o drm_gem_atomic_helper.o \ + drm_gem_atomic_helper.o \ drm_gem_framebuffer_helper.o \ drm_atomic_state_helper.o drm_damage_helper.o \ drm_format_helper.o drm_self_refresh_helper.o drm_rect.o
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +1 -1
@@ -26,13 +26,13 @@#include <drm/bridge/dw_hdmi.h> #include <drm/display/drm_hdmi_helper.h> +#include <drm/display/drm_scdc_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_scdc_helper.h> #include "dw-hdmi-audio.h" #include "dw-hdmi-cec.h"
drivers/gpu/drm/display/Makefile +1 -1
@@ -8,6 +8,6 @@ drm_display_helper-$(CONFIG_DRM_DP_HELPER) := drm_dp_helper.o drm_dp_dual_mode_h drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o drm_display_helper-$(CONFIG_DRM_HDCP_HELPER) += drm_hdcp_helper.o -drm_display_helper-$(CONFIG_DRM_HDMI_HELPER) += drm_hdmi_helper.o +drm_display_helper-$(CONFIG_DRM_HDMI_HELPER) += drm_hdmi_helper.o drm_scdc_helper.o obj-$(CONFIG_DRM_DISPLAY_HELPER) += drm_display_helper.o
drivers/gpu/drm/display/drm_scdc_helper.c renamed from drivers/gpu/drm/drm_scdc_helper.c +2 -1
@@ -21,11 +21,12 @@* DEALINGS IN THE SOFTWARE. */ +#include <linux/i2c.h> #include <linux/slab.h> #include <linux/delay.h> +#include <drm/display/drm_scdc_helper.h> #include <drm/drm_print.h> -#include <drm/drm_scdc_helper.h> /** * DOC: scdc helpers
drivers/gpu/drm/drm_edid.c +0 -1
@@ -42,7 +42,6 @@#include <drm/drm_edid.h> #include <drm/drm_encoder.h> #include <drm/drm_print.h> -#include <drm/drm_scdc_helper.h> #include "drm_crtc_internal.h"
drivers/gpu/drm/i915/display/intel_ddi.c +1 -1
@@ -27,8 +27,8 @@#include <linux/string_helpers.h> +#include <drm/display/drm_scdc_helper.h> #include <drm/drm_privacy_screen_consumer.h> -#include <drm/drm_scdc_helper.h> #include "i915_drv.h" #include "intel_audio.h"
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -1
@@ -34,10 +34,10 @@#include <drm/display/drm_hdcp_helper.h> #include <drm/display/drm_hdmi_helper.h> +#include <drm/display/drm_scdc_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_edid.h> -#include <drm/drm_scdc_helper.h> #include <drm/intel_lpe_audio.h> #include "i915_debugfs.h"
drivers/gpu/drm/nouveau/dispnv50/disp.c +1 -1
@@ -35,13 +35,13 @@#include <drm/display/drm_dp_helper.h> #include <drm/display/drm_hdmi_helper.h> +#include <drm/display/drm_scdc_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_edid.h> #include <drm/drm_fb_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_scdc_helper.h> #include <drm/drm_vblank.h> #include <nvif/push507c.h>
drivers/gpu/drm/tegra/sor.c +1 -1
@@ -18,11 +18,11 @@#include <drm/display/drm_dp_helper.h> #include <drm/display/drm_hdmi_helper.h> +#include <drm/display/drm_scdc_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_debugfs.h> #include <drm/drm_file.h> #include <drm/drm_panel.h> -#include <drm/drm_scdc_helper.h> #include <drm/drm_simple_kms_helper.h> #include "dc.h"
drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -32,10 +32,10 @@*/ #include <drm/display/drm_hdmi_helper.h> +#include <drm/display/drm_scdc_helper.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h> -#include <drm/drm_scdc_helper.h> #include <linux/clk.h> #include <linux/component.h> #include <linux/i2c.h>
include/drm/display/drm_scdc.h renamed from include/drm/drm_scdc_helper.h +2 -50
62 lines not on this page · raw message
include/drm/display/drm_scdc_helper.h new file +79 -0
79 lines not on this page · raw message
Signature · 1 line
2.35.1
Lyude Paul
maintainerFor patches 2, 3, and 4: Reviewed-by: Lyude Paul <[email protected]>
Quoted 209 lines · Thomas Zimmermann
Move DisplayPort, HDMI and various other display helpers from KMS helpers into a new module. Adapt all drivers.
This patch is part of an on-going effort to reduce the minimum size of DRM when linked into the kernel binary. The helpers for various display and video-output standards are not required for minimal graphics output and can be moved into a separate module.
The DisplayPort code was already part of the DP module, which now forms the base of the display-helper module. Moving other helpers into the new module reduces KMS helpers by ~14 KiB (from 243 KiB to 229 KiB). More importantly, restructuring the code allows for a more fine-grained selection of helpers and dependencies.
Built on x64-64, i586, aarch64, and arm.
Thomas Zimmermann (8):
drm: Put related statements next to each other inMakefile
drm: Rename dp/ to display/
drm/display: Introduce a DRM display-helper module drm/display: Split DisplayPort header into core and helper drm/display: Move DSC header and helpers into display-helper module drm/display: Move HDCP helpers into display-helper module drm/display: Move HDMI helpers into display-helper module drm/display: Move SCDC helpers into display-helper libraryDocumentation/gpu/drm-kms-helpers.rst | 43 +- drivers/gpu/drm/Kconfig | 23 + drivers/gpu/drm/Makefile | 29 +- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + drivers/gpu/drm/amd/display/Kconfig | 1 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 5 +-.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h| 2 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 2 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 +- .../drm/amd/display/dc/core/dc_link_dpcd.c | 2 +-.../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 + .../gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 2 +- .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.h | 2 +-drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 4 +- .../gpu/drm/amd/display/dc/dsc/dscc_types.h | 2 +- .../gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c | 2 +- drivers/gpu/drm/amd/display/dc/os_types.h | 2 +- .../gpu/drm/amd/display/include/dpcd_defs.h | 2 +- .../gpu/drm/amd/display/modules/hdcp/hdcp.h | 4 +- drivers/gpu/drm/bridge/Kconfig | 5 + drivers/gpu/drm/bridge/analogix/Kconfig | 2 + .../drm/bridge/analogix/analogix-anx6345.c | 2 +- .../drm/bridge/analogix/analogix-anx78xx.c | 4 +- .../drm/bridge/analogix/analogix-i2c-dptx.c | 2 +- .../drm/bridge/analogix/analogix_dp_core.h | 2 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 6 +- drivers/gpu/drm/bridge/cadence/Kconfig | 1 +
.../drm/bridge/cadence/cdns-mhdp8546-core.c | 4 +- .../drm/bridge/cadence/cdns-mhdp8546-core.h | 2 +- .../drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 2 +-drivers/gpu/drm/bridge/ite-it6505.c | 4 +- drivers/gpu/drm/bridge/parade-ps8640.c | 4 +- drivers/gpu/drm/bridge/sii902x.c | 2 +- drivers/gpu/drm/bridge/sil-sii8620.c | 2 +- drivers/gpu/drm/bridge/synopsys/Kconfig | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +- drivers/gpu/drm/bridge/tc358767.c | 2 +- drivers/gpu/drm/bridge/tc358775.c | 2 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 +- drivers/gpu/drm/display/Makefile | 13 + .../drm_display_helper_mod.c} | 10 +-
.../gpu/drm/{dp => display}/drm_dp_aux_bus.c | 4 +- .../gpu/drm/{dp => display}/drm_dp_aux_dev.c | 4 +- drivers/gpu/drm/{dp => display}/drm_dp_cec.c | 2 +-.../{dp =>
display}/drm_dp_dual_mode_helper.c| 2 +-.../{dp/drm_dp.c=> display/drm_dp_helper.c} | 4 +- .../{dp => display}/drm_dp_helper_internal.h | 0 .../drm/{dp =>display}/drm_dp_mst_topology.c| 2 +- .../drm_dp_mst_topology_internal.h | 2 +-.../{drm_dsc.c=> display/drm_dsc_helper.c} | 5 +-.../{drm_hdcp.c=>display/drm_hdcp_helper.c} | 4 +- drivers/gpu/drm/display/drm_hdmi_helper.c | 463 +++++++++++ .../gpu/drm/{ => display}/drm_scdc_helper.c | 3 +- drivers/gpu/drm/dp/Makefile | 9 - drivers/gpu/drm/drm_connector.c | 34 - drivers/gpu/drm/drm_edid.c | 439 +---------- drivers/gpu/drm/drm_mipi_dsi.c | 6 +- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +- drivers/gpu/drm/gma500/intel_bios.c | 3 +- drivers/gpu/drm/hdmi/Makefile | 4 + drivers/gpu/drm/i2c/Kconfig | 1 + drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- drivers/gpu/drm/i915/Kconfig | 2 + drivers/gpu/drm/i915/display/icl_dsi.c | 1 + drivers/gpu/drm/i915/display/intel_bios.c | 3 +- drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 2 +- .../drm/i915/display/intel_display_types.h | 6 +- drivers/gpu/drm/i915/display/intel_dp.c | 5 +- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 6 +-.../drm/i915/display/intel_dp_link_training.h| 2 +- drivers/gpu/drm/i915/display/intel_gmbus.c | 2 +- drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 4 +- .../gpu/drm/i915/display/intel_qp_tables.c | 2 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 1 + drivers/gpu/drm/i915/display/intel_vdsc.c | 2 + drivers/gpu/drm/mediatek/Kconfig | 1 + drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/dp/dp_audio.c | 2 +- drivers/gpu/drm/msm/dp/dp_aux.h | 2 +- drivers/gpu/drm/msm/dp/dp_catalog.c | 2 +- drivers/gpu/drm/msm/dp/dp_ctrl.c | 3 +- drivers/gpu/drm/msm/edp/edp.h | 3 +- drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 +- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 + drivers/gpu/drm/nouveau/Kconfig | 1 + drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 +- drivers/gpu/drm/nouveau/nouveau_connector.h | 2 +- drivers/gpu/drm/nouveau/nouveau_dp.c | 2 +- drivers/gpu/drm/nouveau/nouveau_encoder.h | 6 +- drivers/gpu/drm/omapdrm/Kconfig | 2 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 + drivers/gpu/drm/panel/panel-edp.c | 4 +- .../gpu/drm/panel/panel-samsung-atna33xc20.c | 4 +- drivers/gpu/drm/radeon/atombios_dp.c | 2 +- drivers/gpu/drm/radeon/radeon_audio.c | 1 + drivers/gpu/drm/radeon/radeon_connectors.c | 2 +- drivers/gpu/drm/radeon/radeon_dp_mst.c | 2 +- drivers/gpu/drm/radeon/radeon_mode.h | 4 +- drivers/gpu/drm/rockchip/Kconfig | 2 + .../gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- drivers/gpu/drm/rockchip/cdn-dp-core.h | 2 +- drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +- drivers/gpu/drm/rockchip/rk3066_hdmi.c | 1 + drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +- drivers/gpu/drm/rockchip/rockchip_rgb.c | 2 +- .../drm/selftests/test-drm_dp_mst_helper.c | 4 +- drivers/gpu/drm/sti/Kconfig | 1 + drivers/gpu/drm/sti/sti_hdmi.c | 2 +- drivers/gpu/drm/sun4i/Kconfig | 1 + drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 +- drivers/gpu/drm/tegra/Kconfig | 1 + drivers/gpu/drm/tegra/dp.c | 2 +- drivers/gpu/drm/tegra/dpaux.c | 4 +- drivers/gpu/drm/tegra/hdmi.c | 1 + drivers/gpu/drm/tegra/sor.c | 5 +- drivers/gpu/drm/vc4/Kconfig | 1 + drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- drivers/misc/mei/hdcp/mei_hdcp.h | 2 +-.../{dp/drm_dp_helper.h=> display/drm_dp.h} | 695 +----------------include/drm/{dp=> display}/drm_dp_aux_bus.h | 0
.../{dp =>display}/drm_dp_dual_mode_helper.h| 0 include/drm/display/drm_dp_helper.h | 719 ++++++++++++++++++ .../drm/{dp => display}/drm_dp_mst_helper.h | 2 +-include/drm/{=> display}/drm_dsc.h | 8 +- include/drm/display/drm_dsc_helper.h | 20 +include/drm/{=> display}/drm_hdcp.h | 14 +- include/drm/display/drm_hdcp_helper.h | 22 + include/drm/display/drm_hdmi_helper.h | 36 +.../{drm_scdc_helper.h=>display/drm_scdc.h} | 52 +- include/drm/display/drm_scdc_helper.h | 79 ++ include/drm/drm_connector.h | 2 - include/drm/drm_edid.h | 31 +- include/drm/i915_mei_hdcp_interface.h | 2 +-147 files changed, 1631 insertions(+), 1428 deletions(-)create mode 100644
drivers/gpu/drm/display/Makefile
renamedrivers/gpu/drm/{dp/drm_dp_helper_mod.c=>display/drm_display_helper_mod.c} (51%)
renamedrivers/gpu/drm/{dp=>display}/drm_dp_aux_bus.c(99%) renamedrivers/gpu/drm/{dp=>display}/drm_dp_aux_dev.c(99%) renamedrivers/gpu/drm/{dp=>display}/drm_dp_cec.c(99%) renamedrivers/gpu/drm/{dp=>display}/drm_dp_dual_mode_helper.c(99%) renamedrivers/gpu/drm/{dp/drm_dp.c=>display/drm_dp_helper.c} (99%) renamedrivers/gpu/drm/{dp=>display}/drm_dp_helper_internal.h(100%) renamedrivers/gpu/drm/{dp=>display}/drm_dp_mst_topology.c(99%) renamedrivers/gpu/drm/{dp=>display}/drm_dp_mst_topology_internal.h(94%) renamedrivers/gpu/drm/{drm_dsc.c=>display/drm_dsc_helper.c} (99%) renamedrivers/gpu/drm/{drm_hdcp.c=>display/drm_hdcp_helper.c} (99%) create mode 100644drivers/gpu/drm/display/drm_hdmi_helper.crenamedrivers/gpu/drm/{=>display}/drm_scdc_helper.c(99%) delete mode 100644drivers/gpu/drm/dp/Makefile
create mode 100644drivers/gpu/drm/hdmi/Makefile
renameinclude/drm/{dp/drm_dp_helper.h=>display/drm_dp.h} (74%) renameinclude/drm/{dp=>display}/drm_dp_aux_bus.h(100%) renameinclude/drm/{dp=>display}/drm_dp_dual_mode_helper.h(100%) create mode 100644include/drm/display/drm_dp_helper.h
renameinclude/drm/{dp=>display}/drm_dp_mst_helper.h(99%) renameinclude/drm/{=>display}/drm_dsc.h(97%)
create mode 100644include/drm/display/drm_dsc_helper.h
renameinclude/drm/{=>display}/drm_hdcp.h(95%)
create mode 100644include/drm/display/drm_hdcp_helper.h
create mode 100644include/drm/display/drm_hdmi_helper.h
renameinclude/drm/{drm_scdc_helper.h=>display/drm_scdc.h} (65%) create mode 100644include/drm/display/drm_scdc_helper.hbase-commit:
fe83949cd4316608ea785fc376b6ed444224adad
prerequisite-patch-id:c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
prerequisite-patch-id:c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id:6e1032c6302461624f33194c8b8f37103a3fa6ef
Signature · 3 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat