From: Paulo Zanoni Date: Tue, 7 Jul 2015 18:26:06 +0000 (-0300) Subject: drm/i915: add FBC_IN_DBG_MASTER no_fbc_reason X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8935108528194918966757fa00ac986176fe9497;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915: add FBC_IN_DBG_MASTER no_fbc_reason The poor in_dbg_master() check was the only one without a reason string. Give it a reason string so it won't feel excluded. Signed-off-by: Paulo Zanoni Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4ef1764aa8a5..52d07fbd9cc8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -935,6 +935,7 @@ struct i915_fbc { FBC_MODULE_PARAM, FBC_CHIP_DEFAULT, /* disabled by default on this chip */ FBC_ROTATION, /* rotation is not supported */ + FBC_IN_DBG_MASTER, /* kernel debugger is active */ } no_fbc_reason; bool (*fbc_enabled)(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 9ef5b6ca5db7..8d39893b7550 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -471,6 +471,8 @@ const char *intel_no_fbc_reason_str(enum no_fbc_reason reason) return "disabled per chip default"; case FBC_ROTATION: return "rotation unsupported"; + case FBC_IN_DBG_MASTER: + return "Kernel debugger is active"; default: MISSING_CASE(reason); return "unknown reason"; @@ -755,8 +757,10 @@ static void __intel_fbc_update(struct drm_i915_private *dev_priv) } /* If the kernel debugger is active, always disable compression */ - if (in_dbg_master()) + if (in_dbg_master()) { + set_no_fbc_reason(dev_priv, FBC_IN_DBG_MASTER); goto out_disable; + } if (intel_fbc_setup_cfb(dev_priv, obj->base.size, drm_format_plane_cpp(fb->pixel_format, 0))) {