Bug 105469 - i915 always chooses the alternate fixed display mode on the eDP
Summary: i915 always chooses the alternate fixed display mode on the eDP
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords: bisected, patch, regression
Depends on:
Blocks:
 
Reported: 2018-03-12 23:10 UTC by Rune Petersen
Modified: 2018-06-04 11:08 UTC (History)
3 users (show)

See Also:
i915 platform: BDW, HSW, KBL, SKL
i915 features: display/DP


Attachments
The content of /var/log/debug when booting with drm.debug=0xe (189.22 KB, text/plain)
2018-03-12 23:10 UTC, Rune Petersen
no flags Details

Description Rune Petersen 2018-03-12 23:10:33 UTC
Created attachment 138047 [details]
The content of /var/log/debug when booting with drm.debug=0xe

No matter what display mode you select with xrandr, the i915 driver will always select the alternate fixes mode.
For me this means that the display will always run at 40Hz which is quite annoying.

if you intel_edp_compare_alt_mode() to also compare 'vrefresh' then it is possible to select both fixed_mode(60Hz)
(the fix is mentioned in https://bugs.freedesktop.org/show_bug.cgi?id=103497)
Then 60Hz will be selected all the time no matter what display mode is selected.

Distro: Debian
Kernel: 4.15.4(custom)
Machine: HP ZBook 15 G4 Mobile Workstation.
Comment 1 Rune Petersen 2018-03-12 23:36:59 UTC
I just realized that 'vrefresh' is not always valid in the requested mode.

so when I change intel_edp_compare_alt_mode() to also compare 'clock', then it is possible to select both alt_fixed_mode(40Hz) and fixed_mode(60Hz) using xrandr.
Comment 2 Jani Saarinen 2018-03-29 07:11:14 UTC
First of all. Sorry about spam.
This is mass update for our bugs. 

Sorry if you feel this annoying but with this trying to understand if bug still valid or not.
If bug investigation still in progress, please ignore this and I apologize!

If you think this is not anymore valid, please comment to the bug that can be closed.
If you haven't tested with our latest pre-upstream tree(drm-tip), can you do that also to see if issue is valid there still and if you cannot see issue there, please comment to the bug.
Comment 3 Jani Saarinen 2018-04-25 11:26:21 UTC
Closing, please re-open is issue still exists.
Comment 4 Mark Spencer 2018-04-25 18:14:19 UTC
Yes, it still occurs:

$ uname -a
Linux 4.17.0-rc2

$ glxgears                                                                                                       
249 frames in 5.0 seconds = 49.732 FPS
241 frames in 5.0 seconds = 48.033 FPS
241 frames in 5.0 seconds = 48.034 FPS
241 frames in 5.0 seconds = 48.033 FPS
216 frames in 5.0 seconds = 43.100 FPS
241 frames in 5.0 seconds = 48.033 FPS

Main discussion is here: https://bugs.freedesktop.org/show_bug.cgi?id=103497

To sum up:

It's regression
It occurs since Linux 4.14
It's bisected to dc911f5bd8aacfcf8aabd5c26c88e04c837a938e (drm/i915/edp: Allow alternate fixed mode for eDP if available.)
It can be fixed either by adding https://bugs.freedesktop.org/attachment.cgi?id=135277 or reverting bisected commit.

It's sad that having all of the above doesn't result in any action from upstream developers for a half year.
Comment 5 Jani Saarinen 2018-04-26 06:01:06 UTC
Jani, seems like Jim's patch. Any suggestions.
Comment 6 Jani Nikula 2018-04-30 07:48:25 UTC
(In reply to Mark Spencer from comment #4)
> Main discussion is here: https://bugs.freedesktop.org/show_bug.cgi?id=103497

If the main discussion about a regression is in the sidelines of a bug about "touchpad coasting", no wonder this has fallen between the cracks. :(

http://patchwork.freedesktop.org/patch/msgid/1523488406-21245-1-git-send-email-clinton.a.taylor@intel.com
Comment 7 Mark Spencer 2018-05-01 18:18:17 UTC
(In reply to Jani Nikula from comment #6)
> If the main discussion about a regression is in the sidelines of a bug about
> "touchpad coasting", no wonder this has fallen between the cracks. :(

That bug is a regression too, caused by same commit and will probably fixed with same solution.

> http://patchwork.freedesktop.org/patch/msgid/1523488406-21245-1-git-send-
> email-clinton.a.taylor@intel.com

Thanks, for the link. It's great that someone is working on this.
Comment 8 Jani Saarinen 2018-05-02 09:32:31 UTC
Jani, Clint, what are next steps here?
Comment 9 Mark Spencer 2018-05-15 10:39:10 UTC
I see this got stuck again. From last discussion in [1] there was conclusion to revert the offending commit (however it doesn't revert cleanly as so much time passed since it was introduced). Can you do this and finally put this bug to rest?

https://patchwork.freedesktop.org/patch/219719/
Comment 10 Jani Nikula 2018-05-16 07:59:55 UTC
Please try this revert patch on top of drm-tip, and report back:

http://patchwork.freedesktop.org/patch/msgid/20180516080110.22770-1-jani.nikula@intel.com
Comment 11 Mark Spencer 2018-05-16 11:57:25 UTC
(In reply to Jani Nikula from comment #10)
> Please try this revert patch on top of drm-tip, and report back:
> 
> http://patchwork.freedesktop.org/patch/msgid/20180516080110.22770-1-jani.
> nikula@intel.com

Applied and tested. It works as expected:

$ glxgears
308 frames in 5.0 seconds = 61.407 FPS
301 frames in 5.0 seconds = 60.019 FPS
301 frames in 5.0 seconds = 60.021 FPS

Probably it need adjustments if backported to 4.14 and 4.16. I leave to someone else testing on those. Thanks for the patch.
Comment 13 Jani Nikula 2018-05-22 10:07:55 UTC
Thanks for the bug report, testing, and patience everyone. Please reopen if the problem persists with that commit, or reappears.


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.