UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant jairoscz
Participant
7,358 Views
Registered: ‎04-13-2009

Can I use system memory as video memory?

I'll state the obvious (if it isn't obvious enough from the title of the post): I'm a Linux newbie. 

 

Having said that, I would appreciate it if someone could tell me whether using a slice of system memory as video memory possible. 

 

We are currently working with the Xilinx ML403 and we're getting an embedded Linux OS installed.  We are planning on using an LCD screen and was wondering if I could use some of the 64MB of system memory for the framebuffer.

 

Thanks!

 

0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
7,354 Views
Registered: ‎09-10-2008

Re: Can I use system memory as video memory?

You should checkout the frame buffer driver that we have in our development branch (newer version) of the git tree.  It does this and might help you as an example.

 

The driver has been in the mainline kernel for quite a while also, but it's a newer version in our tree.

 

drivers/video/xilinxfb.c

 

-- John

Participant jairoscz
Participant
7,340 Views
Registered: ‎04-13-2009

Re: Can I use system memory as video memory?

Thanks John, that looks like it might be something we'll use.

 

But also, would you know if there is any sort of conflict if we were to use a slice from system memory as video memory?

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
7,337 Views
Registered: ‎09-10-2008

Re: Can I use system memory as video memory?

I'm no expert here, but I would think you would want to make sure the kernel is not using it so you'd need to get that memory from the kernel thru a call or make sure the kernel doesn't use it by altering the device tree such that the kernel doesn't own it.

 

-- John

0 Kudos
Anonymous
Not applicable
7,333 Views

Re: Can I use system memory as video memory?

I believe this is what the driver takes care of for you, so you should be able use something from it in your own driver.

 

Alternatively,  there is a way to reserve part of the memory using the .dts file - essentially by telling linux not to use it.   Look at Documentation/booting-without-of.txt - Section III.5.d  

 

for example:

 

DDR2_SDRAM: memory@0 {

        device_type = "memory";

        reg = < 0x0 0x0C000000 >;

};

 

 

This only tells linux about 192MB of the available 256MB of memory..  I can't say I've ever done this in practice, but I think that's the way it's supposed to work.

 

Terry