[Openchrome-devel] Access to svn

dinesh deepani dkdeepani
Sun Jan 9 13:43:14 PST 2011


I am trying to  use the following TTM branches of Thomas for putting the
openchrome.ko & ttm.ko drivers for the one of CX700 units(with LCD panel
having 1280x768 resolution ) & AGP command regulator to get  the support for
the DRI/DRM specifially focusing on the openGL & 3d gaming apps  .

I was able to compile & build load all the pieces  (with a bit of
manipulation )
1. openchrome.ko
2. ttm.ko
3. openchrome_dri.so
4. libwswbm.so.1 ( libwsbm-src.1.1.0.tar.bz2 from a diffrent repository  old
one new own seems to miss some functions .)
5. openchrome_drv.so

& am able to run the mutliple instances of glxheads/tri/mapvbo( all the apps
with primvite list size less then 4096 bytes/1 page ) etc from the
redbook/samples/xdemos directories of mesa tree & they seem to run OK with
crisp &  clear rendering .

But when I try to run the applications like nurb/depthcue/olympic whose
vertex list sizes are nearing 4-5 pages 20000 bytes I see that
most of the times the GPU gets stuck  & the pause register seems to be 0x000
(busy always ) , never becomes idle & the hw_addr_ptr(0x418) register never
moves ,

paused = VIA_READ(0x41c) & 0x80000000;
in the function
static int via_hook_segment(struct drm_via_private *dev_priv ...) .

I am trying to keep the usage of  the command stream verifier intilally  I
tried putting some debug dump on the
vb = (uint32_t *) dev_priv->pci_buf  & tried to manually evaluate the entire
vertex list & found that it looks good .

But when I did  same dump on the AGP command regulator  buffer (which is
done after copying memcpy_io from the dev_priv->pci_buf  & parser
via_verify_command_stream  is done with ), I see that entire 4 pages where
chopped off & the driver is feeding the GPU with the list which has  only
the primitive data & without the initial command data , which seems to the
make GPU to stuck & killing Xorg freezes the unit .

Further I removed the copying from user to pci_buf & directly copied the
data   to the AGP command regulator  buffer  & then ran the
via_verify_command_stream  on the AGP buffer & the function started to
complain about the
problematic header  & started returning error's & is not posting these
header  less commnads & the GPU doesnot gets stuck & applications can be
killed .

*[drm:via_verify_command_stream] *ERROR* Invalid / Unimplemented DMA HEADER
command. 0x475711e6*
**
Has anyone seen experinced this issue , & where could the problem be ?

Also Is there a known issue  with the part where the AGP pages are bound to
the GART  i.e in the following functions .


int ttm_tt_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem)

int ttm_tt_populate(struct ttm_tt *ttm)

static int ttm_tt_set_caching(struct ttm_tt *ttm,

                              enum ttm_caching_state c_state)

 /* AGP DMA command buffer. */

 ttm_buffer_object_create(&dev_priv->bdev, VIA_AGPC_SIZE,

                                       ttm_bo_type_kernel,

                                       TTM_PL_FLAG_TT |

                                       TTM_PL_FLAG_NO_EVICT,

                                       0, 0, false, NULL,
&dev_priv->agpc_bo);



ret = ttm_bo_kmap(dev_priv->agpc_bo, 0, dev_priv->agpc_bo->num_pages,

                          &dev_priv->agpc_bmo);


Please let me know if some one seems to have observed the similar behaviour
& any possible fix .

