diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-07-02 13:34:59 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-09-06 07:58:28 +0200 |
commit | 9a8ee983e0b77a8b07d3f20a7627202e5f9a7ba5 (patch) | |
tree | 39caae59b2d9f09ecc7f56918b0939b8bcd94ac4 /drivers/gpu/drm/i915/intel_tv.c | |
parent | 85234cdc28f622dc94d8bb0089635113e2aa5609 (diff) | |
download | op-kernel-dev-9a8ee983e0b77a8b07d3f20a7627202e5f9a7ba5.zip op-kernel-dev-9a8ee983e0b77a8b07d3f20a7627202e5f9a7ba5.tar.gz |
drm/i915/tv: implement get_hw_state
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
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 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 5dc08b9..98ad7fd 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -836,6 +836,21 @@ static struct intel_tv *intel_attached_tv(struct drm_connector *connector) base); } +static bool +intel_tv_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe) +{ + struct drm_device *dev = encoder->base.dev; + struct drm_i915_private *dev_priv = dev->dev_private; + u32 tmp = I915_READ(TV_CTL); + + if (!(tmp & TV_ENC_ENABLE)) + return false; + + *pipe = PORT_TO_PIPE(tmp); + + return true; +} + static void intel_enable_tv(struct intel_encoder *encoder) { @@ -1616,6 +1631,8 @@ intel_tv_init(struct drm_device *dev) intel_encoder->enable = intel_enable_tv; intel_encoder->disable = intel_disable_tv; + intel_encoder->get_hw_state = intel_tv_get_hw_state; + intel_connector->get_hw_state = intel_connector_get_hw_state; intel_connector_attach_encoder(intel_connector, intel_encoder); intel_encoder->type = INTEL_OUTPUT_TVOUT; |