Received: by 10.223.185.116 with SMTP id b49csp3496428wrg; Mon, 5 Mar 2018 23:24:01 -0800 (PST) X-Google-Smtp-Source: AG47ELtwNjY++6cAowcmc3CJKarwKJx4mV3/+QTw5n0sXoFhrnqgdr27HXC8XddO/Lm8CD2qWT1S X-Received: by 2002:a17:902:28c4:: with SMTP id f62-v6mr15660906plb.411.1520321041138; Mon, 05 Mar 2018 23:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520321041; cv=none; d=google.com; s=arc-20160816; b=WfBRvZmOwNVtLYFkQJ+jcNukLE+OQh3qPdGZmNjOnRGpgHuocRLkbrTmI23Gm5Df7g K9yv7C/XYuziX4cI9uH3QUnDx8C638Exr54CcpD3NUsOuZ+dgOFyCLahPnibJkM9i6wy uyxCXmQ1cJ6lmzCmG1q54yF3V9/oBacs47/GrjaE7kMVE4UgIWLsDFsjlrf/whftHesR UHFkdK5cGUZXFVfb2ZJ55WsYH+2ZVxKNRcygfSZWpz/6GDrfBqJvbHd5zcpnL/UrWHLe 4t/Uz3BZTCSkUMOfmN1oWi3t5aMJIIV+CA8958H/ztL85jdOvEzgIQ674ZI2KLQZrOQg 1X0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=ekfCwnn6or0LXVDHLXdQOKr3IRbhUU/0ycZK4Rnf03c=; b=02yA6zFThlILopNyLR+X7iXYJ+SD/yAeMHgyY57zD/vHro7j+9yI7pAH/fhYOKOo8P CcRvdQ/Qw2OuaARd7UKpThYuVR80fbLWY6teHaeG9rnVEtgnuBGp59+kv22XM4YOcY2a d0tkem3RLz6w3Lt+TuS3GgYH+z/e1F57fFJ2aZ7Tw196tjIp8mJLROpKP3XOVfBtlzyn Rv9h2Wbn8cUIX9fJ3w8Ons2zB5EUA7l6P6ZHHq2wUutCNxC4H4DpMoEdU+6DuDPbEluK Pkb7xz4pAwLLAdp8NW7yDDydhVlcF809P6zc71hVA4G1YiJIXot3tAKRnJiKgnd6vVq0 KUmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=XbIBhFob; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si10703753pld.546.2018.03.05.23.23.34; Mon, 05 Mar 2018 23:24:01 -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=fail header.i=@ffwll.ch header.s=google header.b=XbIBhFob; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750859AbeCFHWO (ORCPT + 99 others); Tue, 6 Mar 2018 02:22:14 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:54319 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbeCFHWK (ORCPT ); Tue, 6 Mar 2018 02:22:10 -0500 Received: by mail-wm0-f53.google.com with SMTP id z81so20601145wmb.4 for ; Mon, 05 Mar 2018 23:22:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ekfCwnn6or0LXVDHLXdQOKr3IRbhUU/0ycZK4Rnf03c=; b=XbIBhFobZfeUgZUN1eil1nO2Fg7M9HRR9NNjhuVKJLy3FBixnQfI1+xy1Qfx078beq OuAEZhXZV6KqZpt7BfjwUwRFSO8hwl5sy4vqxO/8976jsf1X2aaU/xuThtUldsNhwtUc Hc6AUkPgfA9PAi2QGZ81G23+NzrMdU8rNtWYA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=ekfCwnn6or0LXVDHLXdQOKr3IRbhUU/0ycZK4Rnf03c=; b=it8zJJjwc+Bt+tgNgovd7uCs3Wago/2iqbVwNCkZAMhe519RQOhke8HEBzXRum8ajW RVAOWjtRBUTXWVuDbz73lZkwDCUiNW5TA3THgw7omyJKR05uOawr/FOIJUDMM3UWfz2+ ljSBqnqj1UWl6pDcaD7+OTkebXC5f5ArOFh/Uqi8qtLFgItJ6gdO1hvxzpYK/KJdfiRi WGVGthD8gXim4LzRtnU+TG9mvPxOnzhRr2+cXwjqqE9lXwyACRxXsB4VqpptmYkTGXsu TQxZ6FJ4hEq3LRalquPJiu30X+ejWp/5eERwTf3HbUEd9DZ3ZpIxdeW1cYavjF2q2lAu pW/Q== X-Gm-Message-State: APf1xPDAQqjrv5v8VETHrFOOrT47hxbFL98iN1haxbc/UfIkUHm2lMsI l9EzB7K8Ud12i2/tFaTht9jwCQ== X-Received: by 10.80.241.25 with SMTP id w25mr22009472edl.62.1520320928570; Mon, 05 Mar 2018 23:22:08 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:5635:0:39d2:f87e:2033:9f6]) by smtp.gmail.com with ESMTPSA id q6sm12328121edb.60.2018.03.05.23.22.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Mar 2018 23:22:07 -0800 (PST) Date: Tue, 6 Mar 2018 08:22:05 +0100 From: Daniel Vetter To: Oleksandr Andrushchenko Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, daniel.vetter@intel.com, seanpaul@chromium.org, gustavo@padovan.org, jgross@suse.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, Oleksandr Andrushchenko Subject: Re: [PATCH 7/9] drm/xen-front: Implement KMS/connector handling Message-ID: <20180306072205.GP22212@phenom.ffwll.local> Mail-Followup-To: Oleksandr Andrushchenko , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, daniel.vetter@intel.com, seanpaul@chromium.org, gustavo@padovan.org, jgross@suse.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, Oleksandr Andrushchenko References: <1519200222-20623-1-git-send-email-andr2000@gmail.com> <1519200222-20623-8-git-send-email-andr2000@gmail.com> <20180305092353.GI22212@phenom.ffwll.local> <8132411b-ee50-fe42-2e62-8816a1f85433@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8132411b-ee50-fe42-2e62-8816a1f85433@gmail.com> X-Operating-System: Linux phenom 4.14.0-3-amd64 User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 05, 2018 at 02:59:23PM +0200, Oleksandr Andrushchenko wrote: > On 03/05/2018 11:23 AM, Daniel Vetter wrote: > > On Wed, Feb 21, 2018 at 10:03:40AM +0200, Oleksandr Andrushchenko wrote: > > > From: Oleksandr Andrushchenko > > > > > > Implement kernel modesetiing/connector handling using > > > DRM simple KMS helper pipeline: > > > > > > - implement KMS part of the driver with the help of DRM > > > simple pipepline helper which is possible due to the fact > > > that the para-virtualized driver only supports a single > > > (primary) plane: > > > - initialize connectors according to XenStore configuration > > > - handle frame done events from the backend > > > - generate vblank events > > > - create and destroy frame buffers and propagate those > > > to the backend > > > - propagate set/reset mode configuration to the backend on display > > > enable/disable callbacks > > > - send page flip request to the backend and implement logic for > > > reporting backend IO errors on prepare fb callback > > > > > > - implement virtual connector handling: > > > - support only pixel formats suitable for single plane modes > > > - make sure the connector is always connected > > > - support a single video mode as per para-virtualized driver > > > configuration > > > > > > Signed-off-by: Oleksandr Andrushchenko > > I think once you've removed the midlayer in the previous patch it would > > makes sense to merge the 2 patches into 1. > ok, will squash the two > > > > Bunch more comments below. > > -Daniel > > > > > --- > > > drivers/gpu/drm/xen/Makefile | 2 + > > > drivers/gpu/drm/xen/xen_drm_front_conn.c | 125 +++++++++++++ > > > drivers/gpu/drm/xen/xen_drm_front_conn.h | 35 ++++ > > > drivers/gpu/drm/xen/xen_drm_front_drv.c | 15 ++ > > > drivers/gpu/drm/xen/xen_drm_front_drv.h | 12 ++ > > > drivers/gpu/drm/xen/xen_drm_front_kms.c | 299 +++++++++++++++++++++++++++++++ > > > drivers/gpu/drm/xen/xen_drm_front_kms.h | 30 ++++ > > > 7 files changed, 518 insertions(+) > > > create mode 100644 drivers/gpu/drm/xen/xen_drm_front_conn.c > > > create mode 100644 drivers/gpu/drm/xen/xen_drm_front_conn.h > > > create mode 100644 drivers/gpu/drm/xen/xen_drm_front_kms.c > > > create mode 100644 drivers/gpu/drm/xen/xen_drm_front_kms.h > > > > > > diff --git a/drivers/gpu/drm/xen/Makefile b/drivers/gpu/drm/xen/Makefile > > > index d3068202590f..4fcb0da1a9c5 100644 > > > --- a/drivers/gpu/drm/xen/Makefile > > > +++ b/drivers/gpu/drm/xen/Makefile > > > @@ -2,6 +2,8 @@ > > > drm_xen_front-objs := xen_drm_front.o \ > > > xen_drm_front_drv.o \ > > > + xen_drm_front_kms.o \ > > > + xen_drm_front_conn.o \ > > > xen_drm_front_evtchnl.o \ > > > xen_drm_front_shbuf.o \ > > > xen_drm_front_cfg.o > > > diff --git a/drivers/gpu/drm/xen/xen_drm_front_conn.c b/drivers/gpu/drm/xen/xen_drm_front_conn.c > > > new file mode 100644 > > > index 000000000000..d9986a2e1a3b > > > --- /dev/null > > > +++ b/drivers/gpu/drm/xen/xen_drm_front_conn.c > > > @@ -0,0 +1,125 @@ > > > +/* > > > + * Xen para-virtual DRM device > > > + * > > > + * This program is free software; you can redistribute it and/or modify > > > + * it under the terms of the GNU General Public License as published by > > > + * the Free Software Foundation; either version 2 of the License, or > > > + * (at your option) any later version. > > > + * > > > + * This program is distributed in the hope that it will be useful, > > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > > + * GNU General Public License for more details. > > > + * > > > + * Copyright (C) 2016-2018 EPAM Systems Inc. > > > + * > > > + * Author: Oleksandr Andrushchenko > > > + */ > > > + > > > +#include > > > +#include > > > + > > > +#include