yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] joeykrim:
+1 this would help because this is the only confirmed fix publicly known yet.

at minimum give a starting point to see differences between the two Epson files, fps capped and fps non capped. i'm SURE there are tons more differences between the two files other than the fps capping issue, but at least the fps issue is somewhere among all the differences.

going off the differences we can start messing around with the novatec board (i have rev 2 novatec to test with) ... just tryin to help contribute in an efficient manner.

as always, thanks toast and maejrep!
[EVO 4G Android Development] p-slim:
i have a v3 but i don't know if its epson or the other one but i run the froyo rom. Should I still load this kernal or if i don't have epson its useless?

edit: nevermind read first post about ALL EVO'S
[EVO 4G Android Development] Geniusdog254:
I'm trying to pull your source from GitHub. I've already forked it into my GitHub, but I can't make it work. Whenever I try to clone from either my git or yours I get an error. Why does it refuse to clone the repo? I had no problems with cloning Cyanogen's Nexus source, just this one.

The error I get with your repo is:

Getting pack 17574344d1269722c55c600526eb5f26cc60fea7
which contains a62e6a84fd1e6fadb21e823a788f41ac00a5d9a0
error: Unable to get pack file http://github.com/toastcfh/HTC-Supersonic-Incredible-2.6.29.git/objects/pack/pack-17574344d1269722c55c600526eb5f26cc60fea7.pack
transfer closed with 83708643 bytes remaining to read
error: Unable to find a62e6a84fd1e6fadb21e823a788f41ac00a5d9a0 under http://github.com/toastcfh/HTC-Supersonic-Incredible-2.6.29.git
Cannot obtain needed blob a62e6a84fd1e6fadb21e823a788f41ac00a5d9a0
while processing commit c6fc5c0c4fdb5b9a57a6aacf350bf852274e1601.
fatal: Fetch failed.

I get the same thing on my repo, as in it fails on the same files, just with different strings because of it being a different repo and all.

Any help? I've tried it over both a 3G card & my Charter cable connection & neither works.
[EVO 4G Android Development] frankenstein\:
You guys (toastcfh & maejrep) made Engadget with this piece of work today. Much respect and appreciation for your efforts is all I can offer but I do so readily. Thanks very much for all your hard work!
[EVO 4G Android Development] daveop:
Those of you that have applied the fix, are you noticing a visual improvement to the menu and scrolling? I'm just curious, after some messing around I really have Flipz mod running how I like it, and my hardware is correct for the change, just don't want to mess anything up. I love the camera, but don't feel like I need to have it.
[EVO 4G Android Development] notown775:
i only got 30:(

edit: ha i have novatec OH WELL.. i can wait.. :)
[EVO 4G Android Development] progenocide:
can confirm huge difference on 003 epson just when you drag down lock screen alone!!

As mentioned there is some tearing visually, but i've been running kernel all day rather than to deal with 30 fps

i was still very happy with phone but now i cant believe they didn't release it stock like this!!!!

gonna keep running this kernel till new one comes out.... thanks toast!!
[EVO 4G Android Development] xero187:
I got lucky and got the 003 with the epson on release day at sprint.

Gave it a whurl... DAMN! Awesome job unlocking the EVO's shackled potential :D

Toast awesome work...

Flipz and Toast are really moving the EVO along!

GodeMode Kernal FTW!

Fresh ROM 0.3 FTW! (until 0.4 :cool:)
[EVO 4G Android Development] Farmer42:
Thanks for the hard work, Toast. I can't wait to see if you can get the cap removed from my Novatech device. If anyone can, it's you guys. Keep it up!
[EVO 4G Android Development] skantman69:
What's the story with the charging issue?? Has anyone brought this up??

-------------------------------------

Sent on my Sprint EVO using 4G speed
[EVO 4G Android Development] Cicatrize:
I don't know if this is related, but I found this documentation poking around, and the 5582 is used a lot in the "novatec" code for MDDI.

