From patchwork Tue Apr 21 20:16:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 6253031 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 369879F1C4 for ; Tue, 21 Apr 2015 20:18:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA6F2202EC for ; Tue, 21 Apr 2015 20:18:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E1DA202F0 for ; Tue, 21 Apr 2015 20:18:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756281AbbDUURu (ORCPT ); Tue, 21 Apr 2015 16:17:50 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:35234 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756303AbbDUURo (ORCPT ); Tue, 21 Apr 2015 16:17:44 -0400 Received: by pdbqd1 with SMTP id qd1so252326159pdb.2; Tue, 21 Apr 2015 13:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=nWEb7dV1aNsmwHAgf1uWDTnkuZ96tF9rzhxK40rh0NI=; b=mB85GMHM1V2XGG53+Rb26pUCn5dblxrW6mWSeLVrhi8QriZ058MDP/JAH6lgvLHQdN PW7fDxj29sVtMnzhdjA6FZ7tuLvUyuBjzr5HjWeZDkCTpB4rbOTWUpZNWViYKseoNH6D HIfAUboxJo0DZmOBHLi7BsCVff87zMuJ9qC36WfUIFDzjHPUCsFrjkHpfnRX874BKmU/ +tVbSlBVi8hcQDfNzut/ljJEo329x30HBlkSms/HDkmQ5cPjhQi5mxAp9LGUvcQwNFR3 QYZfIXujc6qM7JJ74tjJl3pzvnQ2bRZnhTMDy5HM8FTvHbjRw8IAgvuC5HSbC7CGnYvo nWIw== X-Received: by 10.70.63.1 with SMTP id c1mr40724212pds.90.1429647464308; Tue, 21 Apr 2015 13:17:44 -0700 (PDT) Received: from mcgrof@gmail.com (c-98-234-145-61.hsd1.ca.comcast.net. [98.234.145.61]) by mx.google.com with ESMTPSA id f1sm2868576pds.62.2015.04.21.13.17.41 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 21 Apr 2015 13:17:43 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Tue, 21 Apr 2015 13:17:41 -0700 From: "Luis R. Rodriguez" To: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com Cc: linux-fbdev@vger.kernel.org, luto@amacapital.net, cocci@systeme.lip6.fr, "Luis R. Rodriguez" , Sudip Mukherjee , Geert Uytterhoeven , Laurent Pinchart , Jingoo Han , Suresh Siddha , Ingo Molnar , Thomas Gleixner , Juergen Gross , Daniel Vetter , Dave Airlie , Antonino Daplas , linux-geode@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 17/17] video: fbdev: geode gxfb: use ioremap_wc() for framebuffer Date: Tue, 21 Apr 2015 13:16:38 -0700 Message-Id: <1429647398-16983-18-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1429647398-16983-1-git-send-email-mcgrof@do-not-panic.com> References: <1429647398-16983-1-git-send-email-mcgrof@do-not-panic.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Luis R. Rodriguez" The driver doesn't use mtrr_add() or arch_phys_wc_add() but since we know the framebuffer is isolated already on an ioremap() we can take advantage of write combining for performance where possible. In this case there are a few motivations for this: a) Take advantage of PAT when available b) Help with the goal of eventually using _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit de33c442e titled "x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()") Cc: Sudip Mukherjee Cc: Geert Uytterhoeven Cc: Laurent Pinchart Cc: Jingoo Han Cc: Suresh Siddha Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Juergen Gross Cc: Daniel Vetter Cc: Andy Lutomirski Cc: Dave Airlie Cc: Antonino Daplas Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: linux-geode@lists.infradead.org Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez --- drivers/video/fbdev/geode/gxfb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/geode/gxfb_core.c b/drivers/video/fbdev/geode/gxfb_core.c index 124d7c7..ec9fc9a 100644 --- a/drivers/video/fbdev/geode/gxfb_core.c +++ b/drivers/video/fbdev/geode/gxfb_core.c @@ -263,7 +263,8 @@ static int gxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev) info->fix.smem_start = pci_resource_start(dev, 0); info->fix.smem_len = vram ? vram : gx_frame_buffer_size(); - info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); + info->screen_base = ioremap_wc(info->fix.smem_start, + info->fix.smem_len); if (!info->screen_base) return -ENOMEM;