From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [PATCH] drm/i915: Use new i915_gem_object_pin_map for LRC
Date: Tue, 12 Apr 2016 11:33:17 +0100 [thread overview]
Message-ID: <570CCEED.8080007@linux.intel.com> (raw)
In-Reply-To: <20160412094353.GM20240@nuc-i3427.alporthouse.com>
On 12/04/16 10:43, Chris Wilson wrote:
> On Tue, Apr 12, 2016 at 09:52:28AM +0100, Tvrtko Ursulin wrote:
>> -static void lrc_setup_hardware_status_page(struct intel_engine_cs *engine,
>> - struct drm_i915_gem_object *default_ctx_obj)
>> +static int
>> +lrc_setup_hws(struct intel_engine_cs *engine,
>> + struct drm_i915_gem_object *def_ctx_obj)
>> {
>> struct drm_i915_private *dev_priv = engine->dev->dev_private;
>> - struct page *page;
>> + void *hws;
>>
>> /* The HWSP is part of the default context object in LRC mode. */
>> - engine->status_page.gfx_addr = i915_gem_obj_ggtt_offset(default_ctx_obj)
>> - + LRC_PPHWSP_PN * PAGE_SIZE;
>> - page = i915_gem_object_get_page(default_ctx_obj, LRC_PPHWSP_PN);
>> - engine->status_page.page_addr = kmap(page);
>> - engine->status_page.obj = default_ctx_obj;
>> + engine->status_page.gfx_addr = i915_gem_obj_ggtt_offset(def_ctx_obj) +
>> + LRC_PPHWSP_PN * PAGE_SIZE;
>> + hws = i915_gem_object_pin_map(def_ctx_obj);
>> + if (IS_ERR(hws))
>> + return PTR_ERR(hws);
>> + engine->status_page.page_addr = hws + LRC_PPHWSP_PN * PAGE_SIZE;
>> + engine->status_page.obj = def_ctx_obj;
>>
>> I915_WRITE(RING_HWS_PGA(engine->mmio_base),
>> - (u32)engine->status_page.gfx_addr);
>> + (u32)engine->status_page.gfx_addr);
>> POSTING_READ(RING_HWS_PGA(engine->mmio_base));
>> +
>> + return 0;
>> }
>
> I don't see the corresonding change for tearing down the hws.
It is where it was, in intel_logical_ring_cleanup. Missing was unpin_map
in intel_lr_context_free. But still there is a leak somewhere. Triggered
by BAT but not individual IGTs so far.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-12 10:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 8:52 [PATCH] drm/i915: Use new i915_gem_object_pin_map for LRC Tvrtko Ursulin
2016-04-12 9:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-04-12 9:35 ` Chris Wilson
2016-04-12 9:30 ` [PATCH] " Chris Wilson
2016-04-12 9:36 ` Tvrtko Ursulin
2016-04-12 9:42 ` Chris Wilson
2016-04-12 9:43 ` Chris Wilson
2016-04-12 10:33 ` Tvrtko Ursulin [this message]
2016-04-12 13:05 ` [PATCH v3] " Tvrtko Ursulin
2016-04-12 13:12 ` Chris Wilson
2016-04-12 13:19 ` Tvrtko Ursulin
2016-04-12 13:29 ` Chris Wilson
2016-04-12 14:06 ` ✗ Fi.CI.BAT: failure for drm/i915: Use new i915_gem_object_pin_map for LRC (rev2) 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=570CCEED.8080007@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=tvrtko.ursulin@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.