]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/i915: Avoid using ctx->file_priv during construction
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 30 Mar 2019 10:03:49 +0000 (10:03 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sun, 31 Mar 2019 07:38:01 +0000 (08:38 +0100)
commitcde5f7edd511b190c175ab817f3f02c5f0897895
treef73b8f55efa13d6908650652a764e8e5d0fba9c3
parent52b832606038c5b3cb1070e7653e4115b7942606
drm/i915: Avoid using ctx->file_priv during construction

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
various parameters. Indeed, we put the file_priv into struct create_ext
so that we have the right file_private available without having to look
at ctx->file_priv. However, it helps to use it!

Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Fixes: b91715417244 ("drm/i915: Extend CONTEXT_CREATE to set parameters upon construction")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190330100349.30642-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c