mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
parent
c21472a1cd
commit
80fce781ab
@ -342,6 +342,7 @@ void framebuffer_auto_adjust_buffers() {
|
||||
|
||||
void framebuffer_free_current_buffer() {
|
||||
vbuffer_t *buffer = framebuffer_get_buffer(framebuffer->head);
|
||||
|
||||
#ifdef __DCACHE_PRESENT
|
||||
// Make sure all cached CPU writes are discarded before returning the buffer.
|
||||
SCB_InvalidateDCache_by_Addr(buffer->data, framebuffer_get_buffer_size());
|
||||
@ -400,7 +401,14 @@ vbuffer_t *framebuffer_get_head(framebuffer_flags_t flags) {
|
||||
framebuffer->head = new_head;
|
||||
}
|
||||
|
||||
return framebuffer_get_buffer(new_head);
|
||||
vbuffer_t *buffer = framebuffer_get_buffer(new_head);
|
||||
|
||||
#ifdef __DCACHE_PRESENT
|
||||
// Make sure any cached CPU reads are dropped before returning the buffer.
|
||||
SCB_InvalidateDCache_by_Addr(buffer->data, framebuffer_get_buffer_size());
|
||||
#endif
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
vbuffer_t *framebuffer_get_tail(framebuffer_flags_t flags) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user