[Patch] Fix for 24 bit issues with dithering and LVTMA output
Hello, The 24 bits were not set for all dithering methods, when 24bit mode was enabled or unset if disabled. This patch also fixed for me the grainy display issues, they are only shown if dithering was enabled. (Lenovo - Radeon Mobility X1400) Please have a look at it. Big Thanks. Martin --- src/rhd_lvtma.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rhd_lvtma.c b/src/rhd_lvtma.c index e9c6012..8474eed 100644 --- a/src/rhd_lvtma.c +++ b/src/rhd_lvtma.c @@ -159,7 +159,7 @@ LVDSSet(struct rhdOutput *Output) if (Private->LVDS24Bit) { /* 24bits */ RHDRegMask(Output, LVTMA_LVDS_DATA_CNTL, 0x00000001, 0x00000001); /* enable 24bits */ - RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x00100000, 0x00100000); /* dithering bit depth = 24 */ + RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x00101010, 0x00101010); /* dithering bit depth = 24 */ if (Private->FPDI) /* FPDI? */ RHDRegMask(Output, LVTMA_LVDS_DATA_CNTL, 0x00000010, 0x00000010); /* 24 bit format: FPDI or LDI? */ @@ -167,7 +167,7 @@ LVDSSet(struct rhdOutput *Output) RHDRegMask(Output, LVTMA_LVDS_DATA_CNTL, 0, 0x00000010); } else { RHDRegMask(Output, LVTMA_LVDS_DATA_CNTL, 0, 0x00000001); /* disable 24bits */ - RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x00100101); /* dithering bit depth != 24 */ + RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x00101010); /* dithering bit depth != 24 */ } #if 0 @@ -182,8 +182,10 @@ LVDSSet(struct rhdOutput *Output) } else RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x00010101); #endif - RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x01010100, 0x01010101); +/* RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x010101000, 0x01010101);*/ + /* enable dithering: spatial and temporal */ +/* RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x00010100, 0x00010100); */ /* reset the temporal dithering */ RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x04000000, 0x04000000); RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x04000000); -- 1.5.2.5 -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Dec 07, 07 18:10:12 +0100, Martin Nowack wrote:
The 24 bits were not set for all dithering methods, when 24bit mode was enabled or unset if disabled. This patch also fixed for me the grainy display issues, they are only shown if dithering was enabled. (Lenovo - Radeon Mobility X1400)
Good catch! But:
@@ -182,8 +182,10 @@ LVDSSet(struct rhdOutput *Output) } else RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x00010101); #endif - RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x01010100, 0x01010101); +/* RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x010101000, 0x01010101);*/
+ /* enable dithering: spatial and temporal */ +/* RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x00010100, 0x00010100); */ /* reset the temporal dithering */ RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x04000000, 0x04000000); RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x04000000);
Sure that you want this?
You basically leave the selection of truncation/spatial/temporal
dithering untouched, and one probably wants to program it correctly.
Still, which method to use is debatable. I would always go for spatial
dithering, that is IMHO the least distorting. Yes, even in 24bit mode
dithering might be interesting (for 30bit color modes) - but we don't
support that yet :-P
Luc, your opinion?
Matthias
--
Matthias Hopf
+ /* enable dithering: spatial and temporal */ +/* RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x00010100, 0x00010100); */ /* reset the temporal dithering */ RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x04000000, 0x04000000); RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x04000000);
Sure that you want this? You basically leave the selection of truncation/spatial/temporal dithering untouched, and one probably wants to program it correctly. Jepp, this was intended. I thought, maybe some day there will be a nice gui, where this can be changed on the fly or for the beginning by a xorg.conf-option.
Thanks for having a look at the patch :)
Still, which method to use is debatable. I would always go for spatial dithering, that is IMHO the least distorting. Yes, even in 24bit mode dithering might be interesting (for 30bit color modes) - but we don't support that yet :-P
Luc, your opinion?
Martin -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Dec 17, 07 19:55:27 +0100, Martin Nowack wrote:
+ /* enable dithering: spatial and temporal */ +/* RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x00010100, 0x00010100); */ /* reset the temporal dithering */ RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0x04000000, 0x04000000); RHDRegMask(Output, LVTMA_BIT_DEPTH_CONTROL, 0, 0x04000000);
Sure that you want this? You basically leave the selection of truncation/spatial/temporal dithering untouched, and one probably wants to program it correctly. Jepp, this was intended. I thought, maybe some day there will be a nice gui, where this can be changed on the fly or for the beginning by a xorg.conf-option.
Sure. And this will eventually come. However, in the meantime, what was
the issue with temporal + spatial dithering enabled? In 24bit mode it
should make much difference (as long as we don't have 30bit modes)...
Matthias
--
Matthias Hopf
On Fri, Dec 07, 2007 at 06:10:12PM +0100, Martin Nowack wrote:
Hello,
The 24 bits were not set for all dithering methods, when 24bit mode was enabled or unset if disabled. This patch also fixed for me the grainy display issues, they are only shown if dithering was enabled. (Lenovo - Radeon Mobility X1400)
Please have a look at it.
Big Thanks.
Martin
I pushed up something which closely resembles what you've done here. Please check whether this satisfy you for your device. I will look into improved handling and maybe some options tomorrow. Thanks, Luc Verhaegen. SUSE/Novell X Driver Developer. -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
participants (3)
-
Luc Verhaegen
-
Martin Nowack
-
Matthias Hopf