drm/amd/display: Rename DCN config to FP
authorHarry Wentland <harry.wentland@amd.com>
Tue, 14 Feb 2023 19:14:49 +0000 (14:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Mar 2023 19:22:40 +0000 (14:22 -0500)
[Why & How]
The only reason we have the DCN config is for
floating point support. Rename it to make that
clear and (hopefully) avoid misuse of the config
in the future.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
21 files changed:
drivers/gpu/drm/amd/display/Kconfig
drivers/gpu/drm/amd/display/amdgpu_dm/Makefile
drivers/gpu/drm/amd/display/dc/Makefile
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dc_hw_types.h
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c
drivers/gpu/drm/amd/display/dc/dml/Makefile
drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer_private.h
drivers/gpu/drm/amd/display/dc/inc/resource.h
drivers/gpu/drm/amd/display/dc/link/link_validation.c
drivers/gpu/drm/amd/display/dc/os_types.h

index 578a8b547ddf634142ba58a74b0ffbb5b1f84dab..06b438217c6180ff8fcbeab6ee16234b2903eb6c 100644 (file)
@@ -8,7 +8,7 @@ config DRM_AMD_DC
        depends on BROKEN || !CC_IS_CLANG || X86_64 || SPARC64 || ARM64
        select SND_HDA_COMPONENT if SND_HDA_CORE
        # !CC_IS_CLANG: https://github.com/ClangBuiltLinux/linux/issues/1752
-       select DRM_AMD_DC_DCN if (X86 || PPC_LONG_DOUBLE_128 || (ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG))
+       select DRM_AMD_DC_FP if (X86 || PPC64 || (ARM64 && KERNEL_MODE_NEON && !CC_IS_CLANG))
        help
          Choose this option if you want to use the new display engine
          support for AMDGPU. This adds required support for Vega and
@@ -20,10 +20,10 @@ config DRM_AMD_DC
          panic on most architectures.  We'll revert this when the following bug report
          has been resolved: https://github.com/llvm/llvm-project/issues/41896.
 
-config DRM_AMD_DC_DCN
+config DRM_AMD_DC_FP
        def_bool n
        help
-         Raven, Navi, and newer family support for display engine
+         Floating point support, required for DCN-based SoCs
 
 config DRM_AMD_DC_SI
        bool "AMD DC support for Southern Islands ASICs"
@@ -44,7 +44,7 @@ config DEBUG_KERNEL_DC
 config DRM_AMD_SECURE_DISPLAY
         bool "Enable secure display support"
         depends on DEBUG_FS
-        depends on DRM_AMD_DC_DCN
+        depends on DRM_AMD_DC_FP
         help
             Choose this option if you want to
             support secure display
index aef782ca37069595b0c156ffc020da50d3a96a8e..249b073f6a239155631e6b6284cfb35314763c05 100644 (file)
@@ -33,7 +33,7 @@ AMDGPUDM = \
        amdgpu_dm_mst_types.o \
        amdgpu_dm_color.o
 
-ifdef CONFIG_DRM_AMD_DC_DCN
+ifdef CONFIG_DRM_AMD_DC_FP
 AMDGPUDM += dc_fpu.o
 endif
 
index d2b1e824eeaa1d83e603029fadf5b87db50b9432..69ffd4424dc7b0bcd0c3def9a06f7902e7c82281 100644 (file)
@@ -24,7 +24,7 @@
 
 DC_LIBS = basics bios dml clk_mgr dce gpio irq link virtual dsc
 
-ifdef CONFIG_DRM_AMD_DC_DCN
+ifdef CONFIG_DRM_AMD_DC_FP
 
 KCOV_INSTRUMENT := n
 
index e381de2429fa63446de9cbc9e2f45bce529f14bd..f0f948501e9a1c018a7d04da0d8b7f84af652429 100644 (file)
@@ -2064,7 +2064,7 @@ static enum bp_result bios_parser_get_encoder_cap_info(
        if (!info)
                return BP_RESULT_BADINPUT;
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        /* encoder cap record not available in v1_5 */
        if (bp->object_info_tbl.revision.minor == 5)
                return BP_RESULT_NORECORD;
index 271d8e573181c872f6da8b3dc414674e34a14b6a..ad390e4cd0a95bfbc5d9883b8416459117a866b8 100644 (file)
@@ -74,7 +74,7 @@ CLK_MGR_DCE120 = dce120_clk_mgr.o
 AMD_DAL_CLK_MGR_DCE120 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dce120/,$(CLK_MGR_DCE120))
 
 AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCE120)
