All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/wopcm: update default size for gen11+
Date: Wed, 5 Jun 2019 11:21:54 -0700	[thread overview]
Message-ID: <012b3078-7cb7-e47d-21c2-4064839fd5c4@intel.com> (raw)
In-Reply-To: <op.z2w18ahdxaggs7@mwajdecz-mobl1.ger.corp.intel.com>



On 6/5/19 7:51 AM, Michal Wajdeczko wrote:
> On Wed, 05 Jun 2019 01:15:29 +0200, Daniele Ceraolo Spurio 
> <daniele.ceraolospurio@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@intel.com>
>> Cc: Michal Wajdeczko <michal.wajdeczko@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?

Daniele

> 
>>     DRM_DEBUG_DRIVER("WOPCM size: %uKiB\n", wopcm->size / 1024);
>>  }
> 
> With above,
> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-06-05 18:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 23:15 [PATCH] drm/i915/wopcm: update default size for gen11+ Daniele Ceraolo Spurio
2019-06-04 23:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-06-05 14:51 ` [PATCH] " Michal Wajdeczko
2019-06-05 18:21   ` Daniele Ceraolo Spurio [this message]
2019-06-05 18:25     ` Michal Wajdeczko
2019-06-06  5:15 ` ✓ Fi.CI.IGT: success for " 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=012b3078-7cb7-e47d-21c2-4064839fd5c4@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michal.wajdeczko@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.