[Intel-gfx] [PATCH] drm/i915/wopcm: update default size for gen11+
Michal Wajdeczko
michal.wajdeczko at intel.com
Wed Jun 5 18:25:34 UTC 2019
On Wed, 05 Jun 2019 20:21:54 +0200, Daniele Ceraolo Spurio
<daniele.ceraolospurio at intel.com> wrote:
>
>
> On 6/5/19 7:51 AM, Michal Wajdeczko wrote:
>> On Wed, 05 Jun 2019 01:15:29 +0200, Daniele Ceraolo Spurio
>> <daniele.ceraolospurio at intel.com> wrote:
>>
>>> The size has been increased to 2MB starting from gen11. GuC and HuC FWs
>> nit: s/gen11/Gen11
>>
>>> fit in 1MB so we were fine even with the legacy define, but let's still
>>> move to the correct one before the blobs grow to avoid being caught off
>>> guard in the future.
>>>
>>> Bspec: 44982
>> I think for ICL this should be 12690
>>
>>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
>>> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
>>> ---
>>> drivers/gpu/drm/i915/intel_wopcm.c | 10 +++++++---
>>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_wopcm.c
>>> b/drivers/gpu/drm/i915/intel_wopcm.c
>>> index f82a415ea2ba..6cb993eea206 100644
>>> --- a/drivers/gpu/drm/i915/intel_wopcm.c
>>> +++ b/drivers/gpu/drm/i915/intel_wopcm.c
>>> @@ -41,8 +41,9 @@
>>> * context).
>>> */
>>> -/* Default WOPCM size 1MB. */
>>> -#define GEN9_WOPCM_SIZE (1024 * 1024)
>>> +/* Default WOPCM size is 2MB from gen11, 1MB on previous platforms */
>> nit: s/gen11/Gen11
>>
>>> +#define GEN11_WOPCM_SIZE (SZ_2M)
>>> +#define GEN9_WOPCM_SIZE (SZ_1M)
>>> /* 16KB WOPCM (RSVD WOPCM) is reserved from HuC firmware top. */
>>> #define WOPCM_RESERVED_SIZE (16 * 1024)
>>> @@ -71,7 +72,10 @@
>>> */
>>> void intel_wopcm_init_early(struct intel_wopcm *wopcm)
>>> {
>>> - wopcm->size = GEN9_WOPCM_SIZE;
>>> + if (INTEL_GEN(wopcm_to_i915(wopcm)) >= 11)
>>> + wopcm->size = GEN11_WOPCM_SIZE;
>>> + else
>>> + wopcm->size = GEN9_WOPCM_SIZE;
>> While here, maybe we should not try to setup WOPCM size on pre-Gen9
>> platforms ? Then we can drop below log if WOPCM is zero/not available.
>
> Are you ok if I just return early if !HAS_GUC(), to make it not
> gen-specific?
That's even better (and aligned with other intel_wopcm_init functions)
Thanks,
Michal
>
> Daniele
>
>>
>>> DRM_DEBUG_DRIVER("WOPCM size: %uKiB\n", wopcm->size / 1024);
>>> }
>> With above,
>> Reviewed-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
More information about the Intel-gfx
mailing list