From patchwork Fri May 3 23:00:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Lutomirski X-Patchwork-Id: 2519931 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2CAE23FCA5 for ; Fri, 3 May 2013 23:01:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934407Ab3ECXBh (ORCPT ); Fri, 3 May 2013 19:01:37 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:62270 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934395Ab3ECXBJ (ORCPT ); Fri, 3 May 2013 19:01:09 -0400 Received: by mail-pd0-f176.google.com with SMTP id x10so1128705pdj.21 for ; Fri, 03 May 2013 16:01:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=/UGntzudiDUJ7A8+s17vpCCOkC75q33tm1aAVibSdGw=; b=f+L6nzd6zHNCw/kvPNRUJk1rFryCCPSU+AFLTh96noGQnkcmvrEonyutBe0CnCmFGR fQymKDE6JK3rNYT8DojErBDV8O0725oidK+lTCIKE/79Vl8d5vEl2TDzkrkTfPqU+cfw ZCTnddWvrn22BC+OBh3ryZ+nQNVGS5jPBH9ZGGic/PfiR2da/5NdDzVdMAP6PpPy/XF6 ZHm/Bzsycl0BSVylyyJ+HhO0VMtXvsEIXcmbN+t3hUwJyjWLfpheGCuONLaLVUfnciFa 3aylmfrNqXAAahodGPwhAOalQHaSdbXp3508nfmgKGWXhX0EASEV/ZwdwxwAZQRpaVSS GvaQ== X-Received: by 10.68.177.33 with SMTP id cn1mr15856213pbc.189.1367622068802; Fri, 03 May 2013 16:01:08 -0700 (PDT) Received: from localhost (50-76-60-73-ip-static.hfc.comcastbusiness.net. [50.76.60.73]) by mx.google.com with ESMTPSA id t1sm14520664pab.12.2013.05.03.16.01.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 03 May 2013 16:01:08 -0700 (PDT) From: Andy Lutomirski To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Cc: Andy Lutomirski Subject: [PATCH 6/7] radeon: Switch to drm_mtrr_add_wc and add a missing drm_mtrr_del_wc Date: Fri, 3 May 2013 16:00:34 -0700 Message-Id: <134d5e30d48f0355d1558597333aab2a680dfbdd.1367621039.git.luto@amacapital.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQm20dJLKqrhT8Wbmr0b3TUMiKIE7DcVoKgZNWlyimSyIGiWt42txXvGudgs4lJiq4CBiWVg Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Signed-off-by: Andy Lutomirski --- drivers/gpu/drm/radeon/radeon_object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index d3aface..01d4906 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -321,8 +321,8 @@ void radeon_bo_force_delete(struct radeon_device *rdev) int radeon_bo_init(struct radeon_device *rdev) { /* Add an MTRR for the VRAM */ - rdev->mc.vram_mtrr = mtrr_add(rdev->mc.aper_base, rdev->mc.aper_size, - MTRR_TYPE_WRCOMB, 1); + rdev->mc.vram_mtrr = drm_mtrr_add_wc(rdev->mc.aper_base, + rdev->mc.aper_size); DRM_INFO("Detected VRAM RAM=%lluM, BAR=%lluM\n", rdev->mc.mc_vram_size >> 20, (unsigned long long)rdev->mc.aper_size >> 20); @@ -334,6 +334,7 @@ int radeon_bo_init(struct radeon_device *rdev) void radeon_bo_fini(struct radeon_device *rdev) { radeon_ttm_fini(rdev); + drm_mtrr_del_wc(rdev->mc.vram_mtrr); } void radeon_bo_list_add_object(struct radeon_bo_list *lobj,