提交 68b4d824 编写于 作者: I Imre Deak 提交者: Daniel Vetter

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: NImre Deak <imre.deak@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 f7d24902
...@@ -65,6 +65,13 @@ static bool is_pch_edp(struct intel_dp *intel_dp) ...@@ -65,6 +65,13 @@ static bool is_pch_edp(struct intel_dp *intel_dp)
return intel_dp->is_pch_edp; return intel_dp->is_pch_edp;
} }
static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
return intel_dig_port->base.base.dev;
}
/** /**
* is_cpu_edp - is the port on the CPU and attached to an eDP panel? * is_cpu_edp - is the port on the CPU and attached to an eDP panel?
* @intel_dp: DP struct * @intel_dp: DP struct
...@@ -73,14 +80,12 @@ static bool is_pch_edp(struct intel_dp *intel_dp) ...@@ -73,14 +80,12 @@ static bool is_pch_edp(struct intel_dp *intel_dp)
*/ */
static bool is_cpu_edp(struct intel_dp *intel_dp) static bool is_cpu_edp(struct intel_dp *intel_dp)
{ {
return is_edp(intel_dp) && !is_pch_edp(intel_dp); struct drm_device *dev = intel_dp_to_dev(intel_dp);
}
static struct drm_device *intel_dp_to_dev(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
enum port port = intel_dig_port->port;
return intel_dig_port->base.base.dev; return is_edp(intel_dp) &&
(port == PORT_A || (port == PORT_C && IS_VALLEYVIEW(dev)));
} }
static struct intel_dp *intel_attached_dp(struct drm_connector *connector) static struct intel_dp *intel_attached_dp(struct drm_connector *connector)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册