Skip to content

Commit

Permalink
drm/amd/display: Clean up code in DC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rodrigo Siqueira authored and Alex Deucher committed Apr 26, 2024
1 parent 2a8f746 commit 7da45e7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 25 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@
#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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
3 changes: 1 addition & 2 deletions drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

/*
Expand Down
11 changes: 5 additions & 6 deletions drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand All @@ -83,11 +83,10 @@
#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
Expand Down

0 comments on commit 7da45e7

Please sign in to comment.