[PATCH 08/10] drm/i915/dp: If the panel has a fixed_mode, it can only be eDP

Chris Wilson
2011-04-22T09:19:28Z

... and so we can simplify some conditionals.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_dp.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 384017c..4c42f39 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -205,7 +205,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
int max_link_clock = intel_dp_link_clock(intel_dp_max_link_bw(intel_dp));
int max_lanes = intel_dp_max_lane_count(intel_dp);

- if (is_edp(intel_dp) && intel_dp->panel.fixed_mode) {
+ if (intel_dp->panel.fixed_mode) {
if (mode->hdisplay > intel_dp->panel.fixed_mode->hdisplay)
return MODE_PANEL;

@@ -596,7 +596,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
int max_clock = intel_dp_max_link_bw(intel_dp) == DP_LINK_BW_2_7 ? 1 : 0;
static int bws[2] = { DP_LINK_BW_1_62, DP_LINK_BW_2_7 };

- if (is_edp(intel_dp) && intel_dp->panel.fixed_mode) {
+ if (intel_dp->panel.fixed_mode) {
intel_fixed_panel_mode(intel_dp->panel.fixed_mode,
adjusted_mode);
intel_pch_panel_fitting(dev, DRM_MODE_SCALE_FULLSCREEN,
@@ -1646,14 +1646,11 @@ static int intel_dp_get_modes(struct drm_connector *connector)
}

/* if eDP has no EDID, try to use fixed panel mode from VBT */
- if (is_edp(intel_dp)) {
- if (intel_dp->panel.fixed_mode != NULL) {
- struct drm_display_mode *mode;
- mode = drm_mode_duplicate(dev,
- intel_dp->panel.fixed_mode);
- drm_mode_probed_add(connector, mode);
- return 1;
- }
+ if (intel_dp->panel.fixed_mode != NULL) {
+ struct drm_display_mode *mode;
+ mode = drm_mode_duplicate(dev, intel_dp->panel.fixed_mode);
+ drm_mode_probed_add(connector, mode);
+ return 1;
}
return 0;
}
--
1.7.4.1