]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/guc: Copy whole golden context, set engine state size of subset
authorMatthew Brost <matthew.brost@intel.com>
Thu, 9 Sep 2021 16:47:31 +0000 (09:47 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Mon, 13 Sep 2021 18:30:36 +0000 (11:30 -0700)
commit0e662f9a90628832f7963fca5eeffcab99110f33
tree69184ccb1c5c8396f1ef06de5b92396a9579890a
parent19d9aac8c010a584d505b70cb26ae87a01e32c18
drm/i915/guc: Copy whole golden context, set engine state size of subset

When the GuC does a media reset, it copies a golden context state back
into the corrupted context's state. The address of the golden context
and the size of the engine state restore are passed in via the GuC ADS.
The i915 had a bug where it passed in the whole size of the golden
context, not the size of the engine state to restore resulting in a
memory corruption.

Also copy the entire golden context on init rather than just the engine
state that is restored.

v2 (Daniele): use defines to avoid duplicated const variables (John).

Fixes: 5d0ff731bbbe ("drm/i915/guc: Add golden context to GuC ADS")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-11-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c