aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-09-11 17:02:47 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 01:45:04 -0400
commit768f69c9fe601af39dfeb377f45909896f201444 (patch)
treece10f4bd9733cd6620360918d215decc404cc9b3 /drivers/gpu/drm/i915/intel_dp.c
parentf740334775efd30631c556f7654b92dae66df494 (diff)
drm/i915: VBT's child_device_config changes over time
We currently treat the child_device_config as a simple struct, but this is not correct: new BDB versions change the meaning of some offsets, so the struct needs to be adjusted for each version. Since there are too many changes (today we're in version 170!), making a big versioned union would be too complicated, so child_device_config is now a union of 3 things: (i) a "raw" byte array that's safe to use anywhere; (ii) an "old" structure that's the one we've been using and should be safe to keep in the SDVO and TV code; and (iii) a "common" structure that should contain only fields that are common for all the known VBT versions. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7e4052ea99c5..7823a1b5c7a6 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3203,7 +3203,7 @@ intel_trans_dp_port_sel(struct drm_crtc *crtc)
3203bool intel_dpd_is_edp(struct drm_device *dev) 3203bool intel_dpd_is_edp(struct drm_device *dev)
3204{ 3204{
3205 struct drm_i915_private *dev_priv = dev->dev_private; 3205 struct drm_i915_private *dev_priv = dev->dev_private;
3206 struct child_device_config *p_child; 3206 union child_device_config *p_child;
3207 int i; 3207 int i;
3208 3208
3209 if (!dev_priv->vbt.child_dev_num) 3209 if (!dev_priv->vbt.child_dev_num)
@@ -3212,8 +3212,8 @@ bool intel_dpd_is_edp(struct drm_device *dev)
3212 for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { 3212 for (i = 0; i < dev_priv->vbt.child_dev_num; i++) {
3213 p_child = dev_priv->vbt.child_dev + i; 3213 p_child = dev_priv->vbt.child_dev + i;
3214 3214
3215 if (p_child->dvo_port == PORT_IDPD && 3215 if (p_child->common.dvo_port == PORT_IDPD &&
3216 p_child->device_type == DEVICE_TYPE_eDP) 3216 p_child->common.device_type == DEVICE_TYPE_eDP)
3217 return true; 3217 return true;
3218 } 3218 }
3219 return false; 3219 return false;