summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/card.cpp19
-rw-r--r--libkms++/card.h2
-rw-r--r--libkms++/connector.cpp8
-rw-r--r--libkms++/connector.h2
-rw-r--r--libkms++/crtc.cpp8
-rw-r--r--libkms++/crtc.h2
-rw-r--r--libkms++/drmobject.cpp8
-rw-r--r--libkms++/drmobject.h3
-rw-r--r--libkms++/dumbframebuffer.cpp5
-rw-r--r--libkms++/dumbframebuffer.h2
-rw-r--r--libkms++/encoder.cpp8
-rw-r--r--libkms++/encoder.h2
-rw-r--r--libkms++/extframebuffer.cpp5
-rw-r--r--libkms++/extframebuffer.h2
-rw-r--r--libkms++/framebuffer.cpp5
-rw-r--r--libkms++/framebuffer.h2
-rw-r--r--libkms++/plane.cpp20
-rw-r--r--libkms++/plane.h2
-rw-r--r--libkms++/property.cpp5
-rw-r--r--libkms++/property.h2
20 files changed, 0 insertions, 112 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 06a237f..2bb6673 100644
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
@@ -132,25 +132,6 @@ void Card::restore_modes()
conn->restore_mode();
}
-template <class T> static void print_obs(const map<uint32_t, DrmObject*>& obmap)
-{
- for (auto pair : obmap) {
- auto ob = pair.second;
- if (dynamic_cast<T*>(ob)) {
- ob->print_short();
- //ob->print_props();
- }
- }
-}
-
-void Card::print_short() const
-{
- print_obs<Connector>(m_obmap);
- print_obs<Encoder>(m_obmap);
- print_obs<Crtc>(m_obmap);
- print_obs<Plane>(m_obmap);
-}
-
Property* Card::get_prop(const string& name) const
{
for (auto prop : m_properties) {
diff --git a/libkms++/card.h b/libkms++/card.h
index 7232467..bbe34e2 100644
--- a/libkms++/card.h
+++ b/libkms++/card.h
@@ -35,8 +35,6 @@ public:
bool has_atomic() const { return m_has_atomic; }
bool has_has_universal_planes() const { return m_has_universal_planes; }
- void print_short() const;
-
const std::vector<Connector*> get_connectors() const { return m_connectors; }
const std::vector<Encoder*> get_encoders() const { return m_encoders; }
const std::vector<Crtc*> get_crtcs() const { return m_crtcs; }
diff --git a/libkms++/connector.cpp b/libkms++/connector.cpp
index eca3edd..6ab590e 100644
--- a/libkms++/connector.cpp
+++ b/libkms++/connector.cpp
@@ -96,14 +96,6 @@ void Connector::restore_mode()
m_saved_crtc->restore_mode(this);
}
-void Connector::print_short() const
-{
- auto c = m_priv->drm_connector;
-
- printf("Connector %d, %s, %dx%dmm, %s\n", id(), m_fullname.c_str(),
- c->mmWidth, c->mmHeight, connection_str.at(c->connection).c_str());
-}
-
Videomode Connector::get_default_mode() const
{
drmModeModeInfo drmmode = m_priv->drm_connector->modes[0];
diff --git a/libkms++/connector.h b/libkms++/connector.h
index f586f4e..9776be3 100644
--- a/libkms++/connector.h
+++ b/libkms++/connector.h
@@ -26,8 +26,6 @@ class Connector : public DrmObject
{
friend class Card;
public:
- void print_short() const;
-
Videomode get_default_mode() const;
Videomode get_mode(const std::string& mode) const;
diff --git a/libkms++/crtc.cpp b/libkms++/crtc.cpp
index 321670c..6d5ee02 100644
--- a/libkms++/crtc.cpp
+++ b/libkms++/crtc.cpp
@@ -50,14 +50,6 @@ void Crtc::restore_mode(Connector* conn)
conns, 1, &c->mode);
}
-void Crtc::print_short() const
-{
- auto c = m_priv->drm_crtc;
-
- printf("Crtc %d, %d,%d %dx%d\n", id(),
- c->x, c->y, c->width, c->height);
-}
-
int Crtc::set_mode(Connector* conn, Framebuffer& fb, const Videomode& mode)
{
uint32_t conns[] = { conn->id() };
diff --git a/libkms++/crtc.h b/libkms++/crtc.h
index 7581302..ec376e4 100644
--- a/libkms++/crtc.h
+++ b/libkms++/crtc.h
@@ -14,8 +14,6 @@ class Crtc : public DrmObject
friend class Card;
friend class Connector;
public:
- void print_short() const;
-
const std::vector<Plane*>& get_possible_planes() const { return m_possible_planes; }
int set_mode(Connector* conn, Framebuffer& fb, const Videomode& mode);
diff --git a/libkms++/drmobject.cpp b/libkms++/drmobject.cpp
index 175ee16..063ae32 100644
--- a/libkms++/drmobject.cpp
+++ b/libkms++/drmobject.cpp
@@ -45,14 +45,6 @@ void DrmObject::refresh_props()
drmModeFreeObjectProperties(props);
}
-void DrmObject::print_props() const
-{
- for (auto it = m_prop_values.begin(); it != m_prop_values.end(); ++it) {
- cout << "\t" << card().get_prop(it->first)->name() <<
- " = " << it->second << endl;
- }
-}
-
uint64_t DrmObject::get_prop_value(uint32_t id) const
{
return m_prop_values.at(id);
diff --git a/libkms++/drmobject.h b/libkms++/drmobject.h
index 9ce2adc..2ff1b04 100644
--- a/libkms++/drmobject.h
+++ b/libkms++/drmobject.h
@@ -14,9 +14,6 @@ public:
DrmObject(const DrmObject& other) = delete;
DrmObject& operator=(const DrmObject& other) = delete;
- virtual void print_short() const = 0;
- void print_props() const;
-
uint32_t id() const { return m_id; }
Card& card() const { return m_card; }
diff --git a/libkms++/dumbframebuffer.cpp b/libkms++/dumbframebuffer.cpp
index fa5562c..d1e40ff 100644
--- a/libkms++/dumbframebuffer.cpp
+++ b/libkms++/dumbframebuffer.cpp
@@ -33,11 +33,6 @@ DumbFramebuffer::~DumbFramebuffer()
Destroy();
}
-void DumbFramebuffer::print_short() const
-{
- printf("DumbFramebuffer %d\n", id());
-}
-
struct FormatPlaneInfo
{
uint8_t bitspp; /* bits per (macro) pixel */
diff --git a/libkms++/dumbframebuffer.h b/libkms++/dumbframebuffer.h
index 49cf8a0..0ee0406 100644
--- a/libkms++/dumbframebuffer.h
+++ b/libkms++/dumbframebuffer.h
@@ -12,8 +12,6 @@ public:
DumbFramebuffer(Card& card, uint32_t width, uint32_t height, PixelFormat format);
virtual ~DumbFramebuffer();
- void print_short() const;
-
PixelFormat format() const { return m_format; }
unsigned num_planes() const { return m_num_planes; }
diff --git a/libkms++/encoder.cpp b/libkms++/encoder.cpp
index 6f79e4f..ffef897 100644
--- a/libkms++/encoder.cpp
+++ b/libkms++/encoder.cpp
@@ -44,14 +44,6 @@ Encoder::~Encoder()
delete m_priv;
}
-void Encoder::print_short() const
-{
- auto e = m_priv->drm_encoder;
-
- printf("Encoder %d, %d\n", id(),
- e->encoder_type);
-}
-
Crtc* Encoder::get_crtc() const
{
if (m_priv->drm_encoder->crtc_id)
diff --git a/libkms++/encoder.h b/libkms++/encoder.h
index 609e136..956a4c7 100644
--- a/libkms++/encoder.h
+++ b/libkms++/encoder.h
@@ -12,8 +12,6 @@ class Encoder : public DrmObject
{
friend class Card;
public:
- void print_short() const;
-
Crtc* get_crtc() const;
std::vector<Crtc*> get_possible_crtcs() const;
diff --git a/libkms++/extframebuffer.cpp b/libkms++/extframebuffer.cpp
index 4c90a4e..35fead8 100644
--- a/libkms++/extframebuffer.cpp
+++ b/libkms++/extframebuffer.cpp
@@ -40,9 +40,4 @@ ExtFramebuffer::~ExtFramebuffer()
drmModeRmFB(card().fd(), id());
}
-void ExtFramebuffer::print_short() const
-{
- printf("Framebuffer %d\n", id());
-}
-
}
diff --git a/libkms++/extframebuffer.h b/libkms++/extframebuffer.h
index 82909c5..b83bbd5 100644
--- a/libkms++/extframebuffer.h
+++ b/libkms++/extframebuffer.h
@@ -14,8 +14,6 @@ public:
uint32_t handles[4], uint32_t pitches[4], uint32_t offsets[4]);
virtual ~ExtFramebuffer();
- void print_short() const;
-
private:
uint32_t m_pitch;
uint32_t m_bpp;
diff --git a/libkms++/framebuffer.cpp b/libkms++/framebuffer.cpp
index bc1fd51..a7e5ad6 100644
--- a/libkms++/framebuffer.cpp
+++ b/libkms++/framebuffer.cpp
@@ -27,9 +27,4 @@ Framebuffer::Framebuffer(Card& card, uint32_t id)
drmModeFreeFB(fb);
}
-void Framebuffer::print_short() const
-{
- printf("Framebuffer %d\n", id());
-}
-
}
diff --git a/libkms++/framebuffer.h b/libkms++/framebuffer.h
index 33349d8..12374ae 100644
--- a/libkms++/framebuffer.h
+++ b/libkms++/framebuffer.h
@@ -12,8 +12,6 @@ public:
uint32_t width() const { return m_width; }
uint32_t height() const { return m_height; }
-
- virtual void print_short() const;
protected:
Framebuffer(Card& card, int width, int height);
diff --git a/libkms++/plane.cpp b/libkms++/plane.cpp
index 3ad3ddf..b4934b8 100644
--- a/libkms++/plane.cpp
+++ b/libkms++/plane.cpp
@@ -32,26 +32,6 @@ Plane::~Plane()
delete m_priv;
}
-void Plane::print_short() const
-{
- auto p = m_priv->drm_plane;
-
- printf("Plane %d, %d modes, %d,%d -> %dx%d\n", id(),
- p->count_formats,
- p->crtc_x, p->crtc_y, p->x, p->y);
-
- printf("\t");
- for (unsigned i = 0; i < p->count_formats; ++i) {
- uint32_t f = p->formats[i];
- printf("%c%c%c%c ",
- (f >> 0) & 0xff,
- (f >> 8) & 0xff,
- (f >> 16) & 0xff,
- (f >> 24) & 0xff);
- }
- printf("\n");
-}
-
bool Plane::supports_crtc(Crtc* crtc) const
{
return m_priv->drm_plane->possible_crtcs & (1 << crtc->idx());
diff --git a/libkms++/plane.h b/libkms++/plane.h
index 2faca78..91c403f 100644
--- a/libkms++/plane.h
+++ b/libkms++/plane.h
@@ -18,8 +18,6 @@ class Plane : public DrmObject
{
friend class Card;
public:
- void print_short() const;
-
bool supports_crtc(Crtc* crtc) const;
bool supports_format(PixelFormat fmt) const;
diff --git a/libkms++/property.cpp b/libkms++/property.cpp
index 3b8a0b8..5ec6bfa 100644
--- a/libkms++/property.cpp
+++ b/libkms++/property.cpp
@@ -27,11 +27,6 @@ Property::~Property()
delete m_priv;
}
-void Property::print_short() const
-{
- printf("Property %d, %s\n", id(), name().c_str());
-}
-
const string& Property::name() const
{
return m_name;
diff --git a/libkms++/property.h b/libkms++/property.h
index 4cb2653..148e325 100644
--- a/libkms++/property.h
+++ b/libkms++/property.h
@@ -11,8 +11,6 @@ class Property : public DrmObject
{
friend class Card;
public:
- void print_short() const;
-
const std::string& name() const;
const std::string to_str(uint64_t val) const;