Pi Firmware: chars_per_line is always in units of 8 pixels, regardless of frame buffer bit depth

Change-Id: I66f6d1e2ffbd0421a976e5f341b0a70f6a215313
pull/11/head
David Banks 2018-11-27 12:41:31 +00:00
rodzic 9c7e814be6
commit 954ff35df8
4 zmienionych plików z 7 dodań i 10 usunięć

Wyświetl plik

@ -9,7 +9,7 @@
// The capture line function is provided the following:
// r0 = pointer to current line in frame buffer
// r1 = number of complete psync cycles to capture (=param_chars_per_line)
// r1 = number of 8-pixel blocks to capture (=param_chars_per_line)
// r2 = frame buffer line pitch in bytes (=param_fb_pitch)
// r3 = flags register
// r4 = GPLEV0 constant

Wyświetl plik

@ -26,7 +26,7 @@
// The capture line function is provided the following:
// r0 = pointer to current line in frame buffer
// r1 = number of complete psync cycles to capture (=param_chars_per_line)
// r1 = number of 8-pixel blocks to capture (=param_chars_per_line)
// r2 = frame buffer line pitch in bytes (=param_fb_pitch)
// r3 = flags register
// r4 = GPLEV0 constant
@ -61,8 +61,6 @@ loop:
str r0, [r12, r2]
#endif
str r10, [r12], #4
subs r6, r6, #1
beq exit
WAIT_FOR_PSYNC_01
@ -82,6 +80,7 @@ loop:
str r0, [r12, r2]
#endif
str r10, [r12], #4
subs r6, r6, #1
bne loop

Wyświetl plik

@ -9,7 +9,7 @@
// The capture line function is provided the following:
// r0 = pointer to current line in frame buffer
// r1 = number of complete psync cycles to capture (=param_chars_per_line)
// r1 = number of 8-pixel blocks to capture (=param_chars_per_line)
// r2 = frame buffer line pitch in bytes (=param_fb_pitch)
// r3 = flags register
// r4 = GPLEV0 constant

Wyświetl plik

@ -156,11 +156,9 @@ rgb_to_fb:
ldr r2, [r0, #O_FB_BASE]
str r2, param_framebuffer0
// Sanity check chars_per_line <= fb_width * fb_bpp / 32
// Sanity check chars_per_line <= fb_width / 8
ldr r3, param_fb_width
ldr r2, param_fb_bpp
mul r3, r3, r2
lsr r3, r3, #5
lsr r3, r3, #3
ldr r2, param_chars_per_line
cmp r2, r3
strgt r3, param_chars_per_line
@ -227,7 +225,7 @@ frame:
// Working registers while frame is being captured
//
// r0 = scratch register
// r1 = number of complete psync cycles to capture (=param_chars_per_line)
// r1 = number of 8-pixel blocks to capture (=param_chars_per_line)
// r2 = frame buffer line pitch in bytes (=param_fb_pitch)
// r3 = flags register
// r4 = GPLEV0 constant