Bug 8205

Summary: dev_priv->ring.space not updated in r128_do_cce_reset()?
Product: Drivers Reporter: Chongfeng Hu (loveminix)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: RESOLVED INVALID    
Severity: normal CC: alan, bunk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.20 Subsystem:
Regression: No Bisected commit-id:

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.