Hi Eric,

Nice change. I looked over the savage changes and the only thing that I
noticed was the comment before the new savage_driver_firstopen. The
MTRRs are deleted in lastclose, not unload. The code actually does the
right thing. Otherwise it looks good as far as Savage is concerned.

Cheers,
  Felix

Am Mittwoch, den 03.08.2005, 17:00 -0700 schrieb Eric Anholt:
> Here's a proposed patch to rename the driver hooks to something that I
> feel is a bit more sane.  The renames:
> 
> preinit               ->      load
> postinit      ->      (removed)
> presetup      ->      firstopen
> postsetup     ->      (removed)
> open_helper   ->      open
> prerelease    ->      preclose
> free_filp_priv        ->      postclose
> pretakedown   ->      lastclose
> postcleanup   ->      unload
> release               ->      reclaim_buffers_locked
> version               ->      (removed)
> 
> - postinit was (almost always) just used to print out description and
> version information.  It was the same across almost all drivers.  The
> exceptions were the intel chipsets and MGA, where they did some counters
> setup, which was moved into "load" for the same effect as before, I
> believe.
> - postsetup was totally unused.
> - version got replaced by setting the values in the driver struct.
> - radeon's preinit handler should have been a postsetup (now
> "firstopen") because it's setting up mappings which get torn down on
> lastclose.
> - savage had its handlers split up to deal with mapping setup better, as
> well.
> - Note that the diff is kinda noisy because I moved the BSD stuff to
> have the driver fields in a similar way as Linux.
> - I tried to generally order the setup/teardown hooks as
> "load/firstopen/open/preclose/postclose/lastclose/unload" in the code,
> for sanity.
> 
> My cheapo approximate diff-line-counter says:
> Add:  663
> Del:  917
> 
> I've only tested this on a couple cards, on FreeBSD, so far.  I'm hoping
> for someone else to do a read-through review to catch dumb mistakes.
> I'll test on Linux before committing, if someone else doesn't beat me to
> it.
> 
-- 
| Felix Kühling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to