summaryrefstree
path: root/kernel/drivers/gpu/msm/adreno_a6xx_hwsched.h
blob: 66a4fce5ce5b4f59db8aa3b38c97a25e1602c875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 */

#ifndef _ADRENO_A6XX_HWSCHED_H_
#define _ADRENO_A6XX_HWSCHED_H_

#include "adreno_a6xx_hwsched_hfi.h"
#include "adreno_hwsched.h"

/**
 * struct a6xx_hwsched_device - Container for the a6xx hwscheduling device
 */
struct a6xx_hwsched_device {
	/** @a6xx_dev: Container for the a6xx device */
	struct a6xx_device a6xx_dev;
	/** @hwsched_hfi: Container for hwscheduling specific hfi resources */
	struct a6xx_hwsched_hfi hwsched_hfi;
	/** @hwsched: Container for the hardware dispatcher */
	struct adreno_hwsched hwsched;
};

/**
 * a6xx_hwsched_probe - Target specific probe for hwsched
 * @pdev: Pointer to the platform device
 * @chipid: Chipid of the target
 * @gpucore: Pointer to the gpucore
 *
 * The target specific probe function for hwsched enabled gmu targets.
 *
 * Return: 0 on success or negative error on failure
 */
int a6xx_hwsched_probe(struct platform_device *pdev,
	u32 chipid, const struct adreno_gpu_core *gpucore);

/**
 * a6xx_hwsched_restart - Restart the gmu and gpu
 * @adreno_dev: Pointer to the adreno device
 */
void a6xx_hwsched_restart(struct adreno_device *adreno_dev);

/**
 * a6xx_hwsched_snapshot - take a6xx hwsched snapshot
 * @adreno_dev: Pointer to the adreno device
 * @snapshot: Pointer to the snapshot instance
 *
 * Snapshot the faulty ib and then snapshot rest of a6xx gmu things
 */
void a6xx_hwsched_snapshot(struct adreno_device *adreno_dev,
	struct kgsl_snapshot *snapshot);
#endif