[RFC 00/15] Selectable platform support

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

 



From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

For Joonas basically. :)

Rough goal - add Kconfig options to turn off supported platforms and count on
compiler DCE to make the driver smaller.

Tested as so much that it boots and renders on Skylake with all platforms/gens
older than Gen8 turned off.

   text    data     bss     dec     hex filename
1502847   54223    2888 1559958  17cd96 i915.ko.original
1375647   51939    2888 1430474  15d3ca i915.ko.gen8+

So only ~124kiB saving. Or ~8.5%. Perhaps once GCC LTO support lands it would be
better than this?

Starts with smaller patches to show the idea step by step on Gen2, then proceeds
in larger chunks, to finish with some invasive Coccinelle works to enable the
last few kilo-bytes of savings.

Let the flames begin! :)

Tvrtko Ursulin (15):
  drm/i915: Make I830 platform support optional
  drm/i915: Make I845G platform support optional
  drm/i915: Make I85X platform support optional
  drm/i915: Make I865G platform support optional
  drm/i915: Make GEN2 support optional
  drm/i915: Make Gen3 platforms support optional
  drm/i915: Make Gen4 platforms support optional
  drm/i915: Make Ironlake/Gen5 platforms support optional
  drm/i915: Make Sandybridge/Gen6 platforms support optional
  drm/i915: Make Gen7/7.5 platform support optional
  drm/i915: Use INTEL_GEN everywhere
  drm/i915: Favour IS_GENx
  drm/i915: IS_GEN range helpers
  drm/i915: Use new IS_GEN range helpers
  drm/i915: Replace some negative Gen checks

 drivers/gpu/drm/i915/Kconfig                       |   5 +
 drivers/gpu/drm/i915/Kconfig.platforms             | 169 ++++++++++++++++++
 drivers/gpu/drm/i915/i915_debugfs.c                |  86 ++++-----
 drivers/gpu/drm/i915/i915_drv.c                    |  16 +-
 drivers/gpu/drm/i915/i915_drv.h                    | 133 ++++++++++----
 drivers/gpu/drm/i915/i915_gem.c                    |  18 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c         |   2 +-
 drivers/gpu/drm/i915/i915_gem_fence_reg.c          |   4 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c                |  30 ++--
 drivers/gpu/drm/i915/i915_gem_request.c            |   2 +-
 drivers/gpu/drm/i915/i915_gem_stolen.c             |   8 +-
 drivers/gpu/drm/i915/i915_gem_tiling.c             |   8 +-
 drivers/gpu/drm/i915/i915_gpu_error.c              |  40 ++---
 drivers/gpu/drm/i915/i915_irq.c                    |  58 +++---
 drivers/gpu/drm/i915/i915_pci.c                    |  84 ++++++++-
 drivers/gpu/drm/i915/i915_perf.c                   |   2 +-
 drivers/gpu/drm/i915/i915_pmu.c                    |   6 +-
 drivers/gpu/drm/i915/i915_reg.h                    |   4 +-
 drivers/gpu/drm/i915/i915_suspend.c                |  12 +-
 drivers/gpu/drm/i915/i915_sysfs.c                  |   2 +-
 drivers/gpu/drm/i915/intel_atomic_plane.c          |   2 +-
 drivers/gpu/drm/i915/intel_audio.c                 |   2 +-
 drivers/gpu/drm/i915/intel_bios.c                  |   2 +-
 drivers/gpu/drm/i915/intel_cdclk.c                 |   8 +-
 drivers/gpu/drm/i915/intel_color.c                 |   2 +-
 drivers/gpu/drm/i915/intel_crt.c                   |   6 +-
 drivers/gpu/drm/i915/intel_ddi.c                   |  10 +-
 drivers/gpu/drm/i915/intel_device_info.c           |  18 +-
 drivers/gpu/drm/i915/intel_display.c               | 194 ++++++++++-----------
 drivers/gpu/drm/i915/intel_dp.c                    |  28 +--
 drivers/gpu/drm/i915/intel_dpll_mgr.c              |   4 +-
 drivers/gpu/drm/i915/intel_engine_cs.c             |  22 +--
 drivers/gpu/drm/i915/intel_fbc.c                   |  32 ++--
 drivers/gpu/drm/i915/intel_fifo_underrun.c         |   2 +-
 drivers/gpu/drm/i915/intel_hangcheck.c             |   2 +-
 drivers/gpu/drm/i915/intel_hdcp.c                  |   2 +-
 drivers/gpu/drm/i915/intel_hdmi.c                  |  10 +-
 drivers/gpu/drm/i915/intel_lrc.c                   |   6 +-
 drivers/gpu/drm/i915/intel_lvds.c                  |  10 +-
 drivers/gpu/drm/i915/intel_mocs.c                  |   2 +-
 drivers/gpu/drm/i915/intel_overlay.c               |   2 +-
 drivers/gpu/drm/i915/intel_panel.c                 |  10 +-
 drivers/gpu/drm/i915/intel_pipe_crc.c              |   2 +-
 drivers/gpu/drm/i915/intel_pm.c                    | 106 +++++------
 drivers/gpu/drm/i915/intel_psr.c                   |   6 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c            |  34 ++--
 drivers/gpu/drm/i915/intel_ringbuffer.h            |   4 +-
 drivers/gpu/drm/i915/intel_sdvo.c                  |  14 +-
 drivers/gpu/drm/i915/intel_sprite.c                |  30 ++--
 drivers/gpu/drm/i915/intel_tv.c                    |   2 +-
 drivers/gpu/drm/i915/intel_uncore.c                |  20 +--
 .../gpu/drm/i915/selftests/i915_gem_coherency.c    |   4 +-
 drivers/gpu/drm/i915/selftests/i915_gem_context.c  |   2 +-
 drivers/gpu/drm/i915/selftests/i915_gem_object.c   |  12 +-
 drivers/gpu/drm/i915/selftests/intel_hangcheck.c   |   8 +-
 drivers/gpu/drm/i915/selftests/intel_uncore.c      |   2 +-
 56 files changed, 816 insertions(+), 495 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/Kconfig.platforms

-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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