linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Fix build without CONFIG_HMM_MIRROR
@ 2019-07-09  9:10 YueHaibing
  2019-07-09 13:08 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-07-09  9:10 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, Philip.Yang, Felix.Kuehling
  Cc: linux-kernel, dri-devel, amd-gfx, YueHaibing

If CONFIG_HMM_MIRROR is not set, building may fails:

In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:72:0,
                 from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:40:
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:69:20: error: field mirror has incomplete type
  struct hmm_mirror mirror;

Fixes: 7590f6d211ec ("drm/amdgpu: Prepare for hmm_range_register API change")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
index 281fd9f..b14f175 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
@@ -65,8 +65,10 @@ struct amdgpu_mn {
 	struct rw_semaphore	lock;
 	struct rb_root_cached	objects;
 
+#if defined(CONFIG_HMM_MIRROR)
 	/* HMM mirror */
 	struct hmm_mirror	mirror;
+#endif
 };
 
 #if defined(CONFIG_HMM_MIRROR)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu: Fix build without CONFIG_HMM_MIRROR
  2019-07-09  9:10 [PATCH] drm/amdgpu: Fix build without CONFIG_HMM_MIRROR YueHaibing
@ 2019-07-09 13:08 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2019-07-09 13:08 UTC (permalink / raw)
  To: YueHaibing
  Cc: Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie,
	Daniel Vetter, Yang, Philip, Kuehling, Felix, amd-gfx list, LKML,
	Maling list - DRI developers

On Tue, Jul 9, 2019 at 8:55 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> If CONFIG_HMM_MIRROR is not set, building may fails:
>
> In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:72:0,
>                  from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:40:
> drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:69:20: error: field mirror has incomplete type
>   struct hmm_mirror mirror;
>
> Fixes: 7590f6d211ec ("drm/amdgpu: Prepare for hmm_range_register API change")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

I already applied a similar patch from Arnd.

Thanks,

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
> index 281fd9f..b14f175 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
> @@ -65,8 +65,10 @@ struct amdgpu_mn {
>         struct rw_semaphore     lock;
>         struct rb_root_cached   objects;
>
> +#if defined(CONFIG_HMM_MIRROR)
>         /* HMM mirror */
>         struct hmm_mirror       mirror;
> +#endif
>  };
>
>  #if defined(CONFIG_HMM_MIRROR)
> --
> 2.7.4
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-09 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09  9:10 [PATCH] drm/amdgpu: Fix build without CONFIG_HMM_MIRROR YueHaibing
2019-07-09 13:08 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).