Am using 2.6.34.1 kernel with ttm.ko & openchrome.ko compiled & built
from  following repos.


    * drm and libdrm (git://anongit.freedesktop.org/git/mesa/drm) -
      branch modesetting-newttm.
    * libwsbm (git://anongit.freedesktop.org/git/mesa/libwsbm) - branch
      master
    * openchrome (http://svn.openchrome.org/svn/branches/ttm_branch) -
      branch ttm_branch
    * mesa (git://anongit.freedesktop.org/git/mesa/mesa) - branch
      openchrome_branch




---------- dump of primitive/command data in the  vb = (uint32_t *)
dev_priv->pci_buf ---------------------------

Jan  9 19:08:36 sm kernel: [  150.309434] Yes space in AGP ring buffer.
20320 AGP buffer is commands dcde03d0 4294925419

Jan  9 19:08:36 sm kernel: [  150.309443] 0000:   f210f110  00010000
00013404  43ffffff

Jan  9 19:08:36 sm kernel: [  150.309458] 0010:   44000cff  f210f110
00010000  101e0000

Jan  9 19:08:36 sm kernel: [  150.309473] 0020:   11000000  122304e0
15010000  23000000

Jan  9 19:08:36 sm kernel: [  150.309488] 0030:   24000000  50000000
51000000  520000ff

Jan  9 19:08:36 sm kernel: [  150.309503] 0040:   7b000000  cccccccc
f210f110  00010000

Jan  9 19:08:36 sm kernel: [  150.309517] 0050:   40012200  41000000
7000012c  7100312f

Jan  9 19:08:36 sm kernel: [  150.309532] 0060:   7c000000  42010a00
f210f110  00010000

Jan  9 19:08:36 sm kernel: [  150.309546] 0070:   cccccccc  dddddddd
f210f110  00000000

Jan  9 19:08:36 sm kernel: [  150.309561] 0080:   ec017e20  ee010860
43960000  43160000

Jan  9 19:08:36 sm kernel: [  150.309576] 0090:   3f000000  3f800000
ffffffff  ffffffff

Jan  9 19:08:36 sm kernel: [  150.309590] 00a0:   43591500  417d5ff0
3f000000  3f800000

Jan  9 19:08:36 sm kernel: [  150.309605] 00b0:   ffffffff  ffffffff
43591500  42d91500

Jan  9 19:08:36 sm kernel: [  150.309619] 00c0:   3f6ce220  3f800000
ffffffff  ffffffff


-------------------------------------------------------------------------
problme in nurbs app --------------------------------


Jan 10 10:20:13 sm kernel: [ 2410.456707] [drm:drm_update_drawable_info],
Updated 1 cliprects for drawable 1

Jan 10 10:20:13 sm kernel: [ 2410.460160] [drm:drm_update_drawable_info],
Updated 1 cliprects for drawable 1

Jan 10 10:20:13 sm kernel: [ 2410.460827] [drm:drm_update_drawable_info],
Updated 1 cliprects for drawable 1

Jan 10 10:20:13 sm kernel: [ 2410.460977] [drm:drm_update_drawable_info],
Updated 1 cliprects for drawable 1

Jan 10 10:20:13 sm kernel: [ 2410.465268] [VIA] via_pl_unref_ioctl ---- nurb
Enter

Jan 10 10:20:13 sm kernel: [ 2410.465282] [TTM] ttm_pl_unref_ioctl ---nurb

Jan 10 10:20:13 sm kernel: [ 2410.465295] [VIA] via_pl_unref_ioctl ---- nurb
Leave ret 0

Jan 10 10:20:13 sm kernel: [ 2410.465321] [VIA] via_pl_reference_ioctl ----
nurb Enter

Jan 10 10:20:13 sm kernel: [ 2410.465331] [TTM] ttm_pl_reference_ioctl Found
user_bo dcd06200 --- nurb

Jan 10 10:20:13 sm kernel: [ 2410.465342] [TTM] added a reference to buffer
object. bo dcd06224

Jan 10 10:20:13 sm kernel: [ 2410.465352] [TTM] ttm_pl_fill_rep bo_size
1e0000

Jan 10 10:20:13 sm kernel: [ 2410.465360] [TTM] ttm_pl_fill_rep num_pages
1e0

Jan 10 10:20:13 sm kernel: [ 2410.465367] [TTM] ttm_pl_fill_rep map_handle 0

Jan 10 10:20:13 sm kernel: [ 2410.465375] [TTM] ttm_pl_fill_rep handle
75683100

Jan 10 10:20:13 sm kernel: [ 2410.465383] [TTM] ttm_pl_fill_rep placement
40004

Jan 10 10:20:13 sm kernel: [ 2410.465390] [TTM] ttm_pl_fill_rep gpu_offset 0

Jan 10 10:20:13 sm kernel: [ 2410.465398] [VIA] via_pl_reference_ioctl ----
nurb Leave ret 0

Jan 10 10:20:13 sm kernel: [ 2410.465971] via_check_dma dma_ptr e2f00000
dma_low 49b00 dma_current e2f49b00

Jan 10 10:20:13 sm kernel: [ 2410.465981] [drm:via_copy_cmdbuf] *ERROR*
Space is AGP ring buffer. vb e2f49b00

Jan 10 10:20:13 sm kernel: [ 2410.465993] -------------------copied cmd from
app nurb 128 bytes. DDCV 1 @ e2f49b00-----------------------

Jan 10 10:20:13 sm kernel: [ 2410.466007] via_verify_command_stream S 128
Start 0xe2f49b00 End 0xe2f49b80

Jan 10 10:20:13 sm kernel: [ 2410.466022] [drm:via_dispatch_clip] *ERROR*
Command verifier OK ...

Jan 10 10:20:13 sm kernel: [ 2410.466032] AGP virtual address is VB 49b00
523157 size 128

Jan 10 10:20:13 sm kernel: [ 2410.466044] via_dispatch_commands @523157
_AGP: Fs c9 es 0 VB 49b80 pb dcde03d0 cs 128

Jan 10 10:20:13 sm kernel: [ 2410.466054] -------Pad 16 QWords..

Jan 10 10:20:13 sm kernel: [ 2410.466061] via_get_dma dma_current e2f49b80

Jan 10 10:20:13 sm kernel: [ 2410.466069] via_get_dma dma_current e2f49c08

Jan 10 10:20:13 sm kernel: [ 2410.466078] via_get_dma dma_current e2f49d00

Jan 10 10:20:13 sm kernel: [ 2410.466086] via_get_dma dma_current e2f49d00

Jan 10 10:20:13 sm kernel: [ 2410.466099] S 504 p 0xc1049b00 R 0xc1049ae0
diff 0x00000000 hi 0x640000c1 lo 0x63049cf8 lpt 0xe2f49cfc --nurb

Jan 10 10:20:13 sm kernel: [ 2410.466111] IDLE 0 cpwb 4736 cpap 128

Jan 10 10:20:13 sm kernel: [ 2410.466120]  via_dispatch_commands @523157 AGP
done: size 128

Jan 10 10:20:13 sm kernel: [ 2410.508963] via_check_dma dma_ptr e2f00000
dma_low 49d00 dma_current e2f49d00

Jan 10 10:20:13 sm kernel: [ 2410.509013] [drm:via_copy_cmdbuf] *ERROR*
Space is AGP ring buffer. vb e2f49d00

Jan 10 10:20:13 sm kernel: [ 2410.509034] -------------------copied cmd from
app nurb 4736 bytes. DDCV 1 @ e2f49d00-----------------------

Jan 10 10:20:13 sm kernel: [ 2410.509049] via_verify_command_stream S 4736
Start 0xe2f49d00 End 0xe2f4af80

Jan 10 10:20:13 sm kernel: [ 2410.509131] [drm:via_dispatch_clip] *ERROR*
Command verifier OK ...

Jan 10 10:20:13 sm kernel: [ 2410.509144] via_apply_cliprect TB 3x0 LR
291x522 1# 7000020a 2# 71003123

Jan 10 10:20:13 sm kernel: [ 2410.509154] AGP virtual address is VB 49d00
523168 size 4736

Jan 10 10:20:13 sm kernel: [ 2410.509166] via_dispatch_commands @523168
_AGP: Fs ca es 0 VB 4af80 pb dcde03d0 cs 4736

Jan 10 10:20:13 sm kernel: [ 2410.509177] via_get_dma dma_current e2f4af80

Jan 10 10:20:13 sm kernel: [ 2410.509185] via_get_dma dma_current e2f4b000

Jan 10 10:20:13 sm kernel: [ 2410.509193] via_get_dma dma_current e2f4b000

*Jan 10 10:20:13 sm kernel: [ 2410.509206] S 4856 p 0xc1049d00 R 0xc1049c60
diff 0x00000080 hi 0x640000c1 lo 0x6304aff8 lpt 0xe2f4affc --nurb*

*Jan 10 10:20:13 sm kernel: [ 2410.509217] Bsy 1 cp 4864*

Jan 10 10:20:13 sm kernel: [ 2410.509225]  via_dispatch_commands @523168 AGP
done: size 4736

Jan 10 10:20:13 sm kernel: [ 2410.525300] via_check_dma dma_ptr e2f00000
dma_low 4b000 dma_current e2f4b000

Jan 10 10:20:13 sm kernel: [ 2410.525313] [drm:via_copy_cmdbuf] *ERROR*
Space is AGP ring buffer. vb e2f4b000

Jan 10 10:20:13 sm kernel: [ 2410.525325] -------------------copied cmd from
app nurb 128 bytes. DDCV 1 @ e2f4b000-----------------------

Jan 10 10:20:13 sm kernel: [ 2410.525340] via_verify_command_stream S 128
Start 0xe2f4b000 End 0xe2f4b080

Jan 10 10:20:13 sm kernel: [ 2410.525355] [drm:via_dispatch_clip] *ERROR*
Command verifier OK ...

Jan 10 10:20:13 sm kernel: [ 2410.525365] AGP virtual address is VB 4b000
523172 size 128

Jan 10 10:20:13 sm kernel: [ 2410.525377] via_dispatch_commands @523172
_AGP: Fs cb es 0 VB 4b080 pb dcde03d0 cs 128

Jan 10 10:20:13 sm kernel: [ 2410.525387] -------Pad 16 QWords..

Jan 10 10:20:13 sm kernel: [ 2410.525394] via_get_dma dma_current e2f4b080

Jan 10 10:20:13 sm kernel: [ 2410.525402] via_get_dma dma_current e2f4b108

Jan 10 10:20:13 sm kernel: [ 2410.525411] via_get_dma dma_current e2f4b200

Jan 10 10:20:13 sm kernel: [ 2410.525419] via_get_dma dma_current e2f4b200

Jan 10 10:20:13 sm kernel: [ 2410.525432] S 504 p 0xc104b000 R 0xc1049c60
diff 0x00001380 hi 0x640000c1 lo 0x6304b1f8 lpt 0xe2f4b1fc --nurb

Jan 10 10:20:13 sm kernel: [ 2410.525443] Bsy 2 cp 4992

Jan 10 10:20:13 sm kernel: [ 2410.525451]  via_dispatch_commands @523172 AGP
done: size 128

Jan 10 10:20:13 sm kernel: [ 2410.581268] via_check_dma dma_ptr e2f00000
dma_low 4b200 dma_current e2f4b200

Jan 10 10:20:13 sm kernel: [ 2410.581281] [drm:via_copy_cmdbuf] *ERROR*
Space is AGP ring buffer. vb e2f4b200

Jan 10 10:20:13 sm kernel: [ 2410.581302] -------------------copied cmd from
app nurb 4896 bytes. DDCV 1 @ e2f4b200-----------------------

Jan 10 10:20:13 sm kernel: [ 2410.581317] via_verify_command_stream S 4896
Start 0xe2f4b200 End 0xe2f4c520

Jan 10 10:20:13 sm kernel: [ 2410.581327] [drm:via_verify_command_stream]
*ERROR* Invalid / Unimplemented DMA HEADER command. 0x475711e6

Jan 10 10:20:13 sm kernel: [ 2410.581339] [drm:via_dispatch_clip] *ERROR*
Command verifier error
http://www.openchrome.org/trac/browser/branches/ttm_branch
http://www.openchrome.org/trac/wiki/TTM_branch





On Thu, Dec 30, 2010 at 7:45 AM, James Simmons <jsimmons at infradead.org>wrote:

>
> > Hi James,
> >
> > I'm glad you're interested in working on this. I'll get you access to
> > the repo asap, I'll send details by private mail.
>
> Thanks :-)
>
> > Some work on TTM was already started by Thomas Hellstr?m quite some time
> > ago but was never finished and never merged back into trunk. You might
> > find the links below useful :
> > http://www.openchrome.org/trac/browser/branches/ttm_branch
> > http://www.openchrome.org/trac/wiki/TTM_branch
>
> Yep, I have been using it as a reference. The TTM layer has changed quite
> a bit since then so I'm going to have to do surgery, which I already have
> started. I also noticed Thomas removed alot of the old apis and replaced
> them with all new. I like to reuse the old apis as much as possible to
> make the transition as painless as possible for people. It will be a
> interesting challenge to keep the old and new working together.
> _______________________________________________
> Openchrome-devel mailing list
> Openchrome-devel at openchrome.org
> http://wiki.openchrome.org/mailman/listinfo/openchrome-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wiki.openchrome.org/pipermail/openchrome-devel/attachments/20110109/67f7a1d0/attachment-0001.html



More information about the Openchrome-devel mailing list