]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/guc: Convert golden context prep to iosys_map
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 16 Feb 2022 17:41:41 +0000 (09:41 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 25 Feb 2022 23:23:25 +0000 (15:23 -0800)
commit8b8a6fd7265f2616682628d679dc2addc290a481
treeedc673693b6dc18b29238ec799e662078091714b
parentfe007a2d540ae970085d28282a0dd6284d08faf2
drm/i915/guc: Convert golden context prep to iosys_map

Use the saved ads_map to prepare the golden context. One difference from
the init context is that this function can be called before there is a
gem object (and thus the guc->ads_map) to calculare the size of the
golden context that should be allocated for that object.

So in this case the function needs to be prepared for not having the
system_info with enabled engines filled out. To accomplish that an
info_map is prepared on the side to point either to the gem object
or the local variable on the stack. This allows making
fill_engine_enable_masks() operate always with a iosys_map
argument.

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220216174147.3073235-11-lucas.demarchi@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c