1/*
2 * Copyright (c) 2010-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 51 unchanged lines hidden (view full) ---

60// initialize clcd registers
61Pl111::Pl111(const Params *p)
62 : AmbaDmaDevice(p), lcdTiming0(0), lcdTiming1(0), lcdTiming2(0),
63 lcdTiming3(0), lcdUpbase(0), lcdLpbase(0), lcdControl(0), lcdImsc(0),
64 lcdRis(0), lcdMis(0),
65 clcdCrsrCtrl(0), clcdCrsrConfig(0), clcdCrsrPalette0(0),
66 clcdCrsrPalette1(0), clcdCrsrXY(0), clcdCrsrClip(0), clcdCrsrImsc(0),
67 clcdCrsrIcr(0), clcdCrsrRis(0), clcdCrsrMis(0),
68 pixelClock(p->pixel_clock),
69 vnc(p->vnc), bmp(NULL), width(LcdMaxWidth), height(LcdMaxHeight),
68 pixelClock(p->pixel_clock), vnc(p->vnc), bmp(NULL), pic(NULL),
69 width(LcdMaxWidth), height(LcdMaxHeight),
70 bytesPerPixel(4), startTime(0), startAddr(0), maxAddr(0), curAddr(0),
71 waterMark(0), dmaPendingNum(0), readEvent(this), fillFifoEvent(this),
72 dmaDoneEventAll(maxOutstandingDma, this),
73 dmaDoneEventFree(maxOutstandingDma),
74 intEvent(this)
75{
76 pioSize = 0xFFFF;
77
78 pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
79
78 dmaBuffer = new uint8_t[buffer_size];
79
80 memset(lcdPalette, 0, sizeof(lcdPalette));
81 memset(cursorImage, 0, sizeof(cursorImage));
82 memset(dmaBuffer, 0, buffer_size);
83
84 for (int i = 0; i < maxOutstandingDma; ++i)
85 dmaDoneEventFree[i] = &dmaDoneEventAll[i];

--- 410 unchanged lines hidden (view full) ---

496 }
497
498 assert(!readEvent.scheduled());
499 if (vnc)
500 vnc->setDirty();
501
502 DPRINTF(PL111, "-- write out frame buffer into bmp\n");
503
504 if (!pic)
505 pic = simout.create(csprintf("%s.framebuffer.bmp", sys->name()), true);
506
507 assert(bmp);
508 assert(pic);
509 pic->seekp(0);
510 bmp->write(pic);
511
512 // schedule the next read based on when the last frame started
513 // and the desired fps (i.e. maxFrameTime), we turn the
514 // argument into a relative number of cycles in the future
515 if (lcdControl.lcden)
516 schedule(readEvent, clockEdge(ticksToCycles(startTime -

--- 241 unchanged lines hidden ---