* radeonfb, dedicate memory to something else
@ 2008-07-20 10:03 Matt Sealey
2008-07-20 15:26 ` Jon Smirl
0 siblings, 1 reply; 6+ messages in thread
From: Matt Sealey @ 2008-07-20 10:03 UTC (permalink / raw)
To: ppc-dev
Hi guys,
I know this isn't a PPC question, but since some of the RadeonFB developers
live here I thought best (and it's about a PPC platform).
Is there any way to hack up the RadeonFB driver - or anything related - to
reserve portions of the memory for a "fake" MTD or so, and still use the
Radeon as a graphics device? What I am talking about basically is turning
a 64MB Radeon card into a 32MB Radeon card, or a 128MB one into a 64MB
card..
I think this can be done by hacking a PCI fixup perhaps, for Efika only
in my case, whereby the memory ranges are fiddled.
Perhaps, a better solution is to use some kind of in-kernel subsystem to
"allocate" and return a 32MB segment of PCI memory (and put it in an
named rheap) but I assume other drivers can and will simply walk all
over it?
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: radeonfb, dedicate memory to something else
2008-07-20 10:03 radeonfb, dedicate memory to something else Matt Sealey
@ 2008-07-20 15:26 ` Jon Smirl
2008-07-22 8:31 ` Matt Sealey
0 siblings, 1 reply; 6+ messages in thread
From: Jon Smirl @ 2008-07-20 15:26 UTC (permalink / raw)
To: Matt Sealey; +Cc: ppc-dev
On 7/20/08, Matt Sealey <matt@genesi-usa.com> wrote:
> Hi guys,
>
> I know this isn't a PPC question, but since some of the RadeonFB developers
> live here I thought best (and it's about a PPC platform).
>
> Is there any way to hack up the RadeonFB driver - or anything related - to
> reserve portions of the memory for a "fake" MTD or so, and still use the
> Radeon as a graphics device? What I am talking about basically is turning
> a 64MB Radeon card into a 32MB Radeon card, or a 128MB one into a 64MB
> card..
Somebody write this long ago. Maybe around 2000. That's all I
remember. I think they made the video memory into a ram disk.
I believe there is more to it, the GART window may be smaller than the
total RAM on the card. You need to use the GART to map in the
appropriate pieces.
> I think this can be done by hacking a PCI fixup perhaps, for Efika only
> in my case, whereby the memory ranges are fiddled.
>
> Perhaps, a better solution is to use some kind of in-kernel subsystem to
> "allocate" and return a 32MB segment of PCI memory (and put it in an
> named rheap) but I assume other drivers can and will simply walk all
> over it?
>
> --
> Matt Sealey <matt@genesi-usa.com>
> Genesi, Manager, Developer Relations
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: radeonfb, dedicate memory to something else
2008-07-20 15:26 ` Jon Smirl
@ 2008-07-22 8:31 ` Matt Sealey
2008-07-22 8:52 ` Michel Dänzer
0 siblings, 1 reply; 6+ messages in thread
From: Matt Sealey @ 2008-07-22 8:31 UTC (permalink / raw)
To: Jon Smirl; +Cc: ppc-dev
Jon Smirl wrote:
> On 7/20/08, Matt Sealey <matt@genesi-usa.com> wrote:
>> Hi guys,
>>
>> I know this isn't a PPC question, but since some of the RadeonFB developers
>> live here I thought best (and it's about a PPC platform).
>>
>> Is there any way to hack up the RadeonFB driver - or anything related - to
>> reserve portions of the memory for a "fake" MTD or so, and still use the
>> Radeon as a graphics device? What I am talking about basically is turning
>> a 64MB Radeon card into a 32MB Radeon card, or a 128MB one into a 64MB
>> card..
>
> Somebody write this long ago. Maybe around 2000. That's all I
> remember. I think they made the video memory into a ram disk.
Yeah making it into a ramdisk precludes the use of the card as a video card
though.. this is what I am trying to get around. If fbdev and X can cooperate
on believing that a 64MB card is a 32MB card, then the upper 32MB can be used
to attach the MTD "ram" driver at a certain address (maybe we can even make a
hacky stub driver that recognizes this configuration based on OF tree..)
There are obvious limitations in that the Pegasos/Efika firmware only will
map 128MB of video memory, and the PCI BAR is limited to 256MB chunks anyway,
but that shouldn't matter. I just wonder, how it can be done that radeonfb
or other graphics drivers can be told "please only use the first 32MB" and
then either manually or automatically, map the rest as ramdisk.
> I believe there is more to it, the GART window may be smaller than the
> total RAM on the card. You need to use the GART to map in the
> appropriate pieces.
The problem here is the PCI bus on the Efika is a PCI bus, with an AGP
riser. It doesn't add any AGP functionality like real GART on the host
controller side, so there is nothing to map system memory into AGP's
view of the system.. it always confused me how "pcigart" is meant to
work and how an AGP GART does anything different to how PCI works in
the first place (the documentation/spec doesn't make it that clear in
my opinion :)
You would certainly know better than I..
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: radeonfb, dedicate memory to something else
2008-07-22 8:31 ` Matt Sealey
@ 2008-07-22 8:52 ` Michel Dänzer
2008-07-22 9:05 ` Matt Sealey
0 siblings, 1 reply; 6+ messages in thread
From: Michel Dänzer @ 2008-07-22 8:52 UTC (permalink / raw)
To: Matt Sealey; +Cc: ppc-dev
On Tue, 2008-07-22 at 09:31 +0100, Matt Sealey wrote:
> Jon Smirl wrote:
> > On 7/20/08, Matt Sealey <matt@genesi-usa.com> wrote:
> >> Hi guys,
> >>
> >> I know this isn't a PPC question, but since some of the RadeonFB developers
> >> live here I thought best (and it's about a PPC platform).
> >>
> >> Is there any way to hack up the RadeonFB driver - or anything related - to
> >> reserve portions of the memory for a "fake" MTD or so, and still use the
> >> Radeon as a graphics device? What I am talking about basically is turning
> >> a 64MB Radeon card into a 32MB Radeon card, or a 128MB one into a 64MB
> >> card..
> >
> > Somebody write this long ago. Maybe around 2000. That's all I
> > remember. I think they made the video memory into a ram disk.
>
> Yeah making it into a ramdisk precludes the use of the card as a video card
> though.. this is what I am trying to get around. If fbdev and X can cooperate
> on believing that a 64MB card is a 32MB card, then the upper 32MB can be used
> to attach the MTD "ram" driver at a certain address (maybe we can even make a
> hacky stub driver that recognizes this configuration based on OF tree..)
>
> There are obvious limitations in that the Pegasos/Efika firmware only will
> map 128MB of video memory, and the PCI BAR is limited to 256MB chunks anyway,
> but that shouldn't matter. I just wonder, how it can be done that radeonfb
> or other graphics drivers can be told "please only use the first 32MB" and
> then either manually or automatically, map the rest as ramdisk.
You can limit the amount of video RAM used by X using the VideoRam
directive in xorg.conf(5).
> > I believe there is more to it, the GART window may be smaller than the
> > total RAM on the card. You need to use the GART to map in the
> > appropriate pieces.
>
> The problem here is the PCI bus on the Efika is a PCI bus, with an AGP
> riser. It doesn't add any AGP functionality like real GART on the host
> controller side, so there is nothing to map system memory into AGP's
> view of the system.. it always confused me how "pcigart" is meant to
> work and how an AGP GART does anything different to how PCI works in
> the first place (the documentation/spec doesn't make it that clear in
> my opinion :)
GART doesn't have anything to do with this. I suspect he was thinking of
the PCI BARs not covering all video RAM.
--
Earthling Michel Dänzer | http://tungstengraphics.com
Libre software enthusiast | Debian, X and DRI developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: radeonfb, dedicate memory to something else
2008-07-22 8:52 ` Michel Dänzer
@ 2008-07-22 9:05 ` Matt Sealey
2008-07-22 14:25 ` Jon Smirl
0 siblings, 1 reply; 6+ messages in thread
From: Matt Sealey @ 2008-07-22 9:05 UTC (permalink / raw)
To: Michel Dänzer; +Cc: ppc-dev
Michel Dänzer wrote:
> On Tue, 2008-07-22 at 09:31 +0100, Matt Sealey wrote:
>> or other graphics drivers can be told "please only use the first 32MB" and
>> then either manually or automatically, map the rest as ramdisk.
>
> You can limit the amount of video RAM used by X using the VideoRam
> directive in xorg.conf(5).
Ah okay. So now.. how do we do this for framebuffers?
Is it safe to poke around in radeon_identify_vram and maybe supply a kernel
argument videomem=32M and let it check, if it's bigger, then limit it, and
if not, keep the old size in rinfo->video_ram?
Can/could this be moved to all relevant framebuffer drivers?
> GART doesn't have anything to do with this. I suspect he was thinking of
> the PCI BARs not covering all video RAM.
That's certainly not the case here.
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: radeonfb, dedicate memory to something else
2008-07-22 9:05 ` Matt Sealey
@ 2008-07-22 14:25 ` Jon Smirl
0 siblings, 0 replies; 6+ messages in thread
From: Jon Smirl @ 2008-07-22 14:25 UTC (permalink / raw)
To: Matt Sealey; +Cc: ppc-dev, Michel Dänzer
On 7/22/08, Matt Sealey <matt@genesi-usa.com> wrote:
> Michel D=E4nzer wrote:
>
> > On Tue, 2008-07-22 at 09:31 +0100, Matt Sealey wrote:
> >
> > > or other graphics drivers can be told "please only use the first 32MB=
"
> and
> > > then either manually or automatically, map the rest as ramdisk.
> > >
> >
> > You can limit the amount of video RAM used by X using the VideoRam
> > directive in xorg.conf(5).
> >
>
>
> Is it safe to poke around in radeon_identify_vram and maybe supply a ker=
nel
> argument videomem=3D32M and let it check, if it's bigger, then limit it,=
and
> if not, keep the old size in rinfo->video_ram?
>
> Can/could this be moved to all relevant framebuffer drivers?
>
>
> > GART doesn't have anything to do with this. I suspect he was thinking o=
f
> > the PCI BARs not covering all video RAM.
> >
>
> That's certainly not the case here.
Yes, I'm forgetting how graphics work. If you can map all of VRAM into
the PCI address space then you don't have to worry about sharing the
window with X.
> Ah okay. So now.. how do we do this for framebuffers?
My memory is suspect, but first you would need to make sure all of
VRAM is mapped. Then there is a value in fb that says how much of the
VRAM it is using. Anything above the max is fair game if X isn't
running. Note that the amount of VRAM in use by fbdev is a function of
which display mode it is in.
>
> --
> Matt Sealey <matt@genesi-usa.com>
> Genesi, Manager, Developer Relations
>
--=20
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-22 14:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-20 10:03 radeonfb, dedicate memory to something else Matt Sealey
2008-07-20 15:26 ` Jon Smirl
2008-07-22 8:31 ` Matt Sealey
2008-07-22 8:52 ` Michel Dänzer
2008-07-22 9:05 ` Matt Sealey
2008-07-22 14:25 ` Jon Smirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).