• Jason Ekstrand's avatar
    drm/i915: Drop I915_CONTEXT_PARAM_RINGSIZE · fe4751c3
    Jason Ekstrand authored
    This reverts commit 88be76cd ("drm/i915: Allow userspace to specify
    ringsize on construction").  This API was originally added for OpenCL
    but the compute-runtime PR has sat open for a year without action so we
    can still pull it out if we want.  I argue we should drop it for three
    reasons:
    
     1. If the compute-runtime PR has sat open for a year, this clearly
        isn't that important.
    
     2. It's a very leaky API.  Ring size is an implementation detail of the
        current execlist scheduler and really only makes sense there.  It
        can't apply to the older ring-buffer scheduler on pre-execlist
        hardware because that's shared across all contexts and it won't
        apply to the GuC scheduler that's in the pipeline.
    
     3. Having userspace set a ring size in bytes is a bad solution to the
        problem of having too small a ring.  There is no way that userspace
        has the information to know how to properly set the ring size so
        it's just going to detect the feature and always set it to the
        maximum of 512K.  This is what the compute-runtime PR does.  The
        scheduler in i915, on the other hand, does have the information to
        make an informed choice.  It could detect if the ring size is a
        problem and grow it itself.  Or, if that's too hard, we could just
        increase the default size from 16K to 32K or even 64K instead of
        relying on userspace to do it.
    
    Let's drop this API for now and, if someone decides they really care
    about solving this problem, they can do it properly.
    Signed-off-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210708154835.528166-2-jason@jlekstrand.net
    fe4751c3
i915_gem_context.c 59.9 KB