/** @ref_count: Refcount for job. */ struct kref ref_count;
/** @type: Type of job. */ enum drm_pvr_job_type type;
/** @id: Job ID number. */
u32 id;
/** * @paired_job: Job paired to this job. * * This field is only meaningful for geometry and fragment jobs. * * Paired jobs are executed on the same context, and need to be submitted * atomically to the FW, to make sure the partial render logic has a * fragment job to execute when the Parameter Manager runs out of memory. * * The geometry job should point to the fragment job it's paired with, * and the fragment job should point to the geometry job it's paired with.
*/ struct pvr_job *paired_job;
/** @cccb_fence: Fence used to wait for CCCB space. */ struct dma_fence *cccb_fence;
/** @kccb_fence: Fence used to wait for KCCB space. */ struct dma_fence *kccb_fence;
/** @done_fence: Fence to signal when the job is done. */ struct dma_fence *done_fence;
/** @ctx: Pointer to owning context. */ struct pvr_context *ctx;
/** @cmd: Command data. Format depends on @type. */ void *cmd;
/** @cmd_len: Length of command data, in bytes. */
u32 cmd_len;
/** * @fw_ccb_cmd_type: Firmware CCB command type. Must be one of %ROGUE_FWIF_CCB_CMD_TYPE_*.
*/
u32 fw_ccb_cmd_type;
/** @hwrt: HWRT object. Will be NULL for compute and transfer jobs. */ struct pvr_hwrt_data *hwrt;
/** * @has_pm_ref: True if the job has a power ref, thus forcing the GPU to stay on until * the job is done.
*/ bool has_pm_ref;
};
/** * pvr_job_get() - Take additional reference on job. * @job: Job pointer. * * Call pvr_job_put() to release. * * Returns: * * The requested job on success, or * * %NULL if no job pointer passed.
*/ static __always_inline struct pvr_job *
pvr_job_get(struct pvr_job *job)
{ if (job)
kref_get(&job->ref_count);
return job;
}
void pvr_job_put(struct pvr_job *job);
/** * pvr_job_release_pm_ref() - Release the PM ref if the job acquired it. * @job: The job to release the PM ref on.
*/ static __always_inline void
pvr_job_release_pm_ref(struct pvr_job *job)
{ if (job->has_pm_ref) {
pvr_power_put(job->pvr_dev);
job->has_pm_ref = false;
}
}
/** * pvr_job_get_pm_ref() - Get a PM ref and attach it to the job. * @job: The job to attach the PM ref to. * * Return: * * 0 on success, or * * Any error returned by pvr_power_get() otherwise.
*/ static __always_inline int
pvr_job_get_pm_ref(struct pvr_job *job)
{ int err;
if (job->has_pm_ref) return 0;
err = pvr_power_get(job->pvr_dev); if (!err)
job->has_pm_ref = true;
return err;
}
int pvr_job_wait_first_non_signaled_native_dep(struct pvr_job *job);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.