From patchwork Wed Oct 7 07:20:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Svensson X-Patchwork-Id: 7342931 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 AA8F59F32B for ; Wed, 7 Oct 2015 07:21:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CFEFE204FC for ; Wed, 7 Oct 2015 07:21:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D610A204E4 for ; Wed, 7 Oct 2015 07:21:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbbJGHUe (ORCPT ); Wed, 7 Oct 2015 03:20:34 -0400 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:19405 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbbJGHU3 (ORCPT ); Wed, 7 Oct 2015 03:20:29 -0400 From: Lars Svensson To: , , , CC: , , , , , Lars Svensson Subject: [PATCH v3 3/3] staging: fbtft: access screen buffer directly Date: Wed, 7 Oct 2015 09:20:14 +0200 Message-ID: <1444202414-21271-3-git-send-email-lars1.svensson@sonymobile.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1444202414-21271-1-git-send-email-lars1.svensson@sonymobile.com> References: <1444202414-21271-1-git-send-email-lars1.svensson@sonymobile.com> MIME-Version: 1.0 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 In fbtft-bus.c:fbtft_write_vmem16_bus9(), ioread8() is used for accessing the provided screen array. Since screen_buffer actually points to an ordinary buffer, instead access it directly. Signed-off-by: Lars Svensson --- drivers/staging/fbtft/fbtft-bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index f5a36a4..04efe90 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -184,7 +184,7 @@ EXPORT_SYMBOL(fbtft_write_vmem16_bus8); /* 16 bit pixel over 9-bit SPI bus: dc + high byte, dc + low byte */ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len) { - u8 __iomem *vmem8; + u8 *vmem8; u16 *txbuf16 = par->txbuf.buf; size_t remain; size_t to_copy; @@ -212,12 +212,12 @@ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len) #ifdef __LITTLE_ENDIAN for (i = 0; i < to_copy; i += 2) { - txbuf16[i] = 0x0100 | ioread8(vmem8 + i + 1); - txbuf16[i + 1] = 0x0100 | ioread8(vmem8 + i); + txbuf16[i] = 0x0100 | vmem8[i + 1]; + txbuf16[i + 1] = 0x0100 | vmem8[i]; } #else for (i = 0; i < to_copy; i++) - txbuf16[i] = 0x0100 | ioread8(vmem8 + i); + txbuf16[i] = 0x0100 | vmem8[i]; #endif vmem8 = vmem8 + to_copy; ret = par->fbtftops.write(par, par->txbuf.buf, to_copy*2);