drm/i915: Update bits to check in device class from VBT to detect eDP
Subsystems (2)
PATCH 1/1 drm/i915: Update bits to check in device class from VBT to detect eDP
The DEVICE_TYPE_eDP has been changed to 0x1806 in case of BYT which can causes wrong detection failures for eDP. Reduce the number of bits of interest in DEVICE_TYPE_eDP_BITS to just check most relevant and conclusive ones and ensure they are set in device_class from VBT. This will ensure that eDP detection works across platforms
--- drivers/gpu/drm/i915/intel_bios.h | 10 +--------- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_bios.h +1 -9
@@ -710,16 +710,8 @@ int intel_parse_bios(struct drm_device *dev);*/ #define DEVICE_TYPE_eDP_BITS \ (DEVICE_TYPE_INTERNAL_CONNECTOR | \ - DEVICE_TYPE_NOT_HDMI_OUTPUT | \ - DEVICE_TYPE_MIPI_OUTPUT | \ - DEVICE_TYPE_COMPOSITE_OUTPUT | \ - DEVICE_TYPE_DUAL_CHANNEL | \ - DEVICE_TYPE_LVDS_SINGALING | \ - DEVICE_TYPE_TMDS_DVI_SIGNALING | \ - DEVICE_TYPE_VIDEO_SIGNALING | \ DEVICE_TYPE_DISPLAYPORT_OUTPUT | \ - DEVICE_TYPE_DIGITAL_OUTPUT | \ - DEVICE_TYPE_ANALOG_OUTPUT) + DEVICE_TYPE_DIGITAL_OUTPUT)/* define the DVO port for HDMI output type */ #define DVO_B 1
drivers/gpu/drm/i915/intel_dp.c +2 -2
@@ -3842,8 +3842,8 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port) p_child = dev_priv->vbt.child_dev + i;if (p_child->common.dvo_port == port_mapping[port] && - (p_child->common.device_type & DEVICE_TYPE_eDP_BITS) == - (DEVICE_TYPE_eDP & DEVICE_TYPE_eDP_BITS)) + ((p_child->common.device_type & DEVICE_TYPE_eDP_BITS) == + DEVICE_TYPE_eDP_BITS))return true; }return false;
Signature · 1 line
1.9.1
Quoted 5 lines · Shobhit Kumar
The
DEVICE_TYPE_eDPhas been changed to0x1806in case of BYT which can causes wrong detection failures for eDP. Reduce the number of bits of interest inDEVICE_TYPE_eDP_BITSto just check most relevant and conclusive ones and ensure they are set indevice_classfrom VBT. This will ensure that eDP detection works across platforms
The current bits will match correctly for 0x1806. I don't have a problem with the patch per-say but would be nice to know what the troublesome device type really was, if indeed there was one. I'm just slightly worried that we might start to get false positives on some platforms if we make it too relaxed.
Quoted 51 lines
Signed-off-by Shobhit Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_bios.h | 10 +--------- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/intel_bios.h +1
-9@@ -710,16 +710,8 @@ int intel_parse_bios(struct drm_device *dev);*/ #define DEVICE_TYPE_eDP_BITS \ (DEVICE_TYPE_INTERNAL_CONNECTOR | \ - DEVICE_TYPE_NOT_HDMI_OUTPUT | \ - DEVICE_TYPE_MIPI_OUTPUT | \ - DEVICE_TYPE_COMPOSITE_OUTPUT | \ - DEVICE_TYPE_DUAL_CHANNEL | \ - DEVICE_TYPE_LVDS_SINGALING | \ - DEVICE_TYPE_TMDS_DVI_SIGNALING | \ - DEVICE_TYPE_VIDEO_SIGNALING | \ DEVICE_TYPE_DISPLAYPORT_OUTPUT | \ - DEVICE_TYPE_DIGITAL_OUTPUT | \ - DEVICE_TYPE_ANALOG_OUTPUT) + DEVICE_TYPE_DIGITAL_OUTPUT)/* define the DVO port for HDMI output type */ #define DVO_B 1drivers/gpu/drm/i915/intel_dp.c +2
-2@@ -3842,8 +3842,8 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port) p_child = dev_priv->vbt.child_dev + i;if (p_child->common.dvo_port == port_mapping[port] && - (p_child->common.device_type & DEVICE_TYPE_eDP_BITS) == - (DEVICE_TYPE_eDP & DEVICE_TYPE_eDP_BITS)) + ((p_child->common.device_type & DEVICE_TYPE_eDP_BITS) == + DEVICE_TYPE_eDP_BITS))return true; }return false;Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 7 lines · On Thu, 5 Jun 2014 16:09:29 +0300 Ville Syrjälä…
Quoted 5 lines · Shobhit Kumar
The
DEVICE_TYPE_eDPhas been changed to0x1806in case of BYT which can causes wrong detection failures for eDP. Reduce the number of bits of interest inDEVICE_TYPE_eDP_BITSto just check most relevant and conclusive ones and ensure they are set indevice_classfrom VBT. This will ensure that eDP detection works across platforms
Quoted 5 lines
The current bits will match correctly for
0x1806. I don't have a problem with the patch per-say but would be nice to know what the troublesome device type really was, if indeed there was one. I'm just slightly worried that we might start to get false positives on some platforms if we make it too relaxed.
Still waiting for results, but
https://bugs.freedesktop.org/show_bug.cgi?id=78795 was what motivated this.
Jesse
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Jesse Barnes
Quoted 7 lines · On Thu, 5 Jun 2014 16:09:29 +0300 Ville Syrjälä…
Quoted 5 lines · Shobhit Kumar
The
DEVICE_TYPE_eDPhas been changed to0x1806in case of BYT which can causes wrong detection failures for eDP. Reduce the number of bits of interest inDEVICE_TYPE_eDP_BITSto just check most relevant and conclusive ones and ensure they are set indevice_classfrom VBT. This will ensure that eDP detection works across platforms
Quoted 9 lines
Quoted 5 lines
The current bits will match correctly for
0x1806. I don't have a problem with the patch per-say but would be nice to know what the troublesome device type really was, if indeed there was one. I'm just slightly worried that we might start to get false positives on some platforms if we make it too relaxed.Still waiting for results, but
https://bugs.freedesktop.org/show_bug.cgi?id=78795 was what motivated this.
Yeah and update from Jesse that forcefully returning true from the function make things work, I assumed this is the reason, without really checking that even the old values will result DEVIVE_TYPE_eDP & DEVICE_TYPE_eDP_BITS = 0x1806 :)
Nevertheless I still feel that a simplified bit mask is good to have. We need to check further on this issue Jesse. Let me know once you have results. It would be still better to spit out the device_type being read from VBT as a log to confirm that indeed it is coming as 0x1806 or can just ask to get the opregion dump from debugfs and we can check ourselves.
Regards
Shobhit
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 27 lines · Shobhit
Quoted 16 lines · Jesse Barnes
Quoted 7 lines · On Thu, 5 Jun 2014 16:09:29 +0300 Ville Syrjälä…
Quoted 5 lines · Shobhit Kumar
The
DEVICE_TYPE_eDPhas been changed to0x1806in case of BYT which can causes wrong detection failures for eDP. Reduce the number of bits of interest inDEVICE_TYPE_eDP_BITSto just check most relevant and conclusive ones and ensure they are set indevice_classfrom VBT. This will ensure that eDP detection works across platformsQuoted 5 lines
The current bits will match correctly for
0x1806. I don't have a problem with the patch per-say but would be nice to know what the troublesome device type really was, if indeed there was one. I'm just slightly worried that we might start to get false positives on some platforms if we make it too relaxed.Quoted 4 lines
Still waiting for results, but
https://bugs.freedesktop.org/show_bug.cgi?id=78795 was what motivated this.Yeah and update from Jesse that forcefully returning true from the function make things work, I assumed this is the reason, without really checking that even the old values will result
DEVIVE_TYPE_eDP&DEVICE_TYPE_eDP_BITS=0x1806:)
Quoted 5 lines
Nevertheless I still feel that a simplified bit mask is good to have. We need to check further on this issue Jesse. Let me know once you have results. It would be still better to spit out the
device_typebeing read from VBT as a log to confirm that indeed it is coming as0x1806or can just ask to get the opregion dump from debugfs and we can check ourselves.
I see above are already been asked in BZ. Will track there for updates.
Regards
Shobhit
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx