HDMI 12bpc causing occasional flickering and blanking
Subsystems (2)
Hello,
Since upgrading to the Fedora 4.3 kernel package, the picture on my the BenQ M2700 HD monitor I've got connected to my HP EliteBook Folio 9470m laptop began having issues. The monitor is connected with a DP+-to-HDMI cable (HDMI in the monitor end), and the resolution I'm using is 1920x1080.
The symptoms are brief flickers of which looks like a thin horizontal line (or maybe more) overlaying the picture for a very brief period. This is ofte often (but not always) followed by the entire picture going completely black (kind of like when xscreensaver blanks the screen). Usually, the picture returns after maybe a second, but sometimes it remains off for several seconds before returning. It might also be that these blankings happen without a horizontal line flicker having occurred immediately before, thought it's hard to be certain because the flickers are very brief.
The laptop's internal screen is not impacted, the picture there remains stable while the external screen is flickering/blanking (including if both screens are set up in xrandr to show the same output).
Most of the time the flickers and blankings happens only occasionally, and be just a minor annoyance. However, some times it gets really bad, and the screen spends a majority of the time black - making it impossible to use the system. I have not determined anything that will with 100% certainty cause the symptoms to manifest themselves, but I do have a feeling that it is more likely to happen if the picture is mostly white/bright (e.g., when displaying a web browser window or an application such as gitk), and also after having resumed from suspend. But flickering/blanking certainly does happen if the screen showing mostly black xterms and without having suspended/resumed too.
I bisected the problem, which resulted in the following verdict:
7a0baa6234468aa387f9b8a1a79dc2a4b4821f67 is the first bad commit commit 7a0baa6234468aa387f9b8a1a79dc2a4b4821f67
Author: Ville Syrjälä <[email protected]> Date: Tue Jun 30 15:33:54 2015 +0300
Revert "drm/i915: Disable 12bpc hdmi for now"
HDMI 12bpc should be working fine now. Let it loose.
This reverts commit 5e3daaca09f5158eff9c92290faa1d2001ecc6e4.
v2: Rebased due to CHV/BXT port clock check improvemnts
I also confirmed that the problem is still present in drm-intel-nightly as of today (8ed1804). I'm currently running 8ed1804 + 7a0baa6 reverted and the symptoms are gone.
I've uploaded a kernel logs with drm.debug=0xe here:
One file is from when running 8ed1804 (with some comments of when the symptoms occurred added by me), the other file is from right now (running 8ed1804 + 7a0baa6 reverted) - I've not yet experienced any issues since booting the system with this kernel.
Tore
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 56 lines · Tore Anderson
Hello,
Since upgrading to the Fedora 4.3 kernel package, the picture on my the BenQ M2700 HD monitor I've got connected to my HP EliteBook Folio 9470m laptop began having issues. The monitor is connected with a DP+-to-HDMI cable (HDMI in the monitor end), and the resolution I'm using is 1920x1080.
The symptoms are brief flickers of which looks like a thin horizontal line (or maybe more) overlaying the picture for a very brief period. This is ofte often (but not always) followed by the entire picture going completely black (kind of like when xscreensaver blanks the screen). Usually, the picture returns after maybe a second, but sometimes it remains off for several seconds before returning. It might also be that these blankings happen without a horizontal line flicker having occurred immediately before, thought it's hard to be certain because the flickers are very brief.
The laptop's internal screen is not impacted, the picture there remains stable while the external screen is flickering/blanking (including if both screens are set up in xrandr to show the same output).
Most of the time the flickers and blankings happens only occasionally, and be just a minor annoyance. However, some times it gets really bad, and the screen spends a majority of the time black - making it impossible to use the system. I have not determined anything that will with 100% certainty cause the symptoms to manifest themselves, but I do have a feeling that it is more likely to happen if the picture is mostly white/bright (e.g., when displaying a web browser window or an application such as gitk), and also after having resumed from suspend. But flickering/blanking certainly does happen if the screen showing mostly black xterms and without having suspended/resumed too.
I bisected the problem, which resulted in the following verdict:
7a0baa6234468aa387f9b8a1a79dc2a4b4821f67is the first bad commit commit7a0baa6234468aa387f9b8a1a79dc2a4b4821f67Author: Ville Syrjälä <[email protected]> Date: Tue Jun 30 15:33:54 2015 +0300Revert "drm/i915: Disable 12bpc hdmi for now"
HDMI 12bpc should be working fine now. Let it loose.
This reverts commit
5e3daaca09f5158eff9c92290faa1d2001ecc6e4.v2: Rebased due to CHV/BXT port clock check improvemnts
Signed-off-by Ville Syrjälä <[email protected]>Reviewed-and-tested-by Imre Deak <[email protected]>Signed-off-by Daniel Vetter <[email protected]>I also confirmed that the problem is still present in drm-intel-nightly as of today (8ed1804). I'm currently running 8ed1804 + 7a0baa6 reverted and the symptoms are gone.
Quoted 8 lines
I've uploaded a kernel logs with drm.debug=0xe here:
One file is from when running 8ed1804 (with some comments of when the symptoms occurred added by me), the other file is from right now (running 8ed1804 + 7a0baa6 reverted) - I've not yet experienced any issues since booting the system with this kernel.
Could you test the following hack while using a 1920x1080 mode with 148.5 MHz dotclock, and see if there's any improvement?
drivers/gpu/drm/i915/intel_display.c +5 -0
@@ -12842,6 +12842,11 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,clear_intel_crtc_state (pipe_config); +if (pipe_config->base.adjusted_mode.clock ==148500 ) { +DRM_ERROR ("adjusting dotclock\n" ); + pipe_config->base.adjusted_mode.clock =148800 ; + } + pipe_config->cpu_transcoder = (enum transcoder )to_intel_crtc (crtc)->pipe;
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
* Ville Syrjälä
Quoted 2 lines
Could you test the following hack while using a 1920x1080 mode with 148.5 MHz dotclock, and see if there's any improvement?
I think it might be an improvement, that is, the blanking/flickers seems to occur less often than it did with 8ed1804, but it is not completely fixed. I've noticed 5-6 blankings events in the last hour or so (during most of those events I wasn't even using the computer actively, it was just sitting there showing a static image of gitk).
Kernel output here:
http://filebin.net/r3nlwu09y2/villepatched.txt
Tore
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
* Tore Anderson
Quoted 8 lines
* Ville Syrjälä
Quoted 2 lines
Could you test the following hack while using a 1920x1080 mode with 148.5 MHz dotclock, and see if there's any improvement?
I think it might be an improvement, that is, the blanking/flickers seems to occur less often than it did with 8ed1804, but it is not completely fixed.
Hi again Ville,
I spoke too soon. I've been doing some more testing with current Git master (e7d04bf). I'm now certain that your patch makes no difference whatsoever, the flickering/blanking is just as bad as before.
The intensity/frequency of the problems vary significantly, so when I tested your patch previously I must have hit one of the better periods. As I write this, however, the computer is essentially rendered unusable. (I have no idea what causes this variance, unfortunately.)
Do you (or anyone else for that matter) have any other ideas?
By the way: Is it possible to disable HDMI 12bpc in a way that doesn't require me to patch and rebuild the kernel drivers, such as a kernel module parameter or sysfs setting? (I prefer to simply use the upstream Fedora kernel RPMs, but this issue is currently making that impossible.)
Tore
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 17 lines · Tore Anderson
* Tore Anderson
Quoted 8 lines
* Ville Syrjälä
Quoted 2 lines
Could you test the following hack while using a 1920x1080 mode with 148.5 MHz dotclock, and see if there's any improvement?
I think it might be an improvement, that is, the blanking/flickers seems to occur less often than it did with 8ed1804, but it is not completely fixed.
Hi again Ville,
I spoke too soon. I've been doing some more testing with current Git master (e7d04bf). I'm now certain that your patch makes no difference whatsoever, the flickering/blanking is just as bad as before.
Quoted 6 lines
The intensity/frequency of the problems vary significantly, so when I tested your patch previously I must have hit one of the better periods. As I write this, however, the computer is essentially rendered unusable. (I have no idea what causes this variance, unfortunately.)
Do you (or anyone else for that matter) have any other ideas?
"The monitor is connected with a DP+-to-HDMI cable"
This and some reading of the DP dual mode spec gave me another idea; The DP->HDMI adaptor may simply be degrading the signal quality too much. According to the DP dual mode spec we're supposed to limit the TMDS clock based on the type of adapter used, but currently we have no code to do that. I've cooked up a few patches that should do what we want:git://github.com/vsyrjala/linux.git dp_dual_mode
I've quickly tested it locally, and it seemed to do the right thing with a few different types of adaptors.
Quoted 5 lines
By the way: Is it possible to disable HDMI 12bpc in a way that doesn't require me to patch and rebuild the kernel drivers, such as a kernel module parameter or sysfs setting? (I prefer to simply use the upstream Fedora kernel RPMs, but this issue is currently making that impossible.)
We don't have any knob to control this.
There is at least one way to do it though, but it's quite involved. What you would need to do is dump the EDID, modify it to indicate that 12bpc isn't supported (and fix up the CRC), and then use the firmware EDID mechanism to override the EDID with the hacked up version.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Ville,
Quoted 11 lines
"The monitor is connected with a DP+-to-HDMI cable"
This and some reading of the DP dual mode spec gave me another idea; TheDP->HDMIadaptor may simply be degrading the signal quality too much. According to the DP dual mode spec we're supposed to limit the TMDS clock based on the type of adapter used, but currently we have no code to do that. I've cooked up a few patches that should do what we want:git://github.com/vsyrjala/linux.gitdp_dual_modeI've quickly tested it locally, and it seemed to do the right thing with a few different types of adaptors.
I've run 32fa589 for a few hours now and it have not seen a single blank or flicker. So it seems you've nailed it - thanks a lot!
Let me know if you want me to test more patches, post debug logs, or anything else.
BTW, also discovered right before you sent that e-mail that downgrading to a 1920x1080i mode (rather than the monitor's native 1920x1080) would also stop the flickering. I'd assume that also fits well with your diagnosis (less bandwidth needed => better tolerance for degraded signal quality), but I thought I'd let you know in case not.
Quoted 7 lines
Quoted 5 lines
By the way: Is it possible to disable HDMI 12bpc in a way that doesn't require me to patch and rebuild the kernel drivers, such as a kernel module parameter or sysfs setting? (I prefer to simply use the upstream Fedora kernel RPMs, but this issue is currently making that impossible.)
We don't have any knob to control this.
I don't need it anymore, so no worries. ;-)
Tore
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Tore Anderson
Hi Ville,
Quoted 9 lines
"The monitor is connected with a DP+-to-HDMI cable"
This and some reading of the DP dual mode spec gave me another idea; TheDP->HDMIadaptor may simply be degrading the signal quality too much. According to the DP dual mode spec we're supposed to limit the TMDS clock based on the type of adapter used, but currently we have no code to do that. I've cooked up a few patches that should do what we want:git://github.com/vsyrjala/linux.gitdp_dual_mode
Quoted 5 lines
Quoted 2 lines
I've quickly tested it locally, and it seemed to do the right thing with a few different types of adaptors.
I've run 32fa589 for a few hours now and it have not seen a single blank or flicker. So it seems you've nailed it - thanks a lot!
Excellent.
Quoted 3 lines
Let me know if you want me to test more patches, post debug logs, or anything else.
Well, just to check the details of your particular cable/dongle, maybe you can post the dmesg with drm.debug=0xe with my branch? Or at least the parts that refer to DP dual mode adaptors.
Quoted 6 lines
BTW, also discovered right before you sent that e-mail that downgrading to a 1920x1080i mode (rather than the monitor's native 1920x1080) would also stop the flickering. I'd assume that also fits well with your diagnosis (less bandwidth needed => better tolerance for degraded signal quality), but I thought I'd let you know in case not.
Yeah, interlaced requires half the bandwidth of progressive, so it should then fit comfortably within the 165MHz limit of the adaptor.
Quoted 12 lines
Quoted 8 lines
Quoted 6 lines
By the way: Is it possible to disable HDMI 12bpc in a way that doesn't require me to patch and rebuild the kernel drivers, such as a kernel module parameter or sysfs setting? (I prefer to simply use the upstream Fedora kernel RPMs, but this issue is currently making that impossible.)
We don't have any knob to control this.
I don't need it anymore, so no worries. ;-)
Tore
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Ville,
Quoted 3 lines
Well, just to check the details of your particular cable/dongle, maybe you can post the dmesg with drm.debug=0xe with my branch? Or at least the parts that refer to DP dual mode adaptors.
Here: http://filebin.net/gd91wnltky/dmesg.4.5.0-rc4-g32fa589.txt
I'm assuming the most important parts are:
[drm:intel_hdmi_dp_dual_mode_detect] DP dual mode adaptor (type 1 HDMI) detected (max TMDS clock: 165000 kHz, TMDS OE# control: no) [drm:intel_hdmi_compute_config] picking bpc to 8 for HDMI output
For the record, I'd call my adapter a «cable» and not a «dongle». I had thought it was completely passive; if there's any active circuitry inside it it must be really tiny - it'd have to fit inside the rather standard-sized HDMI/DP connectors in the ends.
Tore
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Tore Anderson
Hi Ville,
Quoted 3 lines
Well, just to check the details of your particular cable/dongle, maybe you can post the dmesg with drm.debug=0xe with my branch? Or at least the parts that refer to DP dual mode adaptors.
Here: http://filebin.net/gd91wnltky/dmesg.4.5.0-rc4-g32fa589.txt
I'm assuming the most important parts are:
Quoted 7 lines
[drm:intel_hdmi_dp_dual_mode_detect] DP dual mode adaptor (type 1 HDMI) detected (max TMDS clock: 165000 kHz, TMDS OE# control: no) [drm:intel_hdmi_compute_config] picking bpc to 8 for HDMI output
For the record, I'd call my adapter a «cable» and not a «dongle». I had thought it was completely passive; if there's any active circuitry inside it it must be really tiny - it'd have to fit inside the rather standard-sized HDMI/DP connectors in the ends.
Yeah, the chips used for this stuff are pretty small. I had one dongle fry itself a while back, so I pulled it apart and found a PS8121E chip inside it (with a number of other mostly passive components).
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx