RE: about_radeon_dma

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
So, I think ring_test success means GPU  work correctly and smmothly.

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.
>> |--系统内存--|--显存--|--GTT内存--|
>> 0           256M     384M        896M
Such memory alloction in my mini32bit_os has been build up. There are  differences between linux-kernel and my mini32bit_os :
first,  mymini32bit_os does not have TTM;
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.

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. But, when I use the low 16M memory for ring_buffer, ring_test faile d. I have reserved the low 16M memory  at the boot time.

That is the exactly confused me. Why? I move ring_buffer any other palace, ring_test will not work?


> Date: Wed, 13 Jun 2012 22:35:45 -0400
> Subject: Re: about_radeon_dma
> From: alexdeucher@xxxxxxxxx
> To: sizhiying@xxxxxxxxxxx
> CC: konrad.wilk@xxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx
>
> On Wed, Jun 13, 2012 at 9:55 PM, llittle了了 <sizhiying@xxxxxxxxxxx> wrote:
> > Thanks for you reply!
> >
> > I use PCI----MMIO to access VRAM and GTT areas. And for ring_buffer, it
> > alloced from the vmalloc--area and vmap to the physical address using page
> > table.
> >
> > If enable the radeon_benchmark, it first to prepare the dma channel.
> > "set_tex_resource(), set_render_target(), cp_set_surface_sync()" ,such
> > function s only write ring_buffer. The ring_buffer is vma-area, even it map
> > to physical area. But for radeon_card, how it know the physical-area??
> >
> > The question is same to the SCRACH test, ring_test. Why I write into
> > ring_buffer,then the card register will know the value "deadbeef" ??
> >
> > Do I not understand the real card work? ring_test??
>
> What exactly are you trying to accomplish? The GPU has it's own
> internal address space that is used by on chip clients. Within that
> address space you map can map vram, AGP, and on-chip gart apertures.
> The on chip gart aperture lets you map system pages into a contiguous
> linear aperture within the GPU's address space. Once you have these
> apertures set up, internal GPU clients need only point to the
> appropriate internal address to access a buffer in either system ram
> (via on-chip gart or AGP) or vram. For example, you can store
> textures in system memory pages and point the texture hardware at them
> and the chip will read from those pages and use the textures on a quad
> rendered to vram, or vice versa.
>
> Command are sent to the GPU via a command processor (CP) that fetches
> commands from a ring buffer. You write the commands into the ring
> buffer and update the write pointer. The CP then executes the
> commands in the ring buffer until the read pointer and write pointer
> both point to the same index. At that point the CP stops and waits
> until the write pointer is updated again. In the ring test, we put
> command packets on the ring to write to a scatch register or memory
> location. When the CP is done, we check the register or memory
> location to make sure it was properly updated. That way we know the
> ring buffer is working.
>
> Alex
>
> >< br>> >
> >> Date: Wed, 13 Jun 2012 09:57:28 -0400
> >> From: konrad.wilk@xxxxxxxxxx
> >> To: sizhiying@xxxxxxxxxxx
> >> CC: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> >> Subject: Re: about_radeon_dma
> >>
> >> On Wed, Jun 1 3, 2012 at 09:44:19AM +0800, llittle了了 wrote:
> >> >
> >> > HI,all
> >> > Now, my lab is using radeon_ati card。And, I need ati_card dma
> >> > function。But, I do not clear that how the ati card know the dma address
> >> > which alloced by kernel??
> >>
> >> By using the PCI API.
> >>
> >> >
> >>
> >> > Can any kernel drivers for radeon card give me some advise or explain
> >> > the answer?
> >> >
> >> > I have read the radeon driver in kernel (/driver/gpu/drm/randeon/xxx
> ; >> > )and the TTM manager. So, as I know, If I use GFP_KERNEL sign to alloc
> >> > memory, the radeon_card work right, but any other palce ,it failed. Why and
> >> > how this happened?
> >> > Is there any way to tell the dma address and ring buffer address in
> >> > kernel to the radeon_card ?
> >> >
> >> > It`s so confused! Hope for your answer!
> >> >
> >> >
> >> > Thanks so much!
> >> > zhiyig Si
> >> >
> >>
> >> > _______________________________________________
> >> > dri-devel mailing list
> >> > dri-devel@xxxxxxxxxxxxxxxxxxxxx
> >> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> >>
> >
> > _______________________________________________
> > dri-devel mailing list
> > ; dri-devel@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux