From patchwork Fri Sep 21 20:23:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Stellard X-Patchwork-Id: 1493261 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 588673FCFC for ; Fri, 21 Sep 2012 20:24:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 554D69F376 for ; Fri, 21 Sep 2012 13:24:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from hapkido.dreamhost.com (hapkido.dreamhost.com [66.33.216.122]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E0EE9F0EB for ; Fri, 21 Sep 2012 13:23:45 -0700 (PDT) Received: from homiemail-a86.g.dreamhost.com (caiajhbdccah.dreamhost.com [208.97.132.207]) by hapkido.dreamhost.com (Postfix) with ESMTP id BACDE1910 for ; Fri, 21 Sep 2012 13:23:44 -0700 (PDT) Received: from homiemail-a86.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a86.g.dreamhost.com (Postfix) with ESMTP id 02B1336006D; Fri, 21 Sep 2012 13:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=stellard.net; h=from:to:cc :subject:date:message-id; s=stellard.net; bh=TB5D9pv2SX/QFf52/Y8 rFina2Cs=; b=ma4MFvix1IzvO28ZGTNsSb65aV7BLlujrCQDzyiaTxpUZBbX0uC XwF9HsbgZeO/aTsT3eRk9pADyX0ZH96R4A32rohnrROKUKIdxH84enLT6SemRhIs RQ2MjjZSx8ACWhS4Y4MDDY13FW5YCECoBWw75n0w7/QDOZx9bF3b+wFo= Received: from llano-foss.amd.com (unknown [165.204.55.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: tom@stellard.net) by homiemail-a86.g.dreamhost.com (Postfix) with ESMTPSA id 87E1336005C; Fri, 21 Sep 2012 13:23:42 -0700 (PDT) From: Tom Stellard To: dri-devel@lists.freedesktop.org Subject: [PATCH] radeon: Allow N x 1 x 1 surfaces for evergreen+ Date: Fri, 21 Sep 2012 20:23:13 +0000 Message-Id: <1348258993-15154-1-git-send-email-tom@stellard.net> X-Mailer: git-send-email 1.7.11.4 Cc: Tom Stellard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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 From: Tom Stellard This makes it possible to create a surface for a buffer. --- radeon/radeon_surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index 80b1505..235f4ae 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -686,7 +686,8 @@ static int eg_surface_sanity(struct radeon_surface_manager *surf_man, unsigned tileb; /* check surface dimension */ - if (surf->npix_x > 16384 || surf->npix_y > 16384 || surf->npix_z > 16384) { + if ((surf->npix_x > 16384 && (surf->npix_y != 1 || surf->npix_z != 1)) || + surf->npix_y > 16384 || surf->npix_z > 16384) { return -EINVAL; }