[Intel-gfx] [PATCH 14/20] drm/i915/fbc: Move stuff from intel_fbc_can_enable() into intel_fbc_check_plane()
Kahola, Mika
mika.kahola at intel.com
Wed Dec 1 11:03:21 UTC 2021
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Wednesday, November 24, 2021 1:37 PM
> To: intel-gfx at lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 14/20] drm/i915/fbc: Move stuff from
> intel_fbc_can_enable() into intel_fbc_check_plane()
>
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> 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: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_fbc.c | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c
> b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 1daf4f7b5d80..616ab95766b2 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -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) {
> - 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) {
> fbc->no_fbc_reason = "underrun detected";
> return false;
> @@ -1030,6 +1018,16 @@ static int intel_fbc_check_plane(struct
> intel_atomic_state *state,
> if (!fbc)
> 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) {
> plane_state->no_fbc_reason = "plane not visible";
> return 0;
> --
> 2.32.0
More information about the Intel-gfx
mailing list