• Chris Wilson's avatar
    drm/i915: intel_ring.engine is unused · d822bb18
    Chris Wilson authored
    Or rather it is used only by intel_ring_pin() to extract the
    drm_i915_private which we can easily pass in. As this is a relatively
    rare operation, save the space in the struct, and as such it is even
    break even in the extra code for passing around the parameter:
    
    add/remove: 0/0 grow/shrink: 2/3 up/down: 15/-15 (0)
    function                                     old     new   delta
    intel_init_ring_buffer                       906     918     +12
    execlists_context_pin                       1308    1311      +3
    mock_engine                                  407     403      -4
    intel_engine_create_ring                     367     363      -4
    intel_ring_pin                               326     319      -7
    Total: Before=1261794, After=1261794, chg +0.00%
    
    v2: Reorder intel_init_ring_buffer to keep the ring setup together:
    
    add/remove: 0/0 grow/shrink: 2/3 up/down: 9/-15 (-6)
    function                                     old     new   delta
    intel_init_ring_buffer                       906     912      +6
    execlists_context_pin                       1308    1311      +3
    mock_engine                                  407     403      -4
    intel_engine_create_ring                     367     363      -4
    intel_ring_pin                               326     319      -7
    Total: Before=1261794, After=1261788, chg -0.00%
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/20170403113426.25707-1-chris@chris-wilson.co.uk
    d822bb18
mock_engine.c 5.51 KB