mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
update mxcfb_alt_buffer_data struct, added MXCFB_SEND_UPDATE51
* mxcfb_alt_buffer_data is modified according to amazon's source * use MXCFB_SEND_UPDATE51 instead of magic raw number for update
This commit is contained in:
4
einkfb.c
4
einkfb.c
@@ -108,7 +108,7 @@ inline void fillMxcfbUpdateData51(mxcfb_update_data51 *myarea, FBInfo *fb, lua_S
|
||||
myarea->hist_gray_waveform_mode = 0;
|
||||
myarea->temp = 0x1001;
|
||||
myarea->flags = 0;
|
||||
myarea->alt_buffer_data.virt_addr = NULL;
|
||||
/*myarea->alt_buffer_data.virt_addr = NULL;*/
|
||||
myarea->alt_buffer_data.phys_addr = NULL;
|
||||
myarea->alt_buffer_data.width = 0;
|
||||
myarea->alt_buffer_data.height = 0;
|
||||
@@ -141,7 +141,7 @@ void kindle51einkUpdate(FBInfo *fb, lua_State *L) {
|
||||
fb4BppTo8Bpp(fb);
|
||||
fillMxcfbUpdateData51(&myarea, fb, L);
|
||||
|
||||
ioctl(fb->fd, 0x4048462e, &myarea);
|
||||
ioctl(fb->fd, MXCFB_SEND_UPDATE51, &myarea);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
/*
|
||||
* Copyright 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
*
|
||||
* Modified by houqp, added mxcfb_update_data51 struct from GeekMaster's video
|
||||
* player, refer to:
|
||||
* http://www.mobileread.com/forums/showthread.php?t=177455&page=10
|
||||
*/
|
||||
|
||||
/*
|
||||
* - Modified by houqp, added mxcfb_update_data51 struct from GeekMaster's
|
||||
* video player, refer to:
|
||||
* http://www.mobileread.com/forums/showthread.php?t=177455&page=10
|
||||
*
|
||||
* - Modified mxcfb_alt_buffer_data struct according to include/linux/mxcfb.h
|
||||
* from Kindle 5.3.0 firmware. Thanks to eureka@mobileread.
|
||||
* http://www.mobileread.com/forums/showpost.php?p=2337118&postcount=818
|
||||
*
|
||||
*
|
||||
* The code contained herein is licensed under the GNU Lesser General
|
||||
* Public License. You may obtain a copy of the GNU Lesser General
|
||||
* Public License Version 2.1 or later at the following locations:
|
||||
@@ -96,7 +99,8 @@ struct mxcfb_rect {
|
||||
#define FB_TEMP_AUTO_UPDATE_DISABLE -1
|
||||
|
||||
struct mxcfb_alt_buffer_data {
|
||||
void *virt_addr;
|
||||
/* virt_addr is not included in amazon's source */
|
||||
/* void *virt_addr; */
|
||||
__u32 phys_addr;
|
||||
__u32 width; /* width of entire buffer */
|
||||
__u32 height; /* height of entire buffer */
|
||||
@@ -168,6 +172,9 @@ struct mxcfb_waveform_modes {
|
||||
#define MXCFB_SET_TEMP_AUTO_UPDATE_PERIOD _IOR('F', 0x36, int32_t)
|
||||
#define MXCFB_SET_MERGE_ON_WAVEFORM_MISMATCH _IOW('F', 0x37, int32_t)
|
||||
|
||||
/* IOCTLs for E-ink panel updates, kindle firmware version >= 5.1 */
|
||||
#define MXCFB_SEND_UPDATE51 _IOW('F', 0x2E, struct mxcfb_update_data51)
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
extern struct fb_videomode mxcfb_modedb[];
|
||||
|
||||
Reference in New Issue
Block a user