[Bug 16001] XVideo gamma curve is wrong at least for r300 chips
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon May 19 09:00:50 PDT 2008
http://bugs.freedesktop.org/show_bug.cgi?id=16001
--- Comment #4 from Roland Scheidegger <sroland at tungstengraphics.com> 2008-05-19 09:00:49 PST ---
(In reply to comment #0)
> Created an attachment (id=16614)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16614) [details]
> Fix for gamma curve on r300 series
> So the slope values for
> RADEON_OV0_GAMMA_000_00F,
> RADEON_OV0_GAMMA_010_01F and
> RADEON_OV0_GAMMA_020_03F
> need to be shifted by (2, 2, 1) to the left respectively.
Probably the values in the r200 gamma table are just wrong - at least
datasheets seem to indicate no difference between r200 and r300 in that area
(and for that matter, those segments which are defined on r100 too should be
the same as far as I can tell, except the offset for the two last segments, and
they'd indeed pretty much be the same with those shifts).
I know there were some earlier complaints about gamma tables being wrong, but
IIRC noone really investigated this a bit deeper.
>
> I also found, that RADEONSetOverlayGamma() does not allow arbitrary
> gamma values, but only 8 differnt ones, where only value 0 (gamma 1.0)
> would work properly, since
>
> | /* Set gamma */
> | RADEONWaitForIdleMMIO(pScrn);
> | ov0_scale_cntl = INREG(RADEON_OV0_SCALE_CNTL) &
> ~RADEON_SCALER_GAMMA_SEL_MASK;
> | OUTREG(RADEON_OV0_SCALE_CNTL, ov0_scale_cntl | (gamma << 0x00000005));
>
> breaks my overlay (pink screen) for 'gamma' values other than '0'.
Yup, that's r100 only (the test should be < CHIP_FAMILY_R200 though, not <= - I
think r200 family will ignore those bits however, while r300 has them
redefined).
So on r100 you can only have 8 different gamma values, since you can't adjust
all segments freely. Maybe we should try to get rid of the tables entirely for
r200/r300 and just calculate all the segment values as needed, with arbitrary
gamma value.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the xorg-driver-ati
mailing list