From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: fix the wrong type of gem object creation
Date: Fri, 29 Jun 2018 09:21:24 +0800 [thread overview]
Message-ID: <5B358994.40904@amd.com> (raw)
In-Reply-To: <1530179887-24410-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
On 06/28/2018 05:58 PM, Huang Rui wrote:
> We still use legacy type of gem_object_create, it should update to ttm_bo_type
> now.
>
> Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index bc5fd8e..811c629 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -146,7 +146,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
> AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
> AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
> AMDGPU_GEM_CREATE_VRAM_CLEARED,
> - true, NULL, &gobj);
> + ttm_bo_type_kernel, NULL, &gobj);
> if (ret) {
> pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
> return -ENOMEM;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index eff716d..97b999c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -265,7 +265,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
>
> r = amdgpu_gem_object_create(adev, size, args->in.alignment,
> (u32)(0xffffffff & args->in.domains),
> - flags, false, resv, &gobj);
> + flags, ttm_bo_type_device, resv, &gobj);
> if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) {
> if (!r) {
> struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
> @@ -317,7 +317,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
>
> /* create a gem object to contain this object in */
> r = amdgpu_gem_object_create(adev, args->size, 0, AMDGPU_GEM_DOMAIN_CPU,
> - 0, 0, NULL, &gobj);
> + 0, ttm_bo_type_device, NULL, &gobj);
> if (r)
> return r;
>
> @@ -766,7 +766,7 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,
> amdgpu_display_supported_domains(adev));
> r = amdgpu_gem_object_create(adev, args->size, 0, domain,
> AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,
> - false, NULL, &gobj);
> + ttm_bo_type_device, NULL, &gobj);
> if (r)
> return -ENOMEM;
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2018-06-29 1:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 9:58 [PATCH] drm/amdgpu: fix the wrong type of gem object creation Huang Rui
[not found] ` <1530179887-24410-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-06-28 16:53 ` Michel Dänzer
2018-06-29 1:21 ` Zhang, Jerry (Junwei) [this message]
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=5B358994.40904@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ray.huang-5C7GfCeVMHo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.