Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5181708imu; Wed, 19 Dec 2018 07:00:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/W4keMww3PRWUZ+kfLnHmjqzSAMUo6WZPlXKts6yLE4HWXDSGVn3+X81/Agqva/n74uSkcY X-Received: by 2002:a63:a401:: with SMTP id c1mr19733957pgf.403.1545231615939; Wed, 19 Dec 2018 07:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545231615; cv=none; d=google.com; s=arc-20160816; b=fCiV1tOICbfGRXLW4jOq0Fl1tFrz75bEvPRr5q7tr5J7eXvS2iycs5gX7ekSbtXEZH vqGivL3Wk3/x+t4SpKlwNbuVGHi0r88jNj8uYrwenz43lWGHiQOcJUNYiZfQnbP2k7Qi knBSdY0HRRlDX/F6VyFIqAe2lLwKVDHtjR/KvuOBrcjjBjFKf+g6tUEdPqv3IDFvGMaL UogySxWe8HM/s4zN1CpwJsn+EUnlhPiV0+w4l8mXPfFDimhucdiywKQ1XH9f4brKKBlX fY8lbL+jku+8RJSNSSpdy0SBTtxvs/a7H/Rd9G/Mrp0mDEghqJhWGDcRRJaR0tQWp4Wt MOJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=+0eqOgFkmXUoPR1ZqbIdYc+PnaBPUAYMw3GmDvyftGw=; b=jPNJgdrKqtqmn+vCASKqs3NAh6cfKZkK+0LEY6rs513X+glH7LZr0c/s7GOHWmOD00 rhIlak3Msw/qry/a1IUtnNJVtOZh3LmNvKam32+ML22+DCx4pOevHz41iIlK1dcfPFJB a6LVJYnGnZZpyXA606HjZ1uJ7ndVxo02oipuaqyfTB8X50u5xOVBzjqr+OMM9QwmUog5 yvNDkWQVANq8xg+yQABaCqdRSfNAk94Ik8FPE4UkufnN7trYhJHtDt2MEe3ISlmoY1rh czfT05KTwRyQ/DUT2oQewSdz5YNtyL/CUb9yTaejrlPN2kWc9b2W0mq4EQxAgiHDcKE8 HgQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si16182381pgk.127.2018.12.19.06.59.58; Wed, 19 Dec 2018 07:00:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729516AbeLSLwG (ORCPT + 99 others); Wed, 19 Dec 2018 06:52:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40092 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729444AbeLSLvg (ORCPT ); Wed, 19 Dec 2018 06:51:36 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 57EA381DFE; Wed, 19 Dec 2018 11:51:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-174.ams2.redhat.com [10.36.117.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5EE910001BC; Wed, 19 Dec 2018 11:51:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D331D751D; Wed, 19 Dec 2018 12:51:28 +0100 (CET) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org, David Airlie Cc: Gerd Hoffmann , David Airlie , virtualization@lists.linux-foundation.org (open list:DRM DRIVER FOR BOCHS VIRTUAL GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 07/14] drm/bochs: atomic: use atomic page_flip helper Date: Wed, 19 Dec 2018 12:51:20 +0100 Message-Id: <20181219115127.31359-8-kraxel@redhat.com> In-Reply-To: <20181219115127.31359-1-kraxel@redhat.com> References: <20181219115127.31359-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 19 Dec 2018 11:51:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Conversion to atomic modesetting, step five. Use atomic page_flip helper for crtc. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_kms.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index dcc8b864fc..9e836386e9 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -104,27 +104,6 @@ static void bochs_crtc_commit(struct drm_crtc *crtc) { } -static int bochs_crtc_page_flip(struct drm_crtc *crtc, - struct drm_framebuffer *fb, - struct drm_pending_vblank_event *event, - uint32_t page_flip_flags, - struct drm_modeset_acquire_ctx *ctx) -{ - struct bochs_device *bochs = - container_of(crtc, struct bochs_device, crtc); - struct drm_framebuffer *old_fb = crtc->primary->fb; - unsigned long irqflags; - - drm_atomic_set_fb_for_plane(crtc->primary->state, fb); - bochs_crtc_mode_set_base(crtc, 0, 0, old_fb); - if (event) { - spin_lock_irqsave(&bochs->dev->event_lock, irqflags); - drm_crtc_send_vblank_event(crtc, event); - spin_unlock_irqrestore(&bochs->dev->event_lock, irqflags); - } - return 0; -} - static void bochs_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state) { @@ -152,7 +131,7 @@ static void bochs_crtc_atomic_flush(struct drm_crtc *crtc, static const struct drm_crtc_funcs bochs_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = drm_crtc_cleanup, - .page_flip = bochs_crtc_page_flip, + .page_flip = drm_atomic_helper_page_flip, .reset = drm_atomic_helper_crtc_reset, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, -- 2.9.3