-ifdef CONFIG_DRM_AMD_DC_DCN
+ifdef CONFIG_DRM_AMD_DC_FP
 ###############################################################################
 # DCN10
 ###############################################################################
index 73a45ec27f90d4a57169cca7cd220aac1dcacd98..ee81d36146e49c841d5845802a3b27cd8841cd69 100644 (file)
@@ -221,7 +221,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
                        dce120_clk_mgr_construct(ctx, clk_mgr);
                return &clk_mgr->base;
        }
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        case FAMILY_RV: {
                struct clk_mgr_internal *clk_mgr = kzalloc(sizeof(*clk_mgr), GFP_KERNEL);
 
@@ -351,7 +351,7 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
        }
        break;
 
-#endif
+#endif /* CONFIG_DRM_AMD_DC_FP - Family RV */
        default:
                ASSERT(0); /* Unknown Asic */
                break;
@@ -364,7 +364,7 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
 {
        struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
 
-#ifdef CONFIG_DRM_AMD_DC_DCN
+#ifdef CONFIG_DRM_AMD_DC_FP
        switch (clk_mgr_base->ctx->asic_id.chip_family) {
        case FAMILY_NV:
                if (ASICREV_IS_SIENNA_CICHLID_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
@@ -405,7 +405,7 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
        default:
                break;
        }
-#endif
+#endif /* CONFIG_DRM_AMD_DC_FP */
 
        kfree(clk_mgr);
 }
index ca6dfd2d7561fab9378ddfa7a0fd3781e7872df9..bd9fd0b54f46ae994b3d0bc7e1322cb32afed8b4 100644 (file)
@@ -706,7 +706,7 @@ void rn_clk_mgr_construct(
        enum pp_smu_status status = 0;
        int is_green_sardine = 0;
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        is_green_sardine = ASICREV_IS_GREEN_SARDINE(ctx->asic_id.hw_internal_rev);
 #endif
 
index 081d30c98a88e893ab580af0c232a2a644362b69..9f085af00f15f09b352d589f20c239448f8a9de2 100644 (file)
@@ -994,7 +994,7 @@ static bool dc_construct(struct dc *dc,
        dc->clk_mgr = dc_clk_mgr_create(dc->ctx, dc->res_pool->pp_smu, dc->res_pool->dccg);
        if (!dc->clk_mgr)
                goto fail;
-#ifdef CONFIG_DRM_AMD_DC_DCN
+#ifdef CONFIG_DRM_AMD_DC_FP
        dc->clk_mgr->force_smu_not_present = init_params->force_smu_not_present;
 
        if (dc->res_pool->funcs->update_bw_bounding_box) {
index d9f2ef242b0fb4c23c2527d2b888831b744af615..2e3b2fd23b56935e23c4d7127c668e23d1183a93 100644 (file)
@@ -232,7 +232,7 @@ struct resource_pool *dc_create_resource_pool(struct dc  *dc,
                                init_data->num_virtual_links, dc);
                break;
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        case DCN_VERSION_1_0:
        case DCN_VERSION_1_01:
                res_pool = dcn10_create_resource_pool(init_data, dc);
@@ -276,7 +276,7 @@ struct resource_pool *dc_create_resource_pool(struct dc  *dc,
        case DCN_VERSION_3_21:
                res_pool = dcn321_create_resource_pool(init_data, dc);
                break;
-#endif
+#endif /* CONFIG_DRM_AMD_DC_FP */
        default:
                break;
        }
@@ -4027,14 +4027,14 @@ bool dc_resource_acquire_secondary_pipe_for_mpc_odm(
                else
                        sec_pipe->stream_res.opp = sec_pipe->top_pipe->stream_res.opp;
                if (sec_pipe->stream->timing.flags.DSC == 1) {
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
                        dcn20_acquire_dsc(dc, &state->res_ctx, &sec_pipe->stream_res.dsc, pipe_idx);
 #endif
                        ASSERT(sec_pipe->stream_res.dsc);
                        if (sec_pipe->stream_res.dsc == NULL)
                                return false;
                }
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
                dcn20_build_mapped_resource(dc, state, sec_pipe->stream);
 #endif
        }
index c1e69fdd50203933fd0a8797c629086250d6c467..0f6873449d15643ef42397506f23dde995338a4c 100644 (file)
@@ -2054,7 +2054,7 @@ struct dc_sink_dsc_caps {
        // 'true' if these are virtual DPCD's DSC caps (immediately upstream of sink in MST topology),
        // 'false' if they are sink's DSC caps
        bool is_virtual_dpcd_dsc;
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        // 'true' if MST topology supports DSC passthrough for sink
        // 'false' if MST topology does not support DSC passthrough
        bool is_dsc_passthrough_supported;
index a583a72845fe8c20ccd4074237f04f6c4eba653f..100d62162b717ee42916ff3e5d062aca8b631432 100644 (file)
@@ -829,7 +829,7 @@ struct dc_dsc_config {
        uint32_t version_minor; /* DSC minor version. Full version is formed as 1.version_minor. */
        bool ycbcr422_simple; /* Tell DSC engine to convert YCbCr 4:2:2 to 'YCbCr 4:2:2 simple'. */
        int32_t rc_buffer_size; /* DSC RC buffer block size in bytes */
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        bool is_frl; /* indicate if DSC is applied based on HDMI FRL sink's capability */
 #endif
        bool is_dp; /* indicate if DSC is applied based on DP's capability */
index d13e46eeee3c0e68a37705fda3ba8155e1dc09a4..80a0c5a575a970a862d89225da6f1329766d06ca 100644 (file)
@@ -97,7 +97,7 @@ static void enable_memory_low_power(struct dc *dc)
                // Power down VPGs
                for (i = 0; i < dc->res_pool->stream_enc_count; i++)
                        dc->res_pool->stream_enc[i]->vpg->funcs->vpg_powerdown(dc->res_pool->stream_enc[i]->vpg);
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
                for (i = 0; i < dc->res_pool->hpo_dp_stream_enc_count; i++)
                        dc->res_pool->hpo_dp_stream_enc[i]->vpg->funcs->vpg_powerdown(dc->res_pool->hpo_dp_stream_enc[i]->vpg);
 #endif
@@ -291,7 +291,7 @@ void dcn31_init_hw(struct dc *dc)
        if (dc->res_pool->hubbub->funcs->force_pstate_change_control)
                dc->res_pool->hubbub->funcs->force_pstate_change_control(
                                dc->res_pool->hubbub, false, false);
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        if (dc->res_pool->hubbub->funcs->init_crb)
                dc->res_pool->hubbub->funcs->init_crb(dc->res_pool->hubbub);
 #endif
index 0ecea87cf48f2397fd4703d595e63ee2e79ffb65..d1b49ac2e535db42aa22e6f2ddfe690b7235678a 100644 (file)
@@ -128,7 +128,7 @@ CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_math.o := $(dml_rcflags)
 
 DML = calcs/dce_calcs.o calcs/custom_float.o calcs/bw_fixed.o
 
-ifdef CONFIG_DRM_AMD_DC_DCN
+ifdef CONFIG_DRM_AMD_DC_FP
 DML += display_mode_lib.o display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o
 DML += dcn10/dcn10_fpu.o
 DML += dcn20/dcn20_fpu.o
index 3215ca4d57991525b1a6513768b1976ce8331719..64cee8c80110c05cdd6f45ab9190b5bf5894f765 100644 (file)
@@ -39,7 +39,7 @@
  */
 void calc_rc_params(struct rc_params *rc, const struct drm_dsc_config *pps)
 {
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
        enum colour_mode mode;
        enum bits_per_comp bpc;
        bool is_navite_422_or_420;
index 42f7081cf3b3a0bd449d20bdfbb2c8cb6efb9c91..86b711dcc78586dde55280e4da3ed377396f4fc4 100644 (file)
@@ -202,7 +202,7 @@ struct dwbc_funcs {
                struct dwb_warmup_params *warmup_params);
 
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
 
        void (*dwb_program_output_csc)(
                struct dwbc *dwbc,
index d5ea7545583e87f09b0f89afbe8c2d59d00d2122..b5d353c41aa9caf2de7483388c0dbc363d7992b4 100644 (file)
@@ -146,7 +146,7 @@ struct hubp_funcs {
 
        void (*set_blank)(struct hubp *hubp, bool blank);
        void (*set_blank_regs)(struct hubp *hubp, bool blank);
-#ifdef CONFIG_DRM_AMD_DC_DCN
+#ifdef CONFIG_DRM_AMD_DC_FP
        void (*phantom_hubp_post_enable)(struct hubp *hubp);
 #endif
        void (*set_hubp_blank_en)(struct hubp *hubp, bool blank);
index 1d9f9c53d2bd6914f6f3bab88c46a7a7c73e557b..c21e7ffd5bd020c94b2dfd07cc9cbc7e793d553f 100644 (file)
@@ -182,7 +182,7 @@ struct timing_generator_funcs {
 
        bool (*enable_crtc)(struct timing_generator *tg);
        bool (*disable_crtc)(struct timing_generator *tg);
-#ifdef CONFIG_DRM_AMD_DC_DCN
+#ifdef CONFIG_DRM_AMD_DC_FP
        void (*phantom_crtc_post_enable)(struct timing_generator *tg);
 #endif
        void (*disable_phantom_crtc)(struct timing_generator *tg);
index a4d61bb724b67cd7065bee030564d7b6f61638dd..45d37c584551352e691a4e8931514b8cba2e63b7 100644 (file)
@@ -148,7 +148,7 @@ struct hwseq_private_funcs {
        void (*PLAT_58856_wa)(struct dc_state *context,
                        struct pipe_ctx *pipe_ctx);
        void (*setup_hpo_hw_control)(const struct dce_hwseq *hws, bool enable);
-#ifdef CONFIG_DRM_AMD_DC_DCN
+#ifdef CONFIG_DRM_AMD_DC_FP
        void (*program_mall_pipe_config)(struct dc *dc, struct dc_state *context);
        void (*subvp_update_force_pstate)(struct dc *dc, struct dc_state *context);
        void (*update_mall_sel)(struct dc *dc, struct dc_state *context);
index fa6da93caa889c5fb03415ef2526ed21969aa093..eaeb684c8a48ca729970126ea4f0b2ab6b0437ca 100644 (file)
@@ -201,7 +201,7 @@ bool get_temp_dp_link_res(struct dc_link *link,
                struct link_resource *link_res,
                struct dc_link_settings *link_settings);
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
 struct hpo_dp_link_encoder *resource_get_hpo_dp_link_enc_for_det_lt(
                const struct resource_context *res_ctx,
                const struct resource_pool *pool,
index 2ab23bdf5a89b24df8474893e28a4da70c4e1dc3..62aa5f6b1f0c05f65d27fca72dd03f4bd3915712 100644 (file)
@@ -124,7 +124,7 @@ static bool dp_active_dongle_validate_timing(
                if (dongle_caps->dp_hdmi_frl_max_link_bw_in_kbps > 0) { // DP to HDMI FRL converter
                        struct dc_crtc_timing outputTiming = *timing;
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
                        if (timing->flags.DSC && !timing->dsc_cfg.is_frl)
                                /* DP input has DSC, HDMI FRL output doesn't have DSC, remove DSC from output timing */
                                outputTiming.flags.DSC = 0;
index 6b88ae14f1f93a93a18964c9ea405680efc126d0..aad8095660c9a65b1491d599a3ad05b2304d98d4 100644 (file)
 
 #define dm_error(fmt, ...) DRM_ERROR(fmt, ##__VA_ARGS__)
 
-#if defined(CONFIG_DRM_AMD_DC_DCN)
+#if defined(CONFIG_DRM_AMD_DC_FP)
 #include "amdgpu_dm/dc_fpu.h"
 #define DC_FP_START() dc_fpu_begin(__func__, __LINE__)
 #define DC_FP_END() dc_fpu_end(__func__, __LINE__)
-#endif
+#endif /* CONFIG_DRM_AMD_DC_FP */
 
 /*
  *