Bug 13296 - counters should be initialized at load time
Summary: counters should be initialized at load time
Status: NEW
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: DRI git
Hardware: All FreeBSD
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-18 20:54 UTC by Robert Noland
Modified: 2007-11-21 20:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Init counters at load time (1.66 KB, patch)
2007-11-18 20:55 UTC, Robert Noland
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Noland 2007-11-18 20:54:14 UTC
Currently the i915 attempts to add additional counters at load time.  FreeBSD doesn't initialize the counters until drm_firstopen, which resets the count.  It also seems reasonable that the counters should track events over the lifetime of the module...
Comment 1 Robert Noland 2007-11-18 20:55:54 UTC
Created attachment 12621 [details] [review]
Init counters at load time
Comment 2 Eric Anholt 2007-11-18 22:38:34 UTC
Since most of the module gets reset between lastclose and firstopen, it makes sense to me that the counters would as well.  Setting up the list of counters at load time would make sense though.
Comment 3 Robert Noland 2007-11-21 20:48:13 UTC
What is actually occurring and what the patch fixes is that when i915_driver_load is called, it adds additional counters ( += 4 ).  I'm not certain that counters has ever been initialized at this point.  When firstopen is called, counters is initialized to 6.  We either need to move the counter initialization to load time, which this patch does or move i915s additions to counters into i915_driver_firstopen.  The latter seems to be moving in the wrong direction when considering modesetting...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.