From: Michel Thierry <michel.thierry@intel.com>
To: akash goel <akash.goels@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, "Goel, Akash" <akash.goel@intel.com>
Subject: Re: [PATCH 04/12] drm/i915/bdw: Add ppgtt info for dynamic pages
Date: Wed, 18 Mar 2015 10:17:14 +0000 [thread overview]
Message-ID: <550950AA.8050005@intel.com> (raw)
In-Reply-To: <CAK_0AV03DZoDLpYyyym_anDfeVdjm=u4o_jpZxBTnkqgeett5w@mail.gmail.com>
On 3/3/2015 12:23 PM, akash goel wrote:
> On Fri, Feb 20, 2015 at 11:15 PM, Michel Thierry
> <michel.thierry@intel.com> wrote:
>> From: Ben Widawsky<benjamin.widawsky@intel.com>
>>
>> Note that there is no gen8 ppgtt debug_dump function yet.
>>
>> Signed-off-by: Ben Widawsky<ben@bwidawsk.net>
>> Signed-off-by: Michel Thierry<michel.thierry@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_debugfs.c | 19 ++++++++++---------
>> drivers/gpu/drm/i915/i915_gem_gtt.c | 32 ++++++++++++++++++++++++++++++++
>> drivers/gpu/drm/i915/i915_gem_gtt.h | 9 +++++++++
>> 3 files changed, 51 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
>> index 40630bd..93c34ab 100644
>> --- a/drivers/gpu/drm/i915/i915_debugfs.c
>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
>> @@ -2165,7 +2165,6 @@ static void gen6_ppgtt_info(struct seq_file *m, struct drm_device *dev)
>> {
>> struct drm_i915_private *dev_priv = dev->dev_private;
>> struct intel_engine_cs *ring;
>> - struct drm_file *file;
>> int i;
>>
>> if (INTEL_INFO(dev)->gen == 6)
>> @@ -2189,14 +2188,6 @@ static void gen6_ppgtt_info(struct seq_file *m, struct drm_device *dev)
>>
>> ppgtt->debug_dump(ppgtt, m);
>> }
>> -
>> - list_for_each_entry_reverse(file, &dev->filelist, lhead) {
>> - struct drm_i915_file_private *file_priv = file->driver_priv;
>> -
>> - seq_printf(m, "proc: %s\n",
>> - get_pid_task(file->pid, PIDTYPE_PID)->comm);
>> - idr_for_each(&file_priv->context_idr, per_file_ctx, m);
>> - }
>> }
>>
>> static int i915_ppgtt_info(struct seq_file *m, void *data)
>> @@ -2204,6 +2195,7 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
>> struct drm_info_node *node = m->private;
>> struct drm_device *dev = node->minor->dev;
>> struct drm_i915_private *dev_priv = dev->dev_private;
>> + struct drm_file *file;
>>
>> int ret = mutex_lock_interruptible(&dev->struct_mutex);
>> if (ret)
>> @@ -2215,6 +2207,15 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
>> else if (INTEL_INFO(dev)->gen >= 6)
>> gen6_ppgtt_info(m, dev);
>>
>> + list_for_each_entry_reverse(file, &dev->filelist, lhead) {
>> + struct drm_i915_file_private *file_priv = file->driver_priv;
>> +
>> + seq_printf(m, "\nproc: %s\n",
>> + get_pid_task(file->pid, PIDTYPE_PID)->comm);
>> + idr_for_each(&file_priv->context_idr, per_file_ctx,
>> + (void *)(unsigned long)m);
>> + }
>> +
>> intel_runtime_pm_put(dev_priv);
>> mutex_unlock(&dev->struct_mutex);
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
>> index ecfb62a..1edcc17 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
>> @@ -2125,6 +2125,38 @@ static void gen8_ggtt_clear_range(struct i915_address_space *vm,
>> readl(gtt_base);
>> }
>>
>> +void gen8_for_every_pdpe_pde(struct i915_hw_ppgtt *ppgtt,
>> + void (*callback)(struct i915_page_directory_pointer_entry *pdp,
>> + struct i915_page_directory_entry *pd,
>> + struct i915_page_table_entry *pt,
>> + unsigned pdpe,
>> + unsigned pde,
>> + void *data),
>> + void *data)
>> +{
>> + uint64_t start = ppgtt->base.start;
>> + uint64_t length = ppgtt->base.total;
>> + uint64_t pdpe, pde, temp;
>> +
>> + struct i915_page_directory_entry *pd;
>> + struct i915_page_table_entry *pt;
>> +
>> + gen8_for_each_pdpe(pd, &ppgtt->pdp, start, length, temp, pdpe) {
>> + uint64_t pd_start = start, pd_length = length;
>> + int i;
>> +
>> + if (pd == NULL) {
>> + for (i = 0; i < GEN8_PDES_PER_PAGE; i++)
>> + callback(&ppgtt->pdp, NULL, NULL, pdpe, i, data);
>> + continue;
>> + }
>> +
>> + gen8_for_each_pde(pt, pd, pd_start, pd_length, temp, pde) {
>> + callback(&ppgtt->pdp, pd, pt, pdpe, pde, data);
>> + }
>> + }
>> +}
>> +
>> static void gen6_ggtt_clear_range(struct i915_address_space *vm,
>> uint64_t start,
>> uint64_t length,
>> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
>> index a33c6e9..144858e 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
>> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
>> @@ -483,6 +483,15 @@ static inline size_t gen8_pde_count(uint64_t addr, uint64_t length)
>> return i915_pde_index(end, GEN8_PDE_SHIFT) - i915_pde_index(addr, GEN8_PDE_SHIFT);
>> }
>>
>> +void gen8_for_every_pdpe_pde(struct i915_hw_ppgtt *ppgtt,
>> + void (*callback)(struct i915_page_directory_pointer_entry *pdp,
>> + struct i915_page_directory_entry *pd,
>> + struct i915_page_table_entry *pt,
>> + unsigned pdpe,
>> + unsigned pde,
>> + void *data),
>> + void *data);
>> +
> Caller of gen8_for_every_pdpe_pde is not there.
> What is the (envisaged) usage of this function ?
Stale code from a previous rebase. I'll remove it.
>> int i915_gem_gtt_init(struct drm_device *dev);
>> void i915_gem_init_global_gtt(struct drm_device *dev);
>> void i915_global_gtt_cleanup(struct drm_device *dev);
>> --
>> 2.1.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-18 10:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 17:45 [PATCH 00/12] PPGTT with 48b addressing Michel Thierry
2015-02-20 17:45 ` [PATCH 01/12] drm/i915/bdw: Make pdp allocation more dynamic Michel Thierry
2015-03-03 11:48 ` akash goel
2015-03-18 10:15 ` Michel Thierry
2015-02-20 17:45 ` [PATCH 02/12] drm/i915/bdw: Abstract PDP usage Michel Thierry
2015-03-03 12:16 ` akash goel
2015-03-18 10:16 ` Michel Thierry
2015-03-04 3:07 ` akash goel
2015-02-20 17:45 ` [PATCH 03/12] drm/i915/bdw: Add dynamic page trace events Michel Thierry
2015-02-24 10:56 ` Daniel Vetter
2015-02-24 10:59 ` Daniel Vetter
2015-02-20 17:45 ` [PATCH 04/12] drm/i915/bdw: Add ppgtt info for dynamic pages Michel Thierry
2015-03-03 12:23 ` akash goel
2015-03-18 10:17 ` Michel Thierry [this message]
2015-02-20 17:45 ` [PATCH 05/12] drm/i915/bdw: implement alloc/free for 4lvl Michel Thierry
2015-03-03 12:55 ` akash goel
2015-03-04 13:00 ` Daniel Vetter
2015-03-04 2:48 ` akash goel
2015-02-20 17:46 ` [PATCH 06/12] drm/i915/bdw: Add 4 level switching infrastructure Michel Thierry
2015-03-03 13:01 ` akash goel
2015-03-04 13:08 ` Daniel Vetter
2015-02-20 17:46 ` [PATCH 07/12] drm/i915/bdw: Support 64 bit PPGTT in lrc mode Michel Thierry
2015-03-03 13:08 ` akash goel
2015-02-20 17:46 ` [PATCH 08/12] drm/i915/bdw: Generalize PTE writing for GEN8 PPGTT Michel Thierry
2015-02-20 17:46 ` [PATCH 09/12] drm/i915: Plumb sg_iter through va allocation ->maps Michel Thierry
2015-02-20 17:46 ` [PATCH 10/12] drm/i915/bdw: Add 4 level support in insert_entries and clear_range Michel Thierry
2015-03-03 16:39 ` akash goel
2015-02-20 17:46 ` [PATCH 11/12] drm/i915: Expand error state's address width to 64b Michel Thierry
2015-03-03 16:42 ` akash goel
2015-02-20 17:46 ` [PATCH 12/12] drm/i915/bdw: Flip the 48b switch Michel Thierry
2015-02-24 10:54 ` [PATCH 00/12] PPGTT with 48b addressing Daniel Vetter
2015-03-03 13:52 ` Damien Lespiau
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=550950AA.8050005@intel.com \
--to=michel.thierry@intel.com \
--cc=akash.goel@intel.com \
--cc=akash.goels@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
/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