From: Keith Packard <keithp@keithp.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/13] drm/i915: Rename agp_type to cache_level
Date: Thu, 14 Apr 2011 05:39:14 -0700 [thread overview]
Message-ID: <yunhba1m2h9.fsf@aiko.keithp.com> (raw)
In-Reply-To: <1302771827-26112-2-git-send-email-chris@chris-wilson.co.uk>
[-- Attachment #1.1: Type: text/plain, Size: 1278 bytes --]
On Thu, 14 Apr 2011 10:03:35 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> ... to clarify just how we use it inside the driver. We still need to
> translate through agp_type for interface into the fake AGP driver.
agp_type has some really confusing semantics...
> - obj->agp_type = AGP_USER_MEMORY;
> + obj->cache_level = I915_CACHE_NONE;
AGP_USER_MEMORY is indeed uncached, so this is correct.
> +/* XXX kill agp_type! */
> +static uint32_t cache_level_to_agp_type(struct drm_device *dev,
> + enum i915_cache_level cache_level)
This should be unsigned int to match the users of this value
> + switch (cache_level) {
> + case I915_CACHE_LLC_MLC:
> + if (INTEL_INFO(dev)->gen >= 6)
> + return AGP_USER_CACHED_MEMORY_LLC_MLC;
I like to see a comment here:
+ /* Fall through ... */
> + case I915_CACHE_LLC:
> + return AGP_USER_CACHED_MEMORY;
> + default:
> + case I915_CACHE_NONE:
> + return AGP_USER_MEMORY;
> + }
> list_for_each_entry(obj, &dev_priv->mm.gtt_list, gtt_list) {
> + int agp_type = cache_level_to_agp_type(dev, obj->cache_level);
> +
This should be 'unsigned int' to match the signature of
intel_gtt_insert_sg_entries and intel_gtt_insert_pages.
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-04-14 12:39 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 9:03 i915 llc for -next Chris Wilson
2011-04-14 9:03 ` [PATCH 01/13] drm/i915: Rename agp_type to cache_level Chris Wilson
2011-04-14 12:39 ` Keith Packard [this message]
2011-04-14 20:57 ` [PATCH] " Chris Wilson
2011-04-14 9:03 ` [PATCH 02/13] drm/i915: Do not clflush snooped objects Chris Wilson
2011-04-14 9:03 ` [PATCH 03/13] drm/i915: Introduce i915_gem_object_finish_gpu() Chris Wilson
2011-04-14 16:01 ` Daniel Vetter
2011-04-14 9:03 ` [PATCH 04/13] drm/i915: Introduce i915_gem_object_finish_gtt() Chris Wilson
2011-04-14 16:12 ` Daniel Vetter
2011-04-14 20:20 ` Chris Wilson
2011-05-04 16:47 ` Keith Packard
2011-04-14 9:03 ` [PATCH 05/13] drm/i915/gtt: Split out i915_gem_gtt_rebind_object() Chris Wilson
2011-04-14 16:52 ` Daniel Vetter
2011-04-14 9:03 ` [PATCH 06/13] drm/i915: Add an interface to dynamically change the cache level Chris Wilson
2011-04-14 16:54 ` Daniel Vetter
2011-04-14 9:03 ` [PATCH 07/13] drm/i915: Mark the cursor and the overlay as being part of the display planes Chris Wilson
2011-05-04 17:09 ` Keith Packard
2011-05-04 18:28 ` Chris Wilson
2011-05-04 18:46 ` Keith Packard
2011-05-04 19:47 ` Chris Wilson
2011-04-14 9:03 ` [PATCH 08/13] drm/i915: Pin after setting to the display plane Chris Wilson
2011-04-14 17:34 ` Daniel Vetter
2011-04-14 21:31 ` Chris Wilson
2011-04-15 6:04 ` [PATCH 1/2] drm/i915: Combine pinning " Chris Wilson
2011-04-15 6:04 ` [PATCH 2/2] drm/i915: Use the uncached domain for the display planes Chris Wilson
2011-04-16 10:54 ` Daniel Vetter
2011-04-15 12:11 ` [PATCH 1/2] drm/i915: Combine pinning after setting to the display plane Daniel Vetter
2011-04-16 6:26 ` Chris Wilson
2011-04-16 6:27 ` [PATCH] drm/i915: Combine pinning with " Chris Wilson
2011-04-16 10:52 ` Daniel Vetter
2011-04-16 11:00 ` Chris Wilson
2011-04-14 9:03 ` [PATCH 09/13] drm/i915: Use the uncached domain for the display planes Chris Wilson
2011-04-14 9:03 ` [PATCH 10/13] drm/i915: Use the CPU domain for snooped pwrites Chris Wilson
2011-04-14 17:40 ` Daniel Vetter
2011-04-14 9:03 ` [PATCH 11/13] drm/i915: Prevent mmap access through the GTT of snooped pages Chris Wilson
2011-05-04 17:30 ` Keith Packard
2011-04-14 9:03 ` [PATCH 12/13] drm/i915: Prevent mixing of snooped and tiling modes for old chipsets Chris Wilson
2011-04-14 17:43 ` Daniel Vetter
2011-04-14 20:26 ` Chris Wilson
2011-05-04 17:32 ` Keith Packard
2011-04-14 9:03 ` [PATCH 13/13] drm/i915: Use the LLC mode on gen6 for everything but display Chris Wilson
2011-04-15 6:12 ` i915 llc for -next 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=yunhba1m2h9.fsf@aiko.keithp.com \
--to=keithp@keithp.com \
--cc=chris@chris-wilson.co.uk \
--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;
as well as URLs for NNTP newsgroup(s).