summaryrefslogtreecommitdiff
path: root/kms++/inc
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-17 17:24:25 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-17 17:43:48 +0200
commitdb0da1f33c7d688e84e9cd7ff0551842bb68ca6f (patch)
tree58abaa24d29b2c592b9de03e1d4c1aaa23e22806 /kms++/inc
parentd49777b00e844ac77e0f3b0cfb9b9e07257b4c26 (diff)
card: another try with card constructors
Let's try again with the card constructors. Card::open_modesetting_card() is removed. The main constructor is Card(const std::string& dev_path = ""). If dev_path is set, the device node with that path is used. If dev_path is not set, the behavior is similar as previously, except a modeset capable card is used at the third step: - If KMSXX_DEVICE env variable is set, the card device with that path is opened. - If KMSXX_DRIVER env variable is set, the card with the given driver name and index is opened. The format is either "drvname" or "drvname:idx". - If neither env variable is given, the first modeset capable card is opened. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++/inc')
-rw-r--r--kms++/inc/kms++/card.h5
-rw-r--r--kms++/inc/kms++/omap/omapcard.h3
2 files changed, 2 insertions, 6 deletions
diff --git a/kms++/inc/kms++/card.h b/kms++/inc/kms++/card.h
index a2c27f8..099d5b5 100644
--- a/kms++/inc/kms++/card.h
+++ b/kms++/inc/kms++/card.h
@@ -14,10 +14,7 @@ class Card
{
friend class Framebuffer;
public:
- static std::unique_ptr<Card> open_modesetting_card();
-
- Card();
- Card(const std::string& dev_path);
+ Card(const std::string& dev_path = "");
Card(const std::string& driver, uint32_t idx);
virtual ~Card();
diff --git a/kms++/inc/kms++/omap/omapcard.h b/kms++/inc/kms++/omap/omapcard.h
index 5c2f3a5..2f1f528 100644
--- a/kms++/inc/kms++/omap/omapcard.h
+++ b/kms++/inc/kms++/omap/omapcard.h
@@ -9,8 +9,7 @@ namespace kms
class OmapCard : public Card
{
public:
- OmapCard();
- OmapCard(const std::string& device);
+ OmapCard(const std::string& device = "");
virtual ~OmapCard();
struct omap_device* dev() const { return m_omap_dev; }