From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Randy Dunlap <rdunlap@infradead.org>,
Jani Nikula <jani.nikula@intel.com>,
Harry Austen <hpausten@protonmail.com>
Subject: [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols
Date: Fri, 27 Jun 2025 13:30:34 -0700 [thread overview]
Message-ID: <20250627-xe-kunit-v2-1-756fe5cd56cf@intel.com> (raw)
In-Reply-To: <20250627-xe-kunit-v2-0-756fe5cd56cf@intel.com>
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/3667a992-a24b-4e49-aab2-5ca73f2c0a56@infradead.org
Fixes: d9465cc8ac2d ("drm/xe/pcode: add struct drm_device based interface")
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/xe/xe_pcode.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
index 87323ad0cbbb2..6a7ddb9005f99 100644
--- a/drivers/gpu/drm/xe/xe_pcode.c
+++ b/drivers/gpu/drm/xe/xe_pcode.c
@@ -337,7 +337,9 @@ int xe_pcode_probe_early(struct xe_device *xe)
}
ALLOW_ERROR_INJECTION(xe_pcode_probe_early, ERRNO); /* See xe_pci_probe */
-/* Helpers with drm device */
+/* Helpers with drm device. These should only be called by the display side */
+#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
+
int intel_pcode_read(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1)
{
struct xe_device *xe = to_xe_device(drm);
@@ -362,3 +364,5 @@ int intel_pcode_request(struct drm_device *drm, u32 mbox, u32 request,
return xe_pcode_request(tile, mbox, request, reply_mask, reply, timeout_base_ms);
}
+
+#endif
--
2.49.0
next prev parent reply other threads:[~2025-06-27 20:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 20:30 [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi
2025-06-27 20:30 ` Lucas De Marchi [this message]
2025-06-27 21:24 ` [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols Rodrigo Vivi
2025-06-28 2:55 ` Randy Dunlap
2025-06-27 20:30 ` [PATCH v2 2/2] drm/xe: Allow dropping kunit dependency as built-in Lucas De Marchi
2025-06-28 2:56 ` Randy Dunlap
2025-06-28 14:33 ` [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi
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=20250627-xe-kunit-v2-1-756fe5cd56cf@intel.com \
--to=lucas.demarchi@intel.com \
--cc=hpausten@protonmail.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=rdunlap@infradead.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.