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...
Created attachment 12621 [details] [review]
Init counters at load time
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.
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...
Freedesktop's Bugzilla instance is EOLed and open bugs are about to be migrated to http://gitlab.freedesktop.org.
To avoid migrating out of date bugs, I am now closing all the bugs that did not see any activity in the past year. If the issue is still happening, please create a new bug in the relevant project at https://gitlab.freedesktop.org/drm (use misc by default).
Sorry about the noise!