Bug 8205 - dev_priv->ring.space not updated in r128_do_cce_reset()?
dev_priv->ring.space not updated in r128_do_cce_reset()?
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel)
i386 Linux
: P2 normal
Assigned To: drivers_video-dri
Depends on:
  Show dependency treegraph
Reported: 2007-03-15 11:13 UTC by Chongfeng Hu
Modified: 2009-03-25 17:07 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.20
Tree: Mainline
Regression: No


Description Chongfeng Hu 2007-03-15 11:13:24 UTC
Distribution: kernel

Problem Description:

When I checked ATI Rage 128 driver source code, I found that 
drm_r128_private_t*->ring->space is a field keeping the size of ring. In file 
drivers/char/drm/r128_cce.c, there's a function r128_do_cce_reset():

static void r128_do_cce_reset(drm_r128_private_t * dev_priv)
    R128_WRITE(R128_PM4_BUFFER_DL_WPTR, 0);
    R128_WRITE(R128_PM4_BUFFER_DL_RPTR, 0);
    dev_priv->ring.tail = 0;

In a device reset, the space of the ring should be zero, and this information 
might need to be updated into dev_priv->ring.tail. Even if this is not 
necessary, it will make the program easier for others to understand.

Steps to reproduce:

I found this place with the help of a source-analysis tool.

Note You need to log in before you can comment on or make changes to this bug.