Bug 109499 - amdgpu 4k modes not working
Summary: amdgpu 4k modes not working
Status: NEW
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu-pro (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-29 17:55 UTC by Nadal Gonzalo García Zavala
Modified: 2019-02-05 21:56 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
EDID firmware (256 bytes, application/x-sega-cd-rom)
2019-01-29 17:57 UTC, Nadal Gonzalo García Zavala
no flags Details
dmesg (709.20 KB, text/plain)
2019-01-29 17:58 UTC, Nadal Gonzalo García Zavala
no flags Details
parse-edid (2.30 KB, text/plain)
2019-01-29 17:59 UTC, Nadal Gonzalo García Zavala
no flags Details
working_edid.bin (256 bytes, application/x-sega-cd-rom)
2019-02-05 21:56 UTC, Nadal Gonzalo García Zavala
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nadal Gonzalo García Zavala 2019-01-29 17:55:54 UTC
Hi.
    We have an AMD W7100. We are trying to use two DisplayPort at 3840x2160.

    Firstly, those modes are not listed by xrandr

    Second, adding and setting a new xrandr mode may work only after replugging DisplayPort cables on other DisplayPort (for example, disconnecting DP0 and DP1 and connecting to DP2 and DP3).

    Then, fix will not persist across reboots.

    EDID seems to behave flaky by some reason (EDID invalid messages from dmesg)

    We however have a vendor provided EDID which we forced to be loaded on boot.

    That only changed available modes to a max of 1920x1080 but symptoms kept being the same. (edid-decode info shows 3840x2160 modes however)

    We tried thousands of options/configs.
 
    We are on Ubuntu 16.04.

    We tried amdgpu-pro 18.30 and 18.10 version of the driver, with kernel 4.15 and kernel 4.13, using amdgpu.dc=0 and amdgpu.dc=1, using amdgpu and modesetting as driver on xorg.

    The errors dmesg throws when adding/setting the 3840x2160 with xrandr are like:

X Error of failed request:  BadName (named color or font does not exist)
Major opcode of failed request:  140 (RANDR)
Minor opcode of failed request:  16 (RRCreateMode)
Serial number of failed request:  43
Current serial number in output stream:  43
[241317.628306] [drm:drm_crtc_helper_set_config [drm_kms_helper]] *ERROR* failed to set mode on [CRTC:37:crtc-0]
xrandr: Configure crtc 0 failed
xrandr: Configure crtc 1 failed
[241317.940299] [drm:drm_crtc_helper_set_config [drm_kms_helper]] *ERROR* failed to set mode on [CRTC:39:crtc-1]

On some setup, with drm debug enabled on kernel and when trying to set the  3840x2160 mode with xrandr dmesg trhow:

[    7.638690] [drm:drm_mode_prune_invalid [drm]] Not using 3840x2160 mode: CLOCK_HIGH

When using amdgpu.dc=1 that changed to something like:

X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  16 (RRCreateMode)
  Serial number of failed request:  39
  Current serial number in output stream:  39
[ 4482.053606] [drm:amdgpu_dm_atomic_commit_tail [amdgpu]] amdgpu_crtc id:0 crtc_state_flags: enable:0, active:0, planes_changed:0, mode_changed:0,active_changed:0,connectors_changed:0
[ 4482.056191] [drm:drm_mode_setcrtc [drm]] [CRTC:43:crtc-0]
[ 4482.056232] [drm:drm_mode_setcrtc [drm]] [CONNECTOR:55:DP-1]
[ 4482.056390] [drm:best_encoder [amdgpu]] Finding the best encoder
[ 4482.056530] [drm:best_encoder [amdgpu]] Finding the best encoder
[ 4482.056661] [drm:best_encoder [amdgpu]] Finding the best encoder
[ 4482.056839] [drm:dm_update_crtcs_state [amdgpu]] amdgpu_crtc id:0 crtc_state_flags: enable:1, active:1, planes_changed:0, mode_changed:1,active_changed:1,connectors_changed:1
[ 4482.057041] [drm:update_stream_scaling_settings [amdgpu]] Destination Rectangle x:0  y:0  width:3840  height:2160
[ 4482.057201] [drm:dm_update_crtcs_state [amdgpu]] amdgpu_crtc id:0 crtc_state_flags: enable:1, active:1, planes_changed:0, mode_changed:1,active_changed:1,connectors_changed:1
[ 4482.057357] [drm:dm_update_crtcs_state [amdgpu]] Enabling DRM crtc: 43
[ 4482.057539] [drm:dm_update_planes_state [amdgpu]] Enabling DRM plane: 41 on DRM crtc 43
[ 4482.057687] [drm:amdgpu_dm_atomic_check [amdgpu]] Atomic check failed with err: -22 
xrandr: Configure crtc 0 failed
[ 4482.092223] [drm:amdgpu_dm_atomic_commit_tail [amdgpu]] amdgpu_crtc id:0 crtc_state_flags: enable:0, active:0, planes_changed:0, mode_changed:0,active_changed:0,connectors_changed:0
xrandr: Configure crtc 0 failed
[ 4482.094553] [drm:drm_mode_setcrtc [drm]] [CRTC:43:crtc-0]
[ 4482.094567] [drm:drm_mode_setcrtc [drm]] [CONNECTOR:57:DP-2]
[ 4482.094622] [drm:best_encoder [amdgpu]] Finding the best encoder
[ 4482.094668] [drm:best_encoder [amdgpu]] Finding the best encoder
[ 4482.094713] [drm:best_encoder [amdgpu]] Finding the best encoder
[ 4482.094761] [drm:dm_update_crtcs_state [amdgpu]] amdgpu_crtc id:0 crtc_state_flags: enable:1, active:1, planes_changed:0, mode_changed:1,active_changed:1,connectors_changed:1
[ 4482.094809] [drm:update_stream_scaling_settings [amdgpu]] Destination Rectangle x:0  y:0  width:3840  height:2160
[ 4482.094849] [drm:dm_update_crtcs_state [amdgpu]] amdgpu_crtc id:0 crtc_state_flags: enable:1, active:1, planes_changed:0, mode_changed:1,active_changed:1,connectors_changed:1
[ 4482.094887] [drm:dm_update_crtcs_state [amdgpu]] Enabling DRM crtc: 43
[ 4482.094938] [drm:dm_update_planes_state [amdgpu]] Enabling DRM plane: 41 on DRM crtc 43
[ 4482.094979] [drm:amdgpu_dm_atomic_check [amdgpu]] Atomic check failed with err: -22

We also tried various modelines, reported by dmesg, by xorg and by edid-decode. So i think we tried modelines with clock less than ¿ 300000khz ? aprox.

Bug seems similar to https://bugs.freedesktop.org/show_bug.cgi?id=102985

Which mentions something about the driver not taking some part of the EDID modes upper to 64.

Dont know however which commit introduced that change to test it on Ubuntu 16.04 / Linux 4.15.

The commit mentioned on that bug report seems invalid / obsolete.

xrandr commands are like:

xrandr --newmode "3840" 297.00 3840 4016 4104 4400  2160 2168 2178 2250 +hsync +vsync
xrandr --addmode DisplayPort-0 "3840"
xrandr --output DisplayPort-0 --mode "3840"
Comment 1 Nadal Gonzalo García Zavala 2019-01-29 17:57:33 UTC
Created attachment 143251 [details]
EDID firmware
Comment 2 Nadal Gonzalo García Zavala 2019-01-29 17:58:29 UTC
Created attachment 143252 [details]
dmesg
Comment 3 Nadal Gonzalo García Zavala 2019-01-29 17:59:30 UTC
Created attachment 143253 [details]
parse-edid
Comment 4 Nadal Gonzalo García Zavala 2019-02-05 21:54:20 UTC
I'm not sure, but is possible the issue were fixed between revisions 43 and 45 of ubuntu kernel 4.15.

Before upgrading the kernel, we reached a solution:
- Using EDID emulators, getting xrandr showing both DisplayPort outputting 4k
- Dumping the EDID to a file
- Quitting emulators, conecting DisplayPorts normally with EDID firmware forced to previously generated file.

Will attach our working EDID file.
Comment 5 Nadal Gonzalo García Zavala 2019-02-05 21:56:35 UTC
Created attachment 143308 [details]
working_edid.bin


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.