add missing idx for Plane & Encoder
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 27 May 2016 12:09:02 +0000 (15:09 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 27 May 2016 14:24:14 +0000 (17:24 +0300)
libkms++/card.cpp
libkms++/encoder.cpp
libkms++/encoder.h
libkms++/plane.cpp
libkms++/plane.h

index 4fd971d70376a1c9b272aaba01a82ed981742040..30f3abff0d41c8cf1c71e950afb39fea70a6729b 100644 (file)
@@ -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);
        }
index ba6b0765be53171a13bc6f2b40f14c37b10ee178..e3b90fa5aacbc42b3e690d557ebf28dc67c0c0ac 100644 (file)
@@ -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());
index 1b545729f62daebed192bb8209c5dbfaddbff1e1..b5aac709fe02817c21d7cf5197d6d6dbd8de197e 100644 (file)
@@ -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;
index b82c1b41ce8a44329a119b4b8dbd6f55a3f8bf28..46cd3e6fe2d50e2f356cdab02691e65687627fa3 100644 (file)
@@ -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());
index 3d9d4cd2a442f8712f12b66d18883817fdc08e91..d50e5395c6107ffa5005ae296cce365e7176e5c5 100644 (file)
@@ -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;