drm/amd/display: Drop some unnecessary guards
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Wed, 24 Jan 2024 23:57:14 +0000 (16:57 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Feb 2024 17:26:23 +0000 (12:26 -0500)
Some of the CONFIG_DRM_AMD_DC_FP was added in some non-related FPU code,
which may cause confusion. This commit dropped some of the unnecessary
guards.

Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.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/hwss/dcn31/dcn31_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer_private.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/link/link_validation.c

index 0c6a4ab..e3e1940 100644 (file)
@@ -707,9 +707,7 @@ void rn_clk_mgr_construct(
        int is_green_sardine = 0;
        struct clk_log_info log_info = {0};
 
-#if defined(CONFIG_DRM_AMD_DC_FP)
        is_green_sardine = ASICREV_IS_GREEN_SARDINE(ctx->asic_id.hw_internal_rev);
-#endif
 
        clk_mgr->base.ctx = ctx;
        clk_mgr->base.funcs = &dcn21_funcs;
index b510c36..07e6f25 100644 (file)
@@ -2222,11 +2222,9 @@ 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_FP)
        // 'true' if MST topology supports DSC passthrough for sink
        // 'false' if MST topology does not support DSC passthrough
        bool is_dsc_passthrough_supported;
-#endif
        struct dsc_dec_dpcd_caps dsc_dec_caps;
 };
 
index fb4db31..aae2f3a 100644 (file)
@@ -827,9 +827,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_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 */
        uint32_t mst_pbn; /* pbn of display on dsc mst hub */
        const struct dc_dsc_rc_params_override *rc_params_ovrd; /* DM owned memory. If not NULL, apply custom dsc rc params */
index 58eb918..a760f0c 100644 (file)
@@ -98,10 +98,8 @@ static void enable_memory_low_power(struct dc *dc)
                for (i = 0; i < dc->res_pool->stream_enc_count; i++)
                        if (dc->res_pool->stream_enc[i]->vpg)
                                dc->res_pool->stream_enc[i]->vpg->funcs->vpg_powerdown(dc->res_pool->stream_enc[i]->vpg);
-#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
        }
 
 }
index b3c62a8..554cfab 100644 (file)
@@ -155,7 +155,6 @@ struct hwseq_private_funcs {
        void (*setup_hpo_hw_control)(const struct dce_hwseq *hws, bool enable);
        void (*enable_plane)(struct dc *dc, struct pipe_ctx *pipe_ctx,
                               struct dc_state *context);
-#ifdef CONFIG_DRM_AMD_DC_FP
        void (*program_mall_pipe_config)(struct dc *dc, struct dc_state *context);
        void (*update_force_pstate)(struct dc *dc, struct dc_state *context);
        void (*update_mall_sel)(struct dc *dc, struct dc_state *context);
@@ -170,7 +169,6 @@ struct hwseq_private_funcs {
                        struct dc_state *context,
                        struct dc *dc);
        bool (*is_dp_dig_pixel_rate_div_policy)(struct pipe_ctx *pipe_ctx);
-#endif
        void (*reset_back_end_for_pipe)(struct dc *dc,
                        struct pipe_ctx *pipe_ctx,
                        struct dc_state *context);
index dedc537..72610cd 100644 (file)
@@ -157,9 +157,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_FP
        void (*phantom_hubp_post_enable)(struct hubp *hubp);
-#endif
        void (*set_hubp_blank_en)(struct hubp *hubp, bool blank);
 
        void (*set_cursor_attributes)(
index 9a00a99..d98d72f 100644 (file)
@@ -182,9 +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_FP
        void (*phantom_crtc_post_enable)(struct timing_generator *tg);
-#endif
        void (*disable_phantom_crtc)(struct timing_generator *tg);
        bool (*immediate_disable_crtc)(struct timing_generator *tg);
        bool (*is_counter_moving)(struct timing_generator *tg);
index 8fe66c3..1c038e2 100644 (file)
@@ -125,11 +125,9 @@ 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_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;
-#endif
                        if (dc_bandwidth_in_kbps_from_timing(&outputTiming, DC_LINK_ENCODING_HDMI_FRL) >
                                        dongle_caps->dp_hdmi_frl_max_link_bw_in_kbps)
                                return false;