From patchwork Thu Apr 18 08:42:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 2457931 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 1008A3FD8C for ; Thu, 18 Apr 2013 08:43:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2AFCAE6342 for ; Thu, 18 Apr 2013 01:43:40 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from outgoing.email.vodafone.de (outgoing.email.vodafone.de [139.7.28.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D72FE62BA for ; Thu, 18 Apr 2013 01:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=vodafone.de; h=from:to:subject:date:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=out; bh=yNpwhrQjFv7aM6kKmFjy0Cj2s58mzhhKRSmc9EuH5q0=; b=6e2bUzaA3l1lfwe2Y+6eujYdcabuQKZkZ9BmWVdjZj90uyqfbqMfQ7unHTOCOQjgEGl3yVnkoBbhGji05w2ixp3k5CYYAseUC3yzLQ+7xEqXrtvfP6KMraZleoI0D81xAGrPrCRUX2p/DeP35eGFrIxgfy2JGI/BBmxnCIlLEx4= X-Authentication-Info: Sender authenticated as deathsimple@vodafone.de (using DIGEST-MD5) Received: from dslb-084-060-234-163.pools.arcor-ip.net ([84.60.234.163] helo=laptop.amd.com envelope-sender=) by SMTPIN-01.smtp.email.vodafone.de with ESMTPA id 516FB1F9.25498.742771; Thu, 18 Apr 2013 10:42:33 +0200 From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/radeon: fix alignment of UVD fence Date: Thu, 18 Apr 2013 10:42:31 +0200 Message-Id: <1366274551-4967-2-git-send-email-deathsimple@vodafone.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366274551-4967-1-git-send-email-deathsimple@vodafone.de> References: <1366274551-4967-1-git-send-email-deathsimple@vodafone.de> MIME-Version: 1.0 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: , 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: Christian König Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_fence.c | 7 +++---- drivers/gpu/drm/radeon/radeon_uvd.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 82fe183..1a699ce 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -776,10 +776,9 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring) } else { /* put fence directly behind firmware */ - rdev->fence_drv[ring].cpu_addr = rdev->uvd.cpu_addr + - rdev->uvd_fw->size; - rdev->fence_drv[ring].gpu_addr = rdev->uvd.gpu_addr + - rdev->uvd_fw->size; + index = ALIGN(rdev->uvd_fw->size, 8); + rdev->fence_drv[ring].cpu_addr = rdev->uvd.cpu_addr + index; + rdev->fence_drv[ring].gpu_addr = rdev->uvd.gpu_addr + index; } } else { diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index 2fb4d6c..15580fb 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c @@ -107,7 +107,7 @@ int radeon_uvd_init(struct radeon_device *rdev) platform_device_unregister(pdev); - bo_size = RADEON_GPU_PAGE_ALIGN(rdev->uvd_fw->size + 4) + + bo_size = RADEON_GPU_PAGE_ALIGN(rdev->uvd_fw->size + 8) + RADEON_UVD_STACK_SIZE + RADEON_UVD_HEAP_SIZE; r = radeon_bo_create(rdev, bo_size, PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, NULL, &rdev->uvd.vcpu_bo);