| 1 |
|
| 2 | |
| 3 | * Copyright © 2013-2021 Intel Corporation
|
| 4 |
|
| 5 |
|
| 6 | #ifndef _INTEL_PCODE_H_
|
| 7 | #define _INTEL_PCODE_H_
|
| 8 |
|
| 9 | #include <linux/types.h>
|
| 10 |
|
| 11 | struct drm_device;
|
| 12 | struct intel_uncore;
|
| 13 |
|
| 14 | int snb_pcode_read(struct intel_uncore *uncore, u32 mbox, u32 *val, u32 *val1);
|
| 15 | int snb_pcode_write_timeout(struct intel_uncore *uncore, u32 mbox, u32 val, int timeout_ms);
|
| 16 | #define snb_pcode_write(uncore, mbox, val) \
|
| 17 | snb_pcode_write_timeout((uncore), (mbox), (val), 1)
|
| 18 |
|
| 19 | int skl_pcode_request(struct intel_uncore *uncore, u32 mbox, u32 request,
|
| 20 | u32 reply_mask, u32 reply, int timeout_base_ms);
|
| 21 |
|
| 22 | int intel_pcode_init(struct intel_uncore *uncore);
|
| 23 |
|
| 24 | |
| 25 | * Helpers for dGfx PCODE mailbox command formatting
|
| 26 |
|
| 27 | int snb_pcode_read_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 *val);
|
| 28 | int snb_pcode_write_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 val);
|
| 29 |
|
| 30 | extern const struct intel_display_pcode_interface i915_display_pcode_interface;
|
| 31 |
|
| 32 | #endif
|