Drop non-DC display support
Subsystems (3)
Alex Deucher
maintainercover Drop non-DC display support
Thanks to a lot of hard work from Timur and others we now have full DC support for all chips supported by AMD GPU. DC supports a much wider range of features compared to the legacy code and supports the atomic KMS API. DC has been the default now for all chips for several kernel cycles and we have an LTS kernel for 2026 so I think it's finally time to retire the legacy code.
Alex Deucher (7):
drm/amdgpu: fix audio parameter documentation
drm/amdgpu: drop non-DC DCE10 support
drm/amdgpu: drop non-DC DCE8 support
drm/amdgpu: drop non-DC DCE6 support
drm/amdgpu: remove legacy non-DC display support code drm/amdgpu: remove atombios i2c support
drm/amdgpu: warn when driver is built without SI/DCE display support
drivers/gpu/drm/amd/amdgpu/Makefile | 15 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 106 - drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 418 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 10 +- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2063 ---------- .../gpu/drm/amd/amdgpu/amdgpu_connectors.h | 41 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 670 --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 13 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 36 +- drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | 262 -- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 176 +- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 90 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 40 - drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 885 ---- drivers/gpu/drm/amd/amdgpu/atombios_crtc.h | 60 - drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 770 ---- drivers/gpu/drm/amd/amdgpu/atombios_dp.h | 42 - .../gpu/drm/amd/amdgpu/atombios_encoders.c | 2126 ---------- .../gpu/drm/amd/amdgpu/atombios_encoders.h | 78 - drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 176 - drivers/gpu/drm/amd/amdgpu/atombios_i2c.h | 33 - drivers/gpu/drm/amd/amdgpu/cik.c | 18 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3595 ----------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 33 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3502 ---------------- drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 32 - drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 3536 ---------------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 35 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 - drivers/gpu/drm/amd/amdgpu/si.c | 9 +- drivers/gpu/drm/amd/amdgpu/vi.c | 15 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 - 36 files changed, 83 insertions(+), 18857 deletions(-) delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_crtc.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_crtc.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_dp.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_dp.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_encoders.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_i2c.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v10_0.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v6_0.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v8_0.h
Signature · 1 line
2.56.0
Alex Deucher
maintainerPATCH 1/7 drm/amdgpu: fix audio parameter documentation
It applies to DC as well. DC disables audio via this option.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
@@ -318,9 +318,9 @@ module_param_named(moverate, amdgpu_moverate, int, 0600);/** * DOC: audio (int) -* Set HDMI/DPAudio. Only affects non-DC display handling. The default is -1 (Enabled), set 0 to disabled it. +* Set HDMI/DPAudio. The default is -1 (Enabled), set 0 to disabled it. */ -MODULE_PARM_DESC (audio,"HDMI/DP Audio enable for non DC displays (-1 = auto, 0 = disable, 1 = enable)" ); +MODULE_PARM_DESC (audio,"HDMI/DP Audio enable for displays (-1 = auto, 0 = disable, 1 = enable)" );module_param_named (audio, amdgpu_audio, int,0444 );/**
Signature · 1 line
2.56.0
Alex Deucher
maintainerPATCH 2/7 drm/amdgpu: drop non-DC DCE10 support
In reply to Alex DeucherDCE 10 hardware has been supported by DC for years and has been the default since DC support was added. Drop the legacy non-DC support.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 5 - drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3595 ---------------------- drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 33 - drivers/gpu/drm/amd/amdgpu/vi.c | 15 +- 5 files changed, 5 insertions(+), 3644 deletions(-) delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v10_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +0 -1
@@ -149,7 +149,6 @@ amdgpu-y += \ # add DCE block amdgpu-y += \ - dce_v10_0.o \ amdgpu_vkms.o # add GFX block
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +0 -5
@@ -14,7 +14,6 @@#ifdef CONFIG_DRM_AMDGPU_CIK #include "dce_v8_0.h" #endif -#include "dce_v10_0.h" #include "ivsrcid/ivsrcid_vislands30.h" #include "amdgpu_vkms.h" #include "amdgpu_display.h"
@@ -465,10 +464,6 @@ static int amdgpu_vkms_hw_init(struct amdgpu_ip_block *ip_block)dce_v8_0_disable_dce (adev);break ;#endif -case CHIP_FIJI : -case CHIP_TONGA : -dce_v10_0_disable_dce (adev); -break ;case CHIP_TOPAZ :#ifdef CONFIG_DRM_AMDGPU_SI case CHIP_HAINAN :
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c deleted +0 -3595
2,976 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/dce_v10_0.h deleted +0 -33
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.56.0
Part of the diff is not shown here. View the raw message.
Alex Deucher
maintainerPATCH 3/7 drm/amdgpu: drop non-DC DCE8 support
In reply to Alex DeucherDCE8 has been supported by DC for a while now and is the default. Drop the legacy non-DC support.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 12 - drivers/gpu/drm/amd/amdgpu/cik.c | 18 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 3536 ---------------------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 35 - 5 files changed, 5 insertions(+), 3598 deletions(-) delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v8_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
@@ -80,7 +80,7 @@ amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o # add asic specific block amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o \ - dce_v8_0.o gfx_v7_0.o cik_sdma.o uvd_v4_2.o vce_v2_0.o + gfx_v7_0.o cik_sdma.o uvd_v4_2.o vce_v2_0.o amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o dce_v6_0.o \ uvd_v3_1.o vce_v1_0.o
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +0 -12
@@ -11,9 +11,6 @@#ifdef CONFIG_DRM_AMDGPU_SI #include "dce_v6_0.h" #endif -#ifdef CONFIG_DRM_AMDGPU_CIK -#include "dce_v8_0.h" -#endif #include "ivsrcid/ivsrcid_vislands30.h" #include "amdgpu_vkms.h" #include "amdgpu_display.h"
@@ -454,15 +451,6 @@ static int amdgpu_vkms_hw_init(struct amdgpu_ip_block *ip_block)case CHIP_OLAND :dce_v6_0_disable_dce (adev);break ; -#endif -#ifdef CONFIG_DRM_AMDGPU_CIK -case CHIP_BONAIRE : -case CHIP_HAWAII : -case CHIP_KAVERI : -case CHIP_KABINI : -case CHIP_MULLINS : -dce_v8_0_disable_dce (adev); -break ;#endif case CHIP_TOPAZ :#ifdef CONFIG_DRM_AMDGPU_SI
drivers/gpu/drm/amd/amdgpu/cik.c +4 -14
@@ -41,7 +41,6 @@#include "cik.h" #include "gmc_v7_0.h" #include "cik_ih.h" -#include "dce_v8_0.h" #include "gfx_v7_0.h" #include "cik_sdma.h" #include "uvd_v4_2.h"
@@ -2199,11 +2198,9 @@ int cik_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display)amdgpu_device_ip_block_add (adev, &amdgpu_vkms_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev)) + else amdgpu_device_ip_block_add(adev, &dm_ip_block);#endif - else - amdgpu_device_ip_block_add(adev, &dce_v8_2_ip_block);amdgpu_device_ip_block_add (adev, &uvd_v4_2_ip_block);amdgpu_device_ip_block_add (adev, &vce_v2_0_ip_block);break ;
@@ -2217,11 +2214,9 @@ int cik_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display)amdgpu_device_ip_block_add (adev, &amdgpu_vkms_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev)) + else amdgpu_device_ip_block_add(adev, &dm_ip_block);#endif - else - amdgpu_device_ip_block_add(adev, &dce_v8_5_ip_block);amdgpu_device_ip_block_add (adev, &uvd_v4_2_ip_block);amdgpu_device_ip_block_add (adev, &vce_v2_0_ip_block);break ;
@@ -2235,12 +2230,9 @@ int cik_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display)amdgpu_device_ip_block_add (adev, &amdgpu_vkms_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev)) + else amdgpu_device_ip_block_add(adev, &dm_ip_block);#endif - else - amdgpu_device_ip_block_add(adev, &dce_v8_1_ip_block); -amdgpu_device_ip_block_add (adev, &uvd_v4_2_ip_block);amdgpu_device_ip_block_add (adev, &vce_v2_0_ip_block);break ;
@@ -2255,11 +2247,9 @@ int cik_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display)amdgpu_device_ip_block_add (adev, &amdgpu_vkms_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev)) + else amdgpu_device_ip_block_add(adev, &dm_ip_block);#endif - else - amdgpu_device_ip_block_add(adev, &dce_v8_3_ip_block);amdgpu_device_ip_block_add (adev, &uvd_v4_2_ip_block);amdgpu_device_ip_block_add (adev, &vce_v2_0_ip_block);break ;
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c deleted +0 -3536
2,912 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/dce_v8_0.h deleted +0 -35
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.56.0
Part of the diff is not shown here. View the raw message.
Alex Deucher
maintainerPATCH 4/7 drm/amdgpu: drop non-DC DCE6 support
In reply to Alex DeucherDCE6 has been supported by DC for a while now and is the default. Drop the legacy non-DC support.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 23 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3502 ---------------------- drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 32 - drivers/gpu/drm/amd/amdgpu/si.c | 9 +- 5 files changed, 3 insertions(+), 3565 deletions(-) delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/dce_v6_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
@@ -82,7 +82,7 @@ amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o \ gfx_v7_0.o cik_sdma.o uvd_v4_2.o vce_v2_0.o -amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o dce_v6_0.o \ +amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o \ uvd_v3_1.o vce_v1_0.o amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +0 -23
@@ -8,9 +8,6 @@#include <drm/drm_vblank_helper.h> #include "amdgpu.h" -#ifdef CONFIG_DRM_AMDGPU_SI -#include "dce_v6_0.h" -#endif #include "ivsrcid/ivsrcid_vislands30.h" #include "amdgpu_vkms.h" #include "amdgpu_display.h"
@@ -441,26 +438,6 @@ static int amdgpu_vkms_sw_fini(struct amdgpu_ip_block *ip_block)static int amdgpu_vkms_hw_init (struct amdgpu_ip_block *ip_block) { -struct amdgpu_device *adev = ip_block->adev; - -switch (adev->asic_type) { -#ifdef CONFIG_DRM_AMDGPU_SI -case CHIP_TAHITI : -case CHIP_PITCAIRN : -case CHIP_VERDE : -case CHIP_OLAND : -dce_v6_0_disable_dce (adev); -break ; -#endif -case CHIP_TOPAZ : -#ifdef CONFIG_DRM_AMDGPU_SI -case CHIP_HAINAN : -#endif -/* no DCE */ -break ; -default : -break ; - }return 0 ; }
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c deleted +0 -3502
2,957 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/dce_v6_0.h deleted +0 -32
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.56.0
Part of the diff is not shown here. View the raw message.
Alex Deucher
maintainerPATCH 5/7 drm/amdgpu: remove legacy non-DC display support code
In reply to Alex DeucherThis removes all of the common support code for the non-DC display code.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 106 - drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 408 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 9 - .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2063 ---------------- .../gpu/drm/amd/amdgpu/amdgpu_connectors.h | 41 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 670 ------ drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 13 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 24 - drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | 262 -- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 123 - drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 90 - drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 885 ------- drivers/gpu/drm/amd/amdgpu/atombios_crtc.h | 60 - drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 770 ------ drivers/gpu/drm/amd/amdgpu/atombios_dp.h | 42 - .../gpu/drm/amd/amdgpu/atombios_encoders.c | 2126 ----------------- .../gpu/drm/amd/amdgpu/atombios_encoders.h | 78 - .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 - 23 files changed, 11 insertions(+), 7799 deletions(-) delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_crtc.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_crtc.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_dp.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_dp.h delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_encoders.h
drivers/gpu/drm/amd/amdgpu/Makefile +5 -5
@@ -52,15 +52,15 @@ amdgpu-y := amdgpu_drv.o # add KMS driver amdgpu-y += amdgpu_device.o amdgpu_reg_access.o amdgpu_doorbell_mgr.o amdgpu_kms.o \ - amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \ + amdgpu_atombios.o \ atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \ - amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \ + amdgpu_display.o amdgpu_i2c.o \ amdgpu_gem.o amdgpu_ring.o \ amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o \ - atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \ - atombios_encoders.o amdgpu_sa.o atombios_i2c.o \ + amdgpu_trace_points.o \ + amdgpu_sa.o atombios_i2c.o \ amdgpu_dma_buf.o amdgpu_vm.o amdgpu_vm_pt.o amdgpu_vm_tlb_fence.o \ - amdgpu_ib.o amdgpu_pll.o \ + amdgpu_ib.o \ amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \ amdgpu_gtt_mgr.o amdgpu_preempt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o \ amdgpu_atomfirmware.o amdgpu_vf_error.o amdgpu_sched.o \
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -4
@@ -163,7 +163,6 @@ extern int amdgpu_gart_size;extern int amdgpu_gtt_size;extern int amdgpu_moverate;extern int amdgpu_audio; -extern int amdgpu_disp_priority;extern int amdgpu_hw_i2c;extern int amdgpu_pcie_gen2;extern int amdgpu_msi;
@@ -182,7 +181,6 @@ extern int amdgpu_vm_fault_stop;extern int amdgpu_vm_debug;extern int amdgpu_vm_update_mode;extern int amdgpu_exp_hw_support; -extern int amdgpu_dc;extern int amdgpu_sched_jobs;extern int amdgpu_sched_hw_submission;extern uint amdgpu_pcie_gen_cap;
@@ -1039,8 +1037,6 @@ size_t amdgpu_device_aper_access(struct amdgpu_device *adev, loff_t pos,void amdgpu_device_vram_access (struct amdgpu_device *adev,loff_t pos,void *buf,size_t size,bool write);u32 amdgpu_device_get_rev_id (struct amdgpu_device *adev); -bool amdgpu_device_asic_has_dc_support (struct pci_dev *pdev, -enum amd_asic_type asic_type);bool amdgpu_device_has_dc_support (struct amdgpu_device *adev);void amdgpu_device_set_sriov_virtual_display (struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c deleted +0 -106
106 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +0 -408
426 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h +0 -9
@@ -129,19 +129,11 @@ struct atom_voltage_table {struct atom_voltage_table_entry entries[MAX_VOLTAGE_ENTRIES ]; }; -struct amdgpu_gpio_rec -amdgpu_atombios_lookup_gpio (struct amdgpu_device *adev, -u8 id); -struct amdgpu_i2c_bus_rec amdgpu_atombios_lookup_i2c_gpio (struct amdgpu_device *adev,uint8_t id);void amdgpu_atombios_i2c_init (struct amdgpu_device *adev);void amdgpu_atombios_oem_i2c_init (struct amdgpu_device *adev,u8 i2c_id); -bool amdgpu_atombios_has_dce_engine_info (struct amdgpu_device *adev); - -bool amdgpu_atombios_get_connector_info_from_object_table (struct amdgpu_device *adev); -int amdgpu_atombios_get_clock_info (struct amdgpu_device *adev);int amdgpu_atombios_get_gfx_info (struct amdgpu_device *adev);
@@ -192,7 +184,6 @@ int amdgpu_atombios_get_svi2_info(struct amdgpu_device *adev,bool amdgpu_atombios_has_gpu_virtualization_table (struct amdgpu_device *adev); -void amdgpu_atombios_scratch_regs_lock (struct amdgpu_device *adev,bool lock);void amdgpu_atombios_scratch_regs_engine_hung (struct amdgpu_device *adev,bool hung); void amdgpu_atombios_scratch_regs_set_backlight_level(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c deleted +0 -2063
2,063 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.h deleted +0 -41
41 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -8
@@ -3514,8 +3514,8 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)* Check if there is DC (new modesetting infrastructre) support for an asic. * returns true if DC has support, false if not. */ -bool amdgpu_device_asic_has_dc_support (struct pci_dev *pdev, -enum amd_asic_type asic_type) +static bool amdgpu_device_asic_has_dc_support (struct pci_dev *pdev, +enum amd_asic_type asic_type) {switch (asic_type) {#ifdef CONFIG_DRM_AMDGPU_SI
@@ -3529,15 +3529,13 @@ bool amdgpu_device_asic_has_dc_support(struct pci_dev *pdev,case CHIP_PITCAIRN :case CHIP_VERDE :case CHIP_OLAND : -return amdgpu_dc !=0 &&IS_ENABLED (CONFIG_DRM_AMD_DC_SI ); +return IS_ENABLED (CONFIG_DRM_AMD_DC_SI );default : -return amdgpu_dc !=0 ; +return true;#else default : -if (amdgpu_dc >0 ) -dev_info_once ( - &pdev->dev, -"Display Core has been requested via kernel parameter but isn't supported by ASIC, ignoring\n" ); +dev_info_once (&pdev->dev, +"Driver built without display support\n" );return false;#endif }
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -670
267 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_display.h +0 -13
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -24
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c deleted +0 -262
262 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +0 -123
123 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h +0 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +0 -90
90 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_crtc.c deleted +0 -885
885 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_crtc.h deleted +0 -60
60 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_dp.c deleted +0 -770
770 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_dp.h deleted +0 -42
42 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c deleted +0 -2126
2,126 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_encoders.h deleted +0 -78
78 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -7
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.56.0
Part of the diff is not shown here. View the raw message.
Alex Deucher
maintainerPATCH 6/7 drm/amdgpu: remove atombios i2c support
In reply to Alex DeucherThis was optional behavior controlled by separate module parameter. The option allowed for the use the atombios command tables for i2c transactions rather than direct bit banging. It was off by default and now that the legacy non-DC display code is gone, there is not much point in keeping it around.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 18 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 - drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 53 ++---- drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 176 ------------------- drivers/gpu/drm/amd/amdgpu/atombios_i2c.h | 33 ---- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 - 9 files changed, 40 insertions(+), 255 deletions(-) delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c delete mode 100644 drivers/gpu/drm/amd/amdgpu/atombios_i2c.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
@@ -58,7 +58,7 @@ amdgpu-y += amdgpu_device.o amdgpu_reg_access.o amdgpu_doorbell_mgr.o amdgpu_kms amdgpu_gem.o amdgpu_ring.o \ amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o \ amdgpu_trace_points.o \ - amdgpu_sa.o atombios_i2c.o \ + amdgpu_sa.o \ amdgpu_dma_buf.o amdgpu_vm.o amdgpu_vm_pt.o amdgpu_vm_tlb_fence.o \ amdgpu_ib.o \ amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -1
@@ -163,7 +163,6 @@ extern int amdgpu_gart_size;extern int amdgpu_gtt_size;extern int amdgpu_moverate;extern int amdgpu_audio; -extern int amdgpu_hw_i2c;extern int amdgpu_pcie_gen2;extern int amdgpu_msi;extern char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENGTH ];
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +18 -0
@@ -187,6 +187,24 @@ void amdgpu_atombios_oem_i2c_init(struct amdgpu_device *adev, u8 i2c_id) } } +#define TARGET_HW_I2C_CLOCK 50 + +void amdgpu_atombios_i2c_channel_trans (struct amdgpu_device *adev,u8 slave_addr,u8 line_number,u8 offset,u8 data) +{ +PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION args; +int index =GetIndexIntoMasterTable (COMMAND , ProcessI2cChannelTransaction); + + args.ucRegIndex = offset; + args.lpI2CDataOut = data; + args.ucFlag =1 ; + args.ucI2CSpeed =TARGET_HW_I2C_CLOCK ; + args.ucTransBytes =1 ; + args.ucSlaveAddr = slave_addr; + args.ucLineNumber = line_number; + +amdgpu_atom_execute_table (adev->mode_info.atom_context, index, (uint32_t *)&args,sizeof (args)); +} +union firmware_info {ATOM_FIRMWARE_INFO info;ATOM_FIRMWARE_INFO_V1_2 info_12;
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h +3 -0
@@ -134,6 +134,9 @@ struct amdgpu_i2c_bus_rec amdgpu_atombios_lookup_i2c_gpio(struct amdgpu_device *void amdgpu_atombios_i2c_init (struct amdgpu_device *adev);void amdgpu_atombios_oem_i2c_init (struct amdgpu_device *adev,u8 i2c_id); +void amdgpu_atombios_i2c_channel_trans (struct amdgpu_device * adev, +u8 slave_addr,u8 line_number,u8 offset,u8 data); +int amdgpu_atombios_get_clock_info (struct amdgpu_device *adev);int amdgpu_atombios_get_gfx_info (struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -8
@@ -160,7 +160,6 @@ int amdgpu_gart_size = -1; /* auto */int amdgpu_gtt_size =-1 ;/* auto */ int amdgpu_moverate =-1 ;/* auto */ int amdgpu_audio =-1 ; -int amdgpu_hw_i2c;int amdgpu_pcie_gen2 =-1 ;int amdgpu_msi =-1 ;char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENGTH ];
@@ -321,13 +320,6 @@ module_param_named(moverate, amdgpu_moverate, int, 0600);MODULE_PARM_DESC (audio,"HDMI/DP Audio enable for displays (-1 = auto, 0 = disable, 1 = enable)" );module_param_named (audio, amdgpu_audio, int,0444 ); -/** -* DOC: hw_i2c (int) -* To enable hw i2c engine. Only affects non-DC display handling. The default is 0 (Disabled). -*/ -MODULE_PARM_DESC (hw_i2c,"hw i2c engine enable (0 = disable)" ); -module_param_named (hw_i2c, amdgpu_hw_i2c, int,0444 ); -/** * DOC: pcie_gen2 (int) * To disable PCIE Gen2/3 mode (0 = disable, 1 = enable). The default is -1 (auto, enabled).
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +18 -35
77 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_i2c.c deleted +0 -176
176 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/atombios_i2c.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* -* Copyright 2014 Advanced Micro Devices, Inc. -* -* Permission is hereby granted, free of charge, to any person obtaining a -* copy of this software and associated documentation files (the "Software"), -* to deal in the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, -* and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -* OTHER DEALINGS IN THE SOFTWARE. -* -*/ - -#ifndef __ATOMBIOS_I2C_H__ -#define __ATOMBIOS_I2C_H__ - -int amdgpu_atombios_i2c_xfer (struct i2c_adapter *i2c_adap, -struct i2c_msg *msgs,int num); -u32 amdgpu_atombios_i2c_func (struct i2c_adapter *adap); -void amdgpu_atombios_i2c_channel_trans (struct amdgpu_device * adev, -u8 slave_addr,u8 line_number,u8 offset,u8 data); - -#endif
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -1
@@ -35,7 +35,6 @@#include "vid.h" #include "amdgpu_ucode.h" #include "amdgpu_atombios.h" -#include "atombios_i2c.h" #include "clearstate_vi.h" #include "gmc/gmc_8_2_d.h"
Signature · 1 line
2.56.0
Alex Deucher
maintainerPATCH 7/7 drm/amdgpu: warn when driver is built without SI/DCE display support
In reply to Alex DeucherIf the display CONFIG options are disabled, warn the user since they will end up with a blank screen.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +23 -0
@@ -3529,7 +3529,30 @@ static bool amdgpu_device_asic_has_dc_support(struct pci_dev *pdev,case CHIP_PITCAIRN :case CHIP_VERDE :case CHIP_OLAND : +if (!IS_ENABLED (CONFIG_DRM_AMD_DC_SI )) +dev_warn_once (&pdev->dev, +"Driver built without SI display support!\n" );return IS_ENABLED (CONFIG_DRM_AMD_DC_SI ); +case CHIP_BONAIRE : +case CHIP_KAVERI : +case CHIP_KABINI : +case CHIP_HAWAII : +case CHIP_MULLINS : +case CHIP_TONGA : +case CHIP_FIJI : +case CHIP_CARRIZO : +case CHIP_STONEY : +case CHIP_POLARIS10 : +case CHIP_POLARIS11 : +case CHIP_POLARIS12 : +case CHIP_VEGAM : +case CHIP_VEGA10 : +case CHIP_VEGA12 : +case CHIP_VEGA20 : +if (!IS_ENABLED (CONFIG_DRM_AMD_DC_DCE )) +dev_warn_once (&pdev->dev, +"Driver built without DCE display support!\n" ); +return IS_ENABLED (CONFIG_DRM_AMD_DC_DCE );default :return true;#else
Signature · 1 line
2.56.0
Quoted 6 lines · Alex Deucher
Thanks to a lot of hard work from Timur and others we now have full DC support for all chips supported by AMD GPU. DC supports a much wider range of features compared to the legacy code and supports the atomic KMS API. DC has been the default now for all chips for several kernel cycles and we have an LTS kernel for 2026 so I think it's finally time to retire the legacy code.
Thanks, I agree with that 100%.
If somebody still has issues with DC on the old chips, or finds a missing feature, they can use 7.3 LTS while we fix it.
For the whole series,
Quoted 69 lines
Alex Deucher (7):
drm/amdgpu: fix audio parameter documentation drm/amdgpu: drop non-DC DCE10 support
drm/amdgpu: drop non-DC DCE8 support
drm/amdgpu: drop non-DC DCE6 support
drm/amdgpu: remove legacy non-DC display support code drm/amdgpu: remove atombios i2c support drm/amdgpu: warn when driver is built without SI/DCE display supportdrivers/gpu/drm/amd/amdgpu/Makefile | 15 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 106 - drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 418 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h | 10 +-
.../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2063 ---------- .../gpu/drm/amd/amdgpu/amdgpu_connectors.h | 41 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 +-drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 670 --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 13 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 36 +- drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | 262 --
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 176 +- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h | 4 - drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 -drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 90 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 40 - drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 885 ---- drivers/gpu/drm/amd/amdgpu/atombios_crtc.h | 60 - drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 770 ---- drivers/gpu/drm/amd/amdgpu/atombios_dp.h | 42 - .../gpu/drm/amd/amdgpu/atombios_encoders.c | 2126 ---------- .../gpu/drm/amd/amdgpu/atombios_encoders.h | 78 - drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 176 - drivers/gpu/drm/amd/amdgpu/atombios_i2c.h | 33 - drivers/gpu/drm/amd/amdgpu/cik.c | 18 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 3595 --------------- --
drivers/gpu/drm/amd/amdgpu/dce_v10_0.h | 33 - drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 3502 --------------- -
drivers/gpu/drm/amd/amdgpu/dce_v6_0.h | 32 - drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 3536 --------------- -
drivers/gpu/drm/amd/amdgpu/dce_v8_0.h | 35 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 - drivers/gpu/drm/amd/amdgpu/si.c | 9 +- drivers/gpu/drm/amd/amdgpu/vi.c | 15 +-.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 7 -36 files changed, 83 insertions(+), 18857 deletions(-)delete mode 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.hdelete mode 100644drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_crtc.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_crtc.hdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_dp.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_dp.hdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_encoders.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_encoders.hdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_i2c.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/atombios_i2c.hdelete mode 100644drivers/gpu/drm/amd/amdgpu/dce_v10_0.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/dce_v10_0.hdelete mode 100644drivers/gpu/drm/amd/amdgpu/dce_v6_0.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/dce_v6_0.hdelete mode 100644drivers/gpu/drm/amd/amdgpu/dce_v8_0.cdelete mode 100644drivers/gpu/drm/amd/amdgpu/dce_v8_0.h