summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2021-08-16 14:25:36 -0400
committerMarge Bot <emma+marge@anholt.net>2022-04-26 00:33:25 +0000
commit71a749bc7b05ebc7289c3201c9baeb183f436386 (patch)
treeb33b225397db151106cab4cda4802e7c8d6f8674 /src/gallium/winsys
parent2ca8b014d1134bb8888a1da19c6171033c664176 (diff)
svga: Don't try to build x86/x64 assembly on different arch's
svga used to use vmx backdoor directly to send logs to the host. This functionality has been implemented in vmwgfx 2.17, but to make sure we still work with old kernels the functionality to use the backdoor directly has been kept. There's no reason to port that code to arm since vmwgfx implements it and arm64 (or other new platforms) would depend on vmwgfx versions a lot newer than 2.17, so everywhere but on x86/x64 it's fine to assume vmwgfx always support the host logging ioctls. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Reviewed-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16061>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/svga/drm/vmw_msg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_msg.c b/src/gallium/winsys/svga/drm/vmw_msg.c
index e664769c279..cc00b8ebc33 100644
--- a/src/gallium/winsys/svga/drm/vmw_msg.c
+++ b/src/gallium/winsys/svga/drm/vmw_msg.c
@@ -61,7 +61,7 @@
#define HIGH_WORD(X) ((X & 0xFFFF0000) >> 16)
-#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 502)
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 502) && (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64))
/**
* Hypervisor-specific bi-directional communication channel. Should never
@@ -426,15 +426,10 @@ vmw_send_msg(struct rpc_channel *channel, const char *msg)
void
vmw_svga_winsys_host_log(struct svga_winsys_screen *sws, const char *log)
{
- struct rpc_channel channel;
struct vmw_winsys_screen *vws = vmw_winsys_screen(sws);
char *msg;
int msg_len;
- int ret;
-
-#ifdef MSG_NOT_IMPLEMENTED
- return;
-#endif
+ int ret = 0;
if (!log)
return;
@@ -459,10 +454,15 @@ vmw_svga_winsys_host_log(struct svga_winsys_screen *sws, const char *log)
&msg_arg, sizeof(msg_arg));
} else {
+#ifdef MSG_NOT_IMPLEMENTED
+ debug_printf("Old vmwgfx doesn't support message passing.\n");
+#else
+ struct rpc_channel channel;
if (!(ret = vmw_open_channel(&channel, RPCI_PROTOCOL_NUM))) {
ret = vmw_send_msg(&channel, msg);
vmw_close_channel(&channel);
}
+#endif
}
if (ret)