> -----Original Message-----
> From: Intel-gfx <intel-gfx-boun...@lists.freedesktop.org> On Behalf Of
> Jouni Högander
> Sent: Wednesday, June 14, 2023 10:48 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 2/3] drm/i915/fbc: Make FBC check stolen at
> use time
> 
> As a preparation for Xe change stolen memory initialization check to be done
> in use-time instead of during initialization.
> 
> In case of xe, stolen memory is initialised much later so it can't be checked
> during init. There is no specific reason to check this in init for
> i915 either -> perform the check in use-time. This also gives us benefit
> fbc_no_reason reporting missing initialization being reason for disabled fbc.
> 
> Signed-off-by: Jouni Högander <jouni.hogan...@intel.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
LGTM. 
Reviewed-by: Jeevan B <jeeva...@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c
> b/drivers/gpu/drm/i915/display/intel_fbc.c
> index a18e84efe911..da8166eedf93 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -1056,6 +1056,11 @@ static int intel_fbc_check_plane(struct
> intel_atomic_state *state,
>       if (!fbc)
>               return 0;
> 
> +     if (!i915_gem_stolen_initialized(i915)) {
> +             plane_state->no_fbc_reason = "stolen memory not
> initialised";
> +             return 0;
> +     }
> +
>       if (intel_vgpu_active(i915)) {
>               plane_state->no_fbc_reason = "VGPU active";
>               return 0;
> @@ -1709,9 +1714,6 @@ void intel_fbc_init(struct drm_i915_private *i915)  {
>       enum intel_fbc_id fbc_id;
> 
> -     if (!i915_gem_stolen_initialized(i915))
> -             DISPLAY_RUNTIME_INFO(i915)->fbc_mask = 0;
> -
>       if (need_fbc_vtd_wa(i915))
>               DISPLAY_RUNTIME_INFO(i915)->fbc_mask = 0;
> 
> --
> 2.34.1

Reply via email to