Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	intel-xe@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org,
	Jonathan Cavitt <jonathan.cavitt@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Vinod Govindapillai <vinod.govindapillai@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v2 2/2] drm/i915: disable fbc due to Wa_16023588340
Date: Tue, 2 Jul 2024 09:31:13 +0100	[thread overview]
Message-ID: <fe0f61ad-b006-47b4-aee4-2b9408379e7f@intel.com> (raw)
In-Reply-To: <87ikxo9pi1.fsf@intel.com>

Hi,

On 02/07/2024 09:17, Jani Nikula wrote:
> On Mon, 01 Jul 2024, Matthew Auld <matthew.auld@intel.com> wrote:
>> On BMG-G21 we need to disable fbc due to complications around the WA.
>>
>> v2:
>>   - Try to handle with i915_drv.h and compat layer. (Rodrigo)
>>
>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
>> Cc: Matt Roper <matthew.d.roper@intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: intel-gfx@lists.freedesktop.org
>> ---
>>   drivers/gpu/drm/i915/display/intel_fbc.c          | 5 +++++
>>   drivers/gpu/drm/i915/i915_drv.h                   | 2 ++
>>   drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 5 +++++
>>   3 files changed, 12 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
>> index 67116c9f1464..60131de77b4c 100644
>> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
>> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
>> @@ -1237,6 +1237,11 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
>>   		return 0;
>>   	}
>>   
>> +	if (DISPLAY_NEEDS_WA_16023588340(i915)) {
>> +		plane_state->no_fbc_reason = "Wa_16023588340";
>> +		return 0;
>> +	}
>> +
>>   	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
>>   	if (i915_vtd_active(i915) && (IS_SKYLAKE(i915) || IS_BROXTON(i915))) {
>>   		plane_state->no_fbc_reason = "VT-d enabled";
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> index d7723dd11c80..816a01fda3fe 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -762,4 +762,6 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
>>   #define HAS_LMEMBAR_SMEM_STOLEN(i915) (!HAS_LMEM(i915) && \
>>   				       GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70))
>>   
>> +#define DISPLAY_NEEDS_WA_16023588340(i915)	false
>> +
> 
> Display feature macros don't belong in i915_drv.h.

There is also the v1 here:
https://patchwork.freedesktop.org/patch/599900/?series=135061&rev=1

Where feedback was to handle it in i915_drv.h. Is the v1 method 
acceptable here? Do you have an alternative suggestion?

> 
> BR,
> Jani.
> 
>>   #endif
>> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> index 2feedddf1e40..a4256144dff7 100644
>> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
>> @@ -15,6 +15,9 @@
>>   #include "i915_utils.h"
>>   #include "intel_runtime_pm.h"
>>   #include "xe_device_types.h"
>> +#include "xe_wa.h"
>> +
>> +#include <generated/xe_wa_oob.h>
>>   
>>   static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
>>   {
>> @@ -120,6 +123,8 @@ struct i915_sched_attr {
>>   
>>   #define FORCEWAKE_ALL XE_FORCEWAKE_ALL
>>   
>> +#define DISPLAY_NEEDS_WA_16023588340(xe)	XE_WA(xe_root_mmio_gt(xe), 16023588340)
>> +
>>   #ifdef CONFIG_ARM64
>>   /*
>>    * arm64 indirectly includes linux/rtc.h,
> 

  reply	other threads:[~2024-07-02  8:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 13:27 [PATCH v2 1/2] drm/xe/bmg: implement Wa_16023588340 Matthew Auld
2024-07-01 13:27 ` [PATCH v2 2/2] drm/i915: disable fbc due to Wa_16023588340 Matthew Auld
2024-07-01 16:05   ` Lucas De Marchi
2024-07-02  8:17   ` Jani Nikula
2024-07-02  8:31     ` Matthew Auld [this message]
2024-07-02  9:26       ` Jani Nikula
2024-07-02  9:35         ` Matthew Auld
2024-07-02 10:26           ` Jani Nikula
2024-07-01 17:27 ` ✓ CI.Patch_applied: success for series starting with [v2,1/2] drm/xe/bmg: implement Wa_16023588340 Patchwork
2024-07-01 17:27 ` ✗ CI.checkpatch: warning " Patchwork
2024-07-01 17:28 ` ✓ CI.KUnit: success " Patchwork
2024-07-01 17:40 ` ✓ CI.Build: " Patchwork
2024-07-01 17:42 ` ✓ CI.Hooks: " Patchwork
2024-07-01 17:43 ` ✗ CI.checksparse: warning " Patchwork
2024-07-01 18:06 ` ✓ CI.BAT: success " Patchwork
2024-07-01 19:19 ` ✗ CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe0f61ad-b006-47b4-aee4-2b9408379e7f@intel.com \
    --to=matthew.auld@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jonathan.cavitt@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=vinod.govindapillai@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox