Skip to content

Commit 7da45e7

Browse files
Rodrigo Siqueiraalexdeucher
authored andcommitted
drm/amd/display: Clean up code in DC
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 <[email protected]> Acked-by: Aurabindo Pillai <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2a8f746 commit 7da45e7

File tree

5 files changed

+10
-25
lines changed

5 files changed

+10
-25
lines changed

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ void dcn32_link_encoder_construct(
248248
enc10->base.hpd_source = init_data->hpd_source;
249249
enc10->base.connector = init_data->connector;
250250

251-
if (enc10->base.connector.id == CONNECTOR_ID_USBC)
252-
enc10->base.features.flags.bits.DP_IS_USB_C = 1;
253-
254251
enc10->base.preferred_engine = ENGINE_ID_UNKNOWN;
255252

256253
enc10->base.features = *enc_features;
257254

255+
if (enc10->base.connector.id == CONNECTOR_ID_USBC)
256+
enc10->base.features.flags.bits.DP_IS_USB_C = 1;
257+
258258
enc10->base.transmitter = init_data->transmitter;
259259

260260
/* set the flag to indicate whether driver poll the I2C data pin

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,7 @@
2626
#ifndef __DC_LINK_ENCODER__DCN32_H__
2727
#define __DC_LINK_ENCODER__DCN32_H__
2828

29-
#include "dcn31/dcn31_dio_link_encoder.h"
30-
31-
#define LE_DCN32_REG_LIST(id)\
32-
LE_DCN31_REG_LIST(id),\
33-
SRI(DIG_FIFO_CTRL0, DIG, id)
34-
35-
#define LINK_ENCODER_MASK_SH_LIST_DCN32(mask_sh) \
36-
LINK_ENCODER_MASK_SH_LIST_DCN31(mask_sh),\
37-
LE_SF(DIG0_DIG_FIFO_CTRL0, DIG_FIFO_OUTPUT_PIXEL_MODE, mask_sh)
29+
#include "dcn30/dcn30_dio_link_encoder.h"
3830

3931
void dcn32_link_encoder_construct(
4032
struct dcn20_link_encoder *enc20,

drivers/gpu/drm/amd/display/dc/dcn321/dcn321_dio_link_encoder.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ void dcn321_link_encoder_construct(
127127
* while doing the DP sink detect
128128
*/
129129

130-
/* if (dal_adapter_service_is_feature_supported(as,
131-
FEATURE_DP_SINK_DETECT_POLL_DATA_PIN))
132-
enc10->base.features.flags.bits.
133-
DP_SINK_DETECT_POLL_DATA_PIN = true;*/
134-
135130
enc10->base.output_signals =
136131
SIGNAL_TYPE_DVI_SINGLE_LINK |
137132
SIGNAL_TYPE_DVI_DUAL_LINK |

drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,11 @@ struct link_encoder_funcs {
163163

164164
enum signal_type (*get_dig_mode)(
165165
struct link_encoder *enc);
166+
166167
void (*set_dio_phy_mux)(
167168
struct link_encoder *enc,
168169
enum encoder_type_select sel,
169170
uint32_t hpo_inst);
170-
void (*set_dig_output_mode)(
171-
struct link_encoder *enc, uint8_t pix_per_container);
172171
};
173172

174173
/*

drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
#include "dcn20/dcn20_vmid.h"
6363
#include "dce/dce_panel_cntl.h"
6464

65+
#include "dcn20/dcn20_dwb.h"
66+
#include "dcn20/dcn20_mmhubbub.h"
67+
6568
#include "navi10_ip_offset.h"
6669

6770
#include "dcn/dcn_2_0_0_offset.h"
@@ -71,9 +74,6 @@
7174

7275
#include "nbio/nbio_2_3_offset.h"
7376

74-
#include "dcn20/dcn20_dwb.h"
75-
#include "dcn20/dcn20_mmhubbub.h"
76-
7777
#include "mmhub/mmhub_2_0_0_offset.h"
7878
#include "mmhub/mmhub_2_0_0_sh_mask.h"
7979

@@ -83,11 +83,10 @@
8383
#include "dce/dce_aux.h"
8484
#include "dce/dce_i2c.h"
8585
#include "vm_helper.h"
86-
#include "link_enc_cfg.h"
87-
88-
#include "amdgpu_socbb.h"
8986

87+
#include "link_enc_cfg.h"
9088
#include "link.h"
89+
9190
#define DC_LOGGER_INIT(logger)
9291

9392
#ifndef mmDP0_DP_DPHY_INTERNAL_CTRL

0 commit comments

Comments
 (0)