diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-19 22:57:38 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-19 22:57:38 -0400 |
commit | ffee72d4681c8777918268a96aef42bdeb6c367b (patch) | |
tree | 4baf91483886d561c198ed0524ab54b783273e86 /drivers/gpu/drm/radeon/r300.c | |
parent | fb54d268329846aa13b2bc44a64d90e9b7131192 (diff) | |
parent | f72caf7e496465182eeda842ac66a5e75404ddf1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 561048a7c0a4..a5ff8076b423 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -324,12 +324,12 @@ void r300_gpu_init(struct radeon_device *rdev) | |||
324 | uint32_t gb_tile_config, tmp; | 324 | uint32_t gb_tile_config, tmp; |
325 | 325 | ||
326 | r100_hdp_reset(rdev); | 326 | r100_hdp_reset(rdev); |
327 | /* FIXME: rv380 one pipes ? */ | 327 | if ((rdev->family == CHIP_R300 && rdev->pdev->device != 0x4144) || |
328 | if ((rdev->family == CHIP_R300) || (rdev->family == CHIP_R350)) { | 328 | (rdev->family == CHIP_R350 && rdev->pdev->device != 0x4148)) { |
329 | /* r300,r350 */ | 329 | /* r300,r350 */ |
330 | rdev->num_gb_pipes = 2; | 330 | rdev->num_gb_pipes = 2; |
331 | } else { | 331 | } else { |
332 | /* rv350,rv370,rv380 */ | 332 | /* rv350,rv370,rv380,r300 AD, r350 AH */ |
333 | rdev->num_gb_pipes = 1; | 333 | rdev->num_gb_pipes = 1; |
334 | } | 334 | } |
335 | rdev->num_z_pipes = 1; | 335 | rdev->num_z_pipes = 1; |
@@ -729,6 +729,12 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
729 | /* VAP_VF_MAX_VTX_INDX */ | 729 | /* VAP_VF_MAX_VTX_INDX */ |
730 | track->max_indx = idx_value & 0x00FFFFFFUL; | 730 | track->max_indx = idx_value & 0x00FFFFFFUL; |
731 | break; | 731 | break; |
732 | case 0x2088: | ||
733 | /* VAP_ALT_NUM_VERTICES - only valid on r500 */ | ||
734 | if (p->rdev->family < CHIP_RV515) | ||
735 | goto fail; | ||
736 | track->vap_alt_nverts = idx_value & 0xFFFFFF; | ||
737 | break; | ||
732 | case 0x43E4: | 738 | case 0x43E4: |
733 | /* SC_SCISSOR1 */ | 739 | /* SC_SCISSOR1 */ |
734 | track->maxy = ((idx_value >> 13) & 0x1FFF) + 1; | 740 | track->maxy = ((idx_value >> 13) & 0x1FFF) + 1; |
@@ -766,7 +772,6 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
766 | tmp = idx_value & ~(0x7 << 16); | 772 | tmp = idx_value & ~(0x7 << 16); |
767 | tmp |= tile_flags; | 773 | tmp |= tile_flags; |
768 | ib[idx] = tmp; | 774 | ib[idx] = tmp; |
769 | |||
770 | i = (reg - 0x4E38) >> 2; | 775 | i = (reg - 0x4E38) >> 2; |
771 | track->cb[i].pitch = idx_value & 0x3FFE; | 776 | track->cb[i].pitch = idx_value & 0x3FFE; |
772 | switch (((idx_value >> 21) & 0xF)) { | 777 | switch (((idx_value >> 21) & 0xF)) { |
@@ -1039,7 +1044,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
1039 | break; | 1044 | break; |
1040 | case 0x4d1c: | 1045 | case 0x4d1c: |
1041 | /* ZB_BW_CNTL */ | 1046 | /* ZB_BW_CNTL */ |
1042 | track->fastfill = !!(idx_value & (1 << 2)); | 1047 | track->zb_cb_clear = !!(idx_value & (1 << 5)); |
1043 | break; | 1048 | break; |
1044 | case 0x4e04: | 1049 | case 0x4e04: |
1045 | /* RB3D_BLENDCNTL */ | 1050 | /* RB3D_BLENDCNTL */ |
@@ -1051,11 +1056,13 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
1051 | break; | 1056 | break; |
1052 | /* fallthrough do not move */ | 1057 | /* fallthrough do not move */ |
1053 | default: | 1058 | default: |
1054 | printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n", | 1059 | goto fail; |
1055 | reg, idx); | ||
1056 | return -EINVAL; | ||
1057 | } | 1060 | } |
1058 | return 0; | 1061 | return 0; |
1062 | fail: | ||
1063 | printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n", | ||
1064 | reg, idx); | ||
1065 | return -EINVAL; | ||
1059 | } | 1066 | } |
1060 | 1067 | ||
1061 | static int r300_packet3_check(struct radeon_cs_parser *p, | 1068 | static int r300_packet3_check(struct radeon_cs_parser *p, |