View Single Post
Old 12-09-2012, 06:43 PM   #811
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by eureka View Post
BTW, upto 5.1.0 (not including 5.1.0), KT had slightly different screen update structure:ioctl command value for updating also was different, I believe: 0x4040462e (or, at least, it's so in geekmaster's video player).

I don't think there are still owners of pre-5.1.0 devices, so it's just an interesting fact. But if you want to differentiate pre-5.1.0 devices: firmware version could be read from /etc/prettyversion.txt on device.

P.S. Oh, I see this "old" structure is already present in include/mxcfb.h as mxcfb_update_data.
I copied the relevant portions of eink_fb.h (for K3 support) and multiple versions of mxc_fb.h (5.0.x and 5.1.x) into my code. You cannot include all files, because they define DIFFERENT incompatible versions of the SAME ioctl structure name...

By copying parts of both includes and including neither of them, my code was able to support for 5.0.x and 5.1.x ioctl calls (and also K3, and K4 main and diags).

More details can be seen at the "discovering" link provided by eureka above.

I also made my code fall back to an eips call if the ioctl() calls fail, just in case the eink ioctl structures change again in some future firmware version. It adds a little robustness to the program, to postpone bit-rot awhile longer...

Last edited by geekmaster; 12-09-2012 at 06:50 PM.
geekmaster is offline   Reply With Quote