Commit 98009fd7 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/fbc: Move stuff from intel_fbc_can_enable() into intel_fbc_check_plane()

Don't really see a good reason why we can't just do the vgpu and
modparam checks already in intel_fbc_check_plane().
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211124113652.22090-15-ville.syrjala@linux.intel.comReviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
parent 606754fd
...@@ -996,18 +996,6 @@ static bool intel_fbc_cfb_size_changed(struct intel_fbc *fbc) ...@@ -996,18 +996,6 @@ static bool intel_fbc_cfb_size_changed(struct intel_fbc *fbc)
static bool intel_fbc_can_enable(struct intel_fbc *fbc) static bool intel_fbc_can_enable(struct intel_fbc *fbc)
{ {
struct drm_i915_private *i915 = fbc->i915;
if (intel_vgpu_active(i915)) {
fbc->no_fbc_reason = "VGPU is active";
return false;
}
if (!i915->params.enable_fbc) {
fbc->no_fbc_reason = "disabled per module param or by default";
return false;
}
if (fbc->underrun_detected) { if (fbc->underrun_detected) {
fbc->no_fbc_reason = "underrun detected"; fbc->no_fbc_reason = "underrun detected";
return false; return false;
...@@ -1030,6 +1018,16 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state, ...@@ -1030,6 +1018,16 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
if (!fbc) if (!fbc)
return 0; return 0;
if (intel_vgpu_active(i915)) {
plane_state->no_fbc_reason = "VGPU active";
return 0;
}
if (!i915->params.enable_fbc) {
plane_state->no_fbc_reason = "disabled per module param or by default";
return 0;
}
if (!plane_state->uapi.visible) { if (!plane_state->uapi.visible) {
plane_state->no_fbc_reason = "plane not visible"; plane_state->no_fbc_reason = "plane not visible";
return 0; return 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