Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2150932pxt; Sun, 8 Aug 2021 13:24:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPy7bdtMzg6VuICpUmpIOGJrVC6WPpFWR9C6pfERj1z0Eu2GIdErZJ7em7KjoydDYv1zJG X-Received: by 2002:aa7:d511:: with SMTP id y17mr25624737edq.341.1628454280604; Sun, 08 Aug 2021 13:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628454280; cv=none; d=google.com; s=arc-20160816; b=HBlpgXITG32hcFx4XciTPyfJRp8IxDWJ5o7kESn7An2QGYU1RNzJHe9h1Ti1LVi11W hn44n2KTVcSXnPTE+DUg2R7bG9RysJNOMssk8EozeTt+xQvCX4XflRHA4aPoksHUGTjD X1kFQTcXr9VgUqDApFWPuqN+6G1/sCh+CVhlI+176DOiXIoLRSsRKyYwv9nLTuxLUVFl qnh7AYtVslsfJcqTmdBkmc7O+UjYpN95+VgW1uQdvgJIsKW1LBdcKGdYcMdM/zdRcTt3 1JNrgFyqf5c6B427HZvzvb8bft0ryJoRVJOOK/7X6D5cMTCcDWrUccuYA5aRUi52ouYE +Umg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date; bh=cFCXF349UMAy/TjFLrGAEPg+N5WEsRfiQci95Fwoq7o=; b=z/DXvIq+K5xFhhbDMD44pUd0bxdVlSN3y3NC7QT7cRUOgbF7b7EsQGjhndBCmJIer3 xJPRN3SnYLoxjwco774MS27+fuyF/Qncb0YhT0wB+SRqV9Amu/p7y+skjgPeSG0oQEQR C75hRfp6ifuedjEhC/iS6LR04AnswXYPfvWLeXmZtzbVRx86H1d/fc5512lnNroYKZkG esw7f2AAjuYLCub3LJtdoccepjm5vuy9T9kkx6ghY6RL6+p/9+v6W/A9BFd9b/W9CnLJ TG/N0ply4Tl+GYQKfitjwauP5qnl1ii8N7UQi91YvHC6T7PI6jqYBvqPyBxn5tSYDJ4l I4aA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si17538025ejy.271.2021.08.08.13.24.02; Sun, 08 Aug 2021 13:24:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232349AbhHHUJn convert rfc822-to-8bit (ORCPT + 99 others); Sun, 8 Aug 2021 16:09:43 -0400 Received: from aposti.net ([89.234.176.197]:50362 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbhHHUJm (ORCPT ); Sun, 8 Aug 2021 16:09:42 -0400 Date: Sun, 08 Aug 2021 22:09:14 +0200 From: Paul Cercueil Subject: Re: [PATCH 3/8] drm/ingenic: Use standard drm_atomic_helper_commit_tail To: Christophe JAILLET Cc: David Airlie , Daniel Vetter , "H . Nikolaus Schaller" , Paul Boddie , list@opendingux.net, Sam Ravnborg , linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: References: <20210808134526.119198-1-paul@crapouillou.net> <20210808134526.119198-4-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe, Le dim., ao?t 8 2021 at 21:50:04 +0200, Christophe JAILLET a ?crit : > Le 08/08/2021 ? 15:45, Paul Cercueil a ?crit : >> By making the CRTC's .vblank_enable() function return an error when >> it >> is known that the hardware won't deliver a VBLANK, we can drop the >> ingenic_drm_atomic_helper_commit_tail() function and use the standard >> drm_atomic_helper_commit_tail() function instead. >> >> Signed-off-by: Paul Cercueil >> --- >> drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 28 >> ++++------------------- >> 1 file changed, 4 insertions(+), 24 deletions(-) >> >> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c >> b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c >> index bc71ba44ccf4..3ed7c27a8dde 100644 >> --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c >> +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c >> @@ -706,29 +706,6 @@ static int >> ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder, >> } >> } >> -static void ingenic_drm_atomic_helper_commit_tail(struct >> drm_atomic_state *old_state) >> -{ >> - /* >> - * Just your regular drm_atomic_helper_commit_tail(), but only >> calls >> - * drm_atomic_helper_wait_for_vblanks() if priv->no_vblank. >> - */ >> - struct drm_device *dev = old_state->dev; >> - struct ingenic_drm *priv = drm_device_get_priv(dev); >> - >> - drm_atomic_helper_commit_modeset_disables(dev, old_state); >> - >> - drm_atomic_helper_commit_planes(dev, old_state, 0); >> - >> - drm_atomic_helper_commit_modeset_enables(dev, old_state); >> - >> - drm_atomic_helper_commit_hw_done(old_state); >> - >> - if (!priv->no_vblank) >> - drm_atomic_helper_wait_for_vblanks(dev, old_state); >> - >> - drm_atomic_helper_cleanup_planes(dev, old_state); >> -} >> > > Hi, > if this function is removed, shouldn't: > static struct drm_mode_config_helper_funcs > ingenic_drm_mode_config_helpers = { > .atomic_commit_tail = ingenic_drm_atomic_helper_commit_tail, > }; > be updated as well? > > I've not seen it in the serie. It is there though :) At the bottom of this very patch. > Just my 2v. > CJ Cheers, -Paul