summaryrefslogtreecommitdiff
path: root/src/dev/arm
diff options
context:
space:
mode:
authorChander Sudanthi <chander.sudanthi@arm.com>2012-11-02 11:32:00 -0500
committerChander Sudanthi <chander.sudanthi@arm.com>2012-11-02 11:32:00 -0500
commit55787cc0d0ecdbd060f7ee1caaaab90d2482eb67 (patch)
treefff89ebf048d5afecada34a95d7529ac48361e0b /src/dev/arm
parentac161c1d7294fc755b6c06e23f719f577d926695 (diff)
downloadgem5-55787cc0d0ecdbd060f7ee1caaaab90d2482eb67.tar.xz
base: split out the VncServer into a VncInput and Server classes
This patch adds a VncInput base class which VncServer inherits from. Another class can implement the same interface and be used instead of the VncServer, for example a class that replays Vnc traffic. --HG-- rename : src/base/vnc/VncServer.py => src/base/vnc/Vnc.py rename : src/base/vnc/vncserver.cc => src/base/vnc/vncinput.cc rename : src/base/vnc/vncserver.hh => src/base/vnc/vncinput.hh
Diffstat (limited to 'src/dev/arm')
-rw-r--r--src/dev/arm/RealView.py4
-rw-r--r--src/dev/arm/kmi.cc2
-rw-r--r--src/dev/arm/kmi.hh4
-rw-r--r--src/dev/arm/pl111.cc26
-rw-r--r--src/dev/arm/pl111.hh4
5 files changed, 20 insertions, 20 deletions
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 93f534eb3..f0b629b38 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -128,7 +128,7 @@ class PL031(AmbaIntDevice):
class Pl050(AmbaIntDevice):
type = 'Pl050'
- vnc = Param.VncServer(Parent.any, "Vnc server for remote frame buffer display")
+ vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer display")
is_mouse = Param.Bool(False, "Is this interface a mouse, if not a keyboard")
int_delay = '1us'
amba_id = 0x00141050
@@ -137,7 +137,7 @@ class Pl111(AmbaDmaDevice):
type = 'Pl111'
# Override the default clock
clock = '24MHz'
- vnc = Param.VncServer(Parent.any, "Vnc server for remote frame buffer display")
+ vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer display")
amba_id = 0x00141111
class RealView(Platform):
diff --git a/src/dev/arm/kmi.cc b/src/dev/arm/kmi.cc
index c90e00125..b5819c9d8 100644
--- a/src/dev/arm/kmi.cc
+++ b/src/dev/arm/kmi.cc
@@ -41,7 +41,7 @@
* William Wang
*/
-#include "base/vnc/vncserver.hh"
+#include "base/vnc/vncinput.hh"
#include "base/trace.hh"
#include "debug/Pl050.hh"
#include "dev/arm/amba_device.hh"
diff --git a/src/dev/arm/kmi.hh b/src/dev/arm/kmi.hh
index e769a8a46..e2e75cfef 100644
--- a/src/dev/arm/kmi.hh
+++ b/src/dev/arm/kmi.hh
@@ -50,7 +50,7 @@
#include <list>
-#include "base/vnc/vncserver.hh"
+#include "base/vnc/vncinput.hh"
#include "dev/arm/amba_device.hh"
#include "params/Pl050.hh"
@@ -118,7 +118,7 @@ class Pl050 : public AmbaIntDevice, public VncKeyboard, public VncMouse
bool shiftDown;
/** The vnc server we're connected to (if any) */
- VncServer *vnc;
+ VncInput *vnc;
/** If the linux driver has initialized the device yet and thus can we send
* mouse data */
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc
index 22eba1458..c68f606cd 100644
--- a/src/dev/arm/pl111.cc
+++ b/src/dev/arm/pl111.cc
@@ -38,7 +38,7 @@
* Ali Saidi
*/
-#include "base/vnc/vncserver.hh"
+#include "base/vnc/vncinput.hh"
#include "base/bitmap.hh"
#include "base/output.hh"
#include "base/trace.hh"
@@ -64,7 +64,7 @@ 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),
- vncserver(p->vnc), bmp(NULL), width(LcdMaxWidth), height(LcdMaxHeight),
+ vnc(p->vnc), bmp(NULL), width(LcdMaxWidth), height(LcdMaxHeight),
bytesPerPixel(4), startTime(0), startAddr(0), maxAddr(0), curAddr(0),
waterMark(0), dmaPendingNum(0), readEvent(this), fillFifoEvent(this),
dmaDoneEvent(maxOutstandingDma, this), intEvent(this)
@@ -80,8 +80,8 @@ Pl111::Pl111(const Params *p)
memset(cursorImage, 0, sizeof(cursorImage));
memset(dmaBuffer, 0, buffer_size);
- if (vncserver)
- vncserver->setFramebufferAddr(dmaBuffer);
+ if (vnc)
+ vnc->setFramebufferAddr(dmaBuffer);
}
Pl111::~Pl111()
@@ -386,18 +386,18 @@ Pl111::updateVideoParams()
bytesPerPixel = 2;
}
- if (vncserver) {
+ if (vnc) {
if (lcdControl.lcdbpp == bpp24 && lcdControl.bgr)
- vncserver->setFrameBufferParams(VideoConvert::bgr8888, width,
+ vnc->setFrameBufferParams(VideoConvert::bgr8888, width,
height);
else if (lcdControl.lcdbpp == bpp24 && !lcdControl.bgr)
- vncserver->setFrameBufferParams(VideoConvert::rgb8888, width,
+ vnc->setFrameBufferParams(VideoConvert::rgb8888, width,
height);
else if (lcdControl.lcdbpp == bpp16m565 && lcdControl.bgr)
- vncserver->setFrameBufferParams(VideoConvert::bgr565, width,
+ vnc->setFrameBufferParams(VideoConvert::bgr565, width,
height);
else if (lcdControl.lcdbpp == bpp16m565 && !lcdControl.bgr)
- vncserver->setFrameBufferParams(VideoConvert::rgb565, width,
+ vnc->setFrameBufferParams(VideoConvert::rgb565, width,
height);
else
panic("Unimplemented video mode\n");
@@ -489,8 +489,8 @@ Pl111::dmaDone()
}
assert(!readEvent.scheduled());
- if (vncserver)
- vncserver->setDirty();
+ if (vnc)
+ vnc->setDirty();
DPRINTF(PL111, "-- write out frame buffer into bmp\n");
@@ -710,8 +710,8 @@ Pl111::unserialize(Checkpoint *cp, const std::string &section)
if (lcdControl.lcdpwr) {
updateVideoParams();
- if (vncserver)
- vncserver->setDirty();
+ if (vnc)
+ vnc->setDirty();
}
}
diff --git a/src/dev/arm/pl111.hh b/src/dev/arm/pl111.hh
index 5776f199c..49512fcc0 100644
--- a/src/dev/arm/pl111.hh
+++ b/src/dev/arm/pl111.hh
@@ -53,7 +53,7 @@
#include "sim/serialize.hh"
class Gic;
-class VncServer;
+class VncInput;
class Bitmap;
class Pl111: public AmbaDmaDevice
@@ -228,7 +228,7 @@ class Pl111: public AmbaDmaDevice
InterruptReg clcdCrsrMis;
/** VNC server */
- VncServer *vncserver;
+ VncInput *vnc;
/** Helper to write out bitmaps */
Bitmap *bmp;