[PATCH 1/1] drm/amdgpu/gfx8: add support kernel interface queue(KIQ)
zhoucm1
david1.zhou at amd.com
Tue Dec 20 09:49:27 UTC 2016
On 2016年12月20日 17:48, Xiangliang Yu wrote:
> + if (kiq->eop_obj == NULL) {
> + r = amdgpu_bo_create(adev,
> + MEC_HPD_SIZE,
> + PAGE_SIZE, true,
> + AMDGPU_GEM_DOMAIN_GTT, 0, NULL, NULL,
> + &kiq->eop_obj);
> + if (r) {
> + dev_warn(adev->dev, "(%d) create HDP EOP bo failed\n", r);
> + return r;
> + }
> + }
> +
> + r = amdgpu_bo_reserve(kiq->eop_obj, false);
> + if (unlikely(r != 0)) {
> + gfx_v8_0_kiq_fini(adev);
> + return r;
> + }
> +
> + r = amdgpu_bo_pin(kiq->eop_obj, AMDGPU_GEM_DOMAIN_GTT,
> + &kiq->eop_gpu_addr);
> + if (r) {
> + dev_warn(adev->dev, "(%d) pin HDP EOP bo failed\n", r);
> + gfx_v8_0_kiq_fini(adev);
> + return r;
> + }
> +
> + r = amdgpu_bo_kmap(kiq->eop_obj, (void **)&hpd);
you can use amdgpu_bo_create/free_kernel helper to do these.
Regards,
David Zhou
More information about the amd-gfx
mailing list