Commit 8fc34e23 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

hw_parse: Fix handling of DP without branch device line

It appears that when DP is disconnected it may not report presence of DP
branching devices at all in i915_display_info debugfs.

Let's handle that gracefully.
Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 8cef7db8
......@@ -118,12 +118,15 @@ module I915DisplayInfo
if is_display_port(name)
lines.shift while !(lines.empty? || is_dp_branch_line?(lines.first))
branch = lines.shift.scan(/DP branch device present: (yes|no)/)
if branch.flatten.first == 'yes'
type, dev, hw, sw = get_branch_info(lines)
connector_status[name]['to'] = "#{type}" if status == 'connected'
connector_status[name]['via'] = "#{dev} v#{sw}" if !dev.empty?
lines.shift while !(lines.empty? || is_dp_branch_line?(lines.first) || is_connector_line?(lines.first))
if is_dp_branch_line?(lines.first)
branch = lines.shift.scan(/DP branch device present: (yes|no)/)
if branch.flatten.first == 'yes'
type, dev, hw, sw = get_branch_info(lines)
connector_status[name]['to'] = "#{type}" if status == 'connected'
connector_status[name]['via'] = "#{dev} v#{sw}" if !dev.empty?
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment