Commit e8668bbc authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Joonas Lahtinen

drm/i915/guc: Rename intel_guc_loader.c to intel_guc_fw.c

Remaining functions in intel_guc_loader.c were focused around
GuC firmware. Rename them to match object-verb pattern and
rename file itself.
Suggested-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-6-michal.wajdeczko@intel.com
parent d9e2e014
...@@ -64,7 +64,7 @@ i915-y += intel_uc.o \ ...@@ -64,7 +64,7 @@ i915-y += intel_uc.o \
intel_guc.o \ intel_guc.o \
intel_guc_ct.o \ intel_guc_ct.o \
intel_guc_log.o \ intel_guc_log.o \
intel_guc_loader.o \ intel_guc_fw.o \
intel_huc.o \ intel_huc.o \
i915_guc_submission.o i915_guc_submission.o
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define _INTEL_GUC_H_ #define _INTEL_GUC_H_
#include "intel_uncore.h" #include "intel_uncore.h"
#include "intel_guc_fw.h"
#include "intel_guc_fwif.h" #include "intel_guc_fwif.h"
#include "intel_guc_ct.h" #include "intel_guc_ct.h"
#include "intel_guc_log.h" #include "intel_guc_log.h"
...@@ -114,9 +115,6 @@ int intel_guc_auth_huc(struct intel_guc *guc, u32 rsa_offset); ...@@ -114,9 +115,6 @@ int intel_guc_auth_huc(struct intel_guc *guc, u32 rsa_offset);
int intel_guc_suspend(struct drm_i915_private *dev_priv); int intel_guc_suspend(struct drm_i915_private *dev_priv);
int intel_guc_resume(struct drm_i915_private *dev_priv); int intel_guc_resume(struct drm_i915_private *dev_priv);
struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size); struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size);
int intel_guc_select_fw(struct intel_guc *guc);
int intel_guc_init_hw(struct intel_guc *guc);
u32 intel_guc_wopcm_size(struct drm_i915_private *dev_priv); u32 intel_guc_wopcm_size(struct drm_i915_private *dev_priv);
#endif #endif
...@@ -26,8 +26,9 @@ ...@@ -26,8 +26,9 @@
* Dave Gordon <david.s.gordon@intel.com> * Dave Gordon <david.s.gordon@intel.com>
* Alex Dai <yu.dai@intel.com> * Alex Dai <yu.dai@intel.com>
*/ */
#include "intel_guc_fw.h"
#include "i915_drv.h" #include "i915_drv.h"
#include "intel_uc.h"
#define SKL_FW_MAJOR 6 #define SKL_FW_MAJOR 6
#define SKL_FW_MINOR 1 #define SKL_FW_MINOR 1
...@@ -55,7 +56,6 @@ MODULE_FIRMWARE(I915_KBL_GUC_UCODE); ...@@ -55,7 +56,6 @@ MODULE_FIRMWARE(I915_KBL_GUC_UCODE);
#define I915_GLK_GUC_UCODE GUC_FW_PATH(glk, GLK_FW_MAJOR, GLK_FW_MINOR) #define I915_GLK_GUC_UCODE GUC_FW_PATH(glk, GLK_FW_MAJOR, GLK_FW_MINOR)
/* /*
* Read the GuC status register (GUC_STATUS) and store it in the * Read the GuC status register (GUC_STATUS) and store it in the
* specified location; then return a boolean indicating whether * specified location; then return a boolean indicating whether
...@@ -209,7 +209,7 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv) ...@@ -209,7 +209,7 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)
} }
/** /**
* intel_guc_init_hw() - finish preparing the GuC for activity * intel_guc_fw_upload() - finish preparing the GuC for activity
* @guc: intel_guc structure * @guc: intel_guc structure
* *
* Called during driver loading and also after a GPU reset. * Called during driver loading and also after a GPU reset.
...@@ -221,7 +221,7 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv) ...@@ -221,7 +221,7 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)
* *
* Return: non-zero code on error * Return: non-zero code on error
*/ */
int intel_guc_init_hw(struct intel_guc *guc) int intel_guc_fw_upload(struct intel_guc *guc)
{ {
struct drm_i915_private *dev_priv = guc_to_i915(guc); struct drm_i915_private *dev_priv = guc_to_i915(guc);
const char *fw_path = guc->fw.path; const char *fw_path = guc->fw.path;
...@@ -258,12 +258,12 @@ int intel_guc_init_hw(struct intel_guc *guc) ...@@ -258,12 +258,12 @@ int intel_guc_init_hw(struct intel_guc *guc)
} }
/** /**
* intel_guc_select_fw() - selects GuC firmware for loading * intel_guc_fw_select() - selects GuC firmware for loading
* @guc: intel_guc struct * @guc: intel_guc struct
* *
* Return: zero when we know firmware, non-zero in other case * Return: zero when we know firmware, non-zero in other case
*/ */
int intel_guc_select_fw(struct intel_guc *guc) int intel_guc_fw_select(struct intel_guc *guc)
{ {
struct drm_i915_private *dev_priv = guc_to_i915(guc); struct drm_i915_private *dev_priv = guc_to_i915(guc);
......
/*
* Copyright © 2017 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
#ifndef _INTEL_GUC_FW_H_
#define _INTEL_GUC_FW_H_
struct intel_guc;
int intel_guc_fw_select(struct intel_guc *guc);
int intel_guc_fw_upload(struct intel_guc *guc);
#endif
...@@ -68,7 +68,7 @@ void intel_uc_sanitize_options(struct drm_i915_private *dev_priv) ...@@ -68,7 +68,7 @@ void intel_uc_sanitize_options(struct drm_i915_private *dev_priv)
if (HAS_HUC_UCODE(dev_priv)) if (HAS_HUC_UCODE(dev_priv))
intel_huc_select_fw(&dev_priv->huc); intel_huc_select_fw(&dev_priv->huc);
if (intel_guc_select_fw(&dev_priv->guc)) if (intel_guc_fw_select(&dev_priv->guc))
i915_modparams.enable_guc_loading = 0; i915_modparams.enable_guc_loading = 0;
} }
...@@ -196,7 +196,7 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv) ...@@ -196,7 +196,7 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv)
intel_huc_init_hw(&dev_priv->huc); intel_huc_init_hw(&dev_priv->huc);
intel_guc_init_params(guc); intel_guc_init_params(guc);
ret = intel_guc_init_hw(&dev_priv->guc); ret = intel_guc_fw_upload(guc);
if (ret == 0 || ret != -EAGAIN) if (ret == 0 || ret != -EAGAIN)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment