diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/r300.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 15 |
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; |
1063 | fail: | ||
1064 | printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n", | ||
1065 | reg, idx); | ||
1066 | return -EINVAL; | ||
1060 | } | 1067 | } |
1061 | 1068 | ||
1062 | static int r300_packet3_check(struct radeon_cs_parser *p, | 1069 | static int r300_packet3_check(struct radeon_cs_parser *p, |