dev-arm: Add a VExpress_GEM5_V2 platform with GICv3 support
[gem5.git] / src / dev / pixelpump.hh
index 582e1aa1852008a6bdf49b85ee09da14762bd87f..bc21fca753ac03ed441517e3cdc56d5dc8f732b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 ARM Limited
+ * Copyright (c) 2015, 2017 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -63,8 +63,8 @@ struct DisplayTimings : public Serializable
                    unsigned hbp, unsigned h_sync, unsigned hfp,
                    unsigned vbp, unsigned v_sync, unsigned vfp);
 
-    void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
-    void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
+    void serialize(CheckpointOut &cp) const override;
+    void unserialize(CheckpointIn &cp) override;
 
     /** How many pixel clocks are required for one line? */
     Cycles cyclesPerLine() const {
@@ -148,15 +148,22 @@ class BasePixelPump
       public Serializable
 {
   public:
-    BasePixelPump(EventManager &em, ClockDomain &pxl_clk, unsigned pixel_chunk);
+    BasePixelPump(EventManager &em, ClockDomain &pxl_clk,
+                  unsigned pixel_chunk);
     virtual ~BasePixelPump();
 
-    void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
-    void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
+    void serialize(CheckpointOut &cp) const override;
+    void unserialize(CheckpointIn &cp) override;
 
   public: // Public API
-    /** Starting pushing pixels using the supplied display timings. */
-    void start(const DisplayTimings &timings);
+    /** Update frame size using display timing */
+    void updateTimings(const DisplayTimings &timings);
+
+    /** Render an entire frame in KVM execution mode */
+    void renderFrame();
+
+    /** Starting pushing pixels in timing mode */
+    void start();
 
     /** Immediately stop pushing pixels */
     void stop();
@@ -257,14 +264,14 @@ class BasePixelPump
       public:
         PixelEvent(const char *name, BasePixelPump *parent, CallbackType func);
 
-        DrainState drain() M5_ATTR_OVERRIDE;
-        void drainResume() M5_ATTR_OVERRIDE;
+        DrainState drain() override;
+        void drainResume() override;
 
-        void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE;
-        void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE;
+        void serialize(CheckpointOut &cp) const override;
+        void unserialize(CheckpointIn &cp) override;
 
-        const std::string name() const M5_ATTR_OVERRIDE { return _name; }
-        void process() M5_ATTR_OVERRIDE {
+        const std::string name() const override { return _name; }
+        void process() override {
             (parent.*func)();
         }
 
@@ -285,6 +292,9 @@ class BasePixelPump
     void beginLine();
     void renderPixels();
 
+    /** Fast and event-free line rendering function */
+    void renderLine();
+
     /** Convenience vector when doing operations on all events */
     std::vector<PixelEvent *> pixelEvents;