From 616d7d09052dcdf31be74289720298c3f2e4a12f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 6 Jul 2021 19:33:55 -0400 Subject: [PATCH] panfrost: Assert that injected jobs are for blits Remove a level of indentation. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_scoreboard.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/panfrost/lib/pan_scoreboard.c b/src/panfrost/lib/pan_scoreboard.c index 515dd646f2f..a904f05de4a 100644 --- a/src/panfrost/lib/pan_scoreboard.c +++ b/src/panfrost/lib/pan_scoreboard.c @@ -145,18 +145,18 @@ panfrost_add_job( } if (inject) { - if (type == MALI_JOB_TYPE_TILER) { - if (scoreboard->first_tiler) { - /* Manual update of the dep2 field. This is bad, - * don't copy this pattern. - */ - scoreboard->first_tiler->opaque[5] = - scoreboard->first_tiler_dep1 | (index << 16); - } + assert(type == MALI_JOB_TYPE_TILER && "only for blit shaders"); - scoreboard->first_tiler = (void *)job->cpu; - scoreboard->first_tiler_dep1 = local_dep; + if (scoreboard->first_tiler) { + /* Manual update of the dep2 field. This is bad, + * don't copy this pattern. + */ + scoreboard->first_tiler->opaque[5] = + scoreboard->first_tiler_dep1 | (index << 16); } + + scoreboard->first_tiler = (void *)job->cpu; + scoreboard->first_tiler_dep1 = local_dep; scoreboard->first_job = job->gpu; return index; }