From 78a202157eb90eee4fe916e8757c8a6afbd7c10f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 18 Sep 2024 13:27:35 -0400 Subject: [PATCH] virtio/vdrm: don't spam number of log splat would be proportional to # of enabled vdrm drivers otherwise. silences a pile of MESA: info: wrong context_type: 2 Signed-off-by: Alyssa Rosenzweig Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/virtio/vdrm/vdrm_virtgpu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/virtio/vdrm/vdrm_virtgpu.c b/src/virtio/vdrm/vdrm_virtgpu.c index f5310ab9fb5..13c133ca749 100644 --- a/src/virtio/vdrm/vdrm_virtgpu.c +++ b/src/virtio/vdrm/vdrm_virtgpu.c @@ -366,10 +366,12 @@ vdrm_virtgpu_connect(int fd, uint32_t context_type) return NULL; } - if (caps.context_type != context_type) { - mesa_logi("wrong context_type: %u", caps.context_type); + /* If the context type does not match, return silently. This does not + * indicate anything is wrong, just that we're trying to probe the wrong + * driver. If we logged here, we would spam for every vdrm driver. + */ + if (caps.context_type != context_type) return NULL; - } ret = set_context(fd); if (ret) {