Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1686193

Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches

From Stéphane Marchesin <marcheu@chromium.org>
Newsgroups linux.kernel
Subject Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches
Date 2017-07-13 04:30 +0200
Message-ID <u2C38-84q-27@gated-at.bofh.it> (permalink)
References <tyshk-5OL-23@gated-at.bofh.it> <tDPdf-4Km-1@gated-at.bofh.it> <tDPwC-4T3-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, May 5, 2017 at 10:40 AM, Ville Syrjälä
<ville.syrjala@linux.intel.com> wrote:
>
> On Fri, May 05, 2017 at 10:26:36AM -0700, Matthias Kaehlcke wrote:
> > El Thu, Apr 20, 2017 at 02:56:05PM -0700 Matthias Kaehlcke ha dit:
> >
> > > In several instances the driver passes an 'enum pipe' value to a
> > > function expecting an 'enum transcoder' and viceversa. Since PIPE_x and
> > > TRANSCODER_x have the same values this doesn't cause functional
> > > problems. Still it is incorrect and causes clang to generate warnings
> > > like this:
> > >
> > > drivers/gpu/drm/i915/intel_display.c:1844:34: warning: implicit
> > >   conversion from enumeration type 'enum transcoder' to different
> > >   enumeration type 'enum pipe' [-Wenum-conversion]
> > >     assert_fdi_rx_enabled(dev_priv, TRANSCODER_A);
> > >
> > > Change the code to pass values of the type expected by the callee.
> > >
> > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > > ---
> > >  drivers/gpu/drm/i915/intel_display.c | 4 ++--
> > >  drivers/gpu/drm/i915/intel_dp.c      | 6 ++++--
> > >  drivers/gpu/drm/i915/intel_hdmi.c    | 6 ++++--
> > >  drivers/gpu/drm/i915/intel_sdvo.c    | 6 ++++--
> > >  4 files changed, 14 insertions(+), 8 deletions(-)
> >
> > Ping, any comments on this patch?
>
> I'm not convinced the patch is making things any better really. To
> fix this really properly, I think we'd need to introduce a new enum
> pch_transcoder and thus avoid the confusion of which type of
> transcoder we're talking about. Currently most places expect an
> enum pipe when dealing with PCH transcoders, and enum transcoder
> when dealing with CPU transcoders. But there are some exceptions
> of course.


I don't follow -- these functions take an enum transcoder; what's
wrong about passing what they expect? It seems like what you are
asking for has nothing to do with the warning here...

Stéphane

>
> --
> Ville Syrjälä
> Intel OTC
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches Stéphane Marchesin <marcheu@chromium.org> - 2017-07-13 04:30 +0200
  Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum  mismatches Ville Syrjälä <ville.syrjala@linux.intel.com> - 2017-07-13 12:20 +0200
    Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum  mismatches Daniel Vetter <daniel@ffwll.ch> - 2017-07-13 14:30 +0200
    Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches Stéphane Marchesin <marcheu@chromium.org> - 2017-07-13 18:30 +0200
      Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum  mismatches Ville Syrjälä <ville.syrjala@linux.intel.com> - 2017-07-13 19:50 +0200
        Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches Stéphane Marchesin <stephane.marchesin@gmail.com> - 2017-07-13 22:00 +0200
          Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches Jani Nikula <jani.nikula@linux.intel.com> - 2017-07-14 11:10 +0200
            Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches Grant Grundler <grundler@chromium.org> - 2017-07-14 19:40 +0200
              Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches Daniel Vetter <daniel@ffwll.ch> - 2017-07-14 23:40 +0200
                Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum mismatches Grant Grundler <grundler@chromium.org> - 2017-07-15 00:50 +0200
                Re: [Intel-gfx] [PATCH RESEND] drm/i915: Fix pipe/transcoder enum  mismatches Matthias Kaehlcke <mka@chromium.org> - 2017-07-15 01:40 +0200

csiph-web