drm/radeon/kms: add ARGB2101010 colorbuffer support for r500
authorMarek Olšák <maraeo@gmail.com>
Tue, 21 Dec 2010 20:27:34 +0000 (21:27 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 21 Dec 2010 23:54:39 +0000 (09:54 +1000)
This should be part of DRM 2.8.0.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/radeon_drv.c

index cde1d3480d932c55ae33855c3a2336eadfe9ab54..36b4f7b48d6aa9eec29108fb282a7270db82bc4a 100644 (file)
@@ -787,6 +787,13 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
                case 15:
                        track->cb[i].cpp = 2;
                        break;
+               case 5:
+                       if (p->rdev->family < CHIP_RV515) {
+                               DRM_ERROR("Invalid color buffer format (%d)!\n",
+                                         ((idx_value >> 21) & 0xF));
+                               return -EINVAL;
+                       }
+                       /* Pass through. */
                case 6:
                        track->cb[i].cpp = 4;
                        break;
index 6fb1218f9d76fbd862e567fa3f8a12c9dc8fdbea..520b776b09f4779086edeec5801fc4e4a2d43f56 100644 (file)
@@ -48,7 +48,7 @@
  * - 2.5.0 - add get accel 2 to work around ddx breakage for evergreen
  * - 2.6.0 - add tiling config query (r6xx+), add initial HiZ support (r300->r500)
  *   2.7.0 - fixups for r600 2D tiling support. (no external ABI change), add eg dyn gpr regs
- *   2.8.0 - pageflip support, r500 US_FORMAT regs.
+ *   2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf
  */
 #define KMS_DRIVER_MAJOR       2
 #define KMS_DRIVER_MINOR       8