mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: fix building without CONFIG_HMM_MIRROR
@ 2019-07-08 13:51 Arnd Bergmann
  2019-07-08 15:59 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-07-08 13:51 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David (ChunMing) Zhou,
	David Airlie, Daniel Vetter
  Cc: Arnd Bergmann, Philip Yang, Felix Kuehling, Michel Dänzer,
	amd-gfx, dri-devel, linux-kernel

'struct hmm_mirror' is not defined without the Kconfig option set,
so we cannot include it within another struct:

In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:72:
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mn.h:69:20: error: field has incomplete type 'struct hmm_mirror'
        struct hmm_mirror       mirror;
                                ^
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mn.h:69:9: note: forward declaration of 'struct hmm_mirror'
        struct hmm_mirror       mirror;

Add the #ifdef around it that is also used for all functions operating
on it.

Fixes: 7590f6d211ec ("drm/amdgpu: Prepare for hmm_range_register API change")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 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 281fd9fef662..b8ed68943625 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;
 
+#ifdef CONFIG_HMM_MIRROR
 	/* HMM mirror */
 	struct hmm_mirror	mirror;
+#endif
 };
 
 #if defined(CONFIG_HMM_MIRROR)
-- 
2.20.0


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 13:51 [PATCH] drm/amdgpu: fix building without CONFIG_HMM_MIRROR Arnd Bergmann
2019-07-08 15:59 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®