From patchwork Fri May 3 23:00:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Lutomirski X-Patchwork-Id: 2519951 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 919D13FCA5 for ; Fri, 3 May 2013 23:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934258Ab3ECXCB (ORCPT ); Fri, 3 May 2013 19:02:01 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:58978 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934268Ab3ECXBD (ORCPT ); Fri, 3 May 2013 19:01:03 -0400 Received: by mail-pa0-f41.google.com with SMTP id rl6so1161563pac.28 for ; Fri, 03 May 2013 16:01:02 -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=9eP7o6BMc5nBv71d3kJ4L6dXb2HoA5rds1uj7p27diY=; b=eeapH5jhqJVeZ4rYPRMn0bDG6gbIDJZ1k1jGo9jNU3leQcShMqLOI8bj5UYaPfQSfW WIqCD7VILzfx8iBrpdpQbYzKWlpJCAZP888Rdkj7yzPfTdmcCwjOs6/N3oxG1U7UX+jr swxWDR+OP8IKRKxYvcdY9jhMZHVbDbInThbiBS9Shj6xZhYn2/fr78PHX3DZvjdmRleH 0OVHosqpg4dwM81+yzG3uN89lIoGPBAL9WSa+zdfeQ8aDOiN/uJ4AsdU2HTVNWnKn6rq 8dzG84yJ7fJpxl0giaa9soM00TqAxWHgL0f6K7K0a8MtrmpK8VKUtxfdXinNPT9+h10b 0sTA== X-Received: by 10.66.148.201 with SMTP id tu9mr16621173pab.56.1367622062598; Fri, 03 May 2013 16:01:02 -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 k2sm14538208pat.7.2013.05.03.16.01.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 03 May 2013 16:01:01 -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 4/7] drm: Use drm_mtrr_add_wc for the AGP aperture Date: Fri, 3 May 2013 16:00:32 -0700 Message-Id: X-Mailer: git-send-email 1.8.1.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQk1M6fmRdwdN8097ro+SEoanNKsC7J4uvWiUx4y/xJwSDXEqm4Z/DkdIDlvSBfHT60NFUOr 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/drm_pci.c | 8 ++++---- drivers/gpu/drm/drm_stub.c | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index bd719e9..3628683 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -278,10 +278,10 @@ int drm_pci_agp_init(struct drm_device *dev) } if (drm_core_has_MTRR(dev)) { if (dev->agp) - dev->agp->agp_mtrr = - mtrr_add(dev->agp->agp_info.aper_base, - dev->agp->agp_info.aper_size * - 1024 * 1024, MTRR_TYPE_WRCOMB, 1); + dev->agp->agp_mtrr = drm_mtrr_add_wc( + dev->agp->agp_info.aper_base, + dev->agp->agp_info.aper_size * + 1024 * 1024); } } return 0; diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 7d30802..96e21bd 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -451,14 +451,8 @@ void drm_put_dev(struct drm_device *dev) drm_lastclose(dev); - if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && - dev->agp && dev->agp->agp_mtrr >= 0) { - int retval; - retval = mtrr_del(dev->agp->agp_mtrr, - dev->agp->agp_info.aper_base, - dev->agp->agp_info.aper_size * 1024 * 1024); - DRM_DEBUG("mtrr_del=%d\n", retval); - } + if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && dev->agp) + drm_mtrr_del_wc(dev->agp->agp_mtrr); if (dev->driver->unload) dev->driver->unload(dev);