aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-09 11:20:55 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-09 12:00:43 -0400
commitdf0e924883d029a8651a2a0c7b8da67a07611ed2 (patch)
tree7482d6c4942c709f2c6812f397c3239326ade3b8 /drivers/gpu/drm/i915/intel_drv.h
parentf875c15a4fbf37534dda30771d8bde8604fbbf09 (diff)
drm/i915: Make the connector->encoder relationship explicit
Currently we have a exact mapping of a connector onto an encoder for its whole lifetime. Make this an explicit property of the structure and so simplify the code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index ba94944e4eb1..1ada684ea569 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -150,6 +150,7 @@ struct intel_encoder {
150 150
151struct intel_connector { 151struct intel_connector {
152 struct drm_connector base; 152 struct drm_connector base;
153 struct intel_encoder *encoder;
153}; 154};
154 155
155struct intel_crtc { 156struct intel_crtc {
@@ -234,7 +235,14 @@ extern void intel_encoder_prepare (struct drm_encoder *encoder);
234extern void intel_encoder_commit (struct drm_encoder *encoder); 235extern void intel_encoder_commit (struct drm_encoder *encoder);
235extern void intel_encoder_destroy(struct drm_encoder *encoder); 236extern void intel_encoder_destroy(struct drm_encoder *encoder);
236 237
237extern struct drm_encoder *intel_attached_encoder(struct drm_connector *connector); 238static inline struct intel_encoder *intel_attached_encoder(struct drm_connector *connector)
239{
240 return to_intel_connector(connector)->encoder;
241}
242
243extern void intel_connector_attach_encoder(struct intel_connector *connector,
244 struct intel_encoder *encoder);
245extern struct drm_encoder *intel_best_encoder(struct drm_connector *connector);
238 246
239extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev, 247extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
240 struct drm_crtc *crtc); 248 struct drm_crtc *crtc);