r600g: kill event type magic number in winsys
authorDave Airlie <airlied@redhat.com>
Tue, 17 Aug 2010 05:16:53 +0000 (15:16 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 17 Aug 2010 06:07:48 +0000 (16:07 +1000)
these events have names, use them.

src/gallium/winsys/r600/drm/r600_state.c
src/gallium/winsys/r600/drm/r600d.h

index d17d6e7954f6e602f03901e93c82aa69170e3122..2facec75deccac56930dd851b6e5b648f48579d2 100644 (file)
@@ -233,7 +233,7 @@ static int r600_state_pm4_config(struct radeon_state *state)
        state->pm4[state->cpm4++] = 0x80000000;
        state->pm4[state->cpm4++] = 0x80000000;
        state->pm4[state->cpm4++] = PKT3(PKT3_EVENT_WRITE, 0);
-       state->pm4[state->cpm4++] = 0x00000016;
+       state->pm4[state->cpm4++] = EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT;
        state->pm4[state->cpm4++] = PKT3(PKT3_SET_CONFIG_REG, 1);
        state->pm4[state->cpm4++] = 0x00000010;
        state->pm4[state->cpm4++] = 0x00028000;
@@ -246,7 +246,7 @@ static int r700_state_pm4_config(struct radeon_state *state)
        state->pm4[state->cpm4++] = 0x80000000;
        state->pm4[state->cpm4++] = 0x80000000;
        state->pm4[state->cpm4++] = PKT3(PKT3_EVENT_WRITE, 0);
-       state->pm4[state->cpm4++] = 0x00000016;
+       state->pm4[state->cpm4++] = EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT;
        state->pm4[state->cpm4++] = PKT3(PKT3_SET_CONFIG_REG, 1);
        state->pm4[state->cpm4++] = 0x00000010;
        state->pm4[state->cpm4++] = 0x00028000;
@@ -314,7 +314,7 @@ static int r600_state_pm4_draw(struct radeon_state *state)
                state->pm4[state->cpm4++] = state->states[R600_DRAW__VGT_DRAW_INITIATOR];
        }
        state->pm4[state->cpm4++] = PKT3(PKT3_EVENT_WRITE, 0);
-       state->pm4[state->cpm4++] = 0x00000016;
+       state->pm4[state->cpm4++] = EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT;
        return 0;
 }
 
index 5d13378627ea77b1160622f352a131bc652b52da..235b2b3d9767c6d79dd52e6a75e970c1afec121f 100644 (file)
@@ -82,6 +82,8 @@
 #define PKT3_SET_CTL_CONST                     0x6F
 #define PKT3_SURFACE_BASE_UPDATE               0x73
 
+#define EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT   0x16
+
 #define PKT_TYPE_S(x)                   (((x) & 0x3) << 30)
 #define PKT_TYPE_G(x)                   (((x) >> 30) & 0x3)
 #define PKT_TYPE_C                      0x3FFFFFFF