Bug 110375 - [Ubuntu 19.04] The screen display incompleted when rotate the screen to left/right
Summary: [Ubuntu 19.04] The screen display incompleted when rotate the screen to left/...
Status: RESOLVED NOTOURBUG
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Stanislav Lisovskiy
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords: regression
: 108764 110374 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-10 07:58 UTC by qwang13
Modified: 2019-04-29 12:00 UTC (History)
3 users (show)

See Also:
i915 platform: ALL
i915 features: display/Other


Attachments
dmesg log (76.16 KB, text/plain)
2019-04-10 07:58 UTC, qwang13
no flags Details
screen shot (1.71 MB, image/png)
2019-04-10 08:02 UTC, qwang13
no flags Details
upload dmesg with drm.debug=0x1e log_buf_len=4M (1.16 MB, text/plain)
2019-04-11 04:06 UTC, qwang13
no flags Details

Description qwang13 2019-04-10 07:58:02 UTC
Note:This is a common bug for all tested platforms including CFL-S/Bean Canyon/CFL-H/WHL-U/June Canyon.

This issue is a regression issue compared with 18.10 (v4.18)

We have verified on 19.04 beta1 (v5.0.0) kernel, linux official kernel, and latest drm-intel-next kernel, all can reproduced.

Just list the platform information for CFL-S.

Platform information:
Label: CFLS04
Processor: CoffeeLake DT, Genuine Intel(R) CPU 0000 @ 2.60GHz, P0 Stepping, GT2
Bios: CNLSFWX1.R00.X144.B02.1805180751
Chipset: CNL B0 Stepping 

OS: Ubuntu 19.04
Kernel: 5.0.0-8-generic

Details:

Only half of the screen is displayed, when run "xrandr --output $device --rotate left/right".

Please check the attachment "Screen_half_rotate_CFLS04_19.04.jpg".
Comment 1 qwang13 2019-04-10 07:58:51 UTC
Created attachment 143910 [details]
dmesg log
Comment 2 qwang13 2019-04-10 08:02:27 UTC
Created attachment 143911 [details]
screen shot
Comment 3 qwang13 2019-04-10 08:08:12 UTC
*** Bug 110374 has been marked as a duplicate of this bug. ***
Comment 4 qwang13 2019-04-11 04:06:29 UTC
Created attachment 143929 [details]
upload dmesg with drm.debug=0x1e log_buf_len=4M

enable the debug switch and upload the dmesg log for reference.
Comment 5 Lakshmi 2019-04-12 07:36:04 UTC
I am unable reproduce this issue on my machine (KBL) with drmtip 5.1.0 rc4+.
"xrandr --output $device --rotate left/right" shows external screen normal/complete but not as in the attachment.

Can you try to verify with drmtip?
Comment 6 qwang13 2019-04-12 07:53:23 UTC
ok. I will have a try. Keep tune. Thanks for your response.
Comment 7 qwang13 2019-04-15 05:53:41 UTC
we can still reproduce this issue with drm-tip (5.1.0-rc4).
Comment 8 Jani Saarinen 2019-04-15 06:40:07 UTC
What I would like to know is that is this kernel regression or some userspace (modesetting driver) issue.
Comment 9 Stanislav Lisovskiy 2019-04-15 07:39:08 UTC
I have investigated this issue a bit on Friday. Problem ended up in userspace. 
As we have noticed the screen stays blank for eDP, because primary plane is disabled, whicl cursor still visible. I was looking for some wrong condition or calculation in kernel, but basically it is just userspace which assigns NO_FB to primary active plane at some point when other screen is rotated.
Then skl_plane_check-drm_atomic_helper_check_plane_state(called from atomic_check) detects that and turns off the plane completely, making it further unusable.

This is done in drm_atomic_set_fb_for_plane function. I can fix it by adding a simple check there which forbids removing FB from primary plane if it is active.

Not sure if this patch is correct or will be accepted, but lets see :)
Comment 10 Stanislav Lisovskiy 2019-04-15 08:03:25 UTC
See this and check if it helps:

https://patchwork.freedesktop.org/patch/299515/
Comment 11 Maarten Lankhorst 2019-04-15 10:42:54 UTC
If the problem is in userspace, fix userspace. :)
Comment 12 qwang13 2019-04-16 02:24:22 UTC
(In reply to Stanislav Lisovskiy from comment #10)
> See this and check if it helps:
> 
> https://patchwork.freedesktop.org/patch/299515/

it is not the whole screen blank. almost half of screen is blank.
Comment 13 Stanislav Lisovskiy 2019-04-16 06:38:30 UTC
(In reply to Maarten Lankhorst from comment #11)
> If the problem is in userspace, fix userspace. :)

If only I could :)

(In reply to qwang13 from comment #12)
> (In reply to Stanislav Lisovskiy from comment #10)
> > See this and check if it helps:
> > 
> > https://patchwork.freedesktop.org/patch/299515/
> 
> it is not the whole screen blank. almost half of screen is blank.

For me and other person the whole screen is getting blank but cursor stays visible. Probably depends on your screen orientation or other parameters. 
But the fact is that userspace decides that you no longer need primary plane on eDP for some reason.
Comment 14 qwang13 2019-04-17 05:47:34 UTC
with this patch, the issue is fixed. Will this patch be accepted in upstream?
Comment 15 Jani Saarinen 2019-04-17 06:20:45 UTC
It helps if you can comment that "tested-by" eg.
Comment 16 Stanislav Lisovskiy 2019-04-17 08:13:34 UTC
(In reply to qwang13 from comment #14)
> with this patch, the issue is fixed. Will this patch be accepted in upstream?

Nope :D Because it is allowed to disable primary plane, if user space wants to.

So if userspace decides to do something stupid, it is hard to fix in the kernel.

This hack was just to prove that this is coming from userspace.
Comment 17 Jani Saarinen 2019-04-22 12:00:26 UTC
Based on comments, not our bug. Userspace issue.
Comment 18 Jani Saarinen 2019-04-29 12:00:56 UTC
*** Bug 108764 has been marked as a duplicate of this bug. ***


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.