![]() |
#31 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Ahh... Freescale linux documentation package contains many files, including mx50_linux.pdf, chapter 14 "Electrophoretic Display Controller (EPDC) Frame Buffer Driver".
![]() RTFM is *SO* much easier when you know *WHICH* FM to read! ![]() |
![]() |
![]() |
![]() |
#32 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
As in:
http://www.freescale.com/webapp/sps/...?code=IMX50_SW EDIT: I posted that link prior to checking its content, although not the exact manual, that page link might still be useful to someone. So I didn't not delete the O.T. link above. Ref in: https://www.mobileread.com/forums/sho...2&postcount=18 Last edited by knc1; 05-01-2012 at 09:32 PM. |
![]() |
![]() |
![]() |
#33 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
The problem is that I tried all the options and variations given in the manual and NONE of them work in 5.1.0. Using strace on eips shows that it is setting an undocumented bit in the call, but when I set that bit it does not help either. The ONLY way I can trigger updates on 5.1.0 is eips '' even though the ioctl as documented in the manual works on 5.0.4 main and diags, and also on the K4 diags. The problem with eips is that I want to do small area updates, and updates from alternate overlay buffers, and although eips complains about "invalid overlay image" for some options, I do not know how to use it for that purpose. |
|
![]() |
![]() |
![]() |
#34 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
The "marker" I mentioned in a previous post is an arbitrary value you set in an update call, which gets queued up to 20 levels deep, then you can later set a bit for a BLOCKING call waiting for io competion on an update-in-progress using the specified update marker.
There are 16 pixel processors updating those regions in parallel, and although each region can take up to 300 msec to complete, the manual says the eink display can be updated at 48Hz (16 non-overlapping regions @ 300 msec each). So for the best control, you need to identify your updates with unique markers, then wait on each one before updating again. I suspect you identify regions like specific buttons. EDIT: Above info is for Freescale eink controller embedded in i.MX508 SoC used in K4 and K5. The K3 uses an external epson broadsheet controller chip with much less capability. ![]() Last edited by geekmaster; 05-01-2012 at 10:43 PM. |
![]() |
![]() |
![]() |
#35 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Perhaps the reason I cannot find any of the useful lab126 custom ioctl stuff in the gpl code is because there is a large folder full of PATCHES, and a script to apply them... Maybe the code would make more sense if it was pathched to match what is in the kindle... ?
EDIT: No, those patches were already applied. They are for patching the generic kernel code if you download it. Downloading 5.1.0 source now, to see if diffs that could break the ioctl(), or at least what changed... Perhaps one of their patches makes it incompatible with the freescale reference manual... ![]() ![]() Last edited by geekmaster; 05-02-2012 at 05:54 AM. |
![]() |
![]() |
![]() |
#36 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
From your description of what "MARKER" does (acts like a token to select which one of the multiple pix processing "jobs" to send the ioctl to)...
Maybe the only change is that before 5.1 there was only one MARKER(token) in use by the Amazon application - the one which you where using in your code. And that now, starting with 5.1 the Amazon application is using more than that single MARKER(token). I.E: Maybe 5.1 just marks the point where the Amazon application started to use the multiple pixel processing feature. Not a actual change in the source code of how the ioctl() is handled, a change in the propriatary Amazon code. Just some additional thoughts, in case you don't find anything of significance in the 5.1 diff's |
![]() |
![]() |
![]() |
#37 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
The only exception is marker value zero. According to several different websites, update marker value zero has a special use -- it crashes the driver. ![]() ![]() |
|
![]() |
![]() |
![]() |
#38 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
What symbol name did they give that value in the header file? ECRASHEBURN ?? FLAMEOUT ?? |
|
![]() |
![]() |
![]() |
#39 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
They added this new "anti-crash-and-burn" code to the 5.1.0 eink kernel driver:
/* 0 is an invalid update_marker value */ if (update_marker == 0) return -EINVAL; They added a lot more mutex locks, and for existing locks they moved a chunk of code to the OTHER side of the lock (either before or after) in many places. And they have a lot more eink powerup and powerdown calls scattered in it too... |
![]() |
![]() |
![]() |
#40 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
The new 5.1.0 eink drivers add a new eink update mode. It is 1bbp (pure black and pure white) and they named it mode AU, which in the comments calls it "ANIMATION UPDATE MODE". Hmm... I wonder if they got that idea from the mobileread forums...
![]() EDIT: I found a reference to "animation update mode" in eink_panel.c for 5.0.0 -- apparently they added it to more source modules now, so perhaps they plan to use it some time in the future. It is still missing from mxcfb.h though... ![]() Last edited by geekmaster; 05-02-2012 at 03:08 PM. |
![]() |
![]() |
![]() |
#41 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I see that the eink waveform modes in the mxcfb.h file DO NOT match the new update modes in the eink_panel.c file. Sadly, the new mode was added to the MIDDLE of the table, not the end. Perhaps this is why I can do ioctl() eink updates on everything EXCEPT 5.0.1, and why eips is setting an extra "undefined" bit in the ioctl() call...
EDIT: I see that they added this to magic.h: #define UNIONFS_SUPER_MAGIC 0xf15f083d New unionfs support? ![]() Last edited by geekmaster; 05-02-2012 at 03:26 PM. |
![]() |
![]() |
![]() |
#42 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
@GM - I am sure you know this one, but for some of the other readers of the tech. details in this thread:
|
![]() |
![]() |
![]() |
#43 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Is that Richard Stallman in the left chair? And the guy with his back to the "camera" looks a lot like Bill Gates, right? But then who are the other two guys? ![]() Last edited by geekmaster; 05-03-2012 at 03:11 PM. |
|
![]() |
![]() |
![]() |
#44 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I discovered (the hard way, later confirmed in GPL source code) that although the K4 and K5 use an 8-bit eink framebuffer, the pixels inside it must still be packed two pixels per byte JUST LIKE for the K3 and earlier. The only difference is that each byte must contain the SAME 4-bit value in both packed pixel positions. In other words, the values in these bytes are 4-bit values multiplied by 17 (which copies the bottom 4-bits to the top 4-bits).
According to GPL source code for the K5 eink drivers, some eink panels REQUIRE that the bottom 4-bits be identical to the top 4-bits or strange behavior can be expected (as can be seen in my screenshots for my paldemo program in another thread). I added the "(c>>4)*17" term to my blitter function and it works a lot better now... That also explains why we need to dither the framebuffer even for "8-bit grayscale" mode... Also, when I updated it, I converted my dither tables to logical expressions using Karnaugh maps, and added the dither terms to my "dither/pack/blit" function. Interestingly, it now runs FASTER than when it used a dither lookup table -- cache effects, no doubt. Modern CPUs are MUCH faster than memory accesses in many cases. Back in the day, pre-computed lookup tables were THE WAY to optimize code, but these days it is often much faster to do real-time computation instead of memory accesses, even on embedded processors like we have in the kindles. ![]() Last edited by geekmaster; 05-03-2012 at 10:51 AM. |
![]() |
![]() |
![]() |
#45 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
This is a really old cartoon, I forget how old but probably mid-90s. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
geekmaster vacation | geekmaster | Kindle Developer's Corner | 2 | 03-19-2012 09:18 PM |