summaryrefslogtreecommitdiff
path: root/firmware/target/mips
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-08-30 11:16:31 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2020-09-02 16:57:05 +0000
commit1a8939cc3d236bc143c8d31e9b46b4b763b95bbb (patch)
tree41a94fbad39ad0090467eaca3f6353c5a0c56ca9 /firmware/target/mips
parent35371df671e3677d896fcde516eaec3a899b5d8f (diff)
downloadrockbox-1a8939cc3d236bc143c8d31e9b46b4b763b95bbb.tar.gz
rockbox-1a8939cc3d236bc143c8d31e9b46b4b763b95bbb.zip
XduooX3 Slow down greylib framerate
halves cpu usage Change-Id: I3797b01ecd2f7615acfed53a77d8a1f51e947c8b
Diffstat (limited to 'firmware/target/mips')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/xduoo_x3/lcd-xduoo_x3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/lcd-xduoo_x3.c b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/lcd-xduoo_x3.c
index d4ab26ea5f..a7449f144d 100644
--- a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/lcd-xduoo_x3.c
+++ b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/lcd-xduoo_x3.c
@@ -24,6 +24,7 @@
24#include "system.h" 24#include "system.h"
25#include "cpu.h" 25#include "cpu.h"
26#include "string.h" 26#include "string.h"
27#include "kernel.h"
27 28
28/* LCD pins */ 29/* LCD pins */
29#define PIN_BL_EN (32*4+0) 30#define PIN_BL_EN (32*4+0)
@@ -435,9 +436,11 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count)
435void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, 436void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
436 int x, int by, int width, int bheight, int stride) 437 int x, int by, int width, int bheight, int stride)
437{ 438{
438 if(!display_on) 439 static long last_tick = 0;
440 if(!display_on || TIME_BEFORE(current_tick, last_tick + 2))
439 return; 441 return;
440 442
443 last_tick = current_tick;
441 const int column_high = get_column_high_byte(x); 444 const int column_high = get_column_high_byte(x);
442 const int column_low = get_column_low_byte(x); 445 const int column_low = get_column_low_byte(x);
443 446