Skip to contentSkip to conversation

drm/i915: Don't touch PORT_HOTPLUG_EN in intel_dp_detect()

RFC PATCH Applied Karsten Wiese 3 participants 3 messages Mar 27, 2010 – Apr 19, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 drm/i915: Don't touch PORT_HOTPLUG_EN in intel_dp_detect()

PORT_HOTPLUG_EN has allready been setup in i915_driver_irq_postinstall(), when intel_dp_detect() runs.

Delete the DP[BCD]_HOTPLUG_INT_EN defines, they are not referenced anymore.

I found this while searching for a fix for

        https://bugzilla.redhat.com/show_bug.cgi?id=528312

---
See also
"drm/i915: only enable hotplug for detected outputs" b01f2c3a4a37d09a47ad73ccbb46d554d21cfeb0

 drivers/gpu/drm/i915/i915_reg.h |    3 ---
 drivers/gpu/drm/i915/intel_dp.c |   10 ----------
 2 files changed, 0 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +0 -3
index ab1bd2d..92f440d 100644
@@ -854,11 +854,8 @@
 /* Hotplug control (945+ only) */
 #define PORT_HOTPLUG_EN                0x61110
 #define   HDMIB_HOTPLUG_INT_EN                 (1 << 29)
-#define   DPB_HOTPLUG_INT_EN                   (1 << 29)
 #define   HDMIC_HOTPLUG_INT_EN                 (1 << 28)
-#define   DPC_HOTPLUG_INT_EN                   (1 << 28)
 #define   HDMID_HOTPLUG_INT_EN                 (1 << 27)
-#define   DPD_HOTPLUG_INT_EN                   (1 << 27)
 #define   SDVOB_HOTPLUG_INT_EN                 (1 << 26)
 #define   SDVOC_HOTPLUG_INT_EN                 (1 << 25)
 #define   TV_HOTPLUG_INT_EN                    (1 << 18)
drivers/gpu/drm/i915/intel_dp.c +0 -10
index 439506c..7a3b5c8 100644
@@ -1179,16 +1179,6 @@ intel_dp_detect(struct drm_connector *connector)
        if (IS_IRONLAKE(dev))
                return ironlake_dp_detect(connector);
 
-       temp = I915_READ(PORT_HOTPLUG_EN);
-
-       I915_WRITE(PORT_HOTPLUG_EN,
-              temp |
-              DPB_HOTPLUG_INT_EN |
-              DPC_HOTPLUG_INT_EN |
-              DPD_HOTPLUG_INT_EN);
-
-       POSTING_READ(PORT_HOTPLUG_EN);
-
        switch (dp_priv->output_reg) {
        case DP_B:
                bit = DPB_HOTPLUG_INT_STATUS;

--

Reviewed-by on v1 1/1
#1 lore raw
Quoted 47 lines · On Sat, 27 Mar 2010 22:48:33 +0100 Karsten Wiese <[email protected]> wrote:

PORT_HOTPLUG_EN has allready been setup in i915_driver_irq_postinstall(), when intel_dp_detect() runs.

Delete the DP[BCD]_HOTPLUG_INT_EN defines, they are not referenced anymore.

I found this while searching for a fix for

        https://bugzilla.redhat.com/show_bug.cgi?id=528312

---
See also
"drm/i915: only enable hotplug for detected outputs" b01f2c3a4a37d09a47ad73ccbb46d554d21cfeb0

 drivers/gpu/drm/i915/i915_reg.h |    3 ---
 drivers/gpu/drm/i915/intel_dp.c |   10 ----------
 2 files changed, 0 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +0 -3
index ab1bd2d..92f440d 100644
@@ -854,11 +854,8 @@
 /* Hotplug control (945+ only) */
 #define PORT_HOTPLUG_EN                0x61110
 #define   HDMIB_HOTPLUG_INT_EN                 (1 << 29)
-#define   DPB_HOTPLUG_INT_EN                   (1 << 29)
 #define   HDMIC_HOTPLUG_INT_EN                 (1 << 28)
-#define   DPC_HOTPLUG_INT_EN                   (1 << 28)
 #define   HDMID_HOTPLUG_INT_EN                 (1 << 27)
-#define   DPD_HOTPLUG_INT_EN                   (1 << 27)
 #define   SDVOB_HOTPLUG_INT_EN                 (1 << 26)
 #define   SDVOC_HOTPLUG_INT_EN                 (1 << 25)
 #define   TV_HOTPLUG_INT_EN                    (1 << 18)
drivers/gpu/drm/i915/intel_dp.c +0 -4
index 439506c..7a3b5c8 100644
@@ -1179,16 +1179,6 @@ intel_dp_detect(struct drm_connector *connector)
        if (IS_IRONLAKE(dev))
                return ironlake_dp_detect(connector);
 
-       temp = I915_READ(PORT_HOTPLUG_EN);
-
-       I915_WRITE(PORT_HOTPLUG_EN,
-              temp |

drivers/gpu/drm/i915/intel_dp.c intel_dp_detect(struct drm_connector *connector)

Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +0 -7
-              DPB_HOTPLUG_INT_EN |
-              DPC_HOTPLUG_INT_EN |
-              DPD_HOTPLUG_INT_EN);
-
-       POSTING_READ(PORT_HOTPLUG_EN);
-
        switch (dp_priv->output_reg) {
        case DP_B:
                bit = DPB_HOTPLUG_INT_STATUS;
--

Yeah, looks like we already cover this with the hotplug_supported_mask setup we do here, so we should be able to drop these bits.

So assuming it's been tested with a real DP output + hotplug:

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Applied
#2 lore raw
In reply to Karsten Wiese
Quoted 9 lines · Karsten Wiese

PORT_HOTPLUG_EN has allready been setup in i915_driver_irq_postinstall(), when intel_dp_detect() runs.

Delete the DP[BCD]_HOTPLUG_INT_EN defines, they are not referenced anymore.

I found this while searching for a fix for

        https://bugzilla.redhat.com/show_bug.cgi?id=528312

Applied to -next, minus the removal of the bits from the header which seem harmless and informative.