diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-10-03 16:11:42 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2017-10-04 14:43:05 +0300 |
commit | 26d0da428f6d6029ad803821ddb6bbc6ff5765a5 (patch) | |
tree | 31b1210d9b622fab96a16fa43370f463311c8aae /lib | |
parent | 9913b582eeb5e9d52dd9963f95f875e1231f44b2 (diff) |
lib/igt_kms: Disable crtc in legacy path when output is unset
When the output is unset, but the fb is still valid we still have
to perform a disable on the crtc.
This ixes the following crash in kms_color (although previous commit
does as well):
(gdb) bt
0 igt_output_get_mode (output=output@entry=0x0) at igt_kms.c:2828
1 0x000055555556f0d5 in igt_primary_plane_commit_legacy(..) at igt_kms.c:2341
2 igt_plane_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2394
3 igt_pipe_commit (fail_on_error=true, s=COMMIT_LEGACY, ..) at igt_kms.c:2435
4 do_display_commit (display=0x7fffffffe5d8, s=COMMIT_LEGACY, ..) at igt_kms.c:2667
5 0x000055555556f38e in igt_display_commit2 (display=<optimized out>, s=<optimized out>) at igt_kms.c:2777
6 0x000055555555ef84 in run_tests_for_pipe (data=.., p=PIPE_B) at kms_color.c:1053
7 0x000055555555f610 in __real_main1189 () at kms_color.c:1206
8 0x000055555555cbc7 in main (argc=<optimized out>, argv=<optimized out>) at kms_color.c:1189
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_kms.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index d25090b0..a572fc60 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -2336,7 +2336,7 @@ static int igt_primary_plane_commit_legacy(igt_plane_t *primary, return 0; crtc_id = pipe->crtc_id; - fb_id = igt_plane_get_fb_id(primary); + fb_id = output ? igt_plane_get_fb_id(primary) : 0; if (fb_id) mode = igt_output_get_mode(output); else |