From patchwork Tue Dec 21 20:27:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWFyZWsgT2zFocOhaw==?= X-Patchwork-Id: 424981 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBLKS6Ua030557 for ; Tue, 21 Dec 2010 20:28:32 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8699A9EAEE for ; Tue, 21 Dec 2010 12:28:06 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-fx0-f42.google.com (mail-fx0-f42.google.com [209.85.161.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 711589E8E4 for ; Tue, 21 Dec 2010 12:27:57 -0800 (PST) Received: by fxm11 with SMTP id 11so4382769fxm.15 for ; Tue, 21 Dec 2010 12:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=O+Yu71mJMyLsqCpuwcSCy6qetCsPDuF749q1gc68lnc=; b=goYAlajsFVYK2mBUfQttxmZgz/yO5Q9qgoc6t1Vr7pnLJgJc1tFcSY8+AOE+AiT9m6 4hmbTs9MeKOk3UKZ7DpN3JraSNFqeUWBtQHzxKF+OLh3Dc4GbH8uOe8SeVRRVVm7DaXr cx7MADIq9gntCyiWFIlizQ9MeGXjswMwa2Wws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=oXBEREW33ffzmrxUE+FkAdMGqRromMpsEhnC/VUrhA4Ry6DkLK+8H+tjUFuTMeO326 PGlElflAfRTJ9FIhkGyVCWCK5mA5kZPMX5We7Pbtiy3UmvaTHx6EACWjirn/9JZWbWbl Tck3Hhued3qVWnRgc1jgW3AtAG4a2fjEwwAWE= Received: by 10.223.70.193 with SMTP id e1mr5184435faj.91.1292963276373; Tue, 21 Dec 2010 12:27:56 -0800 (PST) Received: from localhost.localdomain (ip-89-103-73-143.net.upcbroadband.cz [89.103.73.143]) by mx.google.com with ESMTPS id n1sm1470105fam.16.2010.12.21.12.27.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Dec 2010 12:27:55 -0800 (PST) From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon/kms: add ARGB2101010 colorbuffer support for r500 Date: Tue, 21 Dec 2010 21:27:34 +0100 Message-Id: <1292963254-3603-1-git-send-email-maraeo@gmail.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 20:28:32 +0000 (UTC) X-MIME-Autoconverted: from base64 to 8bit by demeter1.kernel.org id oBLKS6Ua030557 diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index cde1d34..36b4f7b 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c @@ -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; diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index a2307c0..42c614c 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -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 - add r500 US_FORMAT regs + * - 2.8.0 - add r500 US_FORMAT regs + r500 ARGB2101010 colorbuf */ #define KMS_DRIVER_MAJOR 2 #define KMS_DRIVER_MINOR 8