drm/amd/display: Clean up code in DC
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tue, 9 Apr 2024 20:34:59 +0000 (14:34 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Apr 2024 21:22:45 +0000 (17:22 -0400)
This commit removes some unnecessary code and makes the required
adjustments to replace other parts of the code with a short option.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.h
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_dio_link_encoder.c
drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c

index 8a0460e86309775e83775093b04527f022e4a91c..d9ff95cd2dbdb0d4f6e012807c0e8c8eda47beaf 100644 (file)
@@ -248,13 +248,13 @@ void dcn32_link_encoder_construct(
        enc10->base.hpd_source = init_data->hpd_source;
        enc10->base.connector = init_data->connector;
 
-       if (enc10->base.connector.id == CONNECTOR_ID_USBC)
-               enc10->base.features.flags.bits.DP_IS_USB_C = 1;
-
        enc10->base.preferred_engine = ENGINE_ID_UNKNOWN;
 
        enc10->base.features = *enc_features;
 
+       if (enc10->base.connector.id == CONNECTOR_ID_USBC)
+               enc10->base.features.flags.bits.DP_IS_USB_C = 1;
+
        enc10->base.transmitter = init_data->transmitter;
 
        /* set the flag to indicate whether driver poll the I2C data pin
index 2d5f25290ed147b42ba69727b72340d5d34ca92b..35d23d9db45e1dbfedfe6b5a73f18a008d669d37 100644 (file)
 #ifndef __DC_LINK_ENCODER__DCN32_H__
 #define __DC_LINK_ENCODER__DCN32_H__
 
-#include "dcn31/dcn31_dio_link_encoder.h"
-
-#define LE_DCN32_REG_LIST(id)\
-       LE_DCN31_REG_LIST(id),\
-       SRI(DIG_FIFO_CTRL0, DIG, id)
-
-#define LINK_ENCODER_MASK_SH_LIST_DCN32(mask_sh) \
-       LINK_ENCODER_MASK_SH_LIST_DCN31(mask_sh),\
-       LE_SF(DIG0_DIG_FIFO_CTRL0, DIG_FIFO_OUTPUT_PIXEL_MODE, mask_sh)
+#include "dcn30/dcn30_dio_link_encoder.h"
 
 void dcn32_link_encoder_construct(
        struct dcn20_link_encoder *enc20,
index 13be5f06d987926aeb6694c52628748975923c03..a406c5619c45bf775f31a4ec9caeb846cd02f1ad 100644 (file)
@@ -127,11 +127,6 @@ void dcn321_link_encoder_construct(
         * while doing the DP sink detect
         */
 
-/*     if (dal_adapter_service_is_feature_supported(as,
-               FEATURE_DP_SINK_DETECT_POLL_DATA_PIN))
-               enc10->base.features.flags.bits.
-                       DP_SINK_DETECT_POLL_DATA_PIN = true;*/
-
        enc10->base.output_signals =
                SIGNAL_TYPE_DVI_SINGLE_LINK |
                SIGNAL_TYPE_DVI_DUAL_LINK |
index dbe7afa9d3a227d564690457e10c4e1ca3658c73..af9183f5d69befb36a4329efe0cbcf1932cdc277 100644 (file)
@@ -163,12 +163,11 @@ struct link_encoder_funcs {
 
        enum signal_type (*get_dig_mode)(
                struct link_encoder *enc);
+
        void (*set_dio_phy_mux)(
                struct link_encoder *enc,
                enum encoder_type_select sel,
                uint32_t hpo_inst);
-       void (*set_dig_output_mode)(
-                       struct link_encoder *enc, uint8_t pix_per_container);
 };
 
 /*
index d521fc65afe35d37d06bf90c1499c15c09e8f109..6406d31ceefe7989f0e13b9e6e408bc032d091dd 100644 (file)
@@ -62,6 +62,9 @@
 #include "dcn20/dcn20_vmid.h"
 #include "dce/dce_panel_cntl.h"
 
+#include "dcn20/dcn20_dwb.h"
+#include "dcn20/dcn20_mmhubbub.h"
+
 #include "navi10_ip_offset.h"
 
 #include "dcn/dcn_2_0_0_offset.h"
@@ -71,9 +74,6 @@
 
 #include "nbio/nbio_2_3_offset.h"
 
-#include "dcn20/dcn20_dwb.h"
-#include "dcn20/dcn20_mmhubbub.h"
-
 #include "mmhub/mmhub_2_0_0_offset.h"
 #include "mmhub/mmhub_2_0_0_sh_mask.h"
 
 #include "dce/dce_aux.h"
 #include "dce/dce_i2c.h"
 #include "vm_helper.h"
-#include "link_enc_cfg.h"
-
-#include "amdgpu_socbb.h"
 
+#include "link_enc_cfg.h"
 #include "link.h"
+
 #define DC_LOGGER_INIT(logger)
 
 #ifndef mmDP0_DP_DPHY_INTERNAL_CTRL