From: Robert Beckett <bob.beckett@collabora.com> To: "Thomas Hellström" <thomas.hellstrom@linux.intel.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: [PATCH v3 5/5] drm/i915: stolen memory use ttm backend Date: Thu, 14 Apr 2022 18:29:03 +0100 [thread overview] Message-ID: <2f71160e-01cc-40a5-4661-b998b3acd153@collabora.com> (raw) In-Reply-To: <94ddf51a-90ae-dee8-5d6a-45ee2cd1e584@linux.intel.com> On 14/04/2022 15:41, Thomas Hellström wrote: > 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? woops, looks like we did. Nice catch. I'll add a reservation at start of day if wa is needed when I issue v4. > > 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); >> +} >> -
WARNING: multiple messages have this Message-ID (diff)
From: Robert Beckett <bob.beckett@collabora.com> To: "Thomas Hellström" <thomas.hellstrom@linux.intel.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 18:29:03 +0100 [thread overview] Message-ID: <2f71160e-01cc-40a5-4661-b998b3acd153@collabora.com> (raw) In-Reply-To: <94ddf51a-90ae-dee8-5d6a-45ee2cd1e584@linux.intel.com> On 14/04/2022 15:41, Thomas Hellström wrote: > 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? woops, looks like we did. Nice catch. I'll add a reservation at start of day if wa is needed when I issue v4. > > 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); >> +} >> -
next prev parent reply other threads:[~2022-04-14 17:23 UTC|newest] Thread overview: 29+ 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 ` 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-12 19:38 ` Robert Beckett 2022-04-12 19:38 ` Robert Beckett 2022-04-14 13:23 ` Thomas Hellström 2022-04-14 13:23 ` [Intel-gfx] " 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 ` Robert Beckett 2022-04-12 19:38 ` 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 ` Robert Beckett 2022-04-12 19:38 ` 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 ` Robert Beckett 2022-04-12 19:38 ` Robert Beckett 2022-04-12 19:38 ` [PATCH v3 5/5] drm/i915: stolen memory use ttm backend Robert Beckett 2022-04-12 19:38 ` [Intel-gfx] " Robert Beckett 2022-04-12 19:38 ` Robert Beckett 2022-04-14 14:41 ` Thomas Hellström 2022-04-14 14:41 ` [Intel-gfx] " Thomas Hellström 2022-04-14 17:29 ` Robert Beckett [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-18 13:52 ` kernel test robot 2022-04-18 13:52 ` kernel test robot 2022-04-18 13:52 ` 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=2f71160e-01cc-40a5-4661-b998b3acd153@collabora.com \ --to=bob.beckett@collabora.com \ --cc=airlied@linux.ie \ --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=thomas.hellstrom@linux.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: linkBe 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.