Bug 97013

Summary: [CHV] DP->VGA detection fails Intel i915 due to port strap
Product: DRI Reporter: Benjamin Antin <ben.antin>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: BSW/CHT i915 features: display/DP
Attachments:
Description Flags
dmesg output from X441SA w/VGA connected
none
dmesg output from X540SA w/VGA connected
none
intel_reg dump --all
none
intel_opregion_decode none

Description Benjamin Antin 2016-07-20 23:11:38 UTC
Created attachment 125185 [details]
dmesg output from X441SA w/VGA connected

- system architecture: x86_64
- kernel version: 4.4.0
- Linux distribution: Ubuntu
- Machine or mother board model: Asus X441SA Braswell (Valleyview)
- Display connector: VGA

The driver fails to recognize an attached VGA port. On this particular SoC, it appears that VGA is connected to a displayPort via an adapter. As far as I know, this problem is specific to the Asus X441SA, as the X540SA correctly recognizes the displayPort.

Comparing output of dmesg between Asus X540SA and X441SA reveals that the displayPort for VGA output is connected to Port B:

[    2.908763] [drm:intel_dp_init_connector] Adding DP connector on port B
[    2.908853] [drm:intel_dp_aux_init] registering DPDDC-B bus for card0-DP-1

There is no mention of DP-1 on the logs from the X441SA.

Adding some print statements it seems that the following line is executed on the X540SA but not on the X541SA:

_________________________
if (I915_READ(VLV_DP_B) & DP_DETECTED ||
       intel_dp_is_edp(dev, PORT_B))
  			intel_dp_init(dev, VLV_DP_B, PORT_B);
__________________________

This is from drivers/gpu/drm/i915/intel_display.c

It seems that the I915_READ() bit is 1 on the X540SA but 0 on the X441SA.
This seems somewhat similar to https://bugs.freedesktop.org/show_bug.cgi?id=96321

Full dmesg output attached for X441SA.
Comment 1 Benjamin Antin 2016-07-20 23:12:27 UTC
Created attachment 125186 [details]
dmesg output from X540SA w/VGA connected
Comment 2 Benjamin Antin 2016-07-21 22:26:19 UTC
For clarity:

When we force port B to be used the VGA port correctly. Currently, we are using a DMI match as a workaround so that we force port B to be used on the X441SA – but this is not a real solution. 

We have not been able to get a dump of the vbios; when we run 
cat /sys/devices/pci0000:00/0000:00:02.0/rom > vbios.dump
we get "Input / Output Error." Running intel_dump_bios gives the same error message. I am attaching the output of the intel_opregion_decode command as well as the output of intel_reg dump --all.

In the case mentioned here: https://bugs.freedesktop.org/show_bug.cgi?id=96321
It seems that the VBT had the correct information. If there is a way to get past the input/output error and see contents of VBT I will be more than happy to post the results.
Comment 3 Benjamin Antin 2016-07-21 22:27:49 UTC
Created attachment 125246 [details]
intel_reg dump --all
Comment 4 Benjamin Antin 2016-07-21 22:28:19 UTC
Created attachment 125247 [details]
intel_opregion_decode
Comment 5 Ville Syrjala 2016-09-05 15:53:00 UTC
Potentially fixed by:
a5aac5ab876a ("drm/i915: Check VBT for port presence in addition to the strap on 
VLV/CHV")

Please test with a a more recent kernel which includes that commit (4.7+).
Comment 6 Benjamin Antin 2016-09-06 23:22:22 UTC
This has been fixed in Kernel 4.7. Thanks!
Comment 7 Ville Syrjala 2016-09-07 05:15:36 UTC
(In reply to Benjamin Antin from comment #6)
> This has been fixed in Kernel 4.7. Thanks!

Thanks for confirming -> marking as fixed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.