Quoting Tvrtko Ursulin (2018-02-09 11:01:08) > > On 09/02/18 10:50, Chris Wilson wrote: > > Quoting Tvrtko Ursulin (2018-02-09 10:48:23) > >> > >> On 08/02/2018 13:05, Tvrtko Ursulin wrote: > >>> 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+ > >> > >> I've finished this today (all platforms plus some more details and > >> changes) but wont' post it again. Instead who is interested can see it > >> in my freedesktop git repo - people.freedesktop.org/~tursulin/drm-intel > >> platform-kconfig - but for some reason it is not showing in GitWeb any > >> longer. > >> > >> Anyway.. with the latest build the i915.ko size goes from 15600073 to > >> 1256697 when I enable only Skylake via Kconfig. This is 296kiB and close > >> to 20% saving. > > > > Could you post ./scripts/bloat-o-meter? > > It's big: Ok. Looking at some examples in intel_ringbuffer.c, > i965_emit_bb_start 112 - -112 > ring_request_alloc 1640 1145 -495 It can prune away the vfuncs with the local tests, but it can't determine that the majority of intel_ringbuffer.c isn't used. Other than LTO for cross compilation unit, one problem will be #define HAS_LOGICAL_RING_CONTEXTS(dev_priv) \ ((dev_priv)->info.has_logical_ring_contexts) #define HAS_LOGICAL_RING_PREEMPTION(dev_priv) \ ((dev_priv)->info.has_logical_ring_preemption) #define HAS_EXECLISTS(dev_priv) HAS_LOGICAL_RING_CONTEXTS(dev_priv) where we are strongly advocating using static GEN lists rather than describing capabilities. Ideas? A long time ago, we wanted a static INTEL_INFO. I think now we have driver_caps, we try to kill off mkwrite_intel_info() and where need be use INTEL_INFO() && DRIVER_CAPS(). Tvrtko, how easy do you think it will be to go from Kconfig to #define INTEL_INFO(dev_priv) (&platform_info) ? -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx