AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: zhoucm1 <david1.zhou-5C7GfCeVMHo@public.gmane.org>
To: Xiangliang Yu <Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 1/1] drm/amdgpu/gfx8: add support kernel interface queue(KIQ)
Date: Tue, 20 Dec 2016 17:49:27 +0800	[thread overview]
Message-ID: <5858FEA7.9060800@amd.com> (raw)
In-Reply-To: <1482227322-2556-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>



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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2016-12-20  9:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20  9:48 [PATCH 1/1] drm/amdgpu/gfx8: add support kernel interface queue(KIQ) Xiangliang Yu
     [not found] ` <1482227322-2556-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-20  9:49   ` zhoucm1 [this message]
     [not found]     ` <5858FEA7.9060800-5C7GfCeVMHo@public.gmane.org>
2016-12-22  8:58       ` Yu, Xiangliang
     [not found]         ` <CY4PR12MB17017A2AE849141C7D61EBF4EB920-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-22  9:01           ` zhoucm1
     [not found]             ` <585B9663.7070007-5C7GfCeVMHo@public.gmane.org>
2016-12-22  9:06               ` Yu, Xiangliang
  -- strict thread matches above, loose matches on Subject: below --
2016-12-20  9:40 Xiangliang Yu
     [not found] ` <1482226848-2440-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2016-12-20  9:41   ` Yu, Xiangliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5858FEA7.9060800@amd.com \
    --to=david1.zhou-5c7gfcevmho@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox