[Intel-gfx] [PATCH 5/5 v3] drm/i915: debugfs spring cleaning

David Weinehall david.weinehall at linux.intel.com
Mon Aug 15 09:14:48 UTC 2016


On Fri, Aug 12, 2016 at 01:43:52PM +0100, Dave Gordon wrote:
> Alternatively (noting that almost the only use we make of this drm_info_node
> is to indirect multiple times to get dev_priv), we could change what is
> stored in (struct seq_file).private to make it more convenient and/or
> efficient. For example,
> 
> struct i915_debugfs_node {
> 	struct drm_i915_private *dev_priv;
> 	struct drm_info_node drm_info;	// if still required
> };
> 
> thus eliminating several memory cycles per use for a cost of one word extra
> data per debugfs node.

v4 of the patch doesn't eliminate the need for the node_to_i915() macro
and its users, but all functions that don't use the
drm_debugfs_create_files() helper now receive drm_i915_private *dev_priv
instead of drm_device *dev. This at least kills off the cast_to_i915()
macro.


Regards, David


More information about the Intel-gfx mailing list