From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH 1/3] drm/i915/gtt: pde entry encoding is identical
Date: Thu, 04 Jul 2019 19:03:08 +0300 [thread overview]
Message-ID: <87y31d23er.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <156225567088.25091.1560874213326601592@skylake-alporthouse-com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Quoting Mika Kuoppala (2019-07-04 16:44:05)
>> +#define set_pd_entry(pd, pde, to) ({ \
>> + __write_pd_entry((pd), (pde), px_base(to), gen8_pde_encode); \
>> + atomic_inc(&(pd)->used); \
>
> inc before write so that you have a nice onion with clear.
>
>> +})
>> +
>> +#define clear_pd_entry(pd, pde, to) ({ \
>
> You want to pull the GEM_BUG_ON here so that is tightly coupled with the
> atomic_dec -- it's an underflow check.
I think I tried that but found out that when we free the ppgtt,
we want to be fast and don't care about the counts matching.
Well, that could be made to match tho. I will take a look.
-Mika
>
>> + __write_pd_entry((pd), (pde), px_base(to), gen8_pde_encode); \
>> + atomic_dec(&pd->used); \
>> +})
>
> I would have preferred these as inlines (even if means "passing" an
> extra arg), but let's see what the next two patches bring.
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-07-04 16:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 15:44 [PATCH 1/3] drm/i915/gtt: pde entry encoding is identical Mika Kuoppala
2019-07-04 15:44 ` [PATCH 2/3] drm/i915/gtt: Tear down setup and cleanup macros for page dma Mika Kuoppala
2019-07-04 15:44 ` [PATCH 3/3] drm/i915/gtt: Setup phys pages for 3lvl pdps Mika Kuoppala
2019-07-04 15:54 ` [PATCH 1/3] drm/i915/gtt: pde entry encoding is identical Chris Wilson
2019-07-04 16:03 ` Mika Kuoppala [this message]
2019-07-04 17:31 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] " Patchwork
2019-07-04 17:33 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-07-04 17:50 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-06 0:07 ` ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-06-18 16:17 [PATCH 1/3] " Mika Kuoppala
2019-06-18 16:32 ` Chris Wilson
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=87y31d23er.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@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