http://trulydisplays.com/tft/driveric/Novatek NT35582 Spec.pdf
[EVO 4G Android Development] maejrep:
In my opinion, the screen tearing is actually a result of not being capped. It's my belief that the tearing is caused by vsync not happening at the right cycles (since that *is* what vsync is designed to avoid). But I feel that if it is synced properly to the refresh rate of the screen, your tearing will go away, but the cap will come back.

The weird thing is I didn't adjust any clock speeds or vsync interrupts, which means the "cap" had to have been added after the epson panel was introduced to the hw profile, most likely to fix the tearing problem.

What that means to me is that the mddi bus is just too slow, for any panel, to keep up with the framerate and still vsync properly. One difference I did see, and pointed out several days ago, is the difference in spi clock: this kernel has spi clock running at 4800000hz, while stock kernel is something like 960000 (don't know off hand). Since the novatec panel doesn't use spi and epson does, I'd be willing to bet that spi clock has something to do with both problems: too high == tearing, too low == low fps.
[EVO 4G Android Development] halfline:
Hey, that doc's great. Nice find! I found this patent application too which describes mddi:

http://www.freepatentsonline.com/y2006/0179164.html
[EVO 4G Android Development] maejrep:
Yes, our 0002 novatec panels are b9f6:5582 devices. But like I said above, fixing the cap may leave us with visually unappealing results... HTC has already said the MDDI bus just can't keep up with the bandwidth necessary for higher framerates. I believe we're seeing the proof of that now. Capped means no tearing, uncapped means tearing.
[EVO 4G Android Development] xero187:
I'm sure there is a way to get Vsync without the cap.

From gaming I know Vsync always drops the frame rate some but not 40%, that is Huge!

Really looking forward to when either the dev's or HTC get this resolved so that we can have fluidity without the tear.

This breakthrough I'm sure has put people's faith back in the EVO so that anyone considering returning it will wait it out to see.
[EVO 4G Android Development] Cicatrize:
I don't see why not. I thought any MDDI bus was capable of 60Hz.

Feel free to correct me if I'm wrong.
[EVO 4G Android Development] slowpain:
I just installed the kernel patch and I must say the scrolling and general OS fluidity is much improved. It's like iPhone level fluidity but with noticable screen tearing.
[EVO 4G Android Development] halfline:
So I don't have a lot of time to investigate right now, but two things in that doc that are useful:

1)

"It is recommended that the client send a Client Capability Packet to the host after forward link synchronization is

acquired, and it is required when requested by the host via the Reverse Link Flags in the Reverse Link

Encapsulation Packet."

(client is the panel, host is the video hardware)

Then there's a diagram that shows two of the capabilities are "Max Video Frame Rate" and "Min Video Frame Rate". They matches up with mddi_hw.h here:

struct __attribute__((packed)) mddi_client_caps {

...

uint8_t Maximum_Video_Frame_Rate_Capability;

uint8_t Minimum_Video_Frame_Rate_Capability;

...

};

If we look in the code, we see the reverse link encapsulation packet is handled from an interrupt (mddi_isr ->mddi_handle_rev_data_avail -> mddi_handle_rev_data) here:

switch (rev->hdr.type) {

case TYPE_CLIENT_CAPS:

memcpy(&mddi->caps, &rev->caps,

sizeof(struct mddi_client_caps));

mddi->flags |= FLAG_HAVE_CAPS;

wake_up(&mddi->int_wait);

Would be great if someone could add a printk or two printing

mddi->caps.Maximum_Video_Frame_Rate_Capability

and

mddi->caps.Minimum_Video_Frame_Rate_Capability

after that memcpy call. That should tell us the advertised panel limits I think.

2)

"Frame Rate Setting

The NT35582 is able to change the liquid crystal polarity inversion cycle by setting the DIV, RTN bits to change the

