From: Bhuvana Chandra Pinninti <bhuvanachandra.pinninti@xxxxxxx> [why] cleaning up the code refactor requires hubp to be in its own component. [how] move all files under newly created hubp folder and fixing the makefiles. Reviewed-by: Martin Leung <martin.leung@xxxxxxx> Acked-by: Tom Chung <chiahsuan.chung@xxxxxxx> Signed-off-by: Bhuvana Chandra Pinninti <bhuvanachandra.pinninti@xxxxxxx> --- drivers/gpu/drm/amd/display/Makefile | 1 + drivers/gpu/drm/amd/display/dc/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- .../dc/dcn10/dcn10_hw_sequencer_debug.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 3 +- .../gpu/drm/amd/display/dc/dcn201/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 1 - drivers/gpu/drm/amd/display/dc/hubp/Makefile | 92 +++++++++++++++++++ .../display/dc/{ => hubp}/dcn10/dcn10_hubp.c | 0 .../display/dc/{ => hubp}/dcn10/dcn10_hubp.h | 0 .../display/dc/{ => hubp}/dcn20/dcn20_hubp.c | 0 .../display/dc/{ => hubp}/dcn20/dcn20_hubp.h | 0 .../dc/{ => hubp}/dcn201/dcn201_hubp.c | 0 .../dc/{ => hubp}/dcn201/dcn201_hubp.h | 0 .../display/dc/{ => hubp}/dcn21/dcn21_hubp.c | 0 .../display/dc/{ => hubp}/dcn21/dcn21_hubp.h | 0 .../display/dc/{ => hubp}/dcn30/dcn30_hubp.c | 0 .../display/dc/{ => hubp}/dcn30/dcn30_hubp.h | 0 .../display/dc/{ => hubp}/dcn31/dcn31_hubp.c | 0 .../display/dc/{ => hubp}/dcn31/dcn31_hubp.h | 0 .../display/dc/{ => hubp}/dcn32/dcn32_hubp.c | 0 .../display/dc/{ => hubp}/dcn32/dcn32_hubp.h | 0 .../display/dc/{ => hubp}/dcn35/dcn35_hubp.c | 0 .../display/dc/{ => hubp}/dcn35/dcn35_hubp.h | 0 28 files changed, 102 insertions(+), 14 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/Makefile rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn10/dcn10_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn10/dcn10_hubp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn20/dcn20_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn20/dcn20_hubp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn201/dcn201_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn201/dcn201_hubp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn21/dcn21_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn21/dcn21_hubp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn30/dcn30_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn30/dcn30_hubp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn31/dcn31_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn31/dcn31_hubp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn32/dcn32_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn32/dcn32_hubp.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn35/dcn35_hubp.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => hubp}/dcn35/dcn35_hubp.h (100%) diff --git a/drivers/gpu/drm/amd/display/Makefile b/drivers/gpu/drm/amd/display/Makefile index 641073fd7e33..8297fbce7749 100644 --- a/drivers/gpu/drm/amd/display/Makefile +++ b/drivers/gpu/drm/amd/display/Makefile @@ -36,6 +36,7 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/optc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dpp subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/hubbub subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dccg +subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/hubp subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/inc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/freesync subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/color diff --git a/drivers/gpu/drm/amd/display/dc/Makefile b/drivers/gpu/drm/amd/display/dc/Makefile index e0c67f4b9063..9c2f932217e4 100644 --- a/drivers/gpu/drm/amd/display/dc/Makefile +++ b/drivers/gpu/drm/amd/display/dc/Makefile @@ -22,7 +22,7 @@ # # Makefile for Display Core (dc) component. -DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc resource optc dpp hubbub dccg +DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc resource optc dpp hubbub dccg hubp ifdef CONFIG_DRM_AMD_DC_FP diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile index 508306baa65a..68484264831b 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile @@ -25,7 +25,7 @@ DCN10 = dcn10_ipp.o \ dcn10_hw_sequencer_debug.o \ dcn10_opp.o \ - dcn10_hubp.o dcn10_mpc.o \ + dcn10_mpc.o \ dcn10_cm_common.o \ dcn10_stream_encoder.o dcn10_link_encoder.o diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c index 3adef474ed26..05df502a54f2 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c @@ -40,7 +40,7 @@ #include "ipp.h" #include "mpc.h" #include "reg_helper.h" -#include "dcn10_hubp.h" +#include "dcn10/dcn10_hubp.h" #include "dcn10/dcn10_hubbub.h" #include "dcn10_cm_common.h" #include "clk_mgr.h" diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile index 33cbd871eb3a..1ca1cbeabbca 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn20/Makefile @@ -1,8 +1,7 @@ # SPDX-License-Identifier: MIT # Copyright © 2019-2024 Advanced Micro Devices, Inc. All rights reserved. -DCN20 = dcn20_hubp.o \ - dcn20_mpc.o dcn20_opp.o dcn20_mmhubbub.o \ +DCN20 = dcn20_mpc.o dcn20_opp.o dcn20_mmhubbub.o \ dcn20_stream_encoder.o dcn20_link_encoder.o \ dcn20_vmid.o dcn20_dwb.o dcn20_dwb_scl.o diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/Makefile b/drivers/gpu/drm/amd/display/dc/dcn201/Makefile index 7b7acadfccf7..c9f4a5a9f522 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn201/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn201/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT # Copyright © 2021-2024 Advanced Micro Devices, Inc. All rights reserved. -DCN201 = dcn201_mpc.o dcn201_hubp.o dcn201_opp.o \ +DCN201 = dcn201_mpc.o dcn201_opp.o \ dcn201_link_encoder.o AMD_DAL_DCN201 = $(addprefix $(AMDDALPATH)/dc/dcn201/,$(DCN201)) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile index 720f1a463b89..c215f3cc6e44 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile @@ -1,8 +1,7 @@ # SPDX-License-Identifier: MIT # Copyright © 2019-2024 Advanced Micro Devices, Inc. All rights reserved. -DCN21 = dcn21_hubp.o \ - dcn21_link_encoder.o +DCN21 = dcn21_link_encoder.o AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21)) diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/Makefile b/drivers/gpu/drm/amd/display/dc/dcn30/Makefile index fb7471435c69..2131d228f6fb 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn30/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn30/Makefile @@ -23,8 +23,7 @@ # # -DCN30 := dcn30_hubp.o \ - dcn30_mpc.o dcn30_vpg.o \ +DCN30 := dcn30_mpc.o dcn30_vpg.o \ dcn30_afmt.o \ dcn30_dio_stream_encoder.o \ dcn30_dwb.o \ diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/Makefile b/drivers/gpu/drm/amd/display/dc/dcn31/Makefile index 7daa2f038c97..62c8ab0e45aa 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn31/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn31/Makefile @@ -10,8 +10,7 @@ # # Makefile for dcn31. -DCN31 = dcn31_hubp.o \ - dcn31_dio_link_encoder.o dcn31_panel_cntl.o \ +DCN31 = dcn31_dio_link_encoder.o dcn31_panel_cntl.o \ dcn31_apg.o dcn31_hpo_dp_stream_encoder.o dcn31_hpo_dp_link_encoder.o \ dcn31_afmt.o dcn31_vpg.o diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/Makefile b/drivers/gpu/drm/amd/display/dc/dcn32/Makefile index dd3c4e70bce6..2d0eb203ab69 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn32/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn32/Makefile @@ -10,7 +10,7 @@ # # Makefile for dcn32. -DCN32 = dcn32_mmhubbub.o dcn32_hubp.o dcn32_mpc.o \ +DCN32 = dcn32_mmhubbub.o dcn32_mpc.o \ dcn32_dio_stream_encoder.o dcn32_dio_link_encoder.o dcn32_resource_helpers.o \ dcn32_hpo_dp_link_encoder.o diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/Makefile b/drivers/gpu/drm/amd/display/dc/dcn35/Makefile index eb70d5f4e90e..d0fab60e7cd9 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn35/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn35/Makefile @@ -12,7 +12,6 @@ DCN35 = dcn35_dio_stream_encoder.o \ dcn35_dio_link_encoder.o \ - dcn35_hubp.o \ dcn35_mmhubbub.o dcn35_opp.o dcn35_pg_cntl.o dcn35_dwb.o AMD_DAL_DCN35 = $(addprefix $(AMDDALPATH)/dc/dcn35/,$(DCN35)) diff --git a/drivers/gpu/drm/amd/display/dc/hubp/Makefile b/drivers/gpu/drm/amd/display/dc/hubp/Makefile new file mode 100644 index 000000000000..a25a8b216e15 --- /dev/null +++ b/drivers/gpu/drm/amd/display/dc/hubp/Makefile @@ -0,0 +1,92 @@ + +# Copyright 2022 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. +# +# Makefile for the 'hubp' sub-component of DAL. +# +ifdef CONFIG_DRM_AMD_DC_FP +############################################################################### +# DCN +############################################################################### + +HUBP_DCN10 = dcn10_hubp.o + +AMD_DAL_HUBP_DCN10 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn10/,$(HUBP_DCN10)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN10) +############################################################################### + +HUBP_DCN20 = dcn20_hubp.o + +AMD_DAL_HUBP_DCN20 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn20/,$(HUBP_DCN20)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN20) + +############################################################################### + +HUBP_DCN201 = dcn201_hubp.o + +AMD_DAL_HUBP_DCN201 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn201/,$(HUBP_DCN201)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN201) + +############################################################################### + +HUBP_DCN21 = dcn21_hubp.o + +AMD_DAL_HUBP_DCN21 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn21/,$(HUBP_DCN21)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN21) + +############################################################################### +HUBP_DCN30 = dcn30_hubp.o + +AMD_DAL_HUBP_DCN30 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn30/,$(HUBP_DCN30)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN30) + +############################################################################### + +HUBP_DCN31 = dcn31_hubp.o + +AMD_DAL_HUBP_DCN31 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn31/,$(HUBP_DCN31)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN31) + +############################################################################### + +HUBP_DCN32 = dcn32_hubp.o + +AMD_DAL_HUBP_DCN32 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn32/,$(HUBP_DCN32)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN32) + +############################################################################### + +HUBP_DCN35 = dcn35_hubp.o + +AMD_DAL_HUBP_DCN35 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn35/,$(HUBP_DCN35)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN35) + +############################################################################### + +############################################################################### +endif \ No newline at end of file diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.h diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.h diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.h diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.h diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.h diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.h diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hubp.c rename to drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hubp.h b/drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.h similarity index 100% rename from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hubp.h rename to drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.h -- 2.34.1