From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01717C4332F for ; Thu, 15 Dec 2022 11:03:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C04710E08B; Thu, 15 Dec 2022 11:03:51 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23BE410E08B for ; Thu, 15 Dec 2022 11:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671102227; x=1702638227; h=from:to:subject:in-reply-to:references:date:message-id: mime-version:content-transfer-encoding; bh=McCXvImer/A/nVvk3BCMNHdEFPZq6HQPsdeqJhNeFKE=; b=N/uDWL2l6nAAevU4b2vf0+q9jsHhC0oXhzllAHPGGwD3HkSesSe2msrO Moqz6Kmtwq6anf/q7niBmPfO2BF1/XHKGe/FcUjCbEly07Rev/bLJW9Kc iIPM7D2P5BObCpQmxQjTcvX0X2lw/ulAB6xna0qxoFgKMwPIiIDATuJQ6 OmpIeGWEH+aYszDWbfi5c6/GKSN5ZRAKQ4+qRZYoShCDzjJp2HYMkSDLQ xCrECFFQgbthx3Q713Lv3SgqfXRLqrkLyylBWZzkIHeQqECDjqa3C2rtn aJtCP3oZ/A6p6RJ3DzJH8IE9w+OUVJsist2G2KsJiGmWbP09a337R/fBK g==; X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="382954029" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="382954029" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 03:03:46 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="599568431" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="599568431" Received: from tgodea-mobl.ger.corp.intel.com (HELO localhost) ([10.252.61.26]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 03:03:45 -0800 From: Jani Nikula To: "Murthy, Arun R" , "intel-gfx@lists.freedesktop.org" In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <87k02uwdlw.fsf@intel.com> <87wn6tuj1x.fsf@intel.com> <87sfhhufx1.fsf@intel.com> Date: Thu, 15 Dec 2022 13:03:42 +0200 Message-ID: <87mt7pudwx.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline functions to intel_vblank.[ch] X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, 15 Dec 2022, "Murthy, Arun R" wrote: >> -----Original Message----- >> From: Nikula, Jani >> Sent: Thursday, December 15, 2022 3:50 PM >> To: Murthy, Arun R ; intel- >> gfx@lists.freedesktop.org >> Subject: RE: [Intel-gfx] [PATCH 2/7] drm/i915/display: move more scanline >> functions to intel_vblank.[ch] >> >> On Thu, 15 Dec 2022, "Murthy, Arun R" wrote: >> >> >> And how would you propose to drop the wrapper? The wrappers are >> >> >> all about readability in the caller side: >> >> >> >> >> > I didn=E2=80=99t 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 *crt= c) { > Bool state can be added as a parameter to this function, on the other han= d, can have state =3D false as a magic value as well. Then it boils down to what we already have? Too much talk now, please send actual working code instead. BR, Jani. > > Thanks and Regards, > Arun R Murthy > ------------------- >> > struct drm_i915_private *dev_priv =3D to_i915(crtc->base.dev); >> > enum pipe pipe =3D crtc->pipe >> > >> > /* Wait for the display line to settle/start moving */ >> > if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) =3D=3D st= ate, >> > 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 --=20 Jani Nikula, Intel Open Source Graphics Center