frame frequency. Setting a lower frequency in the partial display operation will reduce power consumption. For more

information, refer to 'Frame-Frequency Adjustment Frequency'"

So, some good hints there that could use investigation.
[EVO 4G Android Development] Cicatrize:
Exactly the stuff that I saw in there. The doc is super long, but it basically describes how capable the NT35582 is and customizable by the manufacturer of the device it's being used in.
[EVO 4G Android Development] cj10488:
Here is a bit of information pulled from the Novatek doc that I found interesting.

5.5 Frame Tearing Effect Interface
The frame tearing effect (FTE) signal can be used by the MPU to synchronize frame memory writing to achieve
video images displaying without tearing effect. The FTE pulse output position can be specified to the line
established by the FTE setting, and should be set in keeping with the data transfer speed.
In FTE mode, the data displayed on the panel is written to the internal RAM. In this way, only the data to be
written within the moving picture RAM area is transferred, the overall data transfer needed for the moving
picture display is minimized. The NT35582 can transfer data via the FTE interface at high speed with reduced
power consumption by utilizing the high-speed write function (HSM =1) to write data.

The FTE interface has a minimum RAM write speed requirement. Therefore, the RAM Write Speed must be
faster than the values calculated from the following formulas:
(
( 16.5 )
Frame frequency DisplayLines PorchLines
DisplayClock MHz
>  
)
Clock per 1 H[Hz]
480 x Display Lines
RAM Write SPEED [Hz](min) >
(Display Lines + PorchLines-margins) x RTN x 1
Display Clock (16.5MHz) x variance
The following is an example of calculating the minimum RAM writing speed and internal clock frequency in FTE
interface operation:
[Example]:
Panel size 480 RGB X 800 lines
Total number of lines (NOL) 800 lines (NOL = 10’h320)
Porch (VPA) 16 lines (VPA = 10h)
Frame tearing effect position (FTEP) Display end line: 879th (FTEP = 10’h36F)
Frame frequency 60 Hz
Display clock 10 MHz
Clocks per 1H (RTN) = 16.5 MHz / (60 Hz × (800 + 16) lines) = 337 clocks
Minimum speed for RAM Write [Hz] > 480×800 / {(800+16–2)lines×337clocks × 1/(16.5MHz×1.05)} = 24.3 MHz
Note: 1. In the example, the internal clock frequency allows for a margin of ±5% for variances, and guarantees
that display operation is completed within one FTE cycle.
2. The margin between written data line and the display operation line should be larger than two lines.
3. The FTE pulse output position is set to the line designated by N [9:0].
[EVO 4G Android Development] maejrep:
Great research. I'll check it out when I have time.

But I think we're misunderstanding the issue here, which HTC has already clarified. MDDI may be capable of 60Hz, but that's on the primary interface. On the EVO, the primary mddi interface is dedicated to HDMI, leaving the LCD panel as secondary. I doubt many mddi ports will guarantee 60Hz on both interfaces.
[EVO 4G Android Development] Cicatrize:
Where do you see this at? It looks like to me that the HDMI is using the LCDC interface and the LCD is using the primary MDDI.
[EVO 4G Android Development] halfline:
I don't think that's right. See my "A run through of the panel code and mddi interface" thread (which toast pointed out should be here, so maybe i should just move it here)

If I'm reading the code right, the LCD panel is using the primary mddi interface, and I assume hdmi is using the LCDC interface (although i think the bits that would confirm that aren't in the source we have available)
[EVO 4G Android Development] Cicatrize:
But one thing is for sure...I searched through all the code in the file for anything related to HDMI and it doesn't appear to be using the MDDI interface. And btw nice thread. You should link it up in here.
[EVO 4G Android Development] halfline:
Note, it's still quite possible 30fps is it, but I just think we should add those printk's to the code to confirm or deny that.

