Bug 902993 - Color banding (dithering?) on HD4000 on Mac Mini 2012 (EFI)
Summary: Color banding (dithering?) on HD4000 on Mac Mini 2012 (EFI)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-intel
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-22 21:42 UTC by Pablo d'Angelo
Modified: 2014-02-05 15:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-02-05 15:39:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Output of sudo intel_reg_dumper (14.33 KB, text/plain)
2013-01-23 17:50 UTC, Pablo d'Angelo
no flags Details

Description Pablo d'Angelo 2013-01-22 21:42:19 UTC
Description of problem:

After a fresh install of Fedora 18 on an Mac Mini 2012 (Core i5 model), display shows serious banding (wallpaper, viewing photos), probably because only 256 colors are used.

Version-Release number of selected component (if applicable):
[    28.464] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[    28.494] (II) Module intel: vendor="X.Org Foundation"
[    28.494]    compiled for 1.13.0, module version = 2.20.17
[    28.494]    Module class: X.Org Video Driver
[    28.494]    ABI class: X.Org Video Driver, version 13.0


How reproducible:
Occurs on every boot.

Steps to Reproduce:
1. Install Fedora 18 on mac mini, using EFI, without using bootcamp.
2. boot system
3. Observe strong banding on fine gradients, such as the default background image.
  

Additional info:

/var/log/Xorg.0.log seems to indicate that a 24 bit depth is used:

