[Intel-gfx] [PATCH] drm/i915: Avoid using ctx->file_priv during construction
Chris Wilson
chris at chris-wilson.co.uk
Sun Mar 31 09:23:52 UTC 2019
Quoting Michal Wajdeczko (2019-03-31 10:12:52)
> On Sat, 30 Mar 2019 11:03:49 +0100, Chris Wilson
> <chris at chris-wilson.co.uk> wrote:
>
> > As we only set ctx->file_priv on registering the GEM context after
> > construction, it is invalid to try and use it in the middle for setting
>
> Other option would be to set ctx->file_priv ahead of gem_context_register
> and use gem_context_register only for registering (per function name)
I thought it might be useful for us to distinguish between unregistered
protocontexts and unregistered kernel contexts with registered GEM
contexts.
> Extra bonus would be that changed here static ctx functions will continue
> to take ctx as first parameter (same as other existing ctx functions)
The only real use for ctx->file is for identifying the right lut in
i915_gem_close_object() (the other is for charging a hang against a
file, which is going to be more complicated in future, so expect
changes).
Ideas for avoiding the search along the linked list in close are most
welcome.
https://patchwork.freedesktop.org/patch/291947/?series=57942&rev=2
-Chris
More information about the Intel-gfx
mailing list