FWIW, I'm hoping to get some time set aside this weekend to get things setup so I can build my own kernels and try things on my own.
[EVO 4G Android Development] Cicatrize:
Yeah I haven't been able to find enough time to figure out the whole kernel building thing either. I set up my virtual box with everything but don't know how to compile.

I don't think 30fps is it. If the mfr of the MDDI interface is also the display builder, I doubt they'd make a 30hz setup, but we can't confirm that because I can't find **** about novate(k)(ch)(c) displays. Maybe we can kidnap the HTC devs and ask them to fix it? :)
[EVO 4G Android Development] EtherealRemnant:
Maybe the Epson display is the one that is the problem - the Novatec seems to be more common than the Epson and it appears highly capable...
[EVO 4G Android Development] Farmer42:
Nope. My Nova screen just tested at an avg of 30 in fps2d.
[EVO 4G Android Development] AssassinsLament:
I basically followed this and it worked great:

http://forum.androidcentral.com/htc...how-build-your-own-kernel-package-source.html
[EVO 4G Android Development] AssassinsLament:
<6>[ 4.075653] ASSASS: Max FPS is 30
<6>[ 4.075653] ASSASS: Min FPS is 0

Excuse my ASSASS reference, it was to easier find the printk :p

Anyhow, wow.

edit:

So you're basically saying that this is what the panel is sending back as it's capability.. which on my novatek lcd, it says 30?

Nooooooooooooo! ;-(
[EVO 4G Android Development] EliWay:
Try that with an Epson LCD.. Somehow I still think it's telling you Max FPS is 30 because it was set up that way.
[EVO 4G Android Development] joeykrim:
can you post up this test kernel real quick so an epson user can boot it and show us what theirs prints out?

this is amazing, im so glad somebody had a chance to put the printk lines into the code. i was just readin thru the posts and was bout to get my hands dirty and dive in!! thanks AssassinsLament!!

out of curiosity sake, which file and around what lines did you put the printk code in?

edit: alright, guilty. i started poking around and realized my question was very simple to answer.

drivers/video/msm/mddi_hw.h

181: uint8_t Maximum_Video_Frame_Rate_Capability;

182: uint8_t Minimum_Video_Frame_Rate_Capability;
[EVO 4G Android Development] halfline:
See http://xdaforums.com/showpost.php?p=6925474&postcount=224

Those are the right members, but you can't put the printk in the header file, it needs to go in mddi_handle_rev_data after the memcpy
[EVO 4G Android Development] toastcfh:
so no one has tried this on epson? im just curious and at work. i could load up a update zip of the kernel with the printk in it and test while im at work. but i dont have the ability to compile here. if someone wants to post it that would be great and ill report back. ;)
[EVO 4G Android Development] techjunkie860:
How do I get this to work on my evo? Sorry for the rookie question, but this is how we learn.
[EVO 4G Android Development] joeykrim:
i sync'd up yesterday with toast's kernel source so hopefully i have the latest version...

if somebody wants to mark up the file with the correct printk commands and post the marked up file. i can throw it into the toast kernel source, compile and post the zImage.
[EVO 4G Android Development] vinscuzzy:
Actually, most people learn by reading.
[EVO 4G Android Development] pmootrey:
I have a 0003 with an epson display. I'm getting roughly 58 fps with the kernel from the latest update.zip
[EVO 4G Android Development] Cicatrize:
We want you to flash a new kernel (no one's compiled it yet) that will output (supposedly) the max rate of your display.
[EVO 4G Android Development] npace:
I've got a 003 with Epson but I'm at work as well and can only test -- so upload :)
[EVO 4G Android Development] tkrechel:
i can test it too if someone can compile it. Epson display here
[EVO 4G Android Development] pmootrey:
Link me the kernel and I'll get it going.
[EVO 4G Android Development] athlet1c:
Epson display 003 and im getting 51 Fps
[EVO 4G Android Development] AssassinsLament:
Ok, sorry just got here. The boot.img is attached below. Just unzip the file somewhere, then:

