diff options
author | Sudhanshu Jha <sudhanshu.jha@arm.com> | 2017-02-24 13:34:22 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2017-03-07 11:14:28 +0000 |
commit | 9dd54d10ab63c395b84bff31b5ff94b35c44e18f (patch) | |
tree | 80c7755669f3db6651b424ba5e2fae7f687b5b56 /src/dev/pixelpump.hh | |
parent | 82a8230aa761e193a91ade0fa3c109a5c0f08aed (diff) | |
download | gem5-9dd54d10ab63c395b84bff31b5ff94b35c44e18f.tar.xz |
dev: Add support for single-pass scan out in the PixelPump
Add a helper function to scan out an entire frame in one time
step. This requires the public PixelPump to be changed somewhat to
separate timing updates from general PixelPump control. Instead of
calling PixelPump::start(timings), timings now need to be updated
using a separate call to PixelPump::updateTimings(timings) before
calling PixelPump::start().
Display controllers that don't need accurate timing (e.g., in KVM
mode), can use the new PixelPump::renderFrame() API to render an
entire frame in one step. This call results in the same callbacks
(e.g., calls to nextPixel()) as the timing calls, but they all happen
in immediately. Unlike the timing counterpart, renderFrame() doesn't
support buffer underruns and will panic if nextPixle() indicates an
underrun.
Change-Id: I76c84db04249b02d4207c5281d82aa693d0881be
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2241
Reviewed-by: Rahul Thakur <rjthakur@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/dev/pixelpump.hh')
-rw-r--r-- | src/dev/pixelpump.hh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/dev/pixelpump.hh b/src/dev/pixelpump.hh index 159ee79cb..bc21fca75 100644 --- a/src/dev/pixelpump.hh +++ b/src/dev/pixelpump.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 ARM Limited + * Copyright (c) 2015, 2017 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -148,15 +148,22 @@ class BasePixelPump public Serializable { public: - BasePixelPump(EventManager &em, ClockDomain &pxl_clk, unsigned pixel_chunk); + BasePixelPump(EventManager &em, ClockDomain &pxl_clk, + unsigned pixel_chunk); virtual ~BasePixelPump(); void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; public: // Public API - /** Starting pushing pixels using the supplied display timings. */ - void start(const DisplayTimings &timings); + /** Update frame size using display timing */ + void updateTimings(const DisplayTimings &timings); + + /** Render an entire frame in KVM execution mode */ + void renderFrame(); + + /** Starting pushing pixels in timing mode */ + void start(); /** Immediately stop pushing pixels */ void stop(); @@ -285,6 +292,9 @@ class BasePixelPump void beginLine(); void renderPixels(); + /** Fast and event-free line rendering function */ + void renderLine(); + /** Convenience vector when doing operations on all events */ std::vector<PixelEvent *> pixelEvents; |