2 * Copyright © 2014 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
27 #include "intel_guc_fwif.h"
28 #include "i915_guc_reg.h"
30 enum intel_guc_fw_status {
31 GUC_FIRMWARE_FAIL = -1,
32 GUC_FIRMWARE_NONE = 0,
38 * This structure encapsulates all the data needed during the process
39 * of fetching, caching, and loading the firmware image into the GuC.
42 struct drm_device * guc_dev;
43 const char * guc_fw_path;
45 struct drm_i915_gem_object * guc_fw_obj;
46 enum intel_guc_fw_status guc_fw_fetch_status;
47 enum intel_guc_fw_status guc_fw_load_status;
49 uint16_t guc_fw_major_wanted;
50 uint16_t guc_fw_minor_wanted;
51 uint16_t guc_fw_major_found;
52 uint16_t guc_fw_minor_found;
56 struct intel_guc_fw guc_fw;
59 struct drm_i915_gem_object *log_obj;
61 struct drm_i915_gem_object *ctx_pool_obj;
65 /* intel_guc_loader.c */
66 extern void intel_guc_ucode_init(struct drm_device *dev);
67 extern int intel_guc_ucode_load(struct drm_device *dev);
68 extern void intel_guc_ucode_fini(struct drm_device *dev);
69 extern const char *intel_guc_fw_status_repr(enum intel_guc_fw_status status);
71 /* i915_guc_submission.c */
72 int i915_guc_submission_init(struct drm_device *dev);
73 void i915_guc_submission_fini(struct drm_device *dev);