dev: Let the pixel pump bypass the DMA FIFO in non-caching mode.
When in non-caching mode, performance metrics are not meaningful, and we're just interested in functional level behavior. Going through the DMA FIFO in the HDLCD controller is very inefficient, and prevents reading a batch of pixels from memory all in one go. Change-Id: I3fb6d4d06730b5a94b5399f01aa02186baa5c9b3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38721 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
#ifndef __DEV_PIXELPUMP_HH__
|
||||
#define __DEV_PIXELPUMP_HH__
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/framebuffer.hh"
|
||||
#include "sim/clocked_object.hh"
|
||||
|
||||
@@ -171,7 +173,7 @@ class BasePixelPump
|
||||
/** Update frame size using display timing */
|
||||
void updateTimings(const DisplayTimings &timings);
|
||||
|
||||
/** Render an entire frame in KVM execution mode */
|
||||
/** Render an entire frame in non-caching mode */
|
||||
void renderFrame();
|
||||
|
||||
/** Starting pushing pixels in timing mode */
|
||||
@@ -219,6 +221,28 @@ class BasePixelPump
|
||||
*/
|
||||
virtual bool nextPixel(Pixel &p) = 0;
|
||||
|
||||
/**
|
||||
* Get the next line of pixels directly from memory. This is for use from
|
||||
* the renderFrame which is called in non-caching mode.
|
||||
*
|
||||
* The default implementation falls back to calling nextPixel over and
|
||||
* over, but a more efficient implementation could retrieve the entire line
|
||||
* of pixels all at once using fewer access to memory which bypass any
|
||||
* intermediate structures like an incoming FIFO.
|
||||
*
|
||||
* @param ps A vector iterator to store retrieved pixels into.
|
||||
* @param line_length The number of pixels being requested.
|
||||
* @return The number of pixels actually retrieved.
|
||||
*/
|
||||
virtual size_t
|
||||
nextLine(std::vector<Pixel>::iterator ps, size_t line_length)
|
||||
{
|
||||
size_t count = 0;
|
||||
while (count < line_length && nextPixel(*ps++))
|
||||
count++;
|
||||
return count;
|
||||
}
|
||||
|
||||
/** First pixel clock of the first VSync line. */
|
||||
virtual void onVSyncBegin() {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user