summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-06-29 13:26:00 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-06-29 13:26:00 +0300
commit2cfc1d86771a0835abdef86a6f6fcd914506da86 (patch)
treeb7396be4633ce04a39bf97e2ce500d53ff1688c8 /utils
parent5666baaa8413bcd77344bee9117aab9321477b01 (diff)
kmstest: set props in legacy modesetting too
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/kmstest.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp
index 62b103f..aecb089 100644
--- a/utils/kmstest.cpp
+++ b/utils/kmstest.cpp
@@ -722,7 +722,7 @@ static void print_outputs(const vector<OutputInfo>& outputs)
if (!o.legacy_fbs.empty()) {
auto fb = o.legacy_fbs[0];
- printf(" (Fb %u %ux%u-%s)", fb->id(), fb->width(), fb->height(), PixelFormatToFourCC(fb->format()).c_str());
+ printf(" Fb %u %ux%u-%s\n", fb->id(), fb->width(), fb->height(), PixelFormatToFourCC(fb->format()).c_str());
}
for (unsigned j = 0; j < o.planes.size(); ++j) {
@@ -764,30 +764,41 @@ static void set_crtcs_n_planes_legacy(Card& card, const vector<OutputInfo>& outp
}
for (const OutputInfo& o : outputs) {
+ int r;
auto conn = o.connector;
auto crtc = o.crtc;
- if (!o.conn_props.empty() || !o.crtc_props.empty())
- printf("WARNING: properties not set without atomic modesetting");
+ for (const PropInfo& prop : o.conn_props) {
+ r = conn->set_prop_value(prop.prop, prop.val);
+ EXIT_IF(r, "failed to set connector property %s\n", prop.name.c_str());
+ }
+
+ for (const PropInfo& prop : o.crtc_props) {
+ r = crtc->set_prop_value(prop.prop, prop.val);
+ EXIT_IF(r, "failed to set crtc property %s\n", prop.name.c_str());
+ }
if (!o.legacy_fbs.empty()) {
auto fb = o.legacy_fbs[0];
- int r = crtc->set_mode(conn, *fb, o.mode);
+ r = crtc->set_mode(conn, *fb, o.mode);
if (r)
printf("crtc->set_mode() failed for crtc %u: %s\n",
crtc->id(), strerror(-r));
}
for (const PlaneInfo& p : o.planes) {
+ for (const PropInfo& prop : p.props) {
+ r = p.plane->set_prop_value(prop.prop, prop.val);
+ EXIT_IF(r, "failed to set plane property %s\n", prop.name.c_str());
+ }
+
auto fb = p.fbs[0];
- int r = crtc->set_plane(p.plane, *fb,
+ r = crtc->set_plane(p.plane, *fb,
p.x, p.y, p.w, p.h,
0, 0, fb->width(), fb->height());
if (r)
printf("crtc->set_plane() failed for plane %u: %s\n",
p.plane->id(), strerror(-r));
- if (!p.props.empty())
- printf("WARNING: properties not set without atomic modesetting");
}
}
}