diff mbox

[2/2] drm/i915/guc : GEM_BUG_ON for GuC reset

Message ID 1513818424-18855-2-git-send-email-sujaritha.sundaresan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sundaresan, Sujaritha Dec. 21, 2017, 1:07 a.m. UTC
Including GEM_BUG_ON for GuC reset function in
intel_uncore.

Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/intel_uncore.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

sagar.a.kamble@intel.com Dec. 22, 2017, 9:41 a.m. UTC | #1
On 12/21/2017 6:37 AM, Sujaritha Sundaresan wrote:
> Including GEM_BUG_ON for GuC reset function in
> intel_uncore.
Can be reframed - "Instead of returning -EINVAL, GEM_BUG_ON when GuC 
reset is invoked for
platforms not supporting as we don't expect to invoke it"
Subject can be - "GEM_BUG_ON on invoking GuC reset function for non-GuC 
platforms"
>
> Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_uncore.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 89547b61..94e1fb3 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -1936,8 +1936,7 @@ int intel_reset_guc(struct drm_i915_private *dev_priv)
>   {
>   	int ret;
>   
> -	if (!HAS_GUC(dev_priv))
> -		return -EINVAL;
> +	GEM_BUG_ON(!HAS_GUC(dev_priv));
>   
>   	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
>   	ret = gen6_hw_domain_reset(dev_priv, GEN9_GRDOM_GUC);
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 89547b61..94e1fb3 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -1936,8 +1936,7 @@  int intel_reset_guc(struct drm_i915_private *dev_priv)
 {
 	int ret;
 
-	if (!HAS_GUC(dev_priv))
-		return -EINVAL;
+	GEM_BUG_ON(!HAS_GUC(dev_priv));
 
 	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
 	ret = gen6_hw_domain_reset(dev_priv, GEN9_GRDOM_GUC);