hdlcd.hh (11091:62e1504b9c64) hdlcd.hh (11168:f98eb2da15a4)
1/*
2 * Copyright (c) 2010-2013, 2015 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

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

90class HDLcdPixelPump;
91
92class HDLcd: public AmbaDmaDevice
93{
94 public:
95 HDLcd(const HDLcdParams *p);
96 ~HDLcd();
97
1/*
2 * Copyright (c) 2010-2013, 2015 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

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

90class HDLcdPixelPump;
91
92class HDLcd: public AmbaDmaDevice
93{
94 public:
95 HDLcd(const HDLcdParams *p);
96 ~HDLcd();
97
98 void regStats() M5_ATTR_OVERRIDE;
98 void regStats() override;
99
99
100 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
101 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
100 void serialize(CheckpointOut &cp) const override;
101 void unserialize(CheckpointIn &cp) override;
102
102
103 void drainResume() M5_ATTR_OVERRIDE;
103 void drainResume() override;
104
105 public: // IO device interface
104
105 public: // IO device interface
106 Tick read(PacketPtr pkt) M5_ATTR_OVERRIDE;
107 Tick write(PacketPtr pkt) M5_ATTR_OVERRIDE;
106 Tick read(PacketPtr pkt) override;
107 Tick write(PacketPtr pkt) override;
108
108
109 AddrRangeList getAddrRanges() const M5_ATTR_OVERRIDE { return addrRanges; }
109 AddrRangeList getAddrRanges() const override { return addrRanges; }
110
111 protected: // Parameters
112 VncInput *vnc;
113 const bool workaroundSwapRB;
114 const bool workaroundDmaLineCount;
115 const AddrRangeList addrRanges;
116 const bool enableCapture;
117 const Addr pixelBufferSize;

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

323 {
324 public:
325 PixelPump(HDLcd &p, ClockDomain &pxl_clk, unsigned pixel_chunk)
326 : BasePixelPump(p, pxl_clk, pixel_chunk), parent(p) {}
327
328 void dumpSettings();
329
330 protected:
110
111 protected: // Parameters
112 VncInput *vnc;
113 const bool workaroundSwapRB;
114 const bool workaroundDmaLineCount;
115 const AddrRangeList addrRanges;
116 const bool enableCapture;
117 const Addr pixelBufferSize;

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

323 {
324 public:
325 PixelPump(HDLcd &p, ClockDomain &pxl_clk, unsigned pixel_chunk)
326 : BasePixelPump(p, pxl_clk, pixel_chunk), parent(p) {}
327
328 void dumpSettings();
329
330 protected:
331 bool nextPixel(Pixel &p) M5_ATTR_OVERRIDE { return parent.pxlNext(p); }
331 bool nextPixel(Pixel &p) override { return parent.pxlNext(p); }
332
332
333 void onVSyncBegin() M5_ATTR_OVERRIDE { return parent.pxlVSyncBegin(); }
334 void onVSyncEnd() M5_ATTR_OVERRIDE { return parent.pxlVSyncEnd(); }
333 void onVSyncBegin() override { return parent.pxlVSyncBegin(); }
334 void onVSyncEnd() override { return parent.pxlVSyncEnd(); }
335
335
336 void onUnderrun(unsigned x, unsigned y) M5_ATTR_OVERRIDE {
336 void onUnderrun(unsigned x, unsigned y) override {
337 parent.pxlUnderrun();
338 }
339
337 parent.pxlUnderrun();
338 }
339
340 void onFrameDone() M5_ATTR_OVERRIDE { parent.pxlFrameDone(); }
340 void onFrameDone() override { parent.pxlFrameDone(); }
341
342 protected:
343 HDLcd &parent;
344 };
345
346 /** Helper to write out bitmaps */
347 Bitmap bmp;
348

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

361 DmaEngine(HDLcd &_parent, size_t size,
362 unsigned request_size, unsigned max_pending,
363 size_t line_size, ssize_t line_pitch, unsigned num_lines);
364
365 void startFrame(Addr fb_base);
366 void abortFrame();
367 void dumpSettings();
368
341
342 protected:
343 HDLcd &parent;
344 };
345
346 /** Helper to write out bitmaps */
347 Bitmap bmp;
348

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

361 DmaEngine(HDLcd &_parent, size_t size,
362 unsigned request_size, unsigned max_pending,
363 size_t line_size, ssize_t line_pitch, unsigned num_lines);
364
365 void startFrame(Addr fb_base);
366 void abortFrame();
367 void dumpSettings();
368
369 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
370 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
369 void serialize(CheckpointOut &cp) const override;
370 void unserialize(CheckpointIn &cp) override;
371
372 protected:
371
372 protected:
373 void onEndOfBlock() M5_ATTR_OVERRIDE;
374 void onIdle() M5_ATTR_OVERRIDE;
373 void onEndOfBlock() override;
374 void onIdle() override;
375
376 HDLcd &parent;
377 const size_t lineSize;
378 const ssize_t linePitch;
379 const unsigned numLines;
380
381 Addr nextLineAddr;
382 Addr frameEnd;
383 };
384
385 std::unique_ptr<DmaEngine> dmaEngine;
386
387 protected: // Statistics
388 struct {
389 Stats::Scalar underruns;
390 } stats;
391};
392
393#endif
375
376 HDLcd &parent;
377 const size_t lineSize;
378 const ssize_t linePitch;
379 const unsigned numLines;
380
381 Addr nextLineAddr;
382 Addr frameEnd;
383 };
384
385 std::unique_ptr<DmaEngine> dmaEngine;
386
387 protected: // Statistics
388 struct {
389 Stats::Scalar underruns;
390 } stats;
391};
392
393#endif