pl111.cc (9525:0587c8983d47) pl111.cc (9530:9adfceab236e)
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),
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
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
80 dmaBuffer = new uint8_t[buffer_size];
81
82 memset(lcdPalette, 0, sizeof(lcdPalette));
83 memset(cursorImage, 0, sizeof(cursorImage));
84 memset(dmaBuffer, 0, buffer_size);
85
86 for (int i = 0; i < maxOutstandingDma; ++i)
87 dmaDoneEventFree[i] = &dmaDoneEventAll[i];

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

498 }
499
500 assert(!readEvent.scheduled());
501 if (vnc)
502 vnc->setDirty();
503
504 DPRINTF(PL111, "-- write out frame buffer into bmp\n");
505
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
506 assert(bmp);
507 assert(bmp);
508 assert(pic);
507 pic->seekp(0);
508 bmp->write(pic);
509
510 // schedule the next read based on when the last frame started
511 // and the desired fps (i.e. maxFrameTime), we turn the
512 // argument into a relative number of cycles in the future
513 if (lcdControl.lcden)
514 schedule(readEvent, clockEdge(ticksToCycles(startTime -

--- 241 unchanged lines hidden ---
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 ---