public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Siluvery, Arun" <arun.siluvery@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Skip Stolen Memory first page.
Date: Tue, 03 Feb 2015 16:11:05 +0000	[thread overview]
Message-ID: <54D0F319.2070509@linux.intel.com> (raw)
In-Reply-To: <20140801093414.3c7d812e@jbarnes-desktop>

On 01/08/2014 17:34, Jesse Barnes wrote:
> On Thu, 31 Jul 2014 12:08:20 -0700
> Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>
>> WA to skip the first page of stolen memory due to sporadic HW write on *CS Idle
>>
>> v2: Improve variable names and fix allocated size.
>>
>> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_gem_stolen.c | 15 ++++++++++-----
>>   1 file changed, 10 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
>> index 21c025a..82035b0 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
>> @@ -289,7 +289,8 @@ void i915_gem_cleanup_stolen(struct drm_device *dev)
>>   int i915_gem_init_stolen(struct drm_device *dev)
>>   {
>>   	struct drm_i915_private *dev_priv = dev->dev_private;
>> -	int bios_reserved = 0;
>> +	int start_rsvd = 0;
>> +	int end_rsvd = 0;
>>
>>   #ifdef CONFIG_INTEL_IOMMU
>>   	if (intel_iommu_gfx_mapped && INTEL_INFO(dev)->gen < 8) {
>> @@ -308,15 +309,19 @@ int i915_gem_init_stolen(struct drm_device *dev)
>>   	DRM_DEBUG_KMS("found %zd bytes of stolen memory at %08lx\n",
>>   		      dev_priv->gtt.stolen_size, dev_priv->mm.stolen_base);
>>
>> +	/* WaSkipStolenMemoryFirstPage */
>> +	if (INTEL_INFO(dev)->gen >= 8)
>> +		start_rsvd = 4096;
>> +
>>   	if (IS_VALLEYVIEW(dev))
>> -		bios_reserved = 1024*1024; /* top 1M on VLV/BYT */
>> +		end_rsvd = 1024*1024; /* top 1M on VLV/BYT */
>>
>> -	if (WARN_ON(bios_reserved > dev_priv->gtt.stolen_size))
>> +	if (WARN_ON((start_rsvd + end_rsvd) > dev_priv->gtt.stolen_size))
>>   		return 0;
>>
>>   	/* Basic memrange allocator for stolen space */
>> -	drm_mm_init(&dev_priv->mm.stolen, 0, dev_priv->gtt.stolen_size -
>> -		    bios_reserved);
>> +	drm_mm_init(&dev_priv->mm.stolen, start_rsvd,
>> +		    dev_priv->gtt.stolen_size - start_rsvd - end_rsvd);
>>
>>   	return 0;
>>   }
>
> Beyond the fastboot stuff Ville has already mentioned, the early
> allocation of the existing fb from stolen will prevent us from
> clobbering the currently displayed buffer with the contents of the
> ringbuffers and whatever else we allocate out of stolen at early boot.
>
> We might be able to avoid that by doing stolen allocations top down, or
> by reserving the displayed fb even if we can't allocate an obj for it,
> only freeing it after our first mode set.
>
> Can you file a bug or JIRA for that to make sure we don't lose track of
> the fastboot & boot corruption issues after this fix lands?

Reviving an old thread,
Any particular reason why this patch is not merged to nightly?
Is it known to cause any other regressions?

regards
Arun


>
> Thanks,
>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-02-03 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 17:47 [PATCH] drm/i915: Skip Stolen Memory first page Rodrigo Vivi
2014-07-31  3:57 ` Ben Widawsky
2014-07-31  5:57 ` Chris Wilson
2014-07-31 13:39 ` Ville Syrjälä
2014-07-31 19:08   ` Rodrigo Vivi
2014-08-01 16:34     ` Jesse Barnes
2015-02-03 16:11       ` Siluvery, Arun [this message]
2015-02-03 17:40         ` Ville Syrjälä
2015-02-03 19:24           ` Daniel Vetter

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=54D0F319.2070509@linux.intel.com \
    --to=arun.siluvery@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=rodrigo.vivi@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