On Thu, 15 Dec 2022, "Murthy, Arun R" <arun.r.murthy@xxxxxxxxx> wrote: >> >> And how would you propose to drop the wrapper? The wrappers are all >> >> about readability in the caller side: >> >> >> > I didn’t mean to drop the wrapper, understand that wrapper is more >> readable, what I meant is to replace >> wait_for_pipe_scanline_moving/stopped with its function contents. >> >> Why should we duplicate the code? > > static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) { > struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > enum pipe pipe = crtc->pipe > > /* Wait for the display line to settle/start moving */ > if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100)) > > drm_err(&dev_priv->drm, > "pipe %c scanline %s wait timed out\n", > pipe_name(pipe), str_on_off(state)); > } And the state variable comes from where? BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center