Bug 92206

Summary: Kernel 4.2 colorspace washed out (Haswell GPU)
Product: DRI Reporter: adr3nal1n <adr3nal1n>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: bugs, horsley1953, intel-gfx-bugs, jonah.bernhard, kalpik, michael.letzgus, rob, ville.syrjala
Version: XOrg git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=99137
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg with drm.debug=14 module parameter none

Description adr3nal1n 2015-09-30 20:15:02 UTC
Following an upgrade to kernel 4.2.1 (Arch Linux X86_64), xrandr has no visible effect on screen when switching from Full to Limited 16:235 and vice versa. The screen appears visibly to be stuck at limited range with washed out colors, despite what xrandr reports.

I installed and booted from the Arch Linux LTS kernel (currently at 4.1.8) and the issue goes away. The GPU correctly outputs Full Range using the xrandr settings "xrandr --output HDMI2 --set "Broadcast RGB" "Full" -display :0"

This issue is described in more detail here http://forum.kodi.tv/showthread.php?tid=240397

and also has an open Arch Linux bug entry here https://bugs.archlinux.org/task/46472
Comment 1 Jani Nikula 2015-10-01 08:27:56 UTC
Similar report at https://bugzilla.kernel.org/show_bug.cgi?id=105261, let's track all of it here.
Comment 2 Rob Hasselbaum 2015-10-01 14:21:50 UTC
Logged error and stack trace copied from similar bug report referenced above:

[drm:check_crtc_state [i915]] *ERROR* mismatch in limited_color_range (expected 0, found 1)
------------[ cut here ]------------
WARNING: CPU: 0 PID: 8262 at drivers/gpu/drm/i915/intel_display.c:12324 check_crtc_state+0x8df/0xf80 [i915]()
pipe state doesn't match!
Modules linked in: fuse nfnetlink_queue nfnetlink_log nfnetlink bluetooth bbswitch(O) ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 uvcvideo videobu
 rfkill mii kvm_intel i915 drm_kms_helper drm intel_gtt mei_me mei shpchp i2c_algo_bit i2c_i801 lpc_ich snd_hda_intel snd_hda_codec snd_hda_c
 atkbd libps2 ahci libahci crct10dif_pclmul crc32_pclmul xhci_pci crc32c_intel ehci_pci ghash_clmulni_intel xhci_hcd libata ehci_hcd aesni_in
CPU: 0 PID: 8262 Comm: Xorg Tainted: G        W  O    4.2.1-1-ARCH #1
Hardware name: Hewlett-Packard HP Pavilion dv7 Notebook PC/181F, BIOS F.0B 06/19/2012
 0000000000000000 00000000ab424e4b ffff8802c62e7468 ffffffff8156b77a
 0000000000000000 ffff8802c62e74c0 ffff8802c62e74a8 ffffffff81074846
 00000001c62e74d8 ffff88034de5d350 ffff880095f05000 ffff88034de5d000
Call Trace:
 [<ffffffff8156b77a>] dump_stack+0x4c/0x6e
 [<ffffffff81074846>] warn_slowpath_common+0x86/0xc0
 [<ffffffff810748d5>] warn_slowpath_fmt+0x55/0x70
 [<ffffffffa07cdf7f>] check_crtc_state+0x8df/0xf80 [i915]
 [<ffffffffa07e09f6>] intel_modeset_check_state+0x216/0xb50 [i915]
 [<ffffffffa07db00c>] ? __intel_set_mode+0x92c/0xb60 [i915]
 [<ffffffffa07e2037>] intel_crtc_set_config+0x4c7/0x580 [i915]
 [<ffffffffa06ea9f6>] drm_mode_set_config_internal+0x66/0x100 [drm]
 [<ffffffffa0750552>] restore_fbdev_mode+0xc2/0xf0 [drm_kms_helper]
 [<ffffffffa07524b9>] drm_fb_helper_restore_fbdev_mode_unlocked+0x29/0x70 [drm_kms_helper]
 [<ffffffffa0752522>] drm_fb_helper_set_par+0x22/0x40 [drm_kms_helper]
 [<ffffffffa07f06ca>] intel_fbdev_set_par+0x1a/0x60 [i915]
 [<ffffffff81328cb6>] fb_set_var+0x236/0x460
 [<ffffffff81160d5c>] ? __alloc_pages_nodemask+0x17c/0x960
 [<ffffffffa07c14ad>] ? gen6_read32+0xdd/0x1a0 [i915]
 [<ffffffff8131f8a2>] fbcon_blank+0x312/0x360
 [<ffffffff81399b33>] do_unblank_screen+0xc3/0x190
 [<ffffffff8138feea>] vt_ioctl+0x50a/0x12e0
 [<ffffffff811dd71e>] ? path_parentat+0x3e/0x80
 [<ffffffff81384085>] tty_ioctl+0x3b5/0xba0
 [<ffffffff810d64e7>] ? call_rcu+0x17/0x20
 [<ffffffff813cadf3>] ? vga_arb_release+0xe3/0x130
 [<ffffffff811e29b5>] do_vfs_ioctl+0x295/0x480
 [<ffffffff811ef894>] ? mntput+0x24/0x40
 [<ffffffff811ecaa7>] ? __fget+0x77/0xb0
 [<ffffffff811e2c19>] SyS_ioctl+0x79/0x90
 [<ffffffff81570cee>] entry_SYSCALL_64_fastpath+0x12/0x71
