Path: blob/21.2-virgl/src/panfrost/lib/pan_scoreboard.h
4560 views
/*1* Copyright (C) 2019-2020 Collabora Ltd.2* Copyright (C) 2019 Alyssa Rosenzweig3* Copyright (C) 2014-2017 Broadcom4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the "Software"),7* to deal in the Software without restriction, including without limitation8* the rights to use, copy, modify, merge, publish, distribute, sublicense,9* and/or sell copies of the Software, and to permit persons to whom the10* Software is furnished to do so, subject to the following conditions:11*12* The above copyright notice and this permission notice (including the next13* paragraph) shall be included in all copies or substantial portions of the14* Software.15*16* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR17* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,18* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL19* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER20* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,21* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE22* SOFTWARE.23*24*/2526#ifndef __PAN_SCOREBOARD_H__27#define __PAN_SCOREBOARD_H__2829#include "midgard_pack.h"30#include "pan_pool.h"3132struct pan_scoreboard {33/* The first job in the batch */34mali_ptr first_job;3536/* The number of jobs in the primary batch, essentially */37unsigned job_index;3839/* A CPU-side pointer to the previous job for next_job linking */40struct mali_job_header_packed *prev_job;4142/* A CPU-side pointer to the first tiler job for dep updates when43* injecting a reload tiler job.44*/45struct mali_job_header_packed *first_tiler;46uint32_t first_tiler_dep1;4748/* The dependency for tiler jobs (i.e. the index of the last emitted49* tiler job, or zero if none have been emitted) */50unsigned tiler_dep;5152/* The job index of the WRITE_VALUE job (before it has been created) */53unsigned write_value_index;54};5556unsigned57panfrost_add_job(58struct pan_pool *pool,59struct pan_scoreboard *scoreboard,60enum mali_job_type type,61bool barrier, bool suppress_prefetch,62unsigned local_dep, unsigned global_dep,63const struct panfrost_ptr *job,64bool inject);6566struct panfrost_ptr67panfrost_scoreboard_initialize_tiler(struct pan_pool *pool,68struct pan_scoreboard *scoreboard,69mali_ptr polygon_list);7071#endif727374