View Single Post
Old 12-09-2012, 09:50 PM   #812
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by eureka View Post
ioctl command value for updating also was different, I believe: 0x4040462e (or, at least, it's so in geekmaster's video player).
This value 0x4040462e is perfectly fit to value of macro MXCFB_SEND_UPDATE, defined in include/mxcfb.h. It's not the discovery, but now I know why ioctl value was changed in 5.1.0: just because of changed update structure size.

I suggest to update include/mxcfb.h with the following addition (belonged to public domain):
Code:
// Starting from firmware version 5.1.0, framebuffer update structure
// (actual for Kindle Touch and then Kindle Paperwhite) was changed
// and so appropriate update ioctl value.
#define MXCFB_SEND_UPDATE51 _IOW('F', 0x2E, struct mxcfb_update_data51)
Then just use MXCFB_SEND_UPDATE51 instead of raw value 0x4048462e in function kindlePWeinkUpdate().

(Related macros -- _IOW etc. -- could be found in include/asm-generic/ioctl.h from Kindle kernel source, or online. Two new __u32 members of update structure, i.e. 8 bytes, lead to change of 40 to 48).

UPD: OK, now I understand why you are using raw value -- to avoid dependency on that ioctl.h from kernel source. Still, it would be useful at least add comment about how this raw value was calculated.

Last edited by eureka; 12-09-2012 at 10:11 PM. Reason: add online view of include/asm-generic/ioctl.h
eureka is offline   Reply With Quote