提交 bae3fdce 编写于 作者: M Michal Wajdeczko 提交者: Tvrtko Ursulin

drm/i915/guc: Make intel_guc_recv static.

This function is only used by intel_guc_send() and it doesn't
need to be exposed outside of intel_uc.o file. Also when defined
as static, compiler will generate smaller code. Additionally let
it take guc param instead dev_priv to match function name.
Signed-off-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161220115531.76120-1-michal.wajdeczko@intel.com
上级 1c74eeaf
...@@ -34,8 +34,10 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv) ...@@ -34,8 +34,10 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv)
* Read GuC command/status register (SOFT_SCRATCH_0) * Read GuC command/status register (SOFT_SCRATCH_0)
* Return true if it contains a response rather than a command * Return true if it contains a response rather than a command
*/ */
bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status) static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
{ {
struct drm_i915_private *dev_priv = guc_to_i915(guc);
u32 val = I915_READ(SOFT_SCRATCH(0)); u32 val = I915_READ(SOFT_SCRATCH(0));
*status = val; *status = val;
return INTEL_GUC_RECV_IS_RESPONSE(val); return INTEL_GUC_RECV_IS_RESPONSE(val);
...@@ -69,9 +71,9 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len) ...@@ -69,9 +71,9 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
* up to that length of time, then switch to a slower sleep-wait loop. * up to that length of time, then switch to a slower sleep-wait loop.
* No inte_guc_send command should ever take longer than 10ms. * No inte_guc_send command should ever take longer than 10ms.
*/ */
ret = wait_for_us(intel_guc_recv(dev_priv, &status), 10); ret = wait_for_us(intel_guc_recv(guc, &status), 10);
if (ret) if (ret)
ret = wait_for(intel_guc_recv(dev_priv, &status), 10); ret = wait_for(intel_guc_recv(guc, &status), 10);
if (status != INTEL_GUC_STATUS_SUCCESS) { if (status != INTEL_GUC_STATUS_SUCCESS) {
/* /*
* Either the GuC explicitly returned an error (which * Either the GuC explicitly returned an error (which
......
...@@ -172,7 +172,6 @@ struct intel_guc { ...@@ -172,7 +172,6 @@ struct intel_guc {
/* intel_uc.c */ /* intel_uc.c */
void intel_uc_init_early(struct drm_i915_private *dev_priv); void intel_uc_init_early(struct drm_i915_private *dev_priv);
bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status);
int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len); int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);
int intel_guc_sample_forcewake(struct intel_guc *guc); int intel_guc_sample_forcewake(struct intel_guc *guc);
int intel_guc_log_flush_complete(struct intel_guc *guc); int intel_guc_log_flush_complete(struct intel_guc *guc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册