diff options
author | 2018-08-17 12:10:22 -0700 | |
---|---|---|
committer | 2018-08-17 12:10:22 -0700 | |
commit | f80a71b0c4111e26433744721ad68f05c169ad39 (patch) | |
tree | ff5983e78bb5411dc101a53fa34c34e2eff3c5cc /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | |
parent | Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux (diff) | |
parent | Merge tag 'drm-intel-next-fixes-2018-08-16-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (diff) | |
download | linux-dev-f80a71b0c4111e26433744721ad68f05c169ad39.tar.xz linux-dev-f80a71b0c4111e26433744721ad68f05c169ad39.zip |
Merge tag 'drm-next-2018-08-17' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie:
"First round of fixes for -rc1. I'll follow this up with the msm new hw
support pull request.
This just has three sets of fixes, some for msm before the new hw, a
bunch of AMD fixes (includiing some required firmware changes for new
hw), and a set of i915 (+gvt) fixes"
* tag 'drm-next-2018-08-17' of git://anongit.freedesktop.org/drm/drm: (30 commits)
drm/amdgpu: Use kvmalloc for allocating UVD/VCE/VCN BO backup memory
drm/i915: set DP Main Stream Attribute for color range on DDI platforms
drm/i915/selftests: Hold rpm for unparking
drm/i915: Restore user forcewake domains across suspend
drm/i915: Unmask user interrupts writes into HWSP on snb/ivb/vlv/hsw
drm/i915/gvt: fix memory leak in intel_vgpu_ioctl()
drm/i915/gvt: Off by one in intel_vgpu_write_fence()
drm/i915/kvmgt: Fix potential Spectre v1
drm/i915/gvt: return error on cmd access
drm/i915/gvt: initialize dmabuf mutex in vgpu_create
drm/i915/gvt: fix cleanup sequence in intel_gvt_clean_device
drm/amd/display: Guard against null crtc in CRC IRQ
drm/amd/display: Pass connector id when executing VBIOS CT
drm/amd/display: Check if clock source in use before disabling
drm/amd/display: Allow clock sharing b/w HDMI and DVI
drm/amd/display: Fix warning observed in mode change on Vega
drm/amd/display: fix single link DVI has no display
drm/amdgpu/vce: VCE entity initialization relies on ring initializtion
drm/amdgpu/uvd: UVD entity initialization relys on ring initialization
drm/amdgpu:add VCN booting with firmware loaded by PSP
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index b6ab4f5350c8..0cc5190f4f36 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c @@ -90,8 +90,6 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work); */ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size) { - struct amdgpu_ring *ring; - struct drm_sched_rq *rq; const char *fw_name; const struct common_firmware_header *hdr; unsigned ucode_version, version_major, version_minor, binary_id; @@ -188,14 +186,6 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size) return r; } - ring = &adev->vce.ring[0]; - rq = &ring->sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL]; - r = drm_sched_entity_init(&adev->vce.entity, &rq, 1, NULL); - if (r != 0) { - DRM_ERROR("Failed setting up VCE run queue.\n"); - return r; - } - for (i = 0; i < AMDGPU_MAX_VCE_HANDLES; ++i) { atomic_set(&adev->vce.handles[i], 0); adev->vce.filp[i] = NULL; @@ -236,6 +226,29 @@ int amdgpu_vce_sw_fini(struct amdgpu_device *adev) } /** + * amdgpu_vce_entity_init - init entity + * + * @adev: amdgpu_device pointer + * + */ +int amdgpu_vce_entity_init(struct amdgpu_device *adev) +{ + struct amdgpu_ring *ring; + struct drm_sched_rq *rq; + int r; + + ring = &adev->vce.ring[0]; + rq = &ring->sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL]; + r = drm_sched_entity_init(&adev->vce.entity, &rq, 1, NULL); + if (r != 0) { + DRM_ERROR("Failed setting up VCE run queue.\n"); + return r; + } + + return 0; +} + +/** * amdgpu_vce_suspend - unpin VCE fw memory * * @adev: amdgpu_device pointer |