return drmModeConnectorSetProperty(drm_fd, o->id, dpms, mode);
}
+static bool
+analog_tv_connector(struct test_output *o)
+{
+ uint32_t connector_type = o->connector->connector_type;
+
+ return connector_type == DRM_MODE_CONNECTOR_TV ||
+ connector_type == DRM_MODE_CONNECTOR_9PinDIN ||
+ connector_type == DRM_MODE_CONNECTOR_SVIDEO ||
+ connector_type == DRM_MODE_CONNECTOR_Composite;
+}
+
static void page_flip_handler(int fd, unsigned int frame, unsigned int sec,
unsigned int usec, void *data)
{
exit(6);
}
- if (o->count > 1 && o->flags == 0) {
+ if (o->count > 1 && o->flags == 0 && !analog_tv_connector(o)) {
timersub(&pageflip_ts, &o->last_flip_ts, &diff);
usec_interflip = 1.0 / ((double) o->mode.vrefresh) * 1000.0 * 1000.0;
return mode.mode_valid && mode.fb_id == fb;
}
-static bool
-analog_tv_connector(uint32_t connector_type)
-{
- return connector_type == DRM_MODE_CONNECTOR_TV ||
- connector_type == DRM_MODE_CONNECTOR_9PinDIN ||
- connector_type == DRM_MODE_CONNECTOR_SVIDEO ||
- connector_type == DRM_MODE_CONNECTOR_Composite;
-}
static void flip_mode(struct test_output *o, int crtc, int duration)
{
int ret;
/* Verify we drop no frames, but only if it's not a TV encoder, since
* those use some funny fake timings behind userspace's back. */
- if (o->flags == 0 && !analog_tv_connector(o->connector->connector_type)) {
+ if (o->flags == 0 && !analog_tv_connector(o)) {
struct timeval now;
long us;
int expected;
int flags;
const char *name;
} tests[] = {
- { 5, 0 , "plain flip" },
+ { 15, 0 , "plain flip" },
{ 30, TEST_DPMS, "flip vs dpms" },
{ 30, TEST_DPMS | TEST_WITH_DUMMY_LOAD, "delayed flip vs. dpms" },
{ 5, TEST_PAN, "flip vs panning" },