mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-29 18:56:08 +00:00
testdisplay: Move the code sanitizing depth into main()
It'll be shared by the set_mode() and set_3d_mode() functions. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
79f4cfedbf
commit
0396273972
@ -334,13 +334,6 @@ set_mode(struct connector *c)
|
|||||||
unsigned int fb_id = 0;
|
unsigned int fb_id = 0;
|
||||||
int j, test_mode_num;
|
int j, test_mode_num;
|
||||||
|
|
||||||
if (depth <= 8)
|
|
||||||
bpp = 8;
|
|
||||||
else if (depth > 8 && depth <= 16)
|
|
||||||
bpp = 16;
|
|
||||||
else if (depth > 16 && depth <= 32)
|
|
||||||
bpp = 32;
|
|
||||||
|
|
||||||
test_mode_num = 1;
|
test_mode_num = 1;
|
||||||
if (force_mode){
|
if (force_mode){
|
||||||
memcpy( &c->mode, &force_timing, sizeof(force_timing));
|
memcpy( &c->mode, &force_timing, sizeof(force_timing));
|
||||||
@ -585,6 +578,14 @@ int main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (depth <= 8)
|
||||||
|
bpp = 8;
|
||||||
|
else if (depth <= 16)
|
||||||
|
bpp = 16;
|
||||||
|
else if (depth <= 32)
|
||||||
|
bpp = 32;
|
||||||
|
|
||||||
if (!test_all_modes && !force_mode && !dump_info &&
|
if (!test_all_modes && !force_mode && !dump_info &&
|
||||||
!test_preferred_mode && specified_mode_num == -1)
|
!test_preferred_mode && specified_mode_num == -1)
|
||||||
test_all_modes = 1;
|
test_all_modes = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user