diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-12 14:08:18 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-25 12:23:46 -0400 |
commit | 66a9278eecbef1c746e7fac8f4bcb0485d7aa4d0 (patch) | |
tree | df6a3a51e4ebe33384e532a3ccaae07be725ce37 /drivers/gpu/drm/i915/intel_tv.c | |
parent | ebc0fd882b000b119e0684815db8c2245e61162f (diff) |
drm/i915: simplify possible_clones computation
Intel hw only has one MUX for encoders, so outputs are either not
cloneable or all in the same group of cloneable outputs. This neatly
simplifies the code and allows us to ditch some ugly if cascades in
the dp and hdmi init code (well, we need these if cascades for other
stuff still, but that can be taken care of in follow-up patches).
Note that this changes two things:
- dvo can now be cloned with sdvo, but dvo is gen2 whereas sdvo is
gen3+, so no problem. Note that the old code had a bug and didn't
allow cloning crt with dvo (but only the other way round).
- sdvo-lvds can now be cloned with sdvo-non-tv. Spec says this won't
work, but the only reason I've found is that you can't use the
panel-fitter (used for lvds upscaling) with anything else. But we
don't use the panel fitter for sdvo-lvds. Imo this part of Bspec is
a) rather confusing b) mostly as a guideline to implementors (i.e.
explicitly stating what is already implicit from the spec, without
always going into the details of why). So I think we can ignore this
- worst case we'll get a bug report from a user with with sdvo-lvds
and sdvo-tmds and have to add that special case back in.
Because sdvo lvds is a bit special explain in comments why sdvo LVDS
outputs can be cloned, but native LVDS and eDP can't be cloned - we
use the panel fitter for the later, but not for sdvo.
Note that this also uncoditionally initializes the panel_vdd work used
by eDP. Trying to be clever doesn't buy us anything (but strange bugs)
and this way we can kill the is_edp check.
v2: Incorporate review from Paulo
- Add in a missing space.
- Pimp comment message to address his concerns.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_tv.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index befce6c49704..1a0bab07699e 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1622,7 +1622,7 @@ intel_tv_init(struct drm_device *dev) | |||
1622 | intel_connector_attach_encoder(intel_connector, intel_encoder); | 1622 | intel_connector_attach_encoder(intel_connector, intel_encoder); |
1623 | intel_encoder->type = INTEL_OUTPUT_TVOUT; | 1623 | intel_encoder->type = INTEL_OUTPUT_TVOUT; |
1624 | intel_encoder->crtc_mask = (1 << 0) | (1 << 1); | 1624 | intel_encoder->crtc_mask = (1 << 0) | (1 << 1); |
1625 | intel_encoder->clone_mask = (1 << INTEL_TV_CLONE_BIT); | 1625 | intel_encoder->cloneable = false; |
1626 | intel_encoder->base.possible_crtcs = ((1 << 0) | (1 << 1)); | 1626 | intel_encoder->base.possible_crtcs = ((1 << 0) | (1 << 1)); |
1627 | intel_encoder->base.possible_clones = (1 << INTEL_OUTPUT_TVOUT); | 1627 | intel_encoder->base.possible_clones = (1 << INTEL_OUTPUT_TVOUT); |
1628 | intel_tv->type = DRM_MODE_CONNECTOR_Unknown; | 1628 | intel_tv->type = DRM_MODE_CONNECTOR_Unknown; |