Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
Our infrastructure migration is complete. Please remember to update your SSH remote to point to ssh.gitlab.freedesktop.org; SSH to the old hostname will time out. You should not see any problems apart from that. Please let us know if you do have any other issues.
Created attachment 132061
journal_from_boot_to_HDMI_cable_detaching
We are working with new laptops that have the AMD Bristol Ridge
chipset with this SoC:
AMD A10-9620P RADEON R5, 10 COMPUTE CORES 4C+6G
When the HDMI cable is attached and then detached, the internal panel goes black and the only way to have it back is switching to another TTY and then back to xorg or doing 'xset dpms force off; xset dpms force on'.
This is reproducible also on the ~agd5f/drm-next-4.13-wip branch.
In the attachment the whole journal when booting the kernel compiled from ~agd5f/drm-next-4.13-wip, landing in xorg and then attaching and detaching the HDMI cable.
I suspect the core problem is that there's only 32 MB of VRAM available.
Is it possible to increase this in the BIOS setup?
It is not. There is nothing in the BIOS related to VRAM.
FWIW, it wouldn't say "VRAM" but rather "integrated graphics memory" or
something like that.
Yeah :) Let me put this way: there is nothing in the BIOS related to graphic controller / GPU / video in general.
There are two GPUs, the integrated one in the APU (Carrizo family) and a dedicated one (Polaris 12 family). Xorg is using the integrated one, and there's no way around that, because only the integrated GPU has display outputs hooked up. The dedicated GPU could only be used via PRIME render offloading.
I think all of these are triggered by VRAM being too small to fit the
scanout buffers covering the laptop panel + external monitor.
Probably I'm missing something, but when the HDMI is connected everything works fine, with the scanout buffer correctly displayed on the laptop panel + external monitor. The problem starts when we disconnect the HDMI cable.
Also if it was a problem with VRAM being too small, why toggling the DPMS makes the laptop panel working fine again?
Probably I'm missing something, but when the HDMI is connected everything
works fine, with the scanout buffer correctly displayed on the laptop panel
external monitor. The problem starts when we disconnect the HDMI cable.
At least some of the errors you referenced in comment 8 already happen before that. They're related to failed attempts at page flipping. xf86-video-amdgpu manages to chug along regardless.
When you unplug the HDMI cable is presumably when
> Jun 19 17:10:31 endless gdm-Xorg-:0[672]: (EE) AMDGPU(0): failed to set mode: Invalid argument
appears, i.e. drmModeSetCrtc() fails, presumably (not 100% sure about this part though) because the new, smaller scanout buffer cannot fit into VRAM while the old, larger one is still being scanned out.
> Also if it was a problem with VRAM being too small, why toggling the DPMS
> makes the laptop panel working fine again?
Toggling DPMS off disables scanout, which allows the old scanout buffer to be moved out of VRAM, so the new one can be moved in.
Some details might differ from the above, but that should be roughly what's happening.
I just tried the HEAD of xf86-video-amdgpu and now instead of
having a black screen I have the image corruption as shown
in the picture.
Just FYI this is due to commit b09fde0d81 ("Use reference counting for tracking KMS framebuffer lifetimes").
I just tried the HEAD of xf86-video-amdgpu and now instead of having a black
screen I have the image corruption as shown in the picture.
Without seeing the corresponding Xorg log, I guess that's just a different symptom triggered by the same issue.
> Anything I can do to debug / have this fixed?
We need to make scanout work with buffers outside of VRAM somehow. I've kicked off an internal discussion about this.
With an amd-staging-* kernel branch and DC enabled, you can try tweaking dce_v11_0_crtc_do_set_base to pass AMDGPU_GEM_DOMAIN_GTT instead of / in addition to AMDGPU_GEM_DOMAIN_VRAM to amdgpu_bo_pin. The DC code should already handle this correctly, but we're not sure whether or not there are additional constraints on system memory used for scanout. If there are, it probably won't work correctly yet.
> Is it something I need to fix with the ODM (acer)?
If you can get a BIOS which allows setting up larger VRAM, that might allow you to move forward faster.
Without seeing the corresponding Xorg log, I guess that's just
a different symptom triggered by the same issue.
Attached the log. Yeah, not much different.
> With an amd-staging-* kernel branch and DC enabled, you can try tweaking
> dce_v11_0_crtc_do_set_base to pass AMDGPU_GEM_DOMAIN_GTT instead of / in
> addition to AMDGPU_GEM_DOMAIN_VRAM to amdgpu_bo_pin. The DC code should
> already handle this correctly, but we're not sure whether or not there are
> additional constraints on system memory used for scanout. If there are, it
> probably won't work correctly yet.
I tried amd-staging-4.11 and interestingly dce_v11_0_crtc_do_set_base is called only when DC is disabled. When DRM_AMD_DC=y the function is never called.
I tried also to make the s/AMDGPU_GEM_DOMAIN_VRAM/AMDGPU_GEM_DOMAIN_GTT/ change with DC disabled. What I get is that I have some kind of intermittent display corruption when _connecting_ the HDMI cable on both the screens but on detaching at least everything is fine on the laptop panel.
With an amd-staging-* kernel branch and DC enabled, you can try tweaking
dce_v11_0_crtc_do_set_base to pass AMDGPU_GEM_DOMAIN_GTT instead of / in
addition to AMDGPU_GEM_DOMAIN_VRAM to amdgpu_bo_pin. [...]
I tried amd-staging-4.11 and interestingly dce_v11_0_crtc_do_set_base is
called only when DC is disabled.
Right, sorry, with DC you need to tweak dm_plane_helper_prepare_fb instead.
Right, sorry, with DC you need to tweak dm_plane_helper_prepare_fb instead.
Yup, I tried this but not much luck. In attachment what I get when using AMDGPU_GEM_DOMAIN_GTT. Using AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_VRAM is pretty much the same but the cursor is correctly displayed (even though I cannot move it).
The log is filled with:
[drm:dm_plane_helper_prepare_fb [amdgpu]] *ERROR* Failed to pin framebuffer
/me scratch his head
Attachment 132130, "dm_plane_helper_prepare_fb with AMDGPU_GEM_DOMAIN_GTT":
We have found another laptop with exactly the same issue (and again 32MB of VRAM for the embedded video controller). We have also requested to ACER a new BIOS with a bigger size of VRAM, waiting to receive it (hopefully).
Any news about the internal discussion about this issue? We are available to test any fix / workaround / proposal :)
In attachment what I get when using AMDGPU_GEM_DOMAIN_GTT.
[...]
[drm:dm_plane_helper_prepare_fb [amdgpu]] ERROR Failed to pin framebuffer
Do you also get those errors with AMDGPU_GEM_DOMAIN_GTT? If so, it might be interesting to track down the origin of the errors. Otherwise, it looks like there's still something missing.