Diving more into the code, I also found weird how the scratch cmd packet
is build in radeon_mm_use, in radeon_mm.c. I think it should be like in the
attached patch.
On Wednesday 28 February 2007 22:33, Panagiotis Papadakos wrote:
> Updated patch. Fix a check.
>
> On Tuesday 27 February 2007 23:49, Panagiotis Papadakos wrote:
> > Hope this patch is OK.
> >
> > With it I no more get infinite messages like:
> >
> > Feb 27 15:48:39 localhost kernel: [drm:r300_do_cp_cmdbuf]
> > R300_CMD_SCRATCH Feb 27 15:48:39 localhost last message repeated 2 times
> > Feb 27 15:48:39 localhost kernel: [drm:r300_do_cp_cmdbuf] END
> > Feb 27 15:48:39 localhost kernel: [drm:drm_ioctl] pid=3538,
> > cmd=0xc0046456, nr=0x56, dev 0xe200, auth=1 Feb 27 15:48:39 localhost
> > kernel:
> > [drm:drm_ioctl] pid=3538, cmd=0x40046457, nr=0x57, dev 0xe200, auth=1 Feb
> > 27 15:48:39 localhost kernel: [drm:drm_ioctl] ret = fffffffc
> > Feb 27 15:48:39 localhost kernel: [drm:drm_ioctl] pid=3538,
> > cmd=0x40046457, nr=0x57, dev 0xe200, auth=1 Feb 27 15:48:39 localhost
> > kernel:
> > [drm:drm_ioctl] ret = fffffffc
> > Feb 27 15:48:39 localhost kernel: [drm:drm_ioctl] pid=3538,
> > cmd=0x40046457, nr=0x57, dev 0xe200, auth=1 Feb 27 15:48:39 localhost
> > kernel:
> > [drm:drm_ioctl] ret = fffffffc
> > Feb 27 15:48:39 localhost kernel: [drm:drm_ioctl] pid=3538,
> > cmd=0x40046457, nr=0x57, dev 0xe200, auth=1 Feb 27 15:48:39 localhost
> > kernel:
> > [drm:drm_ioctl] ret = fffffffc
--
Papadakos Panagiotis
diff --git a/src/mesa/drivers/dri/r300/radeon_mm.c b/src/mesa/drivers/dri/r300/radeon_mm.c
index f86a1b4..25f4f32 100644
--- a/src/mesa/drivers/dri/r300/radeon_mm.c
+++ b/src/mesa/drivers/dri/r300/radeon_mm.c
@@ -295,7 +295,7 @@ static void emit_lin_cp(r300ContextPtr r
void radeon_mm_use(r300ContextPtr rmesa, int id)
{
- uint64_t ull;
+ //uint64_t ull;
#ifdef MM_DEBUG
fprintf(stderr, "%s: %d at age %x\n", __FUNCTION__, id, radeonGetAge((radeonContextPtr)rmesa));
#endif
@@ -338,23 +338,27 @@ void radeon_mm_use(r300ContextPtr rmesa,
rmesa->rmm->u_list[id].size);
}*/
#endif
+ LOCK_HARDWARE(&rmesa->radeon); /* Protect from DRM. */
+ rmesa->rmm->u_list[id].h_pending ++;
+ UNLOCK_HARDWARE(&rmesa->radeon);
- cmd = (drm_r300_cmd_header_t *)r300AllocCmdBuf(rmesa, 2 + sizeof(ull) / 4, __FUNCTION__);
+ cmd = (drm_r300_cmd_header_t *)r300AllocCmdBuf(rmesa, 4, __FUNCTION__);
cmd[0].scratch.cmd_type = R300_CMD_SCRATCH;
cmd[0].scratch.reg = RADEON_MM_SCRATCH;
cmd[0].scratch.n_bufs = 1;
cmd[0].scratch.flags = 0;
- cmd ++;
+/* cmd ++;
ull = (uint64_t)(intptr_t)&rmesa->rmm->u_list[id].age;
_mesa_memcpy(cmd, &ull, sizeof(ull));
cmd += sizeof(ull) / 4;
- cmd[0].u = /*id*/0;
-
- LOCK_HARDWARE(&rmesa->radeon); /* Protect from DRM. */
- rmesa->rmm->u_list[id].h_pending ++;
- UNLOCK_HARDWARE(&rmesa->radeon);
+ *///cmd[0].u = /*id*/0;
+
+ cmd[1].u = (uint32_t)(&rmesa->rmm->u_list[id].age);
+ cmd[2].u = (uint32_t)(&rmesa->rmm->u_list[id].h_pending);
+ cmd[3].u = /*id*/0;
+
}
unsigned long radeon_mm_offset(r300ContextPtr rmesa, int id)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel