|
7 | 7 | #include "intel_guc_ct.h"
|
8 | 8 | #include "gt/intel_gt.h"
|
9 | 9 |
|
| 10 | +static inline struct intel_guc *ct_to_guc(struct intel_guc_ct *ct) |
| 11 | +{ |
| 12 | + return container_of(ct, struct intel_guc, ct); |
| 13 | +} |
| 14 | + |
| 15 | +static inline struct intel_gt *ct_to_gt(struct intel_guc_ct *ct) |
| 16 | +{ |
| 17 | + return guc_to_gt(ct_to_guc(ct)); |
| 18 | +} |
| 19 | + |
| 20 | +static inline struct drm_i915_private *ct_to_i915(struct intel_guc_ct *ct) |
| 21 | +{ |
| 22 | + return ct_to_gt(ct)->i915; |
| 23 | +} |
| 24 | + |
| 25 | +static inline struct drm_device *ct_to_drm(struct intel_guc_ct *ct) |
| 26 | +{ |
| 27 | + return &ct_to_i915(ct)->drm; |
| 28 | +} |
| 29 | + |
10 | 30 | #define CT_ERROR(_ct, _fmt, ...) \
|
11 |
| - DRM_DEV_ERROR(ct_to_dev(_ct), "CT: " _fmt, ##__VA_ARGS__) |
| 31 | + drm_err(ct_to_drm(_ct), "CT: " _fmt, ##__VA_ARGS__) |
12 | 32 | #ifdef CONFIG_DRM_I915_DEBUG_GUC
|
13 | 33 | #define CT_DEBUG(_ct, _fmt, ...) \
|
14 |
| - DRM_DEV_DEBUG_DRIVER(ct_to_dev(_ct), "CT: " _fmt, ##__VA_ARGS__) |
| 34 | + drm_dbg(ct_to_drm(_ct), "CT: " _fmt, ##__VA_ARGS__) |
15 | 35 | #else
|
16 | 36 | #define CT_DEBUG(...) do { } while (0)
|
17 | 37 | #endif
|
| 38 | +#define CT_PROBE_ERROR(_ct, _fmt, ...) \ |
| 39 | + i915_probe_error(ct_to_i915(ct), "CT: " _fmt, ##__VA_ARGS__) |
18 | 40 |
|
19 | 41 | struct ct_request {
|
20 | 42 | struct list_head link;
|
@@ -47,26 +69,6 @@ void intel_guc_ct_init_early(struct intel_guc_ct *ct)
|
47 | 69 | INIT_WORK(&ct->requests.worker, ct_incoming_request_worker_func);
|
48 | 70 | }
|
49 | 71 |
|
50 |
| -static inline struct intel_guc *ct_to_guc(struct intel_guc_ct *ct) |
51 |
| -{ |
52 |
| - return container_of(ct, struct intel_guc, ct); |
53 |
| -} |
54 |
| - |
55 |
| -static inline struct intel_gt *ct_to_gt(struct intel_guc_ct *ct) |
56 |
| -{ |
57 |
| - return guc_to_gt(ct_to_guc(ct)); |
58 |
| -} |
59 |
| - |
60 |
| -static inline struct drm_i915_private *ct_to_i915(struct intel_guc_ct *ct) |
61 |
| -{ |
62 |
| - return ct_to_gt(ct)->i915; |
63 |
| -} |
64 |
| - |
65 |
| -static inline struct device *ct_to_dev(struct intel_guc_ct *ct) |
66 |
| -{ |
67 |
| - return ct_to_i915(ct)->drm.dev; |
68 |
| -} |
69 |
| - |
70 | 72 | static inline const char *guc_ct_buffer_type_to_str(u32 type)
|
71 | 73 | {
|
72 | 74 | switch (type) {
|
@@ -264,7 +266,7 @@ int intel_guc_ct_enable(struct intel_guc_ct *ct)
|
264 | 266 | err_deregister:
|
265 | 267 | ct_deregister_buffer(ct, INTEL_GUC_CT_BUFFER_TYPE_RECV);
|
266 | 268 | err_out:
|
267 |
| - CT_ERROR(ct, "Failed to open open CT channel (err=%d)\n", err); |
| 269 | + CT_PROBE_ERROR(ct, "Failed to open channel (err=%d)\n", err); |
268 | 270 | return err;
|
269 | 271 | }
|
270 | 272 |
|
|
0 commit comments