Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1207040imu; Thu, 20 Dec 2018 12:03:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/UQIEy74cLdLUoWAo2uBnGdyZAvXBR1lkihmMny3J9v/ogmTzU46yET0oVdYCJDf3W1eH2Z X-Received: by 2002:a62:43c1:: with SMTP id l62mr26170315pfi.22.1545336184997; Thu, 20 Dec 2018 12:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545336184; cv=none; d=google.com; s=arc-20160816; b=WoPJNh6BAebhWJYVshIrlC4aRYaMolGz91ZI9lRn69VjARvKvwWEIQ4pJ6QMBegWiY GjdIn6vpz+F5QRbzsN0HqpXTV+CAdaR6qV0OaLojYFPdxqM88S5zje3mdiBgM5CZZ88N agn9Djs/5CAIXmznge6Tz4NpQyT8FGGzqnoCNO/G9dMNEvV+JN+GmR2jLhngqo+cH9iS nthIniGF4SQNyCXEtf3yTHZzN52zLCh5cdv7us3FbguTFBZ+EKu9mr1sv2YrcN085sBN v1R+Fsu9dLdCNmsaPXnPGlnoBh/eI0XmCWXQtW3k0UietMTaGRqo1xWLFMP85aUCWp45 467A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=irr36FLl9S+FZSa0kq4qrUCmjMsfLE/+lShBNcbTi6A=; b=hNQfmAljC2+HyNnbympct6y1hha0qhbNjmJcP0q/mmZDj0ZiC5qOMN5JfNJOKBhL/v hN8qEFp9a9+Sp3KS+ZUPQt0TGUDym4pWRmAqz8MzMaPD0AnLbxgSJ37qMh6f1vYT48kH wzxb3/oQq/Pd9SB2nLcIo6sij9nKVmTTm8IgQO73iaxEwUauOZovb0G0IaS7vdKNrovN x6CuDGrZyaKg3XwFdPUxViwmu85kJ5XzGu5G67QS5a9o4UZs7j4441Rek3J8k0W52LJO F/7DcH7mFbrixzpgAr52e40BpiOtB67mJc1UNaN7s4eVqVSaXXxcHw9f42O9aXCZuEtb ABXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7Oi79WO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69si19160342pla.75.2018.12.20.12.02.48; Thu, 20 Dec 2018 12:03:04 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7Oi79WO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732291AbeLTMeU (ORCPT + 99 others); Thu, 20 Dec 2018 07:34:20 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36339 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730639AbeLTMeT (ORCPT ); Thu, 20 Dec 2018 07:34:19 -0500 Received: by mail-lj1-f193.google.com with SMTP id g11-v6so1406588ljk.3 for ; Thu, 20 Dec 2018 04:34:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=irr36FLl9S+FZSa0kq4qrUCmjMsfLE/+lShBNcbTi6A=; b=O7Oi79WOKID1W/QrJ2CteJn/wsHBu3SziGqznkbxE9snliLiuIILZ7s6pEf1yUuivH 26bQoh8x3WkPXYnFL4myyZ1QJfZb922cs8EuJr+GPOMukd5+pAqsPjuzQk9Sa0dQ5sty QdMW/AmuFgkJrnhKL3lQ0IUec3ka4HvUiETnUctLErNrtz6wTKKbHz8QCmIYcGlRg1Lf +lRYYj9DRm50smCRfYtRFdFYcIKRHXqKA0fhFr4nWZilBD0gwpxev9tKpeG+MwomIXBO NxkrYdP8E6jLdVAKpwQ7+0jAoAIAWjx/xyzb8zEMlKrU8MOnZ4EY7fzErWlKMugNyl9f 2ZZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=irr36FLl9S+FZSa0kq4qrUCmjMsfLE/+lShBNcbTi6A=; b=IDtRcu3sw3HR8kW5KVoqAnOUFqyecd4fSpy8f0x9vnWnDWWoFLYcY8+5301HSAdOum IscKpjXE6cfh+F3y95rBsQbE947R+ci6PlMv+V4icPypm2C2TPOWhp6SLr7XQnOQZavd tLqe3IOHdue6QL+JcAscK4J5ZeZUtZ516fopPeV+cPyW/cefzlOIyiwmHE6/IUbAp7Yw ArmDKRqNg+yaFpBxgApHDrUzD93dmtv0Ld8dUazLrQowHJKiMRWdlwFD0ertYNzeAGkB r3zO4yY57WD24izVmry4DCOaTsQR4+XKXf6bYoMBZ25fJ7ioOzhBadBRIEyVqyfAfqxH QFdQ== X-Gm-Message-State: AA+aEWb/tEoJ6Tku6W3tgEzbGEarW1QR02ketmAvMwHRBV5ZDGbv2a2h tqqN77D1CYt6Hm00vbKacIo= X-Received: by 2002:a2e:2246:: with SMTP id i67-v6mr1836425lji.154.1545309256161; Thu, 20 Dec 2018 04:34:16 -0800 (PST) Received: from [10.17.182.20] (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id d10sm4321954lfa.71.2018.12.20.04.34.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Dec 2018 04:34:15 -0800 (PST) Subject: Re: [PATCH 07/14] drm/bochs: atomic: use atomic page_flip helper To: Gerd Hoffmann , dri-devel@lists.freedesktop.org, David Airlie Cc: David Airlie , open list , "open list:DRM DRIVER FOR BOCHS VIRTUAL GPU" References: <20181219115127.31359-1-kraxel@redhat.com> <20181219115127.31359-8-kraxel@redhat.com> From: Oleksandr Andrushchenko Message-ID: <04c01f61-6d4d-5b4d-7678-4e89311cb2ae@gmail.com> Date: Thu, 20 Dec 2018 14:34:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181219115127.31359-8-kraxel@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/19/18 1:51 PM, Gerd Hoffmann wrote: > Conversion to atomic modesetting, step five. > Use atomic page_flip helper for crtc. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Oleksandr Andrushchenko > --- > 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,