[Intel-gfx] [PATCH 5/9] intel_reg: rename RING_LEN RING_CTL

Robert Bragg robert.bragg at intel.com
Fri Jul 18 17:38:49 CEST 2014


This register holds more than the length. This also renames the lsb to
RING_ENABLED.
---
 lib/intel_reg.h       | 7 ++-----
 tools/intel_gpu_top.c | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/intel_reg.h b/lib/intel_reg.h
index 56459ea..8a6e3f1 100644
--- a/lib/intel_reg.h
+++ b/lib/intel_reg.h
@@ -662,17 +662,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define START_ADDR          0x03FFFFF8
 #define I830_RING_START_MASK	0xFFFFF000
 
-#define RING_LEN       0x0C
+#define RING_CTL       0x0C
 #define RING_NR_PAGES       0x001FF000 
 #define I830_RING_NR_PAGES	0x001FF000
 #define RING_REPORT_MASK    0x00000006
 #define RING_REPORT_64K     0x00000002
 #define RING_REPORT_128K    0x00000004
 #define RING_NO_REPORT      0x00000000
-#define RING_VALID_MASK     0x00000001
-#define RING_VALID          0x00000001
-#define RING_INVALID        0x00000000
-
+#define RING_ENABLED_MASK   0x00000001
 
 
 /* BitBlt Instructions
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 3115b5e..6e494b1 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -357,7 +357,7 @@ static uint32_t ring_read(struct ring *ring, uint32_t reg)
 
 static void ring_init(struct ring *ring)
 {
-	ring->size = (((ring_read(ring, RING_LEN) & RING_NR_PAGES) >> 12) + 1) * 4096;
+	ring->size = (((ring_read(ring, RING_CTL) & RING_NR_PAGES) >> 12) + 1) * 4096;
 }
 
 static void ring_reset(struct ring *ring)
-- 
2.0.1

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the Intel-gfx mailing list