fastboot boot tempboot.img

then after it's done booting... adb shell dmesg > dmesg.txt

then read dmesg.txt and look for ASSASS

You should see something like this:

<6>[ 4.068603] ASSASS: Max FPS is 30

<6>[ 4.068603] ASSASS: Min FPS is 0

Please only do this if you know what you're doing! Thanks! (DO NOT FLASH IT!)
[EVO 4G Android Development] toastcfh:
BTW what Rom is the ramdisk from in ur boot.img
[EVO 4G Android Development] tkrechel:
ok checking now
[EVO 4G Android Development] AssassinsLament:
fresh-evo-0.3.zip
[EVO 4G Android Development] toastcfh:
Nice ;) lol ok man thanx
[EVO 4G Android Development] tkrechel:
Not looking good for nova screens =(

<6>[ 3.974945] ASSASS: Max FPS is 64

<6>[ 3.974945] ASSASS: Min FPS is 0
[EVO 4G Android Development] toastcfh:
So now we move on to why 3d is still held up and fixing the other panel. If it could be done to one panel I don't see why not the other.
[EVO 4G Android Development] joeykrim:
im assuming this test kernel with the printk max/min output contains the epson 30 fps uncap patch.

i wonder if all epson models are set at 64 max or if it varies between models?
[EVO 4G Android Development] tkrechel:
Actually I'm running the stock kernel from fresh 0.3 and not the kernel found in this thread. It reported 64 as its max output on the stock kernel.

EDIT

Oh nm i see what you asked, sorry to confuse
[EVO 4G Android Development] elstupidos:
0003 Model with Epson.

Got it from Sprint Store release day.

FPS2d avgs 52 FPS =) Can tell immediately with drag down lock screen and animations

Awesome work
[EVO 4G Android Development] tkrechel:
AssassinsLament, did your test kernel contain the FPS patch?
[EVO 4G Android Development] drbadass:
So if I understand you correctly, the panel itself is essentially reporting these specs to the main board?

If so, I would think there's probably some coding in there reporting those digits that we could go in and edit, assuming the novas ARE capable of 60, but the issue there is if they are, why would they report 30 in the first place. I'm so confused!
[EVO 4G Android Development] AssassinsLament:
This is straight from toast's github source, all I did was add the printk's, so yes, should contain the uncap.
[EVO 4G Android Development] tkrechel:
Actually I believe what this means is the nova panel reports that it is indeed hardware capped at 30 FPS, and the epson panel reports that its hardware output is capable of 64 FPS. I'm not 100% sure but I think that's where we're at atm
[EVO 4G Android Development] AssassinsLament:
Yes, I'm under that assumption also... :mad:
[EVO 4G Android Development] tkrechel:
BTW, all I did was run the test that toast wanted. I am new and still learning this stuff too. PLEASE don't take anything I have said as the way things are lol. Just reported what the epson panel showed and now I'm speculating so don't anyone get in an uproar!
[EVO 4G Android Development] Holyrolla:
Or...it could be that since the cap is in place for the Nova, that's the number it reports...just a thought...
[EVO 4G Android Development] tkrechel:
Yeah I honestly have no idea and that's why these devs are so INCREDIBLE! they are capable of figuring this stuff out lol, I am not!
[EVO 4G Android Development] tarheelsmj12001:
i wonder if i should bring back my evo n try n get one with epson since i only have about a week n a half till my 30 days are up
[EVO 4G Android Development] Estimated Prophet:
I'm willing to bet money that you'll just get another nova.
[EVO 4G Android Development] toastcfh:
I haven't read the docs u got the max cap info from. But I would assume that it is only passing the max cap passed by the driver code. Or are u saying the docs say that this is some sort of output from the actual hardware panel? I would image it reporting 30 for Epson panel if we were doing things the way HTC is. But I guess I need to have a look at the docs tonight
[EVO 4G Android Development] Estimated Prophet:
That's what I'm wondering. Somebody needs to add the printk's to a capped kernel and give it a try.
[EVO 4G Android Development] joeykrim:
yea, i mean we could hard code a value of 64 in for the variable and see if it changes anything?

