summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/arm/RealView.py3
-rw-r--r--src/dev/arm/hdlcd.cc17
-rw-r--r--src/dev/arm/hdlcd.hh2
-rw-r--r--src/dev/arm/pl111.cc18
-rw-r--r--src/dev/arm/pl111.hh2
5 files changed, 27 insertions, 15 deletions
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 167108850..b3c14580e 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -139,6 +139,8 @@ class Pl111(AmbaDmaDevice):
pixel_clock = Param.Clock('24MHz', "Pixel clock")
vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer display")
amba_id = 0x00141111
+ enable_capture = Param.Bool(True, "capture frame to system.framebuffer.bmp")
+
class HDLcd(AmbaDmaDevice):
type = 'HDLcd'
@@ -149,6 +151,7 @@ class HDLcd(AmbaDmaDevice):
vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer "
"display")
amba_id = 0x00141000
+ enable_capture = Param.Bool(True, "capture frame to system.framebuffer.bmp")
class RealView(Platform):
type = 'RealView'
diff --git a/src/dev/arm/hdlcd.cc b/src/dev/arm/hdlcd.cc
index c5daebc9b..349b246c2 100644
--- a/src/dev/arm/hdlcd.cc
+++ b/src/dev/arm/hdlcd.cc
@@ -72,7 +72,8 @@ HDLcd::HDLcd(const Params *p)
startFrameEvent(this), endFrameEvent(this), renderPixelEvent(this),
fillPixelBufferEvent(this), intEvent(this),
dmaDoneEventAll(MAX_OUTSTANDING_DMA_REQ_CAPACITY, this),
- dmaDoneEventFree(MAX_OUTSTANDING_DMA_REQ_CAPACITY)
+ dmaDoneEventFree(MAX_OUTSTANDING_DMA_REQ_CAPACITY),
+ enableCapture(p->enable_capture)
{
pioSize = 0xFFFF;
@@ -560,13 +561,15 @@ HDLcd::endFrame() {
if (vnc)
vnc->setDirty();
- if (!pic)
- pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
+ if (enableCapture) {
+ if (!pic)
+ pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
- assert(bmp);
- assert(pic);
- pic->seekp(0);
- bmp->write(pic);
+ assert(bmp);
+ assert(pic);
+ pic->seekp(0);
+ bmp->write(pic);
+ }
// start the next frame
frameUnderway = false;
diff --git a/src/dev/arm/hdlcd.hh b/src/dev/arm/hdlcd.hh
index ab4df5ed6..ba22cc163 100644
--- a/src/dev/arm/hdlcd.hh
+++ b/src/dev/arm/hdlcd.hh
@@ -474,6 +474,8 @@ class HDLcd: public AmbaDmaDevice
std::vector<DmaDoneEvent *> dmaDoneEventFree;
/**@}*/
+ bool enableCapture;
+
public:
typedef HDLcdParams Params;
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc
index c3d684f29..6abc9b4ac 100644
--- a/src/dev/arm/pl111.cc
+++ b/src/dev/arm/pl111.cc
@@ -69,7 +69,7 @@ Pl111::Pl111(const Params *p)
waterMark(0), dmaPendingNum(0), readEvent(this), fillFifoEvent(this),
dmaDoneEventAll(maxOutstandingDma, this),
dmaDoneEventFree(maxOutstandingDma),
- intEvent(this)
+ intEvent(this), enableCapture(p->enable_capture)
{
pioSize = 0xFFFF;
@@ -497,15 +497,17 @@ Pl111::dmaDone()
if (vnc)
vnc->setDirty();
- DPRINTF(PL111, "-- write out frame buffer into bmp\n");
+ if (enableCapture) {
+ DPRINTF(PL111, "-- write out frame buffer into bmp\n");
- if (!pic)
- pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
+ if (!pic)
+ pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
- assert(bmp);
- assert(pic);
- pic->seekp(0);
- bmp->write(pic);
+ assert(bmp);
+ assert(pic);
+ pic->seekp(0);
+ bmp->write(pic);
+ }
// schedule the next read based on when the last frame started
// and the desired fps (i.e. maxFrameTime), we turn the
diff --git a/src/dev/arm/pl111.hh b/src/dev/arm/pl111.hh
index a99406715..603cf943f 100644
--- a/src/dev/arm/pl111.hh
+++ b/src/dev/arm/pl111.hh
@@ -348,6 +348,8 @@ class Pl111: public AmbaDmaDevice
/** Wrapper to create an event out of the interrupt */
EventWrapper<Pl111, &Pl111::generateInterrupt> intEvent;
+ bool enableCapture;
+
public:
typedef Pl111Params Params;