Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
|
|
/* Copyright 2024-2025 Tomeu Vizoso <tomeu@tomeuvizoso.net> */
|
|
/* Copyright 2025 Arm, Ltd. */
|
|
|
|
#ifndef __ETHOSU_JOB_H__
|
|
#define __ETHOSU_JOB_H__
|
|
|
|
#include <linux/kref.h>
|
|
#include <drm/gpu_scheduler.h>
|
|
|
|
struct ethosu_device;
|
|
struct ethosu_file_priv;
|
|
|
|
struct ethosu_job {
|
|
struct drm_sched_job base;
|
|
struct ethosu_device *dev;
|
|
|
|
struct drm_gem_object *cmd_bo;
|
|
struct drm_gem_object *region_bo[NPU_BASEP_REGION_MAX];
|
|
u8 region_bo_num[NPU_BASEP_REGION_MAX];
|
|
u8 region_cnt;
|
|
u32 sram_size;
|
|
|
|
/* Fence to be signaled by drm-sched once its done with the job */
|
|
struct dma_fence *inference_done_fence;
|
|
|
|
/* Fence to be signaled by IRQ handler when the job is complete. */
|
|
struct dma_fence *done_fence;
|
|
|
|
struct kref refcount;
|
|
};
|
|
|
|
int ethosu_ioctl_submit(struct drm_device *dev, void *data, struct drm_file *file);
|
|
|
|
int ethosu_job_init(struct ethosu_device *dev);
|
|
void ethosu_job_fini(struct ethosu_device *dev);
|
|
int ethosu_job_open(struct ethosu_file_priv *ethosu_priv);
|
|
void ethosu_job_close(struct ethosu_file_priv *ethosu_priv);
|
|
|
|
#endif
|