<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:微软雅黑
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Yes, I transplant the radeon_driver from 64bit_kernel to a mini 32bit_os. The purpose is to open radeon_benchmark or Xorg in the mini_32bit_os.<br>So, I think ring_test success means GPU work correctly and smmothly. <br><br>But ,my ring_test in the mini_32bit_os does not success. When I read scratch register, it`s not the value wrote into the memory location.So, I think the address space does not map correct. <br><pre><font color="#ff0000">>> |--系统内存--|--显存--|--GTT内存--|</font>
<font color="#ff0000">>> 0 256M 384M 896M</font></pre>Such memory alloction in my mini32bit_os has been build up. There are differences between linux-kernel and my mini32bit_os :<br>first, mymini32bit_os does not have TTM;<br>second, the mini32bit_os use 0x8000,0000-----0x9000,0000 virtual address which map to 0x0----0x1000,0000 physical address . While linux-kernel use 0x9800,0000,fc24,0000——0x9800,0000,ff00,0000 CPU vritual address which map to 0x0000,0000,fc24,0000——0x0000,0000,ff00,0000 physical address.I have 2g memory.<br><br>I also use gart_table to tell GPU my mini32bit_os address. set_gart_pages. But ring_test still does not work. If we can use gart_table to tell GPU the ring_buffer memory location, I alloc the ring_buffer from the low 16M memory, then fill the gart_table, GPU would konw that address and ring_test would sucess. <font style="" color="#FF0000">But, when I use the low 16M memory for ring_buffer, ring_test failed. I have reserved the low 16M memory at the boot time</font>.<br><br>That is the exactly confused me. Why? I move ring_buffer any other palace, ring_test will not work?<br><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Wed, 13 Jun 2012 22:35:45 -0400<br>> Subject: Re: about_radeon_dma<br>> From: alexdeucher@gmail.com<br>> To: sizhiying@hotmail.com<br>> CC: konrad.wilk@oracle.com; dri-devel@lists.freedesktop.org<br>> <br>> On Wed, Jun 13, 2012 at 9:55 PM, llittle了了 <sizhiying@hotmail.com> wrote:<br>> > Thanks for you reply!<br>> ><br>> > I use PCI----MMIO to access VRAM and GTT areas. And for ring_buffer, it<br>> > alloced from the vmalloc--area and vmap to the physical address using page<br>> > table.<br>> ><br>> > If enable the radeon_benchmark, it first to prepare the dma channel.<br>> > "set_tex_resource(), set_render_target(), cp_set_surface_sync()" ,such<br>> > functions only write ring_buffer. The ring_buffer is vma-area, even it map<br>> > to physical area. But for radeon_card, how it know the physical-area??<br>> ><br>> > The question is same to the SCRACH test, ring_test. Why I write into<br>> > ring_buffer,then the card register will know the value "deadbeef" ??<br>> ><br>> > Do I not understand the real card work? ring_test??<br>> <br>> What exactly are you trying to accomplish? The GPU has it's own<br>> internal address space that is used by on chip clients. Within that<br>> address space you map can map vram, AGP, and on-chip gart apertures.<br>> The on chip gart aperture lets you map system pages into a contiguous<br>> linear aperture within the GPU's address space. Once you have these<br>> apertures set up, internal GPU clients need only point to the<br>> appropriate internal address to access a buffer in either system ram<br>> (via on-chip gart or AGP) or vram. For example, you can store<br>> textures in system memory pages and point the texture hardware at them<br>> and the chip will read from those pages and use the textures on a quad<br>> rendered to vram, or vice versa.<br>> <br>> Command are sent to the GPU via a command processor (CP) that fetches<br>> commands from a ring buffer. You write the commands into the ring<br>> buffer and update the write pointer. The CP then executes the<br>> commands in the ring buffer until the read pointer and write pointer<br>> both point to the same index. At that point the CP stops and waits<br>> until the write pointer is updated again. In the ring test, we put<br>> command packets on the ring to write to a scatch register or memory<br>> location. When the CP is done, we check the register or memory<br>> location to make sure it was properly updated. That way we know the<br>> ring buffer is working.<br>> <br>> Alex<br>> <br>> ><br>> ><br>> >> Date: Wed, 13 Jun 2012 09:57:28 -0400<br>> >> From: konrad.wilk@oracle.com<br>> >> To: sizhiying@hotmail.com<br>> >> CC: dri-devel@lists.freedesktop.org<br>> >> Subject: Re: about_radeon_dma<br>> >><br>> >> On Wed, Jun 1 3, 2012 at 09:44:19AM +0800, llittle了了 wrote:<br>> >> ><br>> >> > HI,all<br>> >> > Now, my lab is using radeon_ati card。And, I need ati_card dma<br>> >> > function。But, I do not clear that how the ati card know the dma address<br>> >> > which alloced by kernel??<br>> >><br>> >> By using the PCI API.<br>> >><br>> >> ><br>> >><br>> >> > Can any kernel drivers for radeon card give me some advise or explain<br>> >> > the answer?<br>> >> ><br>> >> > I have read the radeon driver in kernel (/driver/gpu/drm/randeon/xxx<br>> >> > )and the TTM manager. So, as I know, If I use GFP_KERNEL sign to alloc<br>> >> > memory, the radeon_card work right, but any other palce ,it failed. Why and<br>> >> > how this happened?<br>> >> > Is there any way to tell the dma address and ring buffer address in<br>> >> > kernel to the radeon_card ?<br>> >> ><br>> >> > It`s so confused! Hope for your answer!<br>> >> ><br>> >> ><br>> >> > Thanks so much!<br>> >> > zhiyig Si<br>> >> ><br>> >><br>> >> > _______________________________________________<br>> >> > dri-devel mailing list<br>> >> > dri-devel@lists.freedesktop.org<br>> >> > http://lists.freedesktop.org/mailman/listinfo/dri-devel<br>> >><br>> ><br>> > _______________________________________________<br>> > dri-devel mailing list<br>> > dri-devel@lists.freedesktop.org<br>> > http://lists.freedesktop.org/mailman/listinfo/dri-devel<br>> ><br></div>                                            </div></body>
</html>