drm/i915: (VLV2) Fix the hotplug detection bits
Subsystems (2)
PATCH 1/1 drm/i915: (VLV2) Fix the hotplug detection bits
These bits are in reverse order in the header from those defined in the specification. Change the bit positions for ports B and D to correctly match the spec.
--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +2 -2
@@ -2083,9 +2083,9 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 29)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)
Signature · 1 line
1.8.3.2
Jani Nikula
maintainerQuoted 3 lines · Todd Previte
These bits are in reverse order in the header from those defined in the specification. Change the bit positions for ports B and D to correctly match the spec.
Your signed-off-by is missing. The git commit -s option will add it for you.
drivers/gpu/drm/i915/i915_reg.h line 2085
Quoted 12 lines
--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -2083,9 +2083,9 @@* Please check the detailed lore in the commit message for for experimental * evidence. */
Please read the comment above, and check out
commit 0ce99f749b3834edeb500e17d6ad17e86b60ff83
Author: Daniel Vetter <[email protected]> Date: Fri Jul 26 11:27:49 2013 +0200
drm/i915: fix gen4 digital port hotplug definitions
Since the definitions are used for both pre-PCH and VLV in g4x_dp_detect() we should try to figure out whether the bits are really different between them or not. Or if the VLV specs are confused too.
Meanwhile, I'll go pat myself on the back for seeing this patch coming, and asking for Daniel to add that comment...
BR,
Jani.
Quoted 15 lines
drivers/gpu/drm/i915/i915_reg.h +2
-2-#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 29)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
PATCH v2 1/1 drm/i915: (VLV2) Fix the hotplug detection bits
In reply to Todd PreviteThese bits are in reverse order in the header from those defined in the specification. Change the bit positions for ports B and D to correctly match the spec.
- Added sign-off
--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +2 -2
@@ -2083,9 +2083,9 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 29)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)
Signature · 1 line
1.8.3.2
Quoted 17 lines · Todd Previte
These bits are in reverse order in the header from those defined in the specification. Change the bit positions for ports B and D to correctly match the spec.
- Added sign-off
Signed-off-by Todd Previte <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h line 2088
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +2
-2@@ -2083,9 +2083,9 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 29)
As Jani explained, this will break g4x. And it might very well be that this particular lie has been carried forward until baytrail, so I think we must cross check Bspec first with the reality of shipping platforms. -Daniel
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Jani Nikula
maintainerQuoted 5 lines · Todd Previte
These bits are in reverse order in the header from those defined in the specification. Change the bit positions for ports B and D to correctly match the spec.
- Added sign-off
And please also read the rest of my previous mail! :)
Jani.
Quoted 30 lines
Signed-off-by Todd Previte <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-2@@ -2083,9 +2083,9 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 29)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Quoted 22 lines · Daniel Vetter
Quoted 21 lines · Todd Previte
These bits are in reverse order in the header from those defined in the specification. Change the bit positions for ports B and D to correctly match the spec.
- Added sign-off
Signed-off-by Todd Previte <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_reg.h +0
-1@@ -2083,9 +2083,9 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29)
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h line 2088
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +2
-1+#define PORTD_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 29)As Jani explained, this will break g4x. And it might very well be that this particular lie has been carried forward until baytrail, so I think we must cross check Bspec first with the reality of shipping platforms.
FYI I just checked this on Jani's ELK, and it agrees with the spec. Port B is bit 29 and port C is bit 28. Both are HDMI/DVI ports on the board. No DP connectors present unfortunately. Which explains why things work since we don't check the live status on HDMI ports.
Signature · 2 lines
Ville Syrjälä Intel OTC
(no subject)
In reply to Todd PreviteAddresses the comments and feedback herein. VLV2 and gen4 have separate bit definitions now. The correct bits are selected in gen4x_dp_detect() based on the detected platform.
PATCH v3 1/1 drm/i915: VLV2 - Fix hotplug detect bits
Add new definitions for hotplug live status bits for VLV2 since they're in reverse order from the gen4x ones.
Changelog:
- Restored gen4 bit definitions
- Added new definitions for VLV2
- Added platform check for IS_VALLEYVIEW() in dp_detect to use the correct bit defintions
--- drivers/gpu/drm/i915/i915_reg.h | 11 ++++++++--- drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +8 -3
@@ -2083,9 +2083,14 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) -#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +/* VLV hot plug bits are different */ +#define VLV_PORTD_HOTPLUG_LIVE_STATUS (1 << 27) +#define VLV_PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define VLV_PORTB_HOTPLUG_LIVE_STATUS (1 << 29) + +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)
drivers/gpu/drm/i915/intel_dp.c +27 -12
@@ -2946,18 +2946,33 @@ g4x_dp_detect(struct intel_dp *intel_dp)return status; } -switch (intel_dig_port->port) { -case PORT_B : - bit =PORTB_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_C : - bit =PORTC_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_D : - bit =PORTD_HOTPLUG_LIVE_STATUS ; -break ; -default : -return connector_status_unknown; +if (IS_VALLEYVIEW (dev)) { +switch (intel_dig_port->port) { +case PORT_B : + bit =VLV_PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =VLV_PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =VLV_PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } else { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } }if ((I915_READ (PORT_HOTPLUG_STAT ) & bit) ==0 )
Signature · 1 line
1.8.3.2
Re: [PATCH v3] drm/i915: VLV2 - Fix hotplug detect bits
Quoted 24 lines · Todd Previte
Add new definitions for hotplug live status bits for VLV2 since they're in reverse order from the gen4x ones.
Changelog:
- Restored gen4 bit definitions
- Added new definitions for VLV2
- Added platform check forIS_VALLEYVIEW()indp_detectto use the correct bit defintionsSigned-off-by Todd Previte <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 11 ++++++++--- drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/i915_reg.h +0
-1@@ -2083,9 +2083,14 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29)
drivers/gpu/drm/i915/i915_reg.h line 2093
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +8
-2-#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +/* VLV hot plug bits are different */ +#define VLV_PORTD_HOTPLUG_LIVE_STATUS (1 << 27) +#define VLV_PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define VLV_PORTB_HOTPLUG_LIVE_STATUS (1 << 29) + +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27)
For future reference, changes unrelated to the commit message are generally frowned upon; style changes (like the spaces-to-tabs change for the existing defines) should be kept separate.
Quoted 60 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)drivers/gpu/drm/i915/intel_dp.c +27
-12@@ -2946,18 +2946,33 @@ g4x_dp_detect(struct intel_dp *intel_dp)return status; } -switch (intel_dig_port->port) { -case PORT_B : - bit =PORTB_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_C : - bit =PORTC_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_D : - bit =PORTD_HOTPLUG_LIVE_STATUS ; -break ; -default : -return connector_status_unknown; +if (IS_VALLEYVIEW (dev)) { +switch (intel_dig_port->port) { +case PORT_B : + bit =VLV_PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =VLV_PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =VLV_PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } else { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } }if ((I915_READ (PORT_HOTPLUG_STAT ) & bit) ==0 )Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Jani Nikula
maintainerRe: [PATCH v3] drm/i915: VLV2 - Fix hotplug detect bits
In reply to Todd PreviteQuoted 9 lines · Todd Previte
Add new definitions for hotplug live status bits for VLV2 since they're in reverse order from the gen4x ones.
Changelog:
- Restored gen4 bit definitions
- Added new definitions for VLV2
- Added platform check forIS_VALLEYVIEW()indp_detectto use the correct bit defintions
Btw this might be a relevant bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=73951
Quoted 85 lines
Signed-off-by Todd Previte <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 11 ++++++++--- drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/i915_reg.h +8
-3@@ -2083,9 +2083,14 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) -#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +/* VLV hot plug bits are different */ +#define VLV_PORTD_HOTPLUG_LIVE_STATUS (1 << 27) +#define VLV_PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define VLV_PORTB_HOTPLUG_LIVE_STATUS (1 << 29) + +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)drivers/gpu/drm/i915/intel_dp.c +27
-12@@ -2946,18 +2946,33 @@ g4x_dp_detect(struct intel_dp *intel_dp)return status; } -switch (intel_dig_port->port) { -case PORT_B : - bit =PORTB_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_C : - bit =PORTC_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_D : - bit =PORTD_HOTPLUG_LIVE_STATUS ; -break ; -default : -return connector_status_unknown; +if (IS_VALLEYVIEW (dev)) { +switch (intel_dig_port->port) { +case PORT_B : + bit =VLV_PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =VLV_PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =VLV_PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } else { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } }if ((I915_READ (PORT_HOTPLUG_STAT ) & bit) ==0 )Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
PATCH v4 1/1 VLV2 - Fix hotplug detect bits
In reply to Todd PreviteFixed the trailing brace for the switch() statement in gen4x_dp_detect()
PATCH v4 1/1 drm/i915: VLV2 - Fix hotplug detect bits
Add new definitions for hotplug live status bits for VLV2 since they're in reverse order from the gen4x ones.
Changelog:
- Restored gen4 bit definitions
- Added new definitions for VLV2
- Added platform check for IS_VALLEYVIEW() in dp_detect to use the correct bit defintions
- Replaced a lost trailing brace for the added switch()
--- drivers/gpu/drm/i915/i915_reg.h | 11 ++++++++--- drivers/gpu/drm/i915/intel_dp.c | 40 ++++++++++++++++++++++++++++------------ 2 files changed, 36 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +8 -3
@@ -2083,9 +2083,14 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) -#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +/* VLV hot plug bits are different */ +#define VLV_PORTD_HOTPLUG_LIVE_STATUS (1 << 27) +#define VLV_PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define VLV_PORTB_HOTPLUG_LIVE_STATUS (1 << 29) + +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)
drivers/gpu/drm/i915/intel_dp.c +28 -12
@@ -2946,18 +2946,34 @@ g4x_dp_detect(struct intel_dp *intel_dp)return status; } -switch (intel_dig_port->port) { -case PORT_B : - bit =PORTB_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_C : - bit =PORTC_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_D : - bit =PORTD_HOTPLUG_LIVE_STATUS ; -break ; -default : -return connector_status_unknown; +if (IS_VALLEYVIEW (dev)) { +switch (intel_dig_port->port) { +case PORT_B : + bit =VLV_PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =VLV_PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =VLV_PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } + }else { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } }if ((I915_READ (PORT_HOTPLUG_STAT ) & bit) ==0 )
Signature · 1 line
1.8.3.2
Re: [PATCH v3] drm/i915: VLV2 - Fix hotplug detect bits
In reply to Jani NikulaQuoted 4 lines · Jani Nikula
Quoted 3 lines · Todd Previte
Add new definitions for hotplug live status bits for VLV2 since they're in reverse order from the gen4x ones.
Quoted 8 lines
Quoted 6 lines
Changelog:
- Restored gen4 bit definitions
- Added new definitions for VLV2
- Added platform check forIS_VALLEYVIEW()indp_detectto use the correct bit defintionsBtw this might be a relevant bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=73951
Yeah looks like it. I think this patch (well V4 below) should address the problem. I'll update the bug momentarily.
-T
Quoted 85 lines
Quoted 85 lines
Signed-off-by Todd Previte <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 11 ++++++++--- drivers/gpu/drm/i915/intel_dp.c | 39 +++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/i915_reg.h +8
-3@@ -2083,9 +2083,14 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) -#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +/* VLV hot plug bits are different */ +#define VLV_PORTD_HOTPLUG_LIVE_STATUS (1 << 27) +#define VLV_PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define VLV_PORTB_HOTPLUG_LIVE_STATUS (1 << 29) + +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)drivers/gpu/drm/i915/intel_dp.c +27
-12@@ -2946,18 +2946,33 @@ g4x_dp_detect(struct intel_dp *intel_dp)return status; } -switch (intel_dig_port->port) { -case PORT_B : - bit =PORTB_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_C : - bit =PORTC_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_D : - bit =PORTD_HOTPLUG_LIVE_STATUS ; -break ; -default : -return connector_status_unknown; +if (IS_VALLEYVIEW (dev)) { +switch (intel_dig_port->port) { +case PORT_B : + bit =VLV_PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =VLV_PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =VLV_PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } else { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } }if ((I915_READ (PORT_HOTPLUG_STAT ) & bit) ==0 )Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH V4] drm/i915: VLV2 - Fix hotplug detect bits
In reply to Todd PreviteQuoted 11 lines · Todd Previte
Add new definitions for hotplug live status bits for VLV2 since they're in reverse order from the gen4x ones.
Changelog:
- Restored gen4 bit definitions
- Added new definitions for VLV2
- Added platform check forIS_VALLEYVIEW()indp_detectto use the correct bit defintions
- Replaced a lost trailing brace for the addedswitch()Signed-off-by Todd Previte <[email protected]>
I've bikeshedded your patch a bit for more consistency. Wrt the patch changelog please don't smash it all into one but keep a separate changelog per revision. Otherwise it's not clear what e.g. changed from v3->v4 and so no too useful for reviewers when rechecking patches. -Daniel
Quoted 85 lines
--- drivers/gpu/drm/i915/i915_reg.h | 11 ++++++++--- drivers/gpu/drm/i915/intel_dp.c | 40 ++++++++++++++++++++++++++++------------ 2 files changed, 36 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/i915_reg.h +8
-3@@ -2083,9 +2083,14 @@* Please check the detailed lore in the commit message for for experimental * evidence. */ -#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) -#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) -#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) +/* VLV hot plug bits are different */ +#define VLV_PORTD_HOTPLUG_LIVE_STATUS (1 << 27) +#define VLV_PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define VLV_PORTB_HOTPLUG_LIVE_STATUS (1 << 29) + +#define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) +#define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) +#define PORTB_HOTPLUG_LIVE_STATUS (1 << 27)#define PORTD_HOTPLUG_INT_STATUS (3 << 21)#define PORTC_HOTPLUG_INT_STATUS (3 << 19)#define PORTB_HOTPLUG_INT_STATUS (3 << 17)drivers/gpu/drm/i915/intel_dp.c +28
-12@@ -2946,18 +2946,34 @@ g4x_dp_detect(struct intel_dp *intel_dp)return status; } -switch (intel_dig_port->port) { -case PORT_B : - bit =PORTB_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_C : - bit =PORTC_HOTPLUG_LIVE_STATUS ; -break ; -case PORT_D : - bit =PORTD_HOTPLUG_LIVE_STATUS ; -break ; -default : -return connector_status_unknown; +if (IS_VALLEYVIEW (dev)) { +switch (intel_dig_port->port) { +case PORT_B : + bit =VLV_PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =VLV_PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =VLV_PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } + }else { +switch (intel_dig_port->port) { +case PORT_B : + bit =PORTB_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_C : + bit =PORTC_HOTPLUG_LIVE_STATUS ; +break ; +case PORT_D : + bit =PORTD_HOTPLUG_LIVE_STATUS ; +break ; +default : +return connector_status_unknown; + } }if ((I915_READ (PORT_HOTPLUG_STAT ) & bit) ==0 )Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH V4] drm/i915: VLV2 - Fix hotplug detect bits
Quoted 11 lines · Daniel Vetter
Quoted 10 lines · Todd Previte
Add new definitions for hotplug live status bits for VLV2 since they're in reverse order from the gen4x ones.
Changelog:
- Restored gen4 bit definitions
- Added new definitions for VLV2
- Added platform check forIS_VALLEYVIEW()indp_detectto use the correct bit defintions
- Replaced a lost trailing brace for the addedswitch()
Quoted 6 lines
Quoted 1 line
Signed-off-by Todd Previte <[email protected]>I've bikeshedded your patch a bit for more consistency. Wrt the patch changelog please don't smash it all into one but keep a separate changelog per revision. Otherwise it's not clear what e.g. changed from
v3->v4and so no too useful for reviewers when rechecking patches.
Also please add bugzilla links and cc: stable for bugfixes like these into the sob section of the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch