For a TV device, there might be no preferred mode. In this case,
we can test the first mode.
Signed-off-by: Hai Lan <hai.lan@intel.com>
}
if (!c->mode_valid) {
- fprintf(stderr, "failed to find any modes on connector %d\n",
- c->id);
- return;
+ if (connector->count_modes > 0) {
+ /* use the first mode as test mode */
+ c->mode = connector->modes[0];
+ c->mode_valid = 1;
+ }
+ else {
+ fprintf(stderr, "failed to find any modes on connector %d\n",
+ c->id);
+ return;
+ }
}
/* Now get the encoder */