]> Git Repo - linux.git/blob - drivers/gpu/drm/xe/xe_pcode.h
Merge patch series "riscv: Extension parsing fixes"
[linux.git] / drivers / gpu / drm / xe / xe_pcode.h
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5
6 #ifndef _XE_PCODE_H_
7 #define _XE_PCODE_H_
8
9 #include <linux/types.h>
10 struct xe_gt;
11 struct xe_device;
12
13 void xe_pcode_init(struct xe_gt *gt);
14 int xe_pcode_probe_early(struct xe_device *xe);
15 int xe_pcode_ready(struct xe_device *xe, bool locked);
16 int xe_pcode_init_min_freq_table(struct xe_gt *gt, u32 min_gt_freq,
17                                  u32 max_gt_freq);
18 int xe_pcode_read(struct xe_gt *gt, u32 mbox, u32 *val, u32 *val1);
19 int xe_pcode_write_timeout(struct xe_gt *gt, u32 mbox, u32 val,
20                            int timeout_ms);
21 #define xe_pcode_write(gt, mbox, val) \
22         xe_pcode_write_timeout(gt, mbox, val, 1)
23
24 int xe_pcode_request(struct xe_gt *gt, u32 mbox, u32 request,
25                      u32 reply_mask, u32 reply, int timeout_ms);
26
27 #define PCODE_MBOX(mbcmd, param1, param2)\
28         (FIELD_PREP(PCODE_MB_COMMAND, mbcmd)\
29         | FIELD_PREP(PCODE_MB_PARAM1, param1)\
30         | FIELD_PREP(PCODE_MB_PARAM2, param2))
31
32 #endif
This page took 0.034564 seconds and 4 git commands to generate.