提交 9a8ee983 编写于 作者: D Daniel Vetter

drm/i915/tv: implement get_hw_state

Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 85234cdc
...@@ -836,6 +836,21 @@ static struct intel_tv *intel_attached_tv(struct drm_connector *connector) ...@@ -836,6 +836,21 @@ static struct intel_tv *intel_attached_tv(struct drm_connector *connector)
base); 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 static void
intel_enable_tv(struct intel_encoder *encoder) intel_enable_tv(struct intel_encoder *encoder)
{ {
...@@ -1616,6 +1631,8 @@ intel_tv_init(struct drm_device *dev) ...@@ -1616,6 +1631,8 @@ intel_tv_init(struct drm_device *dev)
intel_encoder->enable = intel_enable_tv; intel_encoder->enable = intel_enable_tv;
intel_encoder->disable = intel_disable_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_connector_attach_encoder(intel_connector, intel_encoder);
intel_encoder->type = INTEL_OUTPUT_TVOUT; intel_encoder->type = INTEL_OUTPUT_TVOUT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册