Advertising
- Stuff
- Friday, October 12th, 2007 at 6:31:31am MDT
- Index: firmware/target/arm/iriver/h10/lcd-h10_20gb.c
- ===================================================================
- --- firmware/target/arm/iriver/h10/lcd-h10_20gb.c (revision 15086)
- +++ firmware/target/arm/iriver/h10/lcd-h10_20gb.c (working copy)
- @@ -180,6 +180,9 @@
- y_offset = 0;
- disp_control_rev = 0x0004;
- lcd_contrast = DEFAULT_CONTRAST_SETTING << 8;
- + outl(0x00000060,LCD2_BASE);
- +// outl(0x00001f10, LCD2_BASE2);
- +
- }
- static void lcd_power_on(void)
- @@ -575,7 +578,7 @@
- {
- int x1, y1;
- - unsigned short *addr = (unsigned short *)lcd_framebuffer;
- + unsigned long *addr;
- if (!display_on)
- return;
- @@ -612,19 +615,41 @@
- /* start drawing */
- lcd_send_cmd(R_WRITE_DATA_2_GRAM);
- - addr = (unsigned short*)&lcd_framebuffer[y0][x0];
- + addr = (unsigned long*)&lcd_framebuffer[y0][x0];
- - int c, r;
- + while (height > 0) {
- + int c, r;
- + int h, pixels_to_write;
- - /* for each row */
- - for (r = 0; r < height; r++) {
- - /* for each column */
- - for (c = 0; c < width; c++) {
- - /* output 1 pixel */
- - lcd_send_data_swapped(*addr++);
- + pixels_to_write = (width * height) * 2;
- + h = height;
- +
- + /* calculate how much we can do in one go */
- + if (pixels_to_write > 0x10000) {
- + h = (0x10000/2) / width;
- + pixels_to_write = (width * h) * 2;
- }
- - addr += LCD_WIDTH - width;
- + LCD2_BLOCK_CTRL = 0x10000080;
- + LCD2_BLOCK_CONFIG = 0xc0010000 | (pixels_to_write - 1);
- + LCD2_BLOCK_CTRL = 0x34000000;
- +
- + /* for each row */
- + for (r = 0; r < h; r++) {
- + /* for each column */
- + for (c = 0; c < width; c += 2) {
- + while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_TXOK));
- +
- + /* output 2 pixels */
- + LCD2_BLOCK_DATA = *addr++;
- + }
- + addr += (LCD_WIDTH - width)/2;
- + }
- +
- + while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_READY));
- + LCD2_BLOCK_CONFIG = 0;
- +
- + height -= h;
- }
- }
- Index: firmware/target/arm/system-pp502x.c
- ===================================================================
- --- firmware/target/arm/system-pp502x.c (revision 15086)
- +++ firmware/target/arm/system-pp502x.c (working copy)
- @@ -186,10 +186,18 @@
- DEV_TIMING1 = 0x00000303;
- PLL_CONTROL &= ~0x80000000; /* disable PLL */
- cpu_frequency = CPUFREQ_DEFAULT;
- +
- break;
- }
- CLOCK_SOURCE = (CLOCK_SOURCE & ~0xf0000000) | 0x20000000; /* select source #2 */
- +#ifdef IRIVER_H10
- +if (frequency == CPUFREQ_MAX)
- + outl(0x00000060,LCD2_BASE);
- +else
- + outl(0x00000000,LCD2_BASE);
- +#endif
- +
- #if defined(HAVE_ADJUSTABLE_CPU_FREQ) && (NUM_CORES > 1)
- boostctrl_mtx.locked = 0;
- #endif
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.