Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Robert Beckett <bob.beckett@collabora.com>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: Matthew Auld <matthew.auld@intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH v3 5/5] drm/i915: stolen memory use ttm backend
Date: Thu, 14 Apr 2022 16:41:23 +0200	[thread overview]
Message-ID: <94ddf51a-90ae-dee8-5d6a-45ee2cd1e584@linux.intel.com> (raw)
In-Reply-To: <20220412193817.2098308-6-bob.beckett@collabora.com>

Hi,


On 4/12/22 21:38, Robert Beckett wrote:
> +struct ttm_resource *
> +i915_gem_stolen_reserve_range(struct drm_i915_private *i915,
> +			      resource_size_t size,
> +			      u64 start, u64 end)
>   {
> -	int ret;
> +	struct intel_memory_region *mem = i915->mm.stolen_region;
>   
> -	if (!drm_mm_initialized(&i915->mm.stolen))
> -		return -ENODEV;
> -
> -	/* WaSkipStolenMemoryFirstPage:bdw+ */
> -	if (GRAPHICS_VER(i915) >= 8 && start < 4096)
> -		start = 4096;

Did we lose this Workaround?

Need to continue reviewing this patchnext week.


Thx,

Thomas




> -
> -	mutex_lock(&i915->mm.stolen_lock);
> -	ret = drm_mm_insert_node_in_range(&i915->mm.stolen, node,
> -					  size, alignment, 0,
> -					  start, end, DRM_MM_INSERT_BEST);
> -	mutex_unlock(&i915->mm.stolen_lock);
> +	if (!mem)
> +		return ERR_PTR(-ENODEV);
> +	return intel_region_ttm_resource_alloc(mem, size, start, end, I915_BO_ALLOC_CONTIGUOUS);
> +}
>   
> -	

  reply	other threads:[~2022-04-14 14:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 19:38 [Intel-gfx] [PATCH v3 0/5] drm/i915: ttm for stolen region Robert Beckett
2022-04-12 19:38 ` [Intel-gfx] [PATCH v3 1/5] drm/i915: instantiate ttm ranger manager for stolen memory Robert Beckett
2022-04-14 13:23   ` Thomas Hellström
2022-04-12 19:38 ` [Intel-gfx] [PATCH v3 2/5] drm/i915: sanitize mem_flags for stolen buffers Robert Beckett
2022-04-12 19:38 ` [Intel-gfx] [PATCH v3 3/5] drm/i915: ttm move/clear logic fix Robert Beckett
2022-04-12 19:38 ` [Intel-gfx] [PATCH v3 4/5] drm/i915: ttm backend dont provide mmap_offset for kernel buffers Robert Beckett
2022-04-12 19:38 ` [Intel-gfx] [PATCH v3 5/5] drm/i915: stolen memory use ttm backend Robert Beckett
2022-04-14 14:41   ` Thomas Hellström [this message]
2022-04-14 17:29     ` Robert Beckett
2022-04-18 13:52   ` [Intel-gfx] [drm/i915] 9c20c625e8: WARNING:possible_recursive_locking_detected kernel test robot
2022-04-13 13:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: ttm for stolen region (rev3) Patchwork
2022-04-13 13:45 ` [Intel-gfx] ✗ Fi.CI.BAT: 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=94ddf51a-90ae-dee8-5d6a-45ee2cd1e584@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=bob.beckett@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.auld@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@linux.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