diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-09 11:20:55 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-09 12:00:43 -0400 |
commit | df0e924883d029a8651a2a0c7b8da67a07611ed2 (patch) | |
tree | 7482d6c4942c709f2c6812f397c3239326ade3b8 /drivers/gpu/drm/i915/intel_drv.h | |
parent | f875c15a4fbf37534dda30771d8bde8604fbbf09 (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.h | 10 |
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 | ||
151 | struct intel_connector { | 151 | struct intel_connector { |
152 | struct drm_connector base; | 152 | struct drm_connector base; |
153 | struct intel_encoder *encoder; | ||
153 | }; | 154 | }; |
154 | 155 | ||
155 | struct intel_crtc { | 156 | struct intel_crtc { |
@@ -234,7 +235,14 @@ extern void intel_encoder_prepare (struct drm_encoder *encoder); | |||
234 | extern void intel_encoder_commit (struct drm_encoder *encoder); | 235 | extern void intel_encoder_commit (struct drm_encoder *encoder); |
235 | extern void intel_encoder_destroy(struct drm_encoder *encoder); | 236 | extern void intel_encoder_destroy(struct drm_encoder *encoder); |
236 | 237 | ||
237 | extern struct drm_encoder *intel_attached_encoder(struct drm_connector *connector); | 238 | static inline struct intel_encoder *intel_attached_encoder(struct drm_connector *connector) |
239 | { | ||
240 | return to_intel_connector(connector)->encoder; | ||
241 | } | ||
242 | |||
243 | extern void intel_connector_attach_encoder(struct intel_connector *connector, | ||
244 | struct intel_encoder *encoder); | ||
245 | extern struct drm_encoder *intel_best_encoder(struct drm_connector *connector); | ||
238 | 246 | ||
239 | extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev, | 247 | extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev, |
240 | struct drm_crtc *crtc); | 248 | struct drm_crtc *crtc); |