[PATCH 00/10] shrink dev_priv by 300 lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri,  2 Nov 2012 19:55:01 +0100
Daniel Vetter <daniel.vetter at ffwll.ch> wrote:

> Hi all,
> 
> Inspired by some recent patches I've figured I need to clean up and
> put some organization behind our driver_private struct. It shrunk
> from almost 500 lines to about 160. Things still there which could be
> gathered:
> - vbt and vbt-derived values
> - shared/global modeset state
> - random smaller bits and pieces
> 
> Comments highly welcome.
> 
> Cheers, Daniel

This is in reference to all your extraction of substructs ie. the l3
parity...

This really seems like moving around code mostly for the sake of moving
around code (note that I said mostly). What I would have liked to see as a
motivation/result of this is instead of passing dev_priv around all over
the place, pass around the new extracted structures. If you still need
dev_priv (for something other than reg reads or writes), then I don't
think you've done anything useful.

Changing the function prototypes to the new substructs would be a 
provably useful thing to do. 

> 
> Daniel Vetter (10):
>   drm/i915: move the suspend/resume register file out of dev_priv
>   drm/i915: move dev_priv->(rps|ips) out of line
>   drm/i915: move pwrctx/renderctx to the other ilk power state
>   drm/i915: move dri1 dungeon out of dev_priv
>   drm/i915: extract dev_priv fbc state into separate substruct
>   drm/i915: extract l3_parity substruct from dev_priv
>   drm/i915: move dev_priv->mm out of line
>   drm/i915: extract hangcheck/reset/error_state state into substruct
>   drm/i915: kill dev_priv->modeset_on_lid
>   drm/i915: move fence_regs to the fence lru
> 
>  drivers/gpu/drm/i915/i915_debugfs.c     |  32 +-
>  drivers/gpu/drm/i915/i915_dma.c         |  43 +-
>  drivers/gpu/drm/i915/i915_drv.c         |  15 +-
>  drivers/gpu/drm/i915/i915_drv.h         | 608
> ++++++++++++++-------------- drivers/gpu/drm/i915/i915_gem.c
> |  42 +- drivers/gpu/drm/i915/i915_gem_stolen.c  |  14 +-
>  drivers/gpu/drm/i915/i915_irq.c         |  62 +--
>  drivers/gpu/drm/i915/i915_suspend.c     | 692
> ++++++++++++++++----------------
> drivers/gpu/drm/i915/i915_sysfs.c       |   6 +-
> drivers/gpu/drm/i915/intel_display.c    |   6 +-
> drivers/gpu/drm/i915/intel_lvds.c       |  40 --
> drivers/gpu/drm/i915/intel_panel.c      |  20 +-
> drivers/gpu/drm/i915/intel_pm.c         |  80 ++--
> drivers/gpu/drm/i915/intel_ringbuffer.c |   2 +- 14 files changed,
> 823 insertions(+), 839 deletions(-)
> 



-- 
Ben Widawsky, Intel Open Source Technology Center


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux