Skip to contentSkip to conversation

Stoney Ridge laptop display goes blank after HDMI gets plugged/unplugged in extended mode.

Bug 104275 [email protected] 1 participant 15 messages Dec 15, 2017 – Dec 20, 2018

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=104275

Bug ID: 104275
Summary: Stoney Ridge laptop display goes blank after HDMI gets
plugged/unplugged in extended mode.
Product: DRI
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]

Hi,

We are enabling a new Stoney Ridge laptop.
The issue can be reproduced on branch drm-next-4.16-wip and amd-staging-drm-next.

Reproduce steps:

1. Plug HDMI monitor.
2. Change to extended mode.
3. Unplug the HDMI monitor
4. Plug the HDMI monitor

Internal display may go blank in step 3.

The internal display may also go blank in step 4. The external one shows desktop correctly though.

I can see lots of message flooding once I plugged HDMI:

[  120.933668] amdgpu 0000:00:01.0: 0000000030e07f1f pin failed
[  120.933859] [drm:amdgpu_crtc_page_flip_target [amdgpu]] *ERROR* failed to

pin new abo buffer before flip

These messages stop as soon as the HDMI is unplugged.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #1 from Kai-Heng Feng <[email protected]> --- Created attachment 136186
--> https://bugs.freedesktop.org/attachment.cgi?id=136186&action=edit
lspci

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #2 from Kai-Heng Feng <[email protected]> --- Created attachment 136187
--> https://bugs.freedesktop.org/attachment.cgi?id=136187&action=edit
dmesg with drm.debug=0x0e

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #3 from Michel Dänzer <[email protected]> ---
The fundamental issue here is that only 32 MB of memory are reserved as VRAM for the GPU.

https://patchwork.freedesktop.org/patch/192451/ should fix it (with DC enabled).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #4 from Kai-Heng Feng <[email protected]> --- (In reply to Michel Dänzer from comment #3)

Quoted 5 lines

The fundamental issue here is that only 32 MB of memory are reserved as VRAM for the GPU.

https://patchwork.freedesktop.org/patch/192451/ should fix it (with DC enabled).

I applied both [1] and [2], also enabled DC for it, now the Unity Desktop is garbled.
Unity Greeter in LightDM is fine though.

[1] https://patchwork.freedesktop.org/patch/192451/
[2] https://patchwork.freedesktop.org/patch/192450/

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #5 from Kai-Heng Feng <[email protected]> --- Created attachment 136191
--> https://bugs.freedesktop.org/attachment.cgi?id=136191&action=edit
Garbled display.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |ckoenig.leichtzumerken@gmai
                   |                            |l.com

--- Comment #6 from Michel Dänzer <[email protected]> --- Hmm, maybe a separate DC patch is needed as well. Christian?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #7 from [email protected] ---
Hi Michel,
Before the buffer been pined to a location, can the buffer be moved to other
place? My opinion, this is not about VRAM size, it is the mechanism of buffer move. Is this buffer content of rendering output or source or it is GPU command buffer? Is there any better way we can narrow down or investigate?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #8 from Michel Dänzer <[email protected]> --- (In reply to Alex_Zhang1 from comment #7)

Without the patch referenced in comment 3, a buffer must be pinned to VRAM before it can be scanned out (displayed). The problem described in this report happens because pinning to VRAM fails, because there isn't enough space in VRAM. The patch allows buffers to be pinned to GTT instead of VRAM for scanout. Another DC patch is probably needed to fix the garbled display described in comment 4. Maybe try the patch on top of the amd-staging-drm-next branch.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #9 from Harry Wentland <[email protected]> --- Created attachment 136321
--> https://bugs.freedesktop.org/attachment.cgi?id=136321&action=edit
DC scatter gather patch

You'll need this DC patch.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #10 from AceLan Kao <[email protected]> --- Hi Harry,

I'm wondering if there is also an equivalence method to fix it on v4.13 kernel.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #11 from [email protected] ---
(In reply to Harry Wentland from comment #9)

Quoted 4 lines

Created attachment 136321 [details] [review]
DC scatter gather patch

You'll need this DC patch.

Hi Harry,
As patch below,

+ /*
+ * TODO debug why this doesn't work on Raven
+ */
+ if (adev->flags & AMD_IS_APU &&
+ adev->asic_type >= CHIP_CARRIZO &&
+ adev->asic_type < CHIP_RAVEN)
+ init_data.flags.gpu_vm_support = true;

Seems this is just for debug, if I am wrong, please correct me. Do the flags
gpu_vm_support has support on 4.13 kernel? Could you please help to confirm if this patch can be used on 4.13 kernel?

Thanks

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #12 from Kai-Heng Feng <[email protected]> --- (In reply to Harry Wentland from comment #9)

Quoted 4 lines

Created attachment 136321 [details] [review]
DC scatter gather patch

You'll need this DC patch.

I can confirm that the issue is fixed by this patch (with the additional two patches above).

Thanks.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

--- Comment #13 from Harry Wentland <[email protected]> --- (In reply to AceLan Kao from comment #10)

Quoted 4 lines

Hi Harry,

I'm wondering if there is also an equivalence method to fix it on v4.13 kernel.

You could try applying the patches mentioned by Michel, plus my patch. I'm not sure whether they'll apply well or work. The DC patch shouldn't be a problem if it applies but I'm not sure about the other patches Michel mentioned.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=104275

Kai-Heng Feng <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel