aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2012-05-09 09:35:02 -0400
committerDave Airlie <airlied@redhat.com>2012-05-09 12:22:55 -0400
commitf2e3922106f6b29083086393ee474ad4483bc487 (patch)
tree73ae3df5af1166f5f80f198598871113a97acc15 /drivers/gpu/drm/radeon/r100.c
parentf237750f007412eb5e1baafe3e32857b35fbc6ee (diff)
drm/radeon: make the ib an inline object
No need to malloc it any more. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index ad6ceb731713..0874a6dd411f 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -139,9 +139,9 @@ int r100_reloc_pitch_offset(struct radeon_cs_parser *p,
139 } 139 }
140 140
141 tmp |= tile_flags; 141 tmp |= tile_flags;
142 p->ib->ptr[idx] = (value & 0x3fc00000) | tmp; 142 p->ib.ptr[idx] = (value & 0x3fc00000) | tmp;
143 } else 143 } else
144 p->ib->ptr[idx] = (value & 0xffc00000) | tmp; 144 p->ib.ptr[idx] = (value & 0xffc00000) | tmp;
145 return 0; 145 return 0;
146} 146}
147 147
@@ -156,7 +156,7 @@ int r100_packet3_load_vbpntr(struct radeon_cs_parser *p,
156 volatile uint32_t *ib; 156 volatile uint32_t *ib;
157 u32 idx_value; 157 u32 idx_value;
158 158
159 ib = p->ib->ptr; 159 ib = p->ib.ptr;
160 track = (struct r100_cs_track *)p->track; 160 track = (struct r100_cs_track *)p->track;
161 c = radeon_get_ib_value(p, idx++) & 0x1F; 161 c = radeon_get_ib_value(p, idx++) & 0x1F;
162 if (c > 16) { 162 if (c > 16) {
@@ -1275,7 +1275,7 @@ void r100_cs_dump_packet(struct radeon_cs_parser *p,
1275 unsigned i; 1275 unsigned i;
1276 unsigned idx; 1276 unsigned idx;
1277 1277
1278 ib = p->ib->ptr; 1278 ib = p->ib.ptr;
1279 idx = pkt->idx; 1279 idx = pkt->idx;
1280 for (i = 0; i <= (pkt->count + 1); i++, idx++) { 1280 for (i = 0; i <= (pkt->count + 1); i++, idx++) {
1281 DRM_INFO("ib[%d]=0x%08X\n", idx, ib[idx]); 1281 DRM_INFO("ib[%d]=0x%08X\n", idx, ib[idx]);
@@ -1354,7 +1354,7 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
1354 uint32_t header, h_idx, reg; 1354 uint32_t header, h_idx, reg;
1355 volatile uint32_t *ib; 1355 volatile uint32_t *ib;
1356 1356
1357 ib = p->ib->ptr; 1357 ib = p->ib.ptr;
1358 1358
1359 /* parse the wait until */ 1359 /* parse the wait until */
1360 r = r100_cs_packet_parse(p, &waitreloc, p->idx); 1360 r = r100_cs_packet_parse(p, &waitreloc, p->idx);
@@ -1533,7 +1533,7 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
1533 u32 tile_flags = 0; 1533 u32 tile_flags = 0;
1534 u32 idx_value; 1534 u32 idx_value;
1535 1535
1536 ib = p->ib->ptr; 1536 ib = p->ib.ptr;
1537 track = (struct r100_cs_track *)p->track; 1537 track = (struct r100_cs_track *)p->track;
1538 1538
1539 idx_value = radeon_get_ib_value(p, idx); 1539 idx_value = radeon_get_ib_value(p, idx);
@@ -1889,7 +1889,7 @@ static int r100_packet3_check(struct radeon_cs_parser *p,
1889 volatile uint32_t *ib; 1889 volatile uint32_t *ib;
1890 int r; 1890 int r;
1891 1891
1892 ib = p->ib->ptr; 1892 ib = p->ib.ptr;
1893 idx = pkt->idx + 1; 1893 idx = pkt->idx + 1;
1894 track = (struct r100_cs_track *)p->track; 1894 track = (struct r100_cs_track *)p->track;
1895 switch (pkt->opcode) { 1895 switch (pkt->opcode) {
@@ -3684,7 +3684,7 @@ void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
3684 3684
3685int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring) 3685int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
3686{ 3686{
3687 struct radeon_ib *ib; 3687 struct radeon_ib ib;
3688 uint32_t scratch; 3688 uint32_t scratch;
3689 uint32_t tmp = 0; 3689 uint32_t tmp = 0;
3690 unsigned i; 3690 unsigned i;
@@ -3700,22 +3700,22 @@ int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
3700 if (r) { 3700 if (r) {
3701 return r; 3701 return r;
3702 } 3702 }
3703 ib->ptr[0] = PACKET0(scratch, 0); 3703 ib.ptr[0] = PACKET0(scratch, 0);
3704 ib->ptr[1] = 0xDEADBEEF; 3704 ib.ptr[1] = 0xDEADBEEF;
3705 ib->ptr[2] = PACKET2(0); 3705 ib.ptr[2] = PACKET2(0);
3706 ib->ptr[3] = PACKET2(0); 3706 ib.ptr[3] = PACKET2(0);
3707 ib->ptr[4] = PACKET2(0); 3707 ib.ptr[4] = PACKET2(0);
3708 ib->ptr[5] = PACKET2(0); 3708 ib.ptr[5] = PACKET2(0);
3709 ib->ptr[6] = PACKET2(0); 3709 ib.ptr[6] = PACKET2(0);
3710 ib->ptr[7] = PACKET2(0); 3710 ib.ptr[7] = PACKET2(0);
3711 ib->length_dw = 8; 3711 ib.length_dw = 8;
3712 r = radeon_ib_schedule(rdev, ib); 3712 r = radeon_ib_schedule(rdev, &ib);
3713 if (r) { 3713 if (r) {
3714 radeon_scratch_free(rdev, scratch); 3714 radeon_scratch_free(rdev, scratch);
3715 radeon_ib_free(rdev, &ib); 3715 radeon_ib_free(rdev, &ib);
3716 return r; 3716 return r;
3717 } 3717 }
3718 r = radeon_fence_wait(ib->fence, false); 3718 r = radeon_fence_wait(ib.fence, false);
3719 if (r) { 3719 if (r) {
3720 return r; 3720 return r;
3721 } 3721 }