[Xorg-driver-geode] Question: Calculate Pitch value
Cui, Hunk
Hunk.Cui at amd.com
Sun Sep 12 20:41:33 PDT 2010
Hi, Jordan & ajax,
About the "GeodeCalculatePitchBytes" function, as you said, it
was used to do the compression algorithm, as following, when calculate
the pitch values: in LXPreInit function: pGeode->Pitch =
LXCalcPitch(pScrni);
(http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/tree/src/lx_dr
iver.c?id=8a61ef8f9f6b9dac6804754572250e59d80bdf06#n561 )
And Recalculate the pitch value when do rotation in
lx_crtc_shadow_allocate function: rpitch = pScrni->displayWidth *
(pScrni->bitsPerPixel / 8);
(http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/tree/src/lx_di
splay.c?id=8a61ef8f9f6b9dac6804754572250e59d80bdf06#n402 ), this is a
linear pitch, why does not use the a power of 2 if it can do compression
operation?
Thanks,
Hunk Cui
> -----Original Message-----
> From: Jordan Crouse [mailto:jcrouse at codeaurora.org]
> Sent: Wednesday, September 08, 2010 11:26 PM
> To: Adam Jackson
> Cc: Cui, Hunk; Geode Mailing List; xorg-devel at lists.x.org
> Subject: Re: what is the purpose of GeodeCalculatePitchBytes function?
>
> Adam Jackson wrote:
> > On Wed, 2010-09-08 at 17:18 +0800, Cui, Hunk wrote:
> >> Hi, all,
> >>
> >> Ask one question...
> >> In
> >>
http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/tree/src/gx_dri
> >> ver.c#n1560, this is the function " GeodeCalculatePitchBytes", in
the
> >> process of calculate the pitch, why does the compression require a
power
> >> of 2, what is the purpose?
> >
> > Framebuffer compression is a hardware feature. If the hardware
requires
> > a power-of-two pitch...
> >
> > - ajax
>
> Which indeed it does. The compression algorithm and requirements are
> discussed in
> reasonable detail in the datasheet.
>
> Jordan
>
More information about the Xorg-driver-geode
mailing list