summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-05-27 15:09:02 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-05-27 17:24:14 +0300
commitecb075e580912d201375338b01afc762792b9d0b (patch)
tree54189f18a8412a90a9132fb19ebfdcea40dcb3b0
parent5c21d8544fa420624cd8464c6257598898e8f666 (diff)
add missing idx for Plane & Encoder
-rw-r--r--libkms++/card.cpp4
-rw-r--r--libkms++/encoder.cpp4
-rw-r--r--libkms++/encoder.h2
-rw-r--r--libkms++/plane.cpp4
-rw-r--r--libkms++/plane.h2
5 files changed, 8 insertions, 8 deletions
diff --git a/libkms++/card.cpp b/libkms++/card.cpp
index 4fd971d..30f3abf 100644
--- a/libkms++/card.cpp
+++ b/libkms++/card.cpp
@@ -77,7 +77,7 @@ Card::Card(const std::string& device)
for (int i = 0; i < res->count_encoders; ++i) {
uint32_t id = res->encoders[i];
- auto ob = new Encoder(*this, id);
+ auto ob = new Encoder(*this, id, i);
m_obmap[id] = ob;
m_encoders.push_back(ob);
}
@@ -88,7 +88,7 @@ Card::Card(const std::string& device)
for (uint i = 0; i < planeRes->count_planes; ++i) {
uint32_t id = planeRes->planes[i];
- auto ob = new Plane(*this, id);
+ auto ob = new Plane(*this, id, i);
m_obmap[id] = ob;
m_planes.push_back(ob);
}
diff --git a/libkms++/encoder.cpp b/libkms++/encoder.cpp
index ba6b076..e3b90fa 100644
--- a/libkms++/encoder.cpp
+++ b/libkms++/encoder.cpp
@@ -30,8 +30,8 @@ static const map<int, string> encoder_types = {
#undef DEF_ENC
};
-Encoder::Encoder(Card &card, uint32_t id)
- :DrmPropObject(card, id, DRM_MODE_OBJECT_ENCODER)
+Encoder::Encoder(Card &card, uint32_t id, uint32_t idx)
+ :DrmPropObject(card, id, DRM_MODE_OBJECT_ENCODER, idx)
{
m_priv = new EncoderPriv();
m_priv->drm_encoder = drmModeGetEncoder(this->card().fd(), this->id());
diff --git a/libkms++/encoder.h b/libkms++/encoder.h
index 1b54572..b5aac70 100644
--- a/libkms++/encoder.h
+++ b/libkms++/encoder.h
@@ -17,7 +17,7 @@ public:
const std::string& get_encoder_type() const;
private:
- Encoder(Card& card, uint32_t id);
+ Encoder(Card& card, uint32_t id, uint32_t idx);
~Encoder();
EncoderPriv* m_priv;
diff --git a/libkms++/plane.cpp b/libkms++/plane.cpp
index b82c1b4..46cd3e6 100644
--- a/libkms++/plane.cpp
+++ b/libkms++/plane.cpp
@@ -18,8 +18,8 @@ struct PlanePriv
drmModePlanePtr drm_plane;
};
-Plane::Plane(Card &card, uint32_t id)
- :DrmPropObject(card, id, DRM_MODE_OBJECT_PLANE)
+Plane::Plane(Card &card, uint32_t id, uint32_t idx)
+ :DrmPropObject(card, id, DRM_MODE_OBJECT_PLANE, idx)
{
m_priv = new PlanePriv();
m_priv->drm_plane = drmModeGetPlane(this->card().fd(), this->id());
diff --git a/libkms++/plane.h b/libkms++/plane.h
index 3d9d4cd..d50e539 100644
--- a/libkms++/plane.h
+++ b/libkms++/plane.h
@@ -33,7 +33,7 @@ public:
uint32_t y() const;
uint32_t gamma_size() const;
private:
- Plane(Card& card, uint32_t id);
+ Plane(Card& card, uint32_t id, uint32_t idx);
~Plane();
PlanePriv* m_priv;