On Mon, 15 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. > > 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.
Maybe the question to ask is if TRANSCONF() using _MMIO_PIPE2() is correct or not? BR, Jani. > > 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 d11ebb03b946..fb75cc9f97cc 100644 > --- a/drivers/gpu/drm/i915/gvt/display_helpers.h > +++ b/drivers/gpu/drm/i915/gvt/display_helpers.h > @@ -21,8 +21,8 @@ struct display; > #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 -- Jani Nikula, Intel