---[ end trace 3ca0f09428c0569c ]---
Comment 3 Rob Hasselbaum 2015-10-25 14:27:39 UTC
Any known workaround for this? I am stuck on kernel 4.1.6 without a fix.
Comment 4 Jani Nikula 2015-10-26 09:17:46 UTC
Please attach full dmesg with drm.debug=14 module parameter set.

Cc: Ville, any ideas?
Comment 5 Ville Syrjala 2015-10-26 10:21:08 UTC
(In reply to Jani Nikula from comment #4)
> Please attach full dmesg with drm.debug=14 module parameter set.
> 
> Cc: Ville, any ideas?

My initial hunch was that atomic and/or fastboot broke things. So something for Maarten to look at.
Comment 6 Rob Hasselbaum 2015-10-26 23:56:23 UTC
Created attachment 119209 [details]
dmesg with drm.debug=14 module parameter

As requested, attached dmesg output with drm.debug=14 parameter.
Comment 7 Jani Nikula 2015-10-27 08:35:19 UTC
(In reply to Ville Syrjala from comment #5)
> (In reply to Jani Nikula from comment #4)
> > Please attach full dmesg with drm.debug=14 module parameter set.
> > 
> > Cc: Ville, any ideas?
> 
> My initial hunch was that atomic and/or fastboot broke things. So something
> for Maarten to look at.

Maarten?
Comment 8 Maarten Lankhorst 2015-10-27 15:01:35 UTC
Fastboot's not part of v4.2 iirc, full modesets still happen.

Does the problem occur on v4.3.rcXX too?
Comment 9 kalpik 2015-10-29 15:38:38 UTC
Yes, last I checked (a week ago or so), the issue was reproducible on 4.3rc
Comment 10 Rob Hasselbaum 2015-10-31 00:12:22 UTC
What additional info is needed? I think all requested info has been provided.
Comment 11 Michael L. 2015-10-31 15:34:56 UTC
Same problem here, what kind of info or tests is needed to resolve this?
Comment 12 jonah.bernhard 2015-10-31 18:57:42 UTC
I also have the same issue and would happy to help troubleshoot.
Comment 13 Maarten Lankhorst 2015-11-02 10:16:36 UTC
Well a bisection would be nice. I'm not sure what the difference between v4.1 and v4.2 is here, no immediate suspect comes to mind.

Could this be bisected?
Comment 14 Rob Hasselbaum 2015-11-02 21:41:50 UTC
While starting to bisect this, I discovered that the problem does NOT exist in kernel v4.3 tagged yesterday. Can someone else confirm on different hardware?
Comment 15 Tom Horsley 2015-11-04 02:16:46 UTC
*** Bug 92803 has been marked as a duplicate of this bug. ***
Comment 16 Michael L. 2015-11-04 18:03:59 UTC
No problem with debian@4.3.0.

The "workaround"

xrandr --output HDMI3 --set "Broadcast RGB" "Full"

works as expected.
Comment 17 Tom Horsley 2015-11-04 23:25:52 UTC
On my fedora 22 system, the latest kernel has this problem:

kernel-4.2.3-200.fc22.x86_64

If I boot an older kernel, the problem goes away:

kernel-4.1.10-200.fc22.x86_64
Comment 18 Jani Nikula 2015-11-05 13:17:19 UTC
(In reply to Tom Horsley from comment #17)
> On my fedora 22 system, the latest kernel has this problem:
> 
> kernel-4.2.3-200.fc22.x86_64
> 
> If I boot an older kernel, the problem goes away:
> 
> kernel-4.1.10-200.fc22.x86_64

The question is now, is it fixed in v4.3?
Comment 19 Tom Horsley 2015-11-05 14:29:18 UTC
(In reply to Jani Nikula from comment #18)
> (In reply to Tom Horsley from comment #17)
> > On my fedora 22 system, the latest kernel has this problem:
> > 
> > kernel-4.2.3-200.fc22.x86_64
> > 
> > If I boot an older kernel, the problem goes away:
> > 
> > kernel-4.1.10-200.fc22.x86_64
> 
> The question is now, is it fixed in v4.3?

I'd love to know that, but I checked updates-testing to see if there was a 4.3 fedora kernel available to try out, and there isn't one yet. I presume there will be one eventually. If it ever shows up, I'll report back.
Comment 20 Rob Hasselbaum 2015-11-05 22:40:51 UTC
We have two reports that v4.3 fixes the problem. I am just waiting for official 4.3 kernel to land in Arch repo (should be anytime now), and if that works, too, this can be closed IMHO.
Comment 21 Tsipizidis Charalampos 2015-11-06 07:19:10 UTC
I installed Linux 4.3 on Arch from testing repo and it seems to solve the problem.
Comment 22 kalpik 2015-11-06 12:05:45 UTC
I can confirm that kernel 4.3 from testing is working fine.
Comment 23 Jani Nikula 2015-11-06 13:00:36 UTC
Enough reports that v4.3 fixes the issue, closing. Please reopen if that turns out not to be the case. Thanks.

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.