Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7093486rwp; Tue, 18 Jul 2023 09:56:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlHNmpkRqwS8/TrwBg0TknOrZpIwc1dxOJv5PHz2FgkKbvB1BEdy6CAi4iLCyKv5VMULRhCr X-Received: by 2002:a17:902:f691:b0:1b8:35fa:cdcc with SMTP id l17-20020a170902f69100b001b835facdccmr367726plg.5.1689699406191; Tue, 18 Jul 2023 09:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689699406; cv=none; d=google.com; s=arc-20160816; b=nd9DvuR2rZih/FHh2owMqJn+Q69hbufZaKZO3WTeov6rWKtRukMPN4xPRgddvdQHSx jxGO3joRju12j72NcCq02OPTzLgrpK8X8/CfI+JIk/0Ur1I4Z4QdjwEfRTF4cE8pYxWE rmFa4wDdfZeM2PmiuFYnZlZgPlwAc0YTKC26Vpq4LS2wBswWFnatAzLCY961YaV9e54g 0ffNWBR4aU6KsaLJNVM9XqO+W8wJFc3TgufRgSILUguc6SqJRYnt679zrQnV3wPH/aOR oVmUOkiqnlnqJjuOpW6ADIJ2J3jr1iSnaFOkTI0szb+RwkhhEmVoxQzDG3msenf796kk S+7Q== 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=V76NAgd7f1t/otXXRcnIYYSN2NX/p2qH/dPlqdSZNiY=; fh=Ople2ijcDVdvBJwvAg2RvyZp0qNZK7It46SN0LxlrVk=; b=yfjZXQQ0W4rk6UY8qKKSTe573mKGu9D0j4wtA3i82AEdTb7PoiXm9l+kFisc+AplhG XDwcS96MluRcL7BB92d37x/9cxVfAl0HuIPYl0qsvAVAnKxBKMl8VEGBNtRyc7iAxXvW FtvOWMXaEeQ+T+bARHLYfENg+3DF6yJuasvknMfpmP0Ba/u3MwttCp5laDiTqJTA1B5K Fc+trCXvdxDk5WdgNBL2HOudJUC5Ne/LSB/TzB0NTKpKIXGFJvZE8k0yJHyAsJe8/42a lgb/hbEnTqrRfPhBb4a8bWPmcmSNojRe8li0j2ReBBdaJ28MHq60q3TYIAdWxwgJSuFq Bkpw== 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 l1-20020a170902d04100b001b06e17610fsi1748930pll.321.2023.07.18.09.56.33; Tue, 18 Jul 2023 09:56:46 -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 S233543AbjGRQzj (ORCPT + 99 others); Tue, 18 Jul 2023 12:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232471AbjGRQzA (ORCPT ); Tue, 18 Jul 2023 12:55:00 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 022741719 for ; Tue, 18 Jul 2023 09:54:54 -0700 (PDT) Received: from ramsan.of.borg ([84.195.187.55]) by xavier.telenet-ops.be with bizsmtp id Ngur2A00i1C8whw01gur1W; Tue, 18 Jul 2023 18:54:53 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qLnyD-001nZR-KZ; Tue, 18 Jul 2023 18:54:51 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qLnyN-000gdb-Li; Tue, 18 Jul 2023 18:54:51 +0200 From: Geert Uytterhoeven To: Laurent Pinchart , Kieran Bingham , David Airlie , Daniel Vetter , Thomas Zimmermann , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Laurent Pinchart Subject: [PATCH v2 31/41] drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip() Date: Tue, 18 Jul 2023 18:54:36 +0200 Message-Id: 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=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 --- 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