Skip to content

Commit 0c638e8

Browse files
committed
drm/i915/dp: add g4x_dp_compute_config()
Add g4x_dp_compute_config() instead of using intel_dp_compute_config() directly, in order to slightly reduce the clutter in the latter wrt ->has_pch_encoder. Cc: Ville Syrjala <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Jani Nikula <[email protected]>
1 parent f2efcd9 commit 0c638e8

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

drivers/gpu/drm/i915/display/g4x_dp.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,18 @@ static bool ilk_digital_port_connected(struct intel_encoder *encoder)
12231223
return intel_de_read(display, DEISR) & bit;
12241224
}
12251225

1226+
static int g4x_dp_compute_config(struct intel_encoder *encoder,
1227+
struct intel_crtc_state *crtc_state,
1228+
struct drm_connector_state *conn_state)
1229+
{
1230+
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
1231+
1232+
if (HAS_PCH_SPLIT(i915) && encoder->port != PORT_A)
1233+
crtc_state->has_pch_encoder = true;
1234+
1235+
return intel_dp_compute_config(encoder, crtc_state, conn_state);
1236+
}
1237+
12261238
static void g4x_dp_suspend_complete(struct intel_encoder *encoder)
12271239
{
12281240
/*
@@ -1307,7 +1319,7 @@ bool g4x_dp_init(struct drm_i915_private *dev_priv,
13071319
intel_encoder_link_check_init(intel_encoder, intel_dp_link_check);
13081320

13091321
intel_encoder->hotplug = intel_dp_hotplug;
1310-
intel_encoder->compute_config = intel_dp_compute_config;
1322+
intel_encoder->compute_config = g4x_dp_compute_config;
13111323
intel_encoder->get_hw_state = intel_dp_get_hw_state;
13121324
intel_encoder->get_config = intel_dp_get_config;
13131325
intel_encoder->sync_state = intel_dp_sync_state;

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,9 +3090,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
30903090
struct intel_connector *connector = intel_dp->attached_connector;
30913091
int ret = 0, link_bpp_x16;
30923092

3093-
if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && encoder->port != PORT_A)
3094-
pipe_config->has_pch_encoder = true;
3095-
30963093
fixed_mode = intel_panel_fixed_mode(connector, adjusted_mode);
30973094
if (intel_dp_is_edp(intel_dp) && fixed_mode) {
30983095
ret = intel_panel_compute_config(connector, adjusted_mode);

0 commit comments

Comments
 (0)