![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
xepdmgr algorithms dicussion thread
Hi! Hansel suggested opening another thread for discussing improvements to the algorithms used in xepdmgr for handling the Typing refresh and the combining of rectangles, so here it is.
Right now (xepdmgr 1.0), the daemon just counts the number of pixels in the area to update and depending on whether it's less than a threshold or not (the threshold is #define'd as 1/3 of the iliad screen), it uses the typing refresh or the full refresh. About the timeout, it waits 0.5seconds from the last update to commit it to the screen (if there is another change while waiting, it resets the timeout and waits 0.5s again). Any ideas to improve this? Last edited by Antartica; 09-20-2008 at 08:48 AM. Reason: sp |
![]() |
![]() |
![]() |
#2 |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
Some Ideas
Continue the good work! Hansel. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#4 |
Addicted to Porting
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,697
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
|
I believe CPU Throttling is done by the powerMgr application. Sources haven't been released for it.
|
![]() |
![]() |
![]() |
#5 | |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
Quote:
Code:
/** * Put cpu in idle mode * args: MHz: the desired cpu clock * timeout: the number of seconds to wait before changing the cpu mode */ int pwrGotoIdleMode(erClientChannel_t channel, int MHz, int timeout); ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
![]()
Antartica (and All)
I thought some more about the rectangle merging... it's not very useful unless we are able to do partial screen updates. On the other hand it might be relevant to know how many times a given area has been changed (might get uglier and uglier) An alternative (and simple) approach might be: - divide the screen in blocks (say 10x10 or 20x20) - when we get dirty rectangle events: increment the dirty flag off the corresponding blocks - when the timer expires: do a Typing or Full refresh depending on the sum of the dirty flags. Typing if the total dirty count has changes since last time (continue counting), Full if it exceeds a certain limit (then: reset it). What do you think? |
![]() |
![]() |
![]() |
#7 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Well, the code to merge rectangles is already done and is not computationally intensive.Even if its only benefit is to select between full and typing refresh more reasonably, I think that it worths its complexity increase
![]() OTOH, counting "how dirty" is an area could be interesting. I'm already calculating intersections, so it would be a matter of having running sum of the intersections occurred in every tracked area (and when merging tracked areas, sum them). If the ratio intersected pixels/area is higher than some number, do a full refresh. The only problem with this approach is that right now we're discarding the tracked areas info after the typing refresh. It can be reasonable saving the info for nnnxnnn blocks as you say. Time to think about it. About partial screen updates: I still have faith that we will get to that point sometime ;-). At least to support scribbles... |
![]() |
![]() |
![]() |
#8 | |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
Quote:
![]() Code:
hel@xyzzy:~$ strings /usr/local/lib/liberdm.a [...] (E)erdmServer.c:%d,%s() Trying to do a partial update of a line (%d,%d):(%d,%d) [...] |
|
![]() |
![]() |
![]() |
#9 | |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
In reality, the only thing we should not scrap is saving the information of the dirty rectangle, so as if we can do partial updates, have the info for it (in theory the bottleneck with updates is in the transmission of data to the delta chip***; if the area is smaller, the update should be able to be done faster). *** if I have understood right iRex's explanations of the improvements to the delta chip in the DR1000. |
|
![]() |
![]() |
![]() |
#11 | |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
![]()
Hi Antartica,
Any news? Quote:
The execution of the partial update starts at displayMgr/displayMgr.c:625 PS: they even merge rectangles at displayMgr/displayMgr.c:480 ![]() |
|
![]() |
![]() |
![]() |
#12 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Unfortunately not. i've not had spare time to devote for the iliad lately :-(.
I've just downloaded the irex's second batch of sources and right now I'm with the delta driver. With the other batch I just chased a wrong path; I was reading liberscribble, but it uses the brush functions of the delta driver instead of pushing pixels to it ![]() ![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
#13 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
![]() Thanks ![]() Last edited by Antartica; 11-19-2008 at 08:03 AM. Reason: Fix mention of pageBar. |
|
![]() |
![]() |
![]() |
#14 |
JSR FFD2
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
|
I think the partial update stuff is fairly new. We should test it with a small program to see if it works, how it looks on the display, and how it performs...
Idea: Maybe the most universal solution would be to integrate the xdamage stuff in displayMgr (make a replacement with the same name, but with extra features)
|
![]() |
![]() |
![]() |
#15 | ||
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
|
Quote:
Quote:
![]() The plan was to support the displayMgr protocol in xepdmgr anyway, merging the two will fulfill that neatly. I was intending to reimplement it, but after all there is no need for it (displayMgr is GPL ![]() Notes: 1. Will integrate displayMgr code inside xepdmgr, as I want to keep the current main loop. But will honour displayMgr command-line as used by irex scripts. 2. No threads; personally I think that they don't worth the effort when in UNIX; too many things are non-reentrant. If needed I'll create a child process, but it doesn't look that it's needed. Hope I have some time for it this week. |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
iLiad xepdmgr - another approach to auto-refresh | Antartica | iRex Developer's Corner | 169 | 02-09-2010 03:07 AM |
MobileRead Official MobileRead Book Club: Welcome thread/November's book choice thread | PsyDocJoanne | Book Clubs | 151 | 02-08-2009 08:42 PM |
emelFM2 0.41 with xepdmgr | ericshliao | iRex | 0 | 10-06-2008 10:25 AM |
another hello thread | hoodaman | Introduce Yourself | 7 | 07-07-2008 10:12 AM |