diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-24 15:33:28 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-07-01 05:14:44 -0400 |
commit | 4f7fd7095d85cd31c86cb9ba87bc301319630ccc (patch) | |
tree | da1ba147ca2ca33fb131f592bd0079c1b22ddd8d /drivers/gpu/drm | |
parent | f5adf94e5fed2468eef4f0c094b66bf834770d7b (diff) |
drm/i915: Fix up sdvo hpd pins for i965g/gm
Bspec seems to be full of lies, at least it disagress with reality:
Two systems corrobated that SDVO hpd bits are the same as on gen3.
v2: Update comment a bit.
Cc: Arthur Ranyan <arthur.j.runyan@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: Alex Fiestas <afiestas@kde.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58405
Cc: stable@vger.kernel.org
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 13 |
2 files changed, 8 insertions, 18 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 7857430943ec..611da3a74479 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -70,15 +70,6 @@ static const u32 hpd_status_gen4[] = { | |||
70 | [HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS | 70 | [HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static const u32 hpd_status_i965[] = { | ||
74 | [HPD_CRT] = CRT_HOTPLUG_INT_STATUS, | ||
75 | [HPD_SDVO_B] = SDVOB_HOTPLUG_INT_STATUS_I965, | ||
76 | [HPD_SDVO_C] = SDVOC_HOTPLUG_INT_STATUS_I965, | ||
77 | [HPD_PORT_B] = PORTB_HOTPLUG_INT_STATUS, | ||
78 | [HPD_PORT_C] = PORTC_HOTPLUG_INT_STATUS, | ||
79 | [HPD_PORT_D] = PORTD_HOTPLUG_INT_STATUS | ||
80 | }; | ||
81 | |||
82 | static const u32 hpd_status_i915[] = { /* i915 and valleyview are the same */ | 73 | static const u32 hpd_status_i915[] = { /* i915 and valleyview are the same */ |
83 | [HPD_CRT] = CRT_HOTPLUG_INT_STATUS, | 74 | [HPD_CRT] = CRT_HOTPLUG_INT_STATUS, |
84 | [HPD_SDVO_B] = SDVOB_HOTPLUG_INT_STATUS_I915, | 75 | [HPD_SDVO_B] = SDVOB_HOTPLUG_INT_STATUS_I915, |
@@ -3449,13 +3440,13 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) | |||
3449 | u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT); | 3440 | u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT); |
3450 | u32 hotplug_trigger = hotplug_status & (IS_G4X(dev) ? | 3441 | u32 hotplug_trigger = hotplug_status & (IS_G4X(dev) ? |
3451 | HOTPLUG_INT_STATUS_G4X : | 3442 | HOTPLUG_INT_STATUS_G4X : |
3452 | HOTPLUG_INT_STATUS_I965); | 3443 | HOTPLUG_INT_STATUS_I915); |
3453 | 3444 | ||
3454 | DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n", | 3445 | DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n", |
3455 | hotplug_status); | 3446 | hotplug_status); |
3456 | if (hotplug_trigger) { | 3447 | if (hotplug_trigger) { |
3457 | if (hotplug_irq_storm_detect(dev, hotplug_trigger, | 3448 | if (hotplug_irq_storm_detect(dev, hotplug_trigger, |
3458 | IS_G4X(dev) ? hpd_status_gen4 : hpd_status_i965)) | 3449 | IS_G4X(dev) ? hpd_status_gen4 : hpd_status_i915)) |
3459 | i915_hpd_irq_setup(dev); | 3450 | i915_hpd_irq_setup(dev); |
3460 | queue_work(dev_priv->wq, | 3451 | queue_work(dev_priv->wq, |
3461 | &dev_priv->hotplug_work); | 3452 | &dev_priv->hotplug_work); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 2102ff32ee20..137be4c1abd1 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -1874,6 +1874,12 @@ | |||
1874 | /* SDVO is different across gen3/4 */ | 1874 | /* SDVO is different across gen3/4 */ |
1875 | #define SDVOC_HOTPLUG_INT_STATUS_G4X (1 << 3) | 1875 | #define SDVOC_HOTPLUG_INT_STATUS_G4X (1 << 3) |
1876 | #define SDVOB_HOTPLUG_INT_STATUS_G4X (1 << 2) | 1876 | #define SDVOB_HOTPLUG_INT_STATUS_G4X (1 << 2) |
1877 | /* | ||
1878 | * Bspec seems to be seriously misleaded about the SDVO hpd bits on i965g/gm, | ||
1879 | * since reality corrobates that they're the same as on gen3. But keep these | ||
1880 | * bits here (and the comment!) to help any other lost wanderers back onto the | ||
1881 | * right tracks. | ||
1882 | */ | ||
1877 | #define SDVOC_HOTPLUG_INT_STATUS_I965 (3 << 4) | 1883 | #define SDVOC_HOTPLUG_INT_STATUS_I965 (3 << 4) |
1878 | #define SDVOB_HOTPLUG_INT_STATUS_I965 (3 << 2) | 1884 | #define SDVOB_HOTPLUG_INT_STATUS_I965 (3 << 2) |
1879 | #define SDVOC_HOTPLUG_INT_STATUS_I915 (1 << 7) | 1885 | #define SDVOC_HOTPLUG_INT_STATUS_I915 (1 << 7) |
@@ -1885,13 +1891,6 @@ | |||
1885 | PORTC_HOTPLUG_INT_STATUS | \ | 1891 | PORTC_HOTPLUG_INT_STATUS | \ |
1886 | PORTD_HOTPLUG_INT_STATUS) | 1892 | PORTD_HOTPLUG_INT_STATUS) |
1887 | 1893 | ||
1888 | #define HOTPLUG_INT_STATUS_I965 (CRT_HOTPLUG_INT_STATUS | \ | ||
1889 | SDVOB_HOTPLUG_INT_STATUS_I965 | \ | ||
1890 | SDVOC_HOTPLUG_INT_STATUS_I965 | \ | ||
1891 | PORTB_HOTPLUG_INT_STATUS | \ | ||
1892 | PORTC_HOTPLUG_INT_STATUS | \ | ||
1893 | PORTD_HOTPLUG_INT_STATUS) | ||
1894 | |||
1895 | #define HOTPLUG_INT_STATUS_I915 (CRT_HOTPLUG_INT_STATUS | \ | 1894 | #define HOTPLUG_INT_STATUS_I915 (CRT_HOTPLUG_INT_STATUS | \ |
1896 | SDVOB_HOTPLUG_INT_STATUS_I915 | \ | 1895 | SDVOB_HOTPLUG_INT_STATUS_I915 | \ |
1897 | SDVOC_HOTPLUG_INT_STATUS_I915 | \ | 1896 | SDVOC_HOTPLUG_INT_STATUS_I915 | \ |