Created attachment 78092 [details] dmesg with drm.debug=0xe Hi I have a custom PC with a custom motherboard from Advantech which has a E2160 @ 1.80GHz intel CPU and the i915 intel chipset. I have recently updated the kernel that I use from version 2.6.39 to 3.6.11 and I have a problem with the i915 composite TV-OUT. This video output shows vertical flickering with the new kernel. Also I have noticed that the TV-OUT is no more enabled at kernel boot (it was enabled with kernel 2.6.39). Then I have tried with the latest kernels 3.8.7 & 3.9-rc7 from krnel.org. With these kernels, the TV-OUT is now enabled at kernel boot but is still flickering vertically. Then I have tried with kernels 3.0.73, 3.2.43 and finally 3.4.40. And I have found that the TV-OUT seems to have been broken in kernel 3.4.40. Can anyone help me in fixing this issue with kernel 3.6.11? Attached you will find dmesg logs with drm.debug=0xe. Regards, Pierre Assal
Hm, sounds like the main issue is the flickering, all other issue seem to be resolved again on latest kernels. Two requests: - Can you try to bisect the kernel patch which introduced the regression? - (Maybe do this one first) Can you grab the latest git of intel-gpu-tools from http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/ and then attach the output of intel_reg_dumper both from the latest working kernel and the latest broken kernel (i.e. 3.9-rc7). Please make sure that your xrandr configuration matches and obviously that the TV output is enabled.
Created attachment 78434 [details] intel reg dump for working vs not working version of kernel (3.3.4 vs 3.8.8)
Hi, Sorry it took so long before I get back to you but I had a hard time compiling the intel_gpu_tools. Attached you will fing the reg dump for a working version of the kernel (3.3.4) and the latest stable kernel 3.8.8 which is not working. I will now try to bisect the kernel patch which introduced the regression. I will get back to you as soon as I have some info. Let me know If you want me to test any potential fix or patch. Thanks again for your help. Pierre Assal
Ah, here's the other bug been hiding that I've looked for ;-) Can you please test the fdi-dither branch from my personal git repo at http://cgit.freedesktop.org/~danvet/drm Thanks!
(In reply to comment #4) > Ah, here's the other bug been hiding that I've looked for ;-) > > Can you please test the fdi-dither branch from my personal git repo at > > http://cgit.freedesktop.org/~danvet/drm > > Thanks! Unfortunately my device does not boot with this kernel. It reboot as soon as grub jumps in the kernel.
Hm, have you tried to boot with i915.die=1 to rule out the intel gfx driver causing havoc? The branch is based on top of 3.9-rc6, can you pls test whether that works (in case this is not an issue with i915.ko)?
(In reply to comment #6) > Hm, have you tried to boot with i915.die=1 to rule out the intel gfx driver > causing havoc? > > The branch is based on top of 3.9-rc6, can you pls test whether that works > (in case this is not an issue with i915.ko)? I was not pointing to the correct kernel in the grub config. It works fine. I'm sorry to have misled you.
(In reply to comment #7) > (In reply to comment #6) > > Hm, have you tried to boot with i915.die=1 to rule out the intel gfx driver > > causing havoc? > > > > The branch is based on top of 3.9-rc6, can you pls test whether that works > > (in case this is not an issue with i915.ko)? > > > I was not pointing to the correct kernel in the grub config. > It works fine. I'm sorry to have misled you. Like I have mentionned, I'm currently using kernel 3.6.11. Is it possible to backport your fixes for this kernel version?
So TV-out is now perfectly working, without any flickering? Problem is that this is an pretty massive rework of the modeset flow for 3.11, so first we need to figure out what exactly fixed things for you. I suspect it's the patch titled "drm/i915: make SDVO TV-out work for multifunction devices". Can you please try to revert that with git revert <sha1 of patch>, compile & install the kernel and then check whether things are broken again? Please make really sure that you're booting the right kernel. If it's indeed that patch we can try to figure out whether/how to backport this to older kernels.
(In reply to comment #9) > So TV-out is now perfectly working, without any flickering? > > Problem is that this is an pretty massive rework of the modeset flow for > 3.11, so first we need to figure out what exactly fixed things for you. I > suspect it's the patch titled "drm/i915: make SDVO TV-out work for > multifunction devices". Can you please try to revert that with git revert > <sha1 of patch>, compile & install the kernel and then check whether things > are broken again? Please make really sure that you're booting the right > kernel. > > If it's indeed that patch we can try to figure out whether/how to backport > this to older kernels. I will try this immediately and get back to you asap. Again thanks alot for your help. It is extremely appreciated.
(In reply to comment #10) > (In reply to comment #9) > > So TV-out is now perfectly working, without any flickering? > > > > Problem is that this is an pretty massive rework of the modeset flow for > > 3.11, so first we need to figure out what exactly fixed things for you. I > > suspect it's the patch titled "drm/i915: make SDVO TV-out work for > > multifunction devices". Can you please try to revert that with git revert > > <sha1 of patch>, compile & install the kernel and then check whether things > > are broken again? Please make really sure that you're booting the right > > kernel. > > > > If it's indeed that patch we can try to figure out whether/how to backport > > this to older kernels. > > I will try this immediately and get back to you asap. > Again thanks alot for your help. It is extremely appreciated. You're right. If I revert this patch the things are broken again. I will try to merge it to my kernel 3.6.11.
(In reply to comment #11) > (In reply to comment #10) > > (In reply to comment #9) > > > So TV-out is now perfectly working, without any flickering? > > > > > > Problem is that this is an pretty massive rework of the modeset flow for > > > 3.11, so first we need to figure out what exactly fixed things for you. I > > > suspect it's the patch titled "drm/i915: make SDVO TV-out work for > > > multifunction devices". Can you please try to revert that with git revert > > > <sha1 of patch>, compile & install the kernel and then check whether things > > > are broken again? Please make really sure that you're booting the right > > > kernel. > > > > > > If it's indeed that patch we can try to figure out whether/how to backport > > > this to older kernels. > > > > I will try this immediately and get back to you asap. > > Again thanks alot for your help. It is extremely appreciated. > > You're right. If I revert this patch the things are broken again. > I will try to merge it to my kernel 3.6.11. At first sight, I do not think that It will be easy to patch kernel 3.6.11 with this fix. Do you think that you could help me with that?
> --- Comment #12 from Pierre Assal <pierre.assal@verint.com> --- > (In reply to comment #11) > > (In reply to comment #10) > > > (In reply to comment #9) > > > > So TV-out is now perfectly working, without any flickering? > > > > > > > > Problem is that this is an pretty massive rework of the modeset flow for > > > > 3.11, so first we need to figure out what exactly fixed things for you. I > > > > suspect it's the patch titled "drm/i915: make SDVO TV-out work for > > > > multifunction devices". Can you please try to revert that with git revert > > > > <sha1 of patch>, compile & install the kernel and then check whether things > > > > are broken again? Please make really sure that you're booting the right > > > > kernel. > > > > > > > > If it's indeed that patch we can try to figure out whether/how to backport > > > > this to older kernels. > > > > > > I will try this immediately and get back to you asap. > > > Again thanks alot for your help. It is extremely appreciated. > > > > You're right. If I revert this patch the things are broken again. > > I will try to merge it to my kernel 3.6.11. > > At first sight, I do not think that It will be easy to patch kernel 3.6.11 with > this fix. > Do you think that you could help me with that? The below diff is the core change (or at least I hope it is): diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e8dd8fe..3343d37 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4303,7 +4303,8 @@ static void vlv_update_pll(struct intel_crtc *crtc) static void i9xx_update_pll(struct intel_crtc *crtc, intel_clock_t *reduced_clock, - int num_connectors) + int num_connectors, + bool needs_tv_clock) { struct drm_device *dev = crtc->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; @@ -4361,7 +4362,7 @@ static void i9xx_update_pll(struct intel_crtc *crtc, if (INTEL_INFO(dev)->gen >= 4) dpll |= (6 << PLL_LOAD_PULSE_PHASE_SHIFT); - if (is_sdvo && intel_pipe_has_type(&crtc->base, INTEL_OUTPUT_TVOUT)) + if (is_sdvo && needs_tv_clock) dpll |= PLL_REF_INPUT_TVCLKINBC; else if (intel_pipe_has_type(&crtc->base, INTEL_OUTPUT_TVOUT)) /* XXX: just matching BIOS for now */ @@ -4686,7 +4687,8 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, else i9xx_update_pll(intel_crtc, has_reduced_clock ? &reduced_clock : NULL, - num_connectors); + num_connectors, + is_sdvo && is_tv); /* Set up the display plane register */ dspcntr = DISPPLANE_GAMMA_ENABLE;
I have succesfully patched my kernel 3.6.11 with the core changes that you have hilighted and it is now working fine. No more flickering on the TV out! In the future if you need someone to test with this particular setup I would be glad to help you. I think that it would also be nice to commit this fix to kernel.org. I want to thak you again for your great help. Best regards, Pierre Assal
Ok, I've submitted the minimal backport for stable kernels. With that and the fix which is already in 3.11 I think we're fully covered. Thanks a lot for reporting this and please reopen the bug (or file a new one) if something breaks a again.
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.