mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 18:06:13 +00:00
testdisplay: Test the first mode if there is no preferred mode.
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>
This commit is contained in:
parent
25b25b907d
commit
6cc92bcbc5
@ -325,9 +325,16 @@ static void connector_find_preferred_mode(struct connector *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!c->mode_valid) {
|
if (!c->mode_valid) {
|
||||||
fprintf(stderr, "failed to find any modes on connector %d\n",
|
if (connector->count_modes > 0) {
|
||||||
c->id);
|
/* use the first mode as test mode */
|
||||||
return;
|
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 */
|
/* Now get the encoder */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user