From: Lars Svensson <lars1.svensson@sonymobile.com>
To: thomas.petazzoni@free-electrons.com, noralf@tronnes.org,
plagnioj@jcrosoft.com, tomi.valkeinen@ti.com
Cc: linux-fbdev@vger.kernel.org, gregkh@linuxfoundation.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
dan.carpenter@oracle.com,
Lars Svensson <lars1.svensson@sonymobile.com>
Subject: [PATCH v3 3/3] staging: fbtft: access screen buffer directly
Date: Wed, 07 Oct 2015 07:20:14 +0000 [thread overview]
Message-ID: <1444202414-21271-3-git-send-email-lars1.svensson@sonymobile.com> (raw)
In-Reply-To: <1444202414-21271-1-git-send-email-lars1.svensson@sonymobile.com>
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 <lars1.svensson@sonymobile.com>
---
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);
--
2.4.2
next prev parent reply other threads:[~2015-10-07 7:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 7:20 [PATCH v3 1/3] fb.h: Provide alternate screen_base pointer Lars Svensson
2015-10-07 7:20 ` [PATCH v3 2/3] staging: fbtft: use alternate screen pointer Lars Svensson
2015-10-07 7:20 ` Lars Svensson [this message]
2015-10-07 7:42 ` [PATCH v3 1/3] fb.h: Provide alternate screen_base pointer Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444202414-21271-3-git-send-email-lars1.svensson@sonymobile.com \
--to=lars1.svensson@sonymobile.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=plagnioj@jcrosoft.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).