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 19D96C4332F for ; Thu, 15 Dec 2022 10:20:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E738410E512; Thu, 15 Dec 2022 10:20:35 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id C8FFF10E512 for ; Thu, 15 Dec 2022 10:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671099630; x=1702635630; h=from:to:subject:in-reply-to:references:date:message-id: mime-version:content-transfer-encoding; bh=EFNrERdPEQTrIT3StHMBOcyDw6o4pqSveIcwQuXYozk=; b=kjGtlL1dyP6YdCuNwy6bOoiWLehaauWRgAkrM5LyWdbwI6kdGdjTbXOa 7F9v/VfZEw8ss2Z5Jy2KrGVWUCjbvkij+9HKbZjfqUOpRGl7jJVh4Wt3p pPmWCGyyQgZBlFlDjf/HkqEfcWM15aKfbPIAtIE9aU9aPRtbTurV6nxHh x43wW3lH8kqrRtB8OId9d8Cm2O8qhl2QQ+N1z+zn/Bzp0xtD3ICQlH6Uh bE3lWlbNHcpvhmBJtkAOjfUzQ/ZTaTWwwVnPpb7RtDbrXVEIol15A5O6/ PfjxU/a62WqBoMGOkkOtBhP1lURpwITQKZ8LKCHyQrHfIUJgQyi7gr7QT A==; X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="317353740" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="317353740" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 02:20:30 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="712849364" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="712849364" Received: from tgodea-mobl.ger.corp.intel.com (HELO localhost) ([10.252.61.26]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 02:20:29 -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> Date: Thu, 15 Dec 2022 12:20:26 +0200 Message-ID: <87sfhhufx1.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: >> >> 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 *crtc) { > 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 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. --=20 Jani Nikula, Intel Open Source Graphics Center