diff options
author | Chris Emmons <Chris.Emmons@arm.com> | 2013-02-15 17:40:10 -0500 |
---|---|---|
committer | Chris Emmons <Chris.Emmons@arm.com> | 2013-02-15 17:40:10 -0500 |
commit | 27630e9cad56d22f73408cfd72d453776c0f2a05 (patch) | |
tree | 39c51eee2178fe96cb6579fe97798932c8c24811 | |
parent | f6550b3d201b6b6a44b107b8fd662090095fe04b (diff) | |
download | gem5-27630e9cad56d22f73408cfd72d453776c0f2a05.tar.xz |
ARM: Postpones creation of framebuffer output file until it is actually used.
This delay prevents a potential conflict with the HDLCD if both are in the same
system even if only one is enabled.
-rw-r--r-- | src/dev/arm/pl111.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc index 2cf401ce4..8460010f6 100644 --- a/src/dev/arm/pl111.cc +++ b/src/dev/arm/pl111.cc @@ -65,8 +65,8 @@ Pl111::Pl111(const Params *p) clcdCrsrCtrl(0), clcdCrsrConfig(0), clcdCrsrPalette0(0), clcdCrsrPalette1(0), clcdCrsrXY(0), clcdCrsrClip(0), clcdCrsrImsc(0), clcdCrsrIcr(0), clcdCrsrRis(0), clcdCrsrMis(0), - pixelClock(p->pixel_clock), - vnc(p->vnc), bmp(NULL), width(LcdMaxWidth), height(LcdMaxHeight), + pixelClock(p->pixel_clock), vnc(p->vnc), bmp(NULL), pic(NULL), + width(LcdMaxWidth), height(LcdMaxHeight), bytesPerPixel(4), startTime(0), startAddr(0), maxAddr(0), curAddr(0), waterMark(0), dmaPendingNum(0), readEvent(this), fillFifoEvent(this), dmaDoneEventAll(maxOutstandingDma, this), @@ -75,8 +75,6 @@ Pl111::Pl111(const Params *p) { pioSize = 0xFFFF; - pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true); - dmaBuffer = new uint8_t[buffer_size]; memset(lcdPalette, 0, sizeof(lcdPalette)); @@ -503,7 +501,11 @@ Pl111::dmaDone() DPRINTF(PL111, "-- write out frame buffer into bmp\n"); + if (!pic) + pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true); + assert(bmp); + assert(pic); pic->seekp(0); bmp->write(pic); |