if this variable which outputs the max fps is used by other functions, a hard coded 64 in as the max fps value then test to see if that changes anything, but its a pretty ghetto patch attempt ... just throwin out ideas
[EVO 4G Android Development] tkrechel:
Can someone add the printk's to a capped kernel? I'll boot into that and see what the epson panel reports.
[EVO 4G Android Development] tarheelsmj12001:
thats not wat i wanted to hear lol
[EVO 4G Android Development] Riztnack:
I swapped mine today and I got a novatec screen =(
[EVO 4G Android Development] AssassinsLament:
Well from how halfline explained it, my understanding is that this is what the panel sends to kernel telling it what it's capable of. This is the actual post he talked about it. (a few pages back)

http://xdaforums.com/showpost.php?p=6925474&postcount=224

All I did was follow his advice of printk'ing.
[EVO 4G Android Development] toastcfh:
And how might u suggest we do that? Lol its a binary
[EVO 4G Android Development] tkrechel:
Oh sorry toast =) Still learning, but that makes sense lol
[EVO 4G Android Development] AssassinsLament:
That can't be done because the innitial source didn't allow for epson panel's to even boot, the moment toast and maejrep fixed the source to allow epson's to boot, the cap was gone for epsons.
[EVO 4G Android Development] tkrechel:
Yeah I get it now hehe.
[EVO 4G Android Development] toastcfh:
Ok ill have a look later at the docs. It's possible we can hard code it I would think. Maejrep has a 0002 evo, maybe of he has time hell check it out tonight. If anyone has the awesome sauce skill to fix it he does. But yeah I'm not thinking that the display is just a 30fps display. It could be though and HTC didn't do the research on the Epson displays and realise they could handle more. Which takes me to the conclusion that the max fps output isn't being sent from the display itself and its being passed by code in the source.

Also moving along with things I can test. I still haven't figured out why its only 2d that's allowed to reach higher fps on Epson panels
[EVO 4G Android Development] AssassinsLament:
Thanks for all that you guys do! I'm just learning along the way also, so you, maejrep, and halfline have us at your disposal, just let us know what we can do to help!
[EVO 4G Android Development] tarheelsmj12001:
damn that sucks, i have faith in all the devs working on this to find a fix for it.
[EVO 4G Android Development] Cicatrize:
Wow lots of action here since I left...

Ok, great 64fps. Well now, what does this tell us?

This says that with the current configuration, the MDDI is capable of outputting 64fps on the mddi0, which is the same interface used by the novatec panel. For those of you thinking the novatec panel is to blame, I very highly doubt it after seeing these results. Like the documentation says, the interface can be altered quite easily for the MDDI to cap the amount of FPS to each peripheral attached. Busy coding work stuff right now, but I will look into this and try to find out what's so special about the Epson code. So far I've noticed that it uses a 9 bit SPI in initializtion, but I have no idea why...
[EVO 4G Android Development] geyes30:
Hate to throw this into the mix but I downloaded Quick System Info from the Android Market and it has the following information:

Screen

Resolution: 480X800

Density: 1.5

Refresh Rate: 60.0

X DPI: 254

Y DPI: 254

I have a 003 Novatec
[EVO 4G Android Development] AssassinsLament:
Well not entirely accurate, what we have recently discovered is that the Nova panels report that their capable of a max of 30fps, and Epson panels report 64fps. We are hoping there is a way to change this, but we're on the right track because we do have a really nice document we can get hints from, thanks to you.
[EVO 4G Android Development] Cicatrize:
Where did you find the Screen stuff?
[EVO 4G Android Development] tarheelsmj12001:
mine says the samething but i think i have a 002