diff options
author | Patrik Jakobsson <patrik.r.jakobsson@gmail.com> | 2011-12-19 21:40:33 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-20 10:23:07 +0000 |
commit | 1730f89bfcff353484672cdcefbef13b2f374176 (patch) | |
tree | ac13c154f05e05cc527df52dce8fb5caa7826c03 /drivers/gpu/drm/gma500/psb_intel_display.c | |
parent | 352b16a0e16eb29fd268dafab7816bf85bfc4d21 (diff) |
gma500: Fix encoder type checking for connectors
Fix cases where we need to know what encoder type is behind a given connector.
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/psb_intel_display.c')
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_display.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index b6f6cf58973..ddaf3d428f5 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c @@ -214,9 +214,9 @@ bool psb_intel_pipe_has_type(struct drm_crtc *crtc, int type) list_for_each_entry(l_entry, &mode_config->connector_list, head) { if (l_entry->encoder && l_entry->encoder->crtc == crtc) { - struct psb_intel_output *psb_intel_output = - to_psb_intel_output(l_entry); - if (psb_intel_output->type == type) + struct psb_intel_encoder *psb_intel_encoder = + psb_intel_attached_encoder(l_entry); + if (psb_intel_encoder->type == type) return true; } } @@ -615,14 +615,14 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc, } list_for_each_entry(connector, &mode_config->connector_list, head) { - struct psb_intel_output *psb_intel_output = - to_psb_intel_output(connector); + struct psb_intel_encoder *psb_intel_encoder = + psb_intel_attached_encoder(connector); if (!connector->encoder || connector->encoder->crtc != crtc) continue; - switch (psb_intel_output->type) { + switch (psb_intel_encoder->type) { case INTEL_OUTPUT_LVDS: is_lvds = true; break; @@ -1402,9 +1402,9 @@ int psb_intel_connector_clones(struct drm_device *dev, int type_mask) list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - struct psb_intel_output *psb_intel_output = - to_psb_intel_output(connector); - if (type_mask & (1 << psb_intel_output->type)) + struct psb_intel_encoder *psb_intel_encoder = + psb_intel_attached_encoder(connector); + if (type_mask & (1 << psb_intel_encoder->type)) index_mask |= (1 << entry); entry++; } @@ -1423,10 +1423,10 @@ void psb_intel_modeset_cleanup(struct drm_device *dev) */ struct drm_encoder *psb_intel_best_encoder(struct drm_connector *connector) { - struct psb_intel_output *psb_intel_output = - to_psb_intel_output(connector); + struct psb_intel_encoder *psb_intel_encoder = + psb_intel_attached_encoder(connector); - return &psb_intel_output->enc; + return &psb_intel_encoder->base; } void psb_intel_connector_attach_encoder(struct psb_intel_connector *connector, |