Commit 89351085 authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Daniel Vetter

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: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 220285f2
...@@ -935,6 +935,7 @@ struct i915_fbc { ...@@ -935,6 +935,7 @@ struct i915_fbc {
FBC_MODULE_PARAM, FBC_MODULE_PARAM,
FBC_CHIP_DEFAULT, /* disabled by default on this chip */ FBC_CHIP_DEFAULT, /* disabled by default on this chip */
FBC_ROTATION, /* rotation is not supported */ FBC_ROTATION, /* rotation is not supported */
FBC_IN_DBG_MASTER, /* kernel debugger is active */
} no_fbc_reason; } no_fbc_reason;
bool (*fbc_enabled)(struct drm_i915_private *dev_priv); bool (*fbc_enabled)(struct drm_i915_private *dev_priv);
......
...@@ -471,6 +471,8 @@ const char *intel_no_fbc_reason_str(enum no_fbc_reason reason) ...@@ -471,6 +471,8 @@ const char *intel_no_fbc_reason_str(enum no_fbc_reason reason)
return "disabled per chip default"; return "disabled per chip default";
case FBC_ROTATION: case FBC_ROTATION:
return "rotation unsupported"; return "rotation unsupported";
case FBC_IN_DBG_MASTER:
return "Kernel debugger is active";
default: default:
MISSING_CASE(reason); MISSING_CASE(reason);
return "unknown reason"; return "unknown reason";
...@@ -755,8 +757,10 @@ static void __intel_fbc_update(struct drm_i915_private *dev_priv) ...@@ -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 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; goto out_disable;
}
if (intel_fbc_setup_cfb(dev_priv, obj->base.size, if (intel_fbc_setup_cfb(dev_priv, obj->base.size,
drm_format_plane_cpp(fb->pixel_format, 0))) { drm_format_plane_cpp(fb->pixel_format, 0))) {
......
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