From db0da1f33c7d688e84e9cd7ff0551842bb68ca6f Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 17 Jan 2019 17:24:25 +0200 Subject: 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 --- utils/kmsblank.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/kmsblank.cpp') diff --git a/utils/kmsblank.cpp b/utils/kmsblank.cpp index 0b51810..286c7f7 100644 --- a/utils/kmsblank.cpp +++ b/utils/kmsblank.cpp @@ -27,7 +27,7 @@ static void usage() int main(int argc, char **argv) { - string dev_path = "/dev/dri/card0"; + string dev_path; vector conn_strs; uint32_t time = 0; -- cgit v1.2.3