[    28.499] (II) intel(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[    28.499] (==) intel(0): Depth 24, (--) framebuffer bpp 32

However, when do manually start X with 8 or 24 bits, the screen shows the same banding.

$ init 3
$ startx -- -depth 8
[logout]
$ startx -- -depth 24

Comment 1 Adam Jackson 2013-01-23 15:34:55 UTC
Odd.  Can you install the 'intel-gpu-tools' package, and then attach the output from running 'intel_reg_dumper' as root?  I suspect we're just getting dithering wrong rather than actually using an 8bpp framebuffer.

Comment 2 Pablo d'Angelo 2013-01-23 17:50:55 UTC
Created attachment 686103 [details]
Output of sudo intel_reg_dumper

Here is the output of intel_reg_dumper

Comment 3 Pablo d'Angelo 2013-01-27 19:53:05 UTC
In the meantime, I have tried different things: A screen shot made with the "Print screen" key under Gnome 3 contains all the colors when viewed on another machine. On the screen, dark colors are especially bad, so I guess it is really the dithering.

Today I noticed that a normal color appearance. I did rebooted the machine a couple of times and switched to OSX in between. Unfortunately, I haven't noticed what made the colors look right. I saved the intel_reg_dumper output when I got the good colors (intel_reg_dumper_nodithering.txt), and it is slightly different from the initial output. Here is the diff:

--- intel_reg_dumper_dither_old.txt	2013-01-27 13:45:28.000000000 +0100
+++ intel_reg_dumper_nodithering.txt	2013-01-27 13:44:42.000000000 +0100
@@ -11,7 +11,7 @@
        DISPLAY_PORT_PLL_BIOS_1: 0x00000000
        DISPLAY_PORT_PLL_BIOS_2: 0x00000000
               FDI_PLL_FREQ_CTL: 0x00000000
-                     PIPEACONF: 0xc1000000 (enabled, active, pf-pd, rotate 0, 8bpc)
+                     PIPEACONF: 0xc0000000 (enabled, active, pf-pd, rotate 0, 8bpc)
                       HTOTAL_A: 0x069704ff (1280 active, 1688 total)
                       HBLANK_A: 0x069704ff (1280 start, 1688 end)
                        HSYNC_A: 0x059f052f (1328 start, 1440 end)
@@ -22,12 +22,12 @@
                       PIPEASRC: 0x04ff03ff (1280, 1024)
                  PIPEA_DATA_M1: 0x7e278d00 (TU 64, val 0x278d00 2592000)
                  PIPEA_DATA_N1: 0x0041eb00 (val 0x41eb00 4320000)
-                 PIPEA_DATA_M2: 0x7e4ccccc (TU 64, val 0x4ccccc 5033164)
-                 PIPEA_DATA_N2: 0x00800000 (val 0x800000 8388608)
+                 PIPEA_DATA_M2: 0x00000000 (TU 1, val 0x0 0)
+                 PIPEA_DATA_N2: 0x00000000 (val 0x0 0)
                  PIPEA_LINK_M1: 0x0001a5e0 (val 0x1a5e0 108000)
                  PIPEA_LINK_N1: 0x00041eb0 (val 0x41eb0 270000)
-                 PIPEA_LINK_M2: 0x00003333 (val 0x3333 13107)
-                 PIPEA_LINK_N2: 0x00008000 (val 0x8000 32768)
+                 PIPEA_LINK_M2: 0x00000000 (val 0x0 0)
+                 PIPEA_LINK_N2: 0x00000000 (val 0x0 0)
                       DSPACNTR: 0xd8004400 (enabled)
                       DSPABASE: 0x00000000
                     DSPASTRIDE: 0x00001400 (80)
@@ -83,12 +83,12 @@
                      PFA_CTL_4: 0x00007d80 (hscale 0.980469)
                    PFA_WIN_POS: 0x00000000 (0, 0)
                   PFA_WIN_SIZE: 0x00000000 (0, 0)
-                     PFB_CTL_1: 0x00800000 (disable, auto_scale yes, auto_scale_cal no, v_filter enable, vadapt disable, mode least, filter_sel hardcoded,chroma pre-filter disable, vert3tap auto, v_inter_invert field 1)
-                     PFB_CTL_2: 0x00008000 (vscale 1.000000)
-                     PFB_CTL_3: 0x00004000 (vscale initial phase 0.500000)
-                     PFB_CTL_4: 0x00008000 (hscale 1.000000)
+                     PFB_CTL_1: 0x00000000 (disable, auto_scale yes, auto_scale_cal no, v_filter enable, vadapt disable, mode least, filter_sel programmed,chroma pre-filter disable, vert3tap auto, v_inter_invert field 1)
+                     PFB_CTL_2: 0x00007e00 (vscale 0.984375)
+                     PFB_CTL_3: 0x00003f00 (vscale initial phase 0.492188)
+                     PFB_CTL_4: 0x00007d80 (hscale 0.980469)
                    PFB_WIN_POS: 0x00000000 (0, 0)
-                  PFB_WIN_SIZE: 0x05000400 (1280, 1024)
+                  PFB_WIN_SIZE: 0x00000000 (0, 0)
                      PFC_CTL_1: 0x00000000 (disable, auto_scale yes, auto_scale_cal no, v_filter enable, vadapt disable, mode least, filter_sel programmed,chroma pre-filter disable, vert3tap auto, v_inter_invert field 1)
                      PFC_CTL_2: 0x00007e00 (vscale 0.984375)
                      PFC_CTL_3: 0x00003f00 (vscale initial phase 0.492188)
@@ -162,7 +162,7 @@
                    FDI_RXA_CTL: 0x8c082b50 (enable, train pattern not train, port width X2, 8bpc,link_reverse_strap_overwrite no, dmi_link_reverse no, FDI PLL enable,FS ecc enable, FE ecc disable, FS err report enable, FE err report enable,scrambing enable, enhanced framing enable, PCDClk)
                    FDI_RXB_CTL: 0x00000040 (disable, train pattern pattern_1, port width X1, 8bpc,link_reverse_strap_overwrite no, dmi_link_reverse no, FDI PLL disable,FS ecc disable, FE ecc disable, FS err report disable, FE err report disable,scrambing enable, enhanced framing enable, RawClk)
                    FDI_RXC_CTL: 0x00000040 (disable, train pattern pattern_1, port width X1, 8bpc,link_reverse_strap_overwrite no, dmi_link_reverse no, FDI PLL disable,FS ecc disable, FE ecc disable, FS err report disable, FE err report disable,scrambing enable, enhanced framing enable, RawClk)
-                  FDI_RXA_MISC: 0x00200080 (FDI Delay 128)
+                  FDI_RXA_MISC: 0x00000080 (FDI Delay 128)
                   FDI_RXB_MISC: 0x00000080 (FDI Delay 128)
                   FDI_RXC_MISC: 0x00000080 (FDI Delay 128)
                FDI_RXA_TUSIZE1: 0x7e000000
@@ -199,8 +199,8 @@
              PCH_PP_OFF_DELAYS: 0x00000000
                 PCH_PP_DIVISOR: 0x00186904
                       PORT_DBG: 0x00007007 (HW DRRS off)
-            RC6_RESIDENCY_TIME: 0x00a7dc68
-           RC6p_RESIDENCY_TIME: 0x91dc0a37
+            RC6_RESIDENCY_TIME: 0x222303b1
+           RC6p_RESIDENCY_TIME: 0x6c0e6f55
           RC6pp_RESIDENCY_TIME: 0x00000000
                GEN6_RP_CONTROL: 0x00000d91 (enabled)
                  GEN6_RPNSWREQ: 0x0e000000



Afterwards, I turned off the computer and started it a again. The dithering appeared again, and the intel reg dump  looks very similar to the initial one:

--- intel_reg_dumper_dither_old.txt	2013-01-27 13:45:28.000000000 +0100
+++ intel_reg_dumper_dither_new.txt	2013-01-27 20:45:29.867867289 +0100
@@ -31,7 +31,7 @@
                       DSPACNTR: 0xd8004400 (enabled)
                       DSPABASE: 0x00000000
                     DSPASTRIDE: 0x00001400 (80)
-                      DSPASURF: 0x00a73008
+                      DSPASURF: 0x04446008
                    DSPATILEOFF: 0x00000000 (0, 0)
                      PIPEBCONF: 0x00000000 (disabled, inactive, pf-pd, rotate 0, 8bpc)
                       HTOTAL_B: 0x00000000 (1 active, 1 total)
@@ -199,8 +199,8 @@
              PCH_PP_OFF_DELAYS: 0x00000000
                 PCH_PP_DIVISOR: 0x00186904
                       PORT_DBG: 0x00007007 (HW DRRS off)
-            RC6_RESIDENCY_TIME: 0x00a7dc68
-           RC6p_RESIDENCY_TIME: 0x91dc0a37
+            RC6_RESIDENCY_TIME: 0x0134edad
+           RC6p_RESIDENCY_TIME: 0x78ed40ec
           RC6pp_RESIDENCY_TIME: 0x00000000
                GEN6_RP_CONTROL: 0x00000d91 (enabled)
                  GEN6_RPNSWREQ: 0x0e000000

I hope that gives some insight into this problem. Please let me know if you need more information.

Thanks,
 Pablo

Comment 4 Pablo d'Angelo 2013-01-27 22:32:14 UTC
After looking at the differences in the listings and the VOL_3_display_registers.pdf file, I tried the following:

intel_reg_write  0x70008 0xC0000000

This did indeed remove the banding effect, and images now look as they should.

Do you know which software component is responsible for setting up the PIPEACONF register? The intel driver or the kernel?

Comment 5 Taneli Korri 2013-02-04 09:08:48 UTC
I'm experience the same issue with late 2012 i7 model and Fedora 18 x86_64.

The workaround in comment 4 also fixes the issue for me.

But I've also noticed that if I boot the machine without any monitors attached and plug the monitor after the graphical boot starts then the colors are ok.

Comment 6 Fedora End Of Life 2013-12-21 10:42:57 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2014-02-05 15:39:29 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.