Received: by 10.223.185.116 with SMTP id b49csp3502693wrg; Mon, 5 Mar 2018 23:32:46 -0800 (PST) X-Google-Smtp-Source: AG47ELtGrHmzZua+MZhK+74oH5kfN82cLqLZarObLR2AbR7sN7Kyr3GIiS2+VNbxZraswrQGbPFB X-Received: by 10.101.100.208 with SMTP id t16mr13867050pgv.398.1520321565924; Mon, 05 Mar 2018 23:32:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520321565; cv=none; d=google.com; s=arc-20160816; b=xLDB0zA9NK7oU5+KHlWAskwfQPW3hmufj+AjrdL5R4jgl/f4QlzOwKTESfs4fFKJlS TVolAzg7DNpUWEEtIkOdlxV8XQZeiVbi3BVUZrzYVeWgCkM5BCzqo8UJsiH3BZZ9ASeU SnNGCpFAuQVyu54BJCLlZCZsjp4gO2owDzPS3i4ZVIRuv0DvNYrP+IvAOjbm/LhXdwUG Lq9mqMxCVaQieeaZUi3D4EedXO8/dzZPl1zPFE8CRmEGGgSfGFeRDN3TH6ZYb1+g5khC nMMgd8uPyPpHu34/W5RgPGPJR7o+CinuIX2YQQApt/9XXoz4Z9WmT5mi/KbF1WS/4w4/ CQ8w== 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:to:subject:dkim-signature :arc-authentication-results; bh=SzYYsADVnB5ZNUIUtNZcUVSydMGL8LQ3rTygETeuNkU=; b=yjjfHJthJvCvxqJ2R0G7j+d04ezGuid/GCQLxobs2FmVNevKUAfyYO/6rTbRRLLZur AzF924rB+9N0HSJDDxaekwAiczs9h8fC2lDu+qNEvoMxpuha/rCVHMFOmPMspN99/Ydg fQ03/Y+7NnlV2GCtGMQHqpZ//ezmosydiwmGkoLtBvu4HTy8ynlwsGcdG2S9IljUzw3I BYnByucdEKQERF5wQCTjZHgNqgUA80WXAdnE70iBGc4tvnWFc2NryYKxK3EfriKgRj6q H4yzOm5YlhbWe7d5VxM013n/EXhbhzBxZXJiyA7KhaSE7ApzMb8e0L78GoEm+OcLELEO 5WRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fUCdKoQT; 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 d2si9499990pgc.758.2018.03.05.23.32.31; Mon, 05 Mar 2018 23:32:45 -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=fUCdKoQT; 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 S1752796AbeCFH3j (ORCPT + 99 others); Tue, 6 Mar 2018 02:29:39 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:36982 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbeCFH30 (ORCPT ); Tue, 6 Mar 2018 02:29:26 -0500 Received: by mail-lf0-f52.google.com with SMTP id y19so26998755lfd.4 for ; Mon, 05 Mar 2018 23:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=SzYYsADVnB5ZNUIUtNZcUVSydMGL8LQ3rTygETeuNkU=; b=fUCdKoQTtLF3eRsYcIZpvOfakkOGumFm0bfbfmKv+b+e2yVrG+UkJgN6G0V0rcLira +Ax0plO0A3/tM2h6bGrfEZa7HGuQWX2BcFlbTetpMBzSSCi3Gvun5T4EPdfZxMDOKL/8 kGPZTgPP3jklvheVn4qsaHM34ikJOVUSs3w0srJYvJ8wP7OxpQ3N7bBEyxqYNNlmax6J 3ReyzqIcYh2Q5yJWUi/rAFZiOjZSXbKYeXj8a+pYTc4xCTq5No/12gk0ic+29jgRkj8Z xx/ONH1yL9iiPffTbfmG4Dof30uNesjp6T1u9jzRkyYrmxuduHcYBWTJpSZNdO+LFiVf idVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=SzYYsADVnB5ZNUIUtNZcUVSydMGL8LQ3rTygETeuNkU=; b=GdkSPwnqS7MKHoWHtPXNRiHBhCR+JLbBkPxZ3OvFBo1I5S/S1QjnTGHVZEmxk7dD9x KaZimOQDFvjgQO7rXNLL9qeWLjdL2HRukiwEEI1Ex1+Zz+5w/iNkEsCKhzO4fGHlaj3b nJLuJX2oa4n54IhAoe9E8ZSMJ0Iu/UBiBsRrPrEWg+9PVWmcRW8daY4CF5q/P3wrgse/ mZUmf4jDNsOSvM42r8k18gmQe1xFvV0K83xfzQ3xKo+hE6ezQ1jw7hOpOPoW9Vi0uaSp XdQhl6ZbmRKgCMAwZ9sNScAdzj+THD2CZ2j7DoE8O6FKGvytvr8HstX63v5QIDdwScx8 H2eg== X-Gm-Message-State: APf1xPAS8V3JW+jGhLdeDAgnH/DVFe2JYOYyFd1AfAhfiXCuc8C+YZue nJFf99On/Q5D8z/wO1hEGUY= X-Received: by 10.46.144.72 with SMTP id n8mr11613552ljg.40.1520321364082; Mon, 05 Mar 2018 23:29:24 -0800 (PST) Received: from [10.17.182.9] (ll-55.209.223.85.sovam.net.ua. [85.223.209.55]) by smtp.gmail.com with ESMTPSA id q63sm3033707ljq.17.2018.03.05.23.29.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 23:29:23 -0800 (PST) Subject: Re: [PATCH 7/9] drm/xen-front: Implement KMS/connector handling To: 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> <20180306072205.GP22212@phenom.ffwll.local> From: Oleksandr Andrushchenko Message-ID: Date: Tue, 6 Mar 2018 09:29:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180306072205.GP22212@phenom.ffwll.local> 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 03/06/2018 09:22 AM, Daniel Vetter wrote: > 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