aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/dvo_ch7xxx.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-02 09:09:45 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-09-06 01:58:52 -0400
commit732ce74f4adfcdac84862fb74c6897b4a152d5e1 (patch)
treedd7f9c2f30d4038f113973c17bb81788ee96f319 /drivers/gpu/drm/i915/dvo_ch7xxx.c
parent4ac41f47f8f6ba1d05b39783ea0819435074ef37 (diff)
drm/i915/dvo: implement get_hw_state
Similar to the sdvo code we poke the dvo encoder whether the output is active. Safe that dvo encoders are not standardized, so this requires a new callback into the dvo chip driver. Hence implement that for all 6 dvo drivers. v2: With the newly added ns2501 we now have 6 dvo drivers instead of just 5 ... Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/dvo_ch7xxx.c')
-rw-r--r--drivers/gpu/drm/i915/dvo_ch7xxx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/dvo_ch7xxx.c b/drivers/gpu/drm/i915/dvo_ch7xxx.c
index c1dea5b11f91..38f3a6cb8c7d 100644
--- a/drivers/gpu/drm/i915/dvo_ch7xxx.c
+++ b/drivers/gpu/drm/i915/dvo_ch7xxx.c
@@ -297,6 +297,18 @@ static void ch7xxx_dpms(struct intel_dvo_device *dvo, bool enable)
297 ch7xxx_writeb(dvo, CH7xxx_PM, CH7xxx_PM_FPD); 297 ch7xxx_writeb(dvo, CH7xxx_PM, CH7xxx_PM_FPD);
298} 298}
299 299
300static bool ch7xxx_get_hw_state(struct intel_dvo_device *dvo)
301{
302 u8 val;
303
304 ch7xxx_readb(dvo, CH7xxx_PM, &val);
305
306 if (val & CH7xxx_PM_FPD)
307 return false;
308 else
309 return true;
310}
311
300static void ch7xxx_dump_regs(struct intel_dvo_device *dvo) 312static void ch7xxx_dump_regs(struct intel_dvo_device *dvo)
301{ 313{
302 int i; 314 int i;
@@ -326,6 +338,7 @@ struct intel_dvo_dev_ops ch7xxx_ops = {
326 .mode_valid = ch7xxx_mode_valid, 338 .mode_valid = ch7xxx_mode_valid,
327 .mode_set = ch7xxx_mode_set, 339 .mode_set = ch7xxx_mode_set,
328 .dpms = ch7xxx_dpms, 340 .dpms = ch7xxx_dpms,
341 .get_hw_state = ch7xxx_get_hw_state,
329 .dump_regs = ch7xxx_dump_regs, 342 .dump_regs = ch7xxx_dump_regs,
330 .destroy = ch7xxx_destroy, 343 .destroy = ch7xxx_destroy,
331}; 344};