Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp16539rdb; Fri, 18 Aug 2023 12:42:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEKhWGFEuS1AJ2OwJ2wN5BXqDkpwRzaTKILmtUcm2OlkW+iyR+FCE64ouoj+YnlFY/BfSTC X-Received: by 2002:a05:6808:259:b0:3a7:3ce0:1ae5 with SMTP id m25-20020a056808025900b003a73ce01ae5mr161373oie.47.1692387740277; Fri, 18 Aug 2023 12:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692387740; cv=none; d=google.com; s=arc-20160816; b=jHpAZYtcpKGeK55/FHZUFrvKCtfc22+1Bb/E6EXyCGcijwcmbX82NuFITquYtfBy4a Eb5eVhFqawkamYJldIpcQQaSP/ES6fZR+FL0N1h0ARi0vNEIio8UzBtAf8z+iKy9kdS6 dH8GmVLsYPOv/vvr0BzEf1Z/OC6rPoFytcFPmFUNcrF3Vo45JuD3hZp3i2g/sROGjvL0 YDUb5h1A+mpb75WBfHmLJrqaAaFJj+kicWJ0eiWetLujFt68wMhv3g1MsXLCum+5IyV8 51DGN7/N2fNB/M7gt8jhmuP39HrEwsfARls0yL4D/gTzXI81cw/JNPEJ53s6b85aLJz/ bfTQ== 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:date:subject:cc:to:from; bh=+fpt0epBGxlLREzG+B7RoJALYnvxBeKj4fgwt7OqUtM=; fh=OmmZDJEp3pl7jaFV8O2/yN66VkuJIFqajAiD2ZUHFno=; b=nbU/kdgawxVgo+Svo94UnVWJqeEDgDq9KFMN93nn085/PLZs+lib2SL2YmCEdfzO0q aRRjyvIeuM+GUxKGwV83Dcs4YNrDMPq0wqj9zlvCu4pxuNdeHvs079zW62QE9Vfo7b5L ZoJO2FWPvoQ2lHeCvDDB+5qzs+VTjcdNDuEeNeQjtHqD+AnBZ6dRY1VkLb+UsoST0LtV FEEgpyAt0ZsBOzgNxRKciIYu79Y/4NWWXsU/DiFt64vfxS56XpguS+FePP1VSIz+gjun otjzFvQL+4xfQjYWeZ48q6V6l1IsDp/N2kXV754NsoQQTXSn4EvRl+bY+4z2q72EGePR YOTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i132-20020a639d8a000000b00565d8d51c20si1807737pgd.217.2023.08.18.12.42.07; Fri, 18 Aug 2023 12:42:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243988AbjHPKpi (ORCPT + 99 others); Wed, 16 Aug 2023 06:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243283AbjHPKpD (ORCPT ); Wed, 16 Aug 2023 06:45:03 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5A862D73 for ; Wed, 16 Aug 2023 03:44:43 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5d0c:f209:12a7:4ce5]) by andre.telenet-ops.be with bizsmtp id aAkg2A00H45ualL01AkgCF; Wed, 16 Aug 2023 12:44:41 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qWE0v-000orc-TE; Wed, 16 Aug 2023 12:44:40 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qWDAx-00676a-02; Wed, 16 Aug 2023 11:50:51 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Laurent Pinchart Subject: [PATCH v3 31/41] drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip() Date: Wed, 16 Aug 2023 11:50:38 +0200 Message-Id: <88bcd675b03a109874e1dff24ff0aa4d45ab96ce.1692178020.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the shmob_drm_crtc_finish_page_flip() function up, to avoid having to move it during the modification in the next change. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by, - Move further up. --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c index f55b5263e611c782..0adf5d33ba31695e 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c @@ -35,6 +35,26 @@ * TODO: panel support */ +/* ----------------------------------------------------------------------------- + * Page Flip + */ + +void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) +{ + struct drm_pending_vblank_event *event; + struct drm_device *dev = scrtc->base.dev; + unsigned long flags; + + spin_lock_irqsave(&dev->event_lock, flags); + event = scrtc->event; + scrtc->event = NULL; + if (event) { + drm_crtc_send_vblank_event(&scrtc->base, event); + drm_crtc_vblank_put(&scrtc->base); + } + spin_unlock_irqrestore(&dev->event_lock, flags); +} + /* ----------------------------------------------------------------------------- * CRTC */ @@ -364,22 +384,6 @@ static const struct drm_crtc_helper_funcs crtc_helper_funcs = { .mode_set_base = shmob_drm_crtc_mode_set_base, }; -void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) -{ - struct drm_pending_vblank_event *event; - struct drm_device *dev = scrtc->base.dev; - unsigned long flags; - - spin_lock_irqsave(&dev->event_lock, flags); - event = scrtc->event; - scrtc->event = NULL; - if (event) { - drm_crtc_send_vblank_event(&scrtc->base, event); - drm_crtc_vblank_put(&scrtc->base); - } - spin_unlock_irqrestore(&dev->event_lock, flags); -} - static int shmob_drm_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event, -- 2.34.1