Rockbox Development > New Ports
Cowon D2
isanggon:
I tried touch screen patch. It worked fine with FREQ>>23 without 2-line problem on my device.
shotofadds// Okay, I'll try other value, for test ;D
shotofadds:
--- Quote from: FranzD2 on December 01, 2008, 10:23:34 AM ---I don't know if this is due to some other mod but it seems to me that a mod in other files causes the problem in the lcd driver to reappear. How is it possible?
--- End quote ---
D'Oh! Of course, we can adjust the delay all we like, but behaviour will still vary if an interrupt (IRQ) occurs while sending commands to the LCD..
I suggest updating lcd_write_reg() so that it reads:
--- Code: ---static void lcd_write_reg(unsigned char reg, unsigned short val)
{
int irq_level = disable_irq_save();
ltv250qv_write(0x740000 | reg);
ltv250qv_write(0x760000 | val);
restore_irq(irq_level);
}
--- End code ---
That might improve things. ;)
FranzD2:
@shoto
1) I just tried test_fps and i saw no differences, if i press or don't press the screen, the values are the same.
2) I tried disabling irq in lcd_write_reg + using FREQ>>24 and i saw one line repeated, with a value of 23 things seem to work better, i'll test it better tomorrow all day at work.
@all
Please if you want to try the touchscreen patch then use the second one, i've adjusted a value that caused problems in the first one.
shotofadds:
--- Quote from: FranzD2 on December 01, 2008, 01:38:31 PM ---1) I just tried test_fps and i saw no differences, if i press or don't press the screen, the values are the same.
--- End quote ---
Really? Check the value displayed at the top: with a plain SVN build this shows either 153.5fps or 158fps normally (at 48Mhz), but goes down to around 120fps if I continually circle the screen with my finger - that's a massive amount of CPU usage attributed to the touchscreen. That's why I'm concerned about adding any more complexity to the button driver, and trying to look at doing things a different way. :o
NOTE: Don't do any speed testing if you are uploading the build using tcctool, sometimes this can give rather different results (and I currently have no idea why that's the case).
btw. I'd also recommend looking at the test_touchscreen plugin, you can use it to see which calibration values work best (for me SVN is rather more accurate than your patch...)
--- Quote from: FranzD2 on December 01, 2008, 01:38:31 PM ---2) I tried disabling irq in lcd_write_reg + using FREQ>>24 and i saw one line repeated, with a value of 23 things seem to work better, i'll test it better tomorrow all day at work.
--- End quote ---
Yes, FREQ>>23 plus disabled IRQs seems to work fine for me too. Hopefully we've cracked it this time. ;D
FranzD2:
1) About test_fps's results CPU: 48 Mhz
1/1 is 140.0 fps (main lcd update)
1/4 is 534.0 fps (main lcd update)
these values don't change when i use the touchscreen even if i circle with my finger or press multiple buttons, i tried several times but they don't change.
2) I tried disabling the busy wait loop but at the moment it is not a good idea, First: there are incorrect presses, Second: i see repeated lines again :-\ (only with the loop disabled). I think that this cycle is essential if we want to always read correct value, so we could try to optimize other things (BTW: a busy wait loop should be also placed when reading battery values)
3) I tried the touchcreen testing plugin, it seems that the empiric calibration is not so bad,
EDIT:
In touch_to_pixels try to modify "x = val_x / 3.5;" -> to -> "x = val_x / 3.1;"
I forgot to include this fix in the second patch.... :o
however the old calibration does not work with my patch (and i don't know why) so i had to replace it with some rough operation, maybe you can find a better solution :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version