Quoting Michel Thierry (2018-05-02 17:29:41)
> On 05/02/2018 02:11 AM, Chris Wilson wrote:
> > Quoting Michel Thierry (2018-05-01 15:21:53)
> >> On 5/1/2018 12:52 AM, Chris Wilson wrote:
> >>> As our early doorbell is split between early allocation and a late setup
> >>> after we have a channel to the GuC, it may happen due to a lapse of
> >>> programmer judgement that we try to setup an invalid doorbell. Make use
> >>> of our has_doorbell() function to check the doorbell does exist for the
> >>> client before we try and tell the guc about it. In doing so, we prevent
> >>> the compiler from warning about the otherwise unused function in some
> >>> configurations.
> >>>
> >>
> >> Looks ok to me, but the new place has_doorbell is called is inside a
> >> GEM_BUG_ON...
> >> So the warning will still be there when CONFIG_DRM_I915_DEBUG_GEM=n, right?
> >
> >>> @@ -224,6 +223,9 @@ static int create_doorbell(struct intel_guc_client
> >>> *client)
> >>> {
> >>> int ret;
> >>>
> >>> + if (WARN_ON(!has_doorbell(client)))
> >>> + return -ENODEV; /* internal setup error, should never
> >>> happen */
>
> Sorry, somehow I read that line as GEM_WARN_ON...
>
> >
> > This is the one I added to make sure we had at least one user. If it
> > weren't for the compiler warning I'd be happy for this to be
> > GEM_BUG_ON() as well.
> > -Chris
> >
>
> Reviewed-by: Michel Thierry <[email protected]>
Ta, pushed alongside the clang warning suppressions.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx