From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Packard Subject: Re: [PATCH 01/13] drm/i915: Rename agp_type to cache_level Date: Thu, 14 Apr 2011 05:39:14 -0700 Message-ID: References: <1302771827-26112-1-git-send-email-chris@chris-wilson.co.uk> <1302771827-26112-2-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2129906362==" Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CC6B9E76D for ; Thu, 14 Apr 2011 05:39:23 -0700 (PDT) In-Reply-To: <1302771827-26112-2-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============2129906362== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Thu, 14 Apr 2011 10:03:35 +0100, Chris Wilson = 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 =3D AGP_USER_MEMORY; > + obj->cache_level =3D 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 >=3D 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 =3D 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. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iD8DBQFNpuryQp8BWwlsTdMRAnjBAJ9RELnVH8wY0lnuhAcry05vtRpoRACgnJiU BQfvA2+NQ3ON/7pkFVCkWAM= =4VOS -----END PGP SIGNATURE----- --=-=-=-- --===============2129906362== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============2129906362==--