BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
3ad95e08
Commit
3ad95e08
authored
Mar 15, 2019
by
David Frey
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'thong/eink_revertbits'
parents
81304453
7931c7b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
fb_waveshare_eink.c
...l/waveshare_eink/linux_kernel_modules/fb_waveshare_eink.c
+16
-1
No files found.
experimental/waveshare_eink/linux_kernel_modules/fb_waveshare_eink.c
View file @
3ad95e08
...
...
@@ -17,6 +17,7 @@
#include <linux/rmap.h>
#include <linux/pagemap.h>
#include <linux/device.h>
#include <linux/bitrev.h>
#include "fb_waveshare_eink.h"
...
...
@@ -339,6 +340,8 @@ static int ws_eink_init_display(struct ws_eink_fb_par *par)
static
int
ws_eink_update_display
(
struct
ws_eink_fb_par
*
par
)
{
int
ret
=
0
;
int
i
;
int
frame_size
;
u8
*
vmem
=
par
->
info
->
screen_base
;
u8
*
ssbuf
=
par
->
ssbuf
;
const
u8
*
lut
;
...
...
@@ -358,7 +361,13 @@ static int ws_eink_update_display(struct ws_eink_fb_par *par)
if
(
ret
)
return
ret
;
memcpy
(
&
ssbuf
,
&
vmem
,
sizeof
(
vmem
));
frame_size
=
par
->
props
->
height
*
par
->
props
->
width
*
par
->
props
->
bpp
/
8
;
memcpy
(
ssbuf
,
vmem
,
frame_size
);
for
(
i
=
0
;
i
<
frame_size
;
i
++
)
{
ssbuf
[
i
]
=
bitrev8
(
ssbuf
[
i
]);
}
ret
=
set_frame_memory
(
par
,
ssbuf
);
if
(
ret
)
...
...
@@ -507,6 +516,7 @@ static int ws_eink_spi_probe(struct spi_device *spi)
const
struct
waveshare_eink_device_properties
*
dev_props
;
struct
ws_eink_fb_par
*
par
;
u8
*
vmem
;
u8
*
ssbuf
;
int
vmem_size
;
pdata
=
spi
->
dev
.
platform_data
;
...
...
@@ -533,6 +543,10 @@ static int ws_eink_spi_probe(struct spi_device *spi)
if
(
!
vmem
)
return
-
ENOMEM
;
ssbuf
=
vzalloc
(
vmem_size
);
if
(
!
ssbuf
)
return
-
ENOMEM
;
info
=
framebuffer_alloc
(
sizeof
(
struct
ws_eink_fb_par
),
&
spi
->
dev
);
if
(
!
info
)
{
retval
=
-
ENOMEM
;
...
...
@@ -570,6 +584,7 @@ static int ws_eink_spi_probe(struct spi_device *spi)
par
->
rst
=
pdata
->
rst_gpio
;
par
->
dc
=
pdata
->
dc_gpio
;
par
->
busy
=
pdata
->
busy_gpio
;
par
->
ssbuf
=
ssbuf
;
retval
=
register_framebuffer
(
info
);
if
(
retval
<
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment