On 12/18/2025 3:55 PM, Jani Nikula wrote:
On Thu, 18 Dec 2025, Ankit Nautiyal <[email protected]> wrote:
TRANSCONF() expands via _MMIO_PIPE2, i.e., it uses pipe-based addressing.
In GVT, some call sites pass an enum transcoder to TRANSCONF(), which now
routes through INTEL_DISPLAY_DEVICE_PIPE_OFFSET() and ultimately calls
intel_display_device_pipe_offset(), whose parameter type is enum pipe.
This results in -Werror=enum-conversion.
And that's really why this should be squashed to the previous patch,
with explanation in the commit message, as otherwise the previous one
fails to build.
I don't know, maybe could also add a FIXME comment about the cast?
*shrug*
Alright, will add a fix me and merge this with the previous patch.
Regards,
Ankit
BR,
Jani.
To address this, cast the index to enum pipe in the GVT-side macro
override.
This works for all cases as TRANSCODER_{A,B,C,D} all have 1:1 mapping to
PIPE_{A,B,C,D} except for TRANSCODER_EDP.
There is one place which uses TRANSCONF() with TRANSCODER_EDP, which
appears to be incorrect. In any case, the cast preserves the previous
behaviour.
Signed-off-by: Ankit Nautiyal <[email protected]>
---
drivers/gpu/drm/i915/gvt/display_helpers.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/display_helpers.h
b/drivers/gpu/drm/i915/gvt/display_helpers.h
index 97ebc92768fc..3af878e3d78e 100644
--- a/drivers/gpu/drm/i915/gvt/display_helpers.h
+++ b/drivers/gpu/drm/i915/gvt/display_helpers.h
@@ -17,8 +17,8 @@
#ifdef INTEL_DISPLAY_DEVICE_PIPE_OFFSET
#undef INTEL_DISPLAY_DEVICE_PIPE_OFFSET
#endif
-#define INTEL_DISPLAY_DEVICE_PIPE_OFFSET(display, pipe) \
- intel_display_device_pipe_offset((display), (pipe))
+#define INTEL_DISPLAY_DEVICE_PIPE_OFFSET(display, idx) \
+ intel_display_device_pipe_offset((display), (enum pipe)(idx))
#ifdef INTEL_DISPLAY_DEVICE_TRANS_OFFSET
#undef INTEL_DISPLAY_DEVICE_TRANS_OFFSET