diff options
author | Imre Deak <imre.deak@intel.com> | 2013-05-08 06:14:06 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-05-10 15:56:41 -0400 |
commit | 68b4d8247033b425ae948f02885c2aed5ae823f3 (patch) | |
tree | c43ea87221208f71a26c77469508e4c305c1fe8a /drivers/gpu/drm/i915/intel_dp.c | |
parent | f7d24902e197824eee717e4c3f406eb8623e67e0 (diff) |
drm/i915: stop using is_pch_edp() in is_cpu_edp()
is_pch_edp() will be removed by the next patch, so replace it by a check
for the port and device type.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 6f3a9e8f7078..3ab683af5256 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -65,6 +65,13 @@ static bool is_pch_edp(struct intel_dp *intel_dp) | |||
65 | return intel_dp->is_pch_edp; | 65 | return intel_dp->is_pch_edp; |
66 | } | 66 | } |
67 | 67 | ||
68 | static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp) | ||
69 | { | ||
70 | struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); | ||
71 | |||
72 | return intel_dig_port->base.base.dev; | ||
73 | } | ||
74 | |||
68 | /** | 75 | /** |
69 | * is_cpu_edp - is the port on the CPU and attached to an eDP panel? | 76 | * is_cpu_edp - is the port on the CPU and attached to an eDP panel? |
70 | * @intel_dp: DP struct | 77 | * @intel_dp: DP struct |
@@ -73,14 +80,12 @@ static bool is_pch_edp(struct intel_dp *intel_dp) | |||
73 | */ | 80 | */ |
74 | static bool is_cpu_edp(struct intel_dp *intel_dp) | 81 | static bool is_cpu_edp(struct intel_dp *intel_dp) |
75 | { | 82 | { |
76 | return is_edp(intel_dp) && !is_pch_edp(intel_dp); | 83 | struct drm_device *dev = intel_dp_to_dev(intel_dp); |
77 | } | ||
78 | |||
79 | static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp) | ||
80 | { | ||
81 | struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); | 84 | struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); |
85 | enum port port = intel_dig_port->port; | ||
82 | 86 | ||
83 | return intel_dig_port->base.base.dev; | 87 | return is_edp(intel_dp) && |
88 | (port == PORT_A || (port == PORT_C && IS_VALLEYVIEW(dev))); | ||
84 | } | 89 | } |
85 | 90 | ||
86 | static struct intel_dp *intel_attached_dp(struct drm_connector *connector) | 91 | static struct intel_dp *intel_attached_dp(struct drm_connector *connector) |