Skip to content

Commit 05f3af5

Browse files
committed
drm/xe: Fix conflicting intel_pcode_* symbols
If CONFIG_DRM_XE_DISPLAY is set, the xe module can only be built as module to avoid duplicate symbols from i915. The interface for pcode was added without considering that, so the build breaks if both xe and i915 are built-in. Since the intel_pcode_* functions should only be called from the display side (xe side should call the xe interface directly) and there's already a protection in Kconfig to avoid the problematic configuration, ifdef it out in case CONFIG_DRM_XE_DISPLAY is disabled. Closes: https://lore.kernel.org/r/[email protected] Fixes: d9465cc ("drm/xe/pcode: add struct drm_device based interface") Acked-by: Jani Nikula <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 8245873 commit 05f3af5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/xe/xe_pcode.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,9 @@ int xe_pcode_probe_early(struct xe_device *xe)
337337
}
338338
ALLOW_ERROR_INJECTION(xe_pcode_probe_early, ERRNO); /* See xe_pci_probe */
339339

340-
/* Helpers with drm device */
340+
/* Helpers with drm device. These should only be called by the display side */
341+
#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
342+
341343
int intel_pcode_read(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1)
342344
{
343345
struct xe_device *xe = to_xe_device(drm);
@@ -362,3 +364,5 @@ int intel_pcode_request(struct drm_device *drm, u32 mbox, u32 request,
362364

363365
return xe_pcode_request(tile, mbox, request, reply_mask, reply, timeout_base_ms);
364366
}
367+
368+
#endif

0 commit comments

Comments
 (0)