aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index ea6a62f67e38..833203401ef4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -29,6 +29,7 @@
#include <linux/module.h>
#include <drm/drm.h>
+#include <drm/drm_drv.h>
#include "amdgpu.h"
#include "amdgpu_pm.h"
@@ -293,7 +294,7 @@ int amdgpu_vce_resume(struct amdgpu_device *adev)
void *cpu_addr;
const struct common_firmware_header *hdr;
unsigned offset;
- int r;
+ int r, idx;
if (adev->vce.vcpu_bo == NULL)
return -EINVAL;
@@ -313,8 +314,12 @@ int amdgpu_vce_resume(struct amdgpu_device *adev)
hdr = (const struct common_firmware_header *)adev->vce.fw->data;
offset = le32_to_cpu(hdr->ucode_array_offset_bytes);
- memcpy_toio(cpu_addr, adev->vce.fw->data + offset,
- adev->vce.fw->size - offset);
+
+ if (drm_dev_enter(&adev->ddev, &idx)) {
+ memcpy_toio(cpu_addr, adev->vce.fw->data + offset,
+ adev->vce.fw->size - offset);
+ drm_dev_exit(idx);
+ }
amdgpu_bo_kunmap(adev->vce.vcpu_bo);
4205-log-pretty-formats.sh?h=main&id=018b9deba5c4971f321f2158e3a6308f479bfee3&follow=1'>pretty: lazy-load commit data when expanding user-formatJeff King2-12/+13 2021-01-28rebase -i: do leave commit message intact in fixup! chainsJohannes Schindelin2-1/+20 2021-01-28t0000: consistently use single quotes for outer testsJeff King1-190/+190 2021-01-28t0000: run cleaning test inside sub-testJeff King1-8/+17 2021-01-28t0000: run prereq tests inside sub-testJeff King1-80/+69 2021-01-28t0000: keep clean-up tests togetherJeff King1-11/+11 2021-01-28oid_pos(): access table through const pointersJeff King7-13/+13 2021-01-28hash_pos(): convert to oid_pos()Jeff King7-43/+43 2021-01-28rerere: use strmap to store rerere directoriesJeff King1-39/+23 2021-01-28rerere: tighten rr-cache dirname checkJeff King1-2/+3 2021-01-28rerere: check dirname format while iterating rr_cache directoryJeff King1-3/+11 2021-01-28commit_graft_pos(): take an oid instead of a bare hashJeff King3-6/+6 2021-01-27git-compat-util: always enable variadic macrosJeff King1-2/+5 2021-01-27ci: do not cancel all jobs of a matrix if one failsPhilippe Blain1-0/+4 2021-01-26test-lib: prevent '--stress-jobs=X' from being ignoredSZEDER Gábor1-4/+4 2021-01-26grep/log: remove hidden --debug and --grep-debug optionsÆvar Arnfjörð Bjarmason4-107/+2 2021-01-25The fourth batchJunio C Hamano1-0/+57 2021-01-24grep/pcre2: better support invalid UTF-8 haystacksÆvar Arnfjörð Bjarmason7-2/+81 2021-01-24grep/pcre2 tests: don't rely on invalid UTF-8 data testÆvar Arnfjörð Bjarmason1-6/+1 2021-01-23Remove support for v1 of the PCRE libraryÆvar Arnfjörð Bjarmason7-217/+18 2021-01-23config.mak.uname: remove redundant NO_LIBPCRE1_JIT flagÆvar Arnfjörð Bjarmason1-1/+0