drm/amd/display: check for null before calling is_blanked
authorYue Hin Lau <[email protected]>
Tue, 12 Dec 2017 19:34:30 +0000 (14:34 -0500)
committerAlex Deucher <[email protected]>
Wed, 20 Dec 2017 19:48:41 +0000 (14:48 -0500)
Signed-off-by: Yue Hin Lau <[email protected]>
Reviewed-by: Eric Bernstein <[email protected]>
Acked-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/display/dc/core/dc.c

index ab875ea8aba47ee6a99bd0819b685b3422540e78..35e84ed031de08f5edfadbfb71e550291ae8ebef 100644 (file)
@@ -580,7 +580,7 @@ static void program_timing_sync(
                for (j = 0; j < group_size; j++) {
                        struct pipe_ctx *temp;
 
-                       if (!pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg)) {
+                       if (pipe_set[j]->stream_res.tg->funcs->is_blanked && !pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg)) {
                                if (j == 0)
                                        break;
 
@@ -593,7 +593,7 @@ static void program_timing_sync(
 
                /* remove any other unblanked pipes as they have already been synced */
                for (j = j + 1; j < group_size; j++) {
-                       if (!pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg)) {
+                       if (pipe_set[j]->stream_res.tg->funcs->is_blanked && !pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg)) {
                                group_size--;
                                pipe_set[j] = pipe_set[group_size];
                                j--;