mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abraham vd Merwe <abraham@2d3d.co.za>
To: DRI Development <dri-devel@lists.sourceforge.net>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: agpgart & i810 & agp_bridge.gatt_table question
Date: Fri, 7 Dec 2001 15:34:44 +0200	[thread overview]
Message-ID: <20011207153444.A6996@crystal.2d3d.co.za> (raw)

[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]

Hi!

What is agp_bridge.gatt_table used for on the Intel 810 series?

Looking at agpgart_be.c, it seems either 64k or 32k is allocated (depending
on the value of MISCC register) and all the entries is set to the scratch
page for i810, but that gatt table is never used except in
intel_i810_insert_entries() where we have this check:

------------< snip <------< snip <------< snip <------------
    for (j = pg_start; j < (pg_start + mem->page_count); j++) {
        if (!PGE_EMPTY(agp_bridge.gatt_table[j])) {
            return -EBUSY;
        }
------------< snip <------< snip <------< snip <------------
		
!PGE_EMPTY roughly translates to agp_bridge.gatt_table[j] &&
agp_bridge.gatt_table[j] != agp_bridge.scratch_page.

Of course, this is always true, so we'll never return EBUSY there, but the
whole thing is silly because we're wasting precious 64k/32k physical
contigious ram and valuable CPU time for this useless check...

The other odd thing I noticed is that this gatt_table is initialized in
agp_backend_initialize(). Look at the 'if (agp_bridge.create_gatt_table()) {'
line in that function. For i810 this translates to
agp_generic_create_gatt_table(), which goes and queries
agp_bridge.current_size.

The problem is that at that stage agp_bridge.current is not initialized yet,
so we're going to get bogus sizes. (Note: this doesn't only go for i810, but
for any chipset that uses agp_generic_create_gatt_table and doesn't have a
size type LVL2_APER_SIZE (for which that function doesn't work))

-- 

Regards
 Abraham

Experience is what you get when you were expecting something else.

__________________________________________________________
 Abraham vd Merwe - 2d3D, Inc.

 Device Driver Development, Outsourcing, Embedded Systems

  Cell: +27 82 565 4451         Snailmail:
   Tel: +27 21 761 7549            Block C, Antree Park
   Fax: +27 21 761 7648            Doncaster Road
 Email: abraham@2d3d.co.za         Kenilworth, 7700
  Http: http://www.2d3d.com        South Africa


[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

                 reply	other threads:[~2001-12-07 13:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20011207153444.A6996@crystal.2d3d.co.za \
    --to=abraham@2d3d.co.za \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®