aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r300.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-21 04:14:25 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-21 04:14:25 -0400
commit87eb367003887cdc81a5d183efea227b5b488961 (patch)
tree40f617e25a9364d573e3cd2189c9e7fa56c8a0fe /drivers/gpu/drm/radeon/r300.c
parentccb7c7732e2ceb4e81a7806faf1670be9681ccd2 (diff)
parent05d17608a69b3ae653ea5c9857283bef3439c733 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-6000.c net/core/dev.c
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r--drivers/gpu/drm/radeon/r300.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 2b9affe754ce..bd75f99bd65e 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -730,6 +730,12 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
730 /* VAP_VF_MAX_VTX_INDX */ 730 /* VAP_VF_MAX_VTX_INDX */
731 track->max_indx = idx_value & 0x00FFFFFFUL; 731 track->max_indx = idx_value & 0x00FFFFFFUL;
732 break; 732 break;
733 case 0x2088:
734 /* VAP_ALT_NUM_VERTICES - only valid on r500 */
735 if (p->rdev->family < CHIP_RV515)
736 goto fail;
737 track->vap_alt_nverts = idx_value & 0xFFFFFF;
738 break;
733 case 0x43E4: 739 case 0x43E4:
734 /* SC_SCISSOR1 */ 740 /* SC_SCISSOR1 */
735 track->maxy = ((idx_value >> 13) & 0x1FFF) + 1; 741 track->maxy = ((idx_value >> 13) & 0x1FFF) + 1;
@@ -767,7 +773,6 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
767 tmp = idx_value & ~(0x7 << 16); 773 tmp = idx_value & ~(0x7 << 16);
768 tmp |= tile_flags; 774 tmp |= tile_flags;
769 ib[idx] = tmp; 775 ib[idx] = tmp;
770
771 i = (reg - 0x4E38) >> 2; 776 i = (reg - 0x4E38) >> 2;
772 track->cb[i].pitch = idx_value & 0x3FFE; 777 track->cb[i].pitch = idx_value & 0x3FFE;
773 switch (((idx_value >> 21) & 0xF)) { 778 switch (((idx_value >> 21) & 0xF)) {
@@ -1052,11 +1057,13 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
1052 break; 1057 break;
1053 /* fallthrough do not move */ 1058 /* fallthrough do not move */
1054 default: 1059 default:
1055 printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n", 1060 goto fail;
1056 reg, idx);
1057 return -EINVAL;
1058 } 1061 }
1059 return 0; 1062 return 0;
1063fail:
1064 printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n",
1065 reg, idx);
1066 return -EINVAL;
1060} 1067}
1061 1068
1062static int r300_packet3_check(struct radeon_cs_parser *p, 1069static int r300_packet3_check(struct radeon_cs_parser *p,