From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH i-g-t 06/43] igt_kms: Introduce a for_each_pipe() macro Date: Thu, 10 Jul 2014 22:36:44 +0200 Message-ID: <20140710203643.GN17271@phenom.ffwll.local> References: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> <1405015244-11370-7-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B40D6E244 for ; Thu, 10 Jul 2014 13:36:37 -0700 (PDT) Received: by mail-wi0-f174.google.com with SMTP id d1so2934773wiv.1 for ; Thu, 10 Jul 2014 13:36:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1405015244-11370-7-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 10, 2014 at 07:00:07PM +0100, Damien Lespiau wrote: > Signed-off-by: Damien Lespiau > --- > lib/igt_kms.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/igt_kms.h b/lib/igt_kms.h > index d34bcee..9e7bc2b 100644 > --- a/lib/igt_kms.h > +++ b/lib/igt_kms.h > @@ -202,6 +202,9 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe); > for (int i__ = 0; i__ < (display)->n_outputs; i__++) \ > if ((output = &(display)->outputs[i__]), output->valid) > > +#define for_each_pipe(display, pipe) \ > + for (pipe = 0; pipe < igt_display_get_n_pipes(display); pipe++) \ > + An additional hunk for lib/igt.cocci would be awesome, especially since it will match a few existing things already. -Daniel > /* > * Can be used with igt_output_set_pipe() to mean we don't care about the pipe > * that should drive this output > -- > 1.8.3.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch