Received: by 10.223.185.116 with SMTP id b49csp627407wrg; Wed, 21 Feb 2018 04:24:14 -0800 (PST) X-Google-Smtp-Source: AH8x224TqOB5XW6AREc1BMb886N7r47Exh+Xz0tDDL3TIIInH6H7nn2sDIFurlzVY2LkvQIodm8j X-Received: by 10.99.114.77 with SMTP id c13mr2647086pgn.8.1519215854143; Wed, 21 Feb 2018 04:24:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519215854; cv=none; d=google.com; s=arc-20160816; b=claXQedWqxbSfeRtqIfUOS0nRhWHkhpNIgW6gm6s5JOJLtxdVc8GSbk8Xuqaoui9TI UCCzx5otAn0aVlcM/C7uwWUsqzzo287qpTF3ED89az+7CPiXfkADBB3szId1BDGqxksm Vs8mn6cMLWYgSH2ZnJNLk8iLv5CIDflnt67nBkKEoeyOIGq8Su7cvL+mZ/WXEfGNfY2+ 9if3Ojqd5HTKNL7/agbAsWT43bqJPYjpX0daXcBkUgtmaR8TcDSWnVUcymCX4w4ufDwF oOvSYqgtZJrzJY0QCK/N/g1osM6CctA6vvNoK++8wxgG5Ed5z7jL+5kwgzkn6vFcf8Tm 3TMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput: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=hdv/cPF+OyxhUj0N+RWeGeisDdiyc2H+fE7jYG/cVrY=; b=L2qW/dckTx81AWm0o2zAqpdVk2UCgiunB9RcVGISDPdfpUskiA/gBKZ0++CEVA6OtY fl5iOPlE7g12DW45lFJXJGYiBUlZ5eYKLq0GJPBxk8Oq4Cv4raOXQVSAJtvy27ghsGKj QdJit2//BdAWyAat4/dTyEk1Nq5KJ8F7EZyYHYJ3Jm+T0LxExYOo/O2OVcg4BieM12jx mtdBdN0qSvhp3SS/Sx1cb1GCfFsjklKe0/3SWF3vL/g7tFcNPopCiI8d8Yy3rvdDhamW v+YMfI/wCaN99a3Gxsbz5H6pfen21Q9tOqOhCM7LUp6CpBHsSVoEAq6KQ8hrn3d5xUW5 oMJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@epam.com header.s=selector1 header.b=NzAOi3io; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=epam.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si1407964pgp.516.2018.02.21.04.23.59; Wed, 21 Feb 2018 04:24: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; dkim=pass header.i=@epam.com header.s=selector1 header.b=NzAOi3io; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=epam.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751956AbeBUIuP (ORCPT + 99 others); Wed, 21 Feb 2018 03:50:15 -0500 Received: from mail-db5eur01on0078.outbound.protection.outlook.com ([104.47.2.78]:3215 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751682AbeBUIuN (ORCPT ); Wed, 21 Feb 2018 03:50:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hdv/cPF+OyxhUj0N+RWeGeisDdiyc2H+fE7jYG/cVrY=; b=NzAOi3ioIzuODwbq6VuTlJOAgDfcKkMJIb6RzyTSb/XwMVNbNmgMMxGkPpBMFLvgodHJYcIzhWLk+26HHDkqgUH4Sbh1GTvZQbRpNpkmwbfJnNbguX2iynSzhvdVLgcPNDW9IDdTLSX5YOGAfG3HcRzLEeXWgvyrHQ5mxSfwxEw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Oleksandr_Andrushchenko@epam.com; Received: from [10.17.182.9] (85.223.209.53) by VI1PR0301MB1952.eurprd03.prod.outlook.com (2603:10a6:800:13::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Wed, 21 Feb 2018 08:50:05 +0000 Subject: Re: [PATCH 2/9] drm/xen-front: Implement Xen bus state handling To: Juergen Gross , 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, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com References: <1519200222-20623-1-git-send-email-andr2000@gmail.com> <1519200222-20623-3-git-send-email-andr2000@gmail.com> <7b302293-a4ca-0225-576f-0cc33f6f56cb@suse.com> From: Oleksandr Andrushchenko Message-ID: Date: Wed, 21 Feb 2018 10:50:01 +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: <7b302293-a4ca-0225-576f-0cc33f6f56cb@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.223.209.53] X-ClientProxiedBy: DB6PR0402CA0019.eurprd04.prod.outlook.com (2603:10a6:4:91::29) To VI1PR0301MB1952.eurprd03.prod.outlook.com (2603:10a6:800:13::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 51a78b3a-effa-428a-8c60-08d579081b92 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020);SRVR:VI1PR0301MB1952; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0301MB1952;3:XeaacmrW6a/JZqMv8db7v2bfNYtSwh3//K7h1qcMKbJcrWFlLjPCyk4o3dUudpTa1kWeXKBgXE4/ETAipiS5CabZeyPquacwDkfRQgFigrhCIS2mV18acPcLV6V8SAXbd7oIBGfu/1c/cokVPiuyEcyvnWRot00TB8Eq5She2l6cL08Uxw61dZAo6kVfbj2MNJsxf1/M5qGYnBqIz5XCyUw2o/DSk/9NawdJSr0qInAyslae7kP49jbYALTEEd3K;25:WtBmHyspMSnkywdlY/CqlDehOXvIBG7SwvUsE4DrhbVIflj2GdOwRjvK8wDljuRelvHI4L9Ire98VL2H8nrbbcaTBc8jQf3iF5elg1qiYvk+8aoFUcWb21FAirCbzpIGhuLn2eSjNID7TlOosOhtTDhnM0WDwNLoNH6i2vTf7PPnF9B0sq3f7YnBwYPPZ62bcb+O1N1JueThkmuLDA6U7G428qFEGAPI48Zv0RyU+545gP6LB+GL/1ikNUAn414zZhB5X1Df5rBJmBu1bCuf2nVyPViBFsUdCmRIWHcSDU4SZtLLuwGOgeCaJGj9EL8rXVUliKjTEIICrB20SYVRtw==;31:WVrOzCE/5P+5gQMKHSuCMxOT3EMl9xGL5zyob1X8cz7M23CcTFtzohZiEbuo0jSU9LL9plvXD3IfXi84Mk/qXUBG/G7YwtuP5oqPIDxBDIfXpZDNdT1MsTz0ykQdHh6aE9dZCU/3629APbNLashzXnweKK43OQbh2XCggXgakZsPl761Fcq5sogs5s1qFJtHFiONjVQpHfFM+Sfmp7WfUDKzFpG64rP+JRXwlni1Dh4= X-MS-TrafficTypeDiagnostic: VI1PR0301MB1952: X-Microsoft-Exchange-Diagnostics: 1;VI1PR0301MB1952;20:4Ms0hD9G/AYHDFR4QD4C/dbUi6s8IQ4OEg3pfcgmkocLgGCxH8R2iz9B9d5fYY5CchBo4WY4xp0OibTmQs2BJNftxU0S/JFT33HolDTsAHI3Hf+oNcRg42hXo6JXxd7/PKPEd6j8Eali+/4hA9v5naxJGwJPcRjdn/iOc9Uc9sDcIE+dGLE6uYKwKv1I4sgX73bq4G0jRLpRjLYlGbgYnkmRfLIOpeSzjUJK8xNV8NWcf7/TvXm4epx/ToJuUh9CuknSufSk1xM8sxISTmiHPtqFWEeW40AcPoUIUi3V2yuzq7jZlfA5BTYTn1soMK1cMiK6txbZoN3X0wHin15/hha/uwfAU0Y3sedwFxa0Ds0fT1jJgCdQ6aO1nC772c39zR3WYLZKmIwqjbyubwP9/IhxvsQozPbqOYLSR/lmP33mnlKjOTt5y/yK+6qAm4r1nSjqzKlaJlJqmiz5ogVDwdLZ6jVvQ62deV2GNAFqgDJgjnqJ9B+ZGf6VfK0QVFmP;4:tZDhX8DnmGsQw8oLCrCl3PqCtuB3E7AMqrO4HvBljAfgbkmidZdbJBhj1uKLyam7tv1dxGuH2EHe4HC1qYqoFDUODAYD7NcXdoVyjZvCBFESRSQtoj69TXl8xdmJIS3HVpIMQQ+swlRozBPPpr2p51RZ4/QTEfWyoqKewrrru5U6zJs/W/4HEu2Jyg3b4RPIUXO7EpK3yeX2O/ljLo8AsXPQGENcx+mj76V3ghNA2bGee6LPH4uqsABa8SsH7SCJMMisCrIs7TkkZp3cfvxDOj6I7qGAug5rH8IQCIF+KS8WeAQLc7hcVWHcJmkuxnL4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(4114951738403); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(3231101)(944501161)(10201501046)(93006095)(93001095)(6041288)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:VI1PR0301MB1952;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0301MB1952; X-Forefront-PRVS: 0590BBCCBC X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(979002)(6049001)(366004)(376002)(39380400002)(346002)(396003)(39860400002)(199004)(189003)(2906002)(65956001)(65806001)(7416002)(80792005)(66066001)(8676002)(81156014)(81166006)(47776003)(64126003)(31696002)(25786009)(50466002)(39060400002)(97736004)(8936002)(6666003)(229853002)(72206003)(105586002)(68736007)(2950100002)(106356001)(26005)(36756003)(230700001)(59450400001)(31686004)(7736002)(305945005)(3846002)(55236004)(53546011)(186003)(77096007)(16526019)(2486003)(52116002)(478600001)(386003)(65826007)(58126008)(110136005)(6246003)(67846002)(5660300001)(52146003)(23676004)(16576012)(6486002)(316002)(6116002)(76176011)(53936002)(86362001)(921003)(1121003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0301MB1952;H:[10.17.182.9];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjAzMDFNQjE5NTI7MjM6Tjd4UGg0eVN4cGErQ0RTTkVzRm5zWEE2?= =?utf-8?B?R0ZKU0xnaTNNL1M2M011ekJTckhXSkIwQmJFN3lveTdYd1NCcDFSN0RwcXlG?= =?utf-8?B?Zmc3L1FMQ1FYNFB2dE9Gc1VJQ2JmMHJ2SHM1Y1dtbEUySytYQXRPRUtKbndF?= =?utf-8?B?U3E4RXZnSmdCcE1kZS90VHFJZXhUM1hkUHE4cHJTQ1pnaE5xVDc2ZEVMMFk3?= =?utf-8?B?SU9PdmtrTGJrczlPaThJUWVGNUU5NlFyUjFDRzBBU1VWWlZHR0ZzaDFpb0ZY?= =?utf-8?B?WHhxLzFyUWtwYWNiNlMxQ050aHdsUEZZOVE4Y1NJa0lLZXMrRXRwTGNaQ0hR?= =?utf-8?B?QWhKQWd6T2tUbEN0N0cyNG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rivalTime: 21 Feb 2018 08:50:05.9891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51a78b3a-effa-428a-8c60-08d579081b92 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0301MB1952 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/21/2018 10:23 AM, Juergen Gross wrote: > On 21/02/18 09:03, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> Initial handling for Xen bus states: implement >> Xen bus state machine for the frontend driver according to >> the state diagram and recovery flow from display para-virtualized >> protocol: xen/interface/io/displif.h. >> >> Signed-off-by: Oleksandr Andrushchenko >> --- >> drivers/gpu/drm/xen/xen_drm_front.c | 124 +++++++++++++++++++++++++++++++++++- >> drivers/gpu/drm/xen/xen_drm_front.h | 26 ++++++++ >> 2 files changed, 149 insertions(+), 1 deletion(-) >> create mode 100644 drivers/gpu/drm/xen/xen_drm_front.h >> >> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c >> index fd372fb464a1..d0306f9d660d 100644 >> --- a/drivers/gpu/drm/xen/xen_drm_front.c >> +++ b/drivers/gpu/drm/xen/xen_drm_front.c >> @@ -24,19 +24,141 @@ >> >> #include >> >> +#include "xen_drm_front.h" >> + >> +static void xen_drv_remove_internal(struct xen_drm_front_info *front_info) >> +{ >> +} >> + >> +static int backend_on_initwait(struct xen_drm_front_info *front_info) >> +{ >> + return 0; >> +} >> + >> +static int backend_on_connected(struct xen_drm_front_info *front_info) >> +{ >> + return 0; >> +} >> + >> +static void backend_on_disconnected(struct xen_drm_front_info *front_info) >> +{ >> + xenbus_switch_state(front_info->xb_dev, XenbusStateInitialising); >> +} >> + >> static void backend_on_changed(struct xenbus_device *xb_dev, >> enum xenbus_state backend_state) >> { >> + struct xen_drm_front_info *front_info = dev_get_drvdata(&xb_dev->dev); >> + int ret; >> + >> + DRM_DEBUG("Backend state is %s, front is %s\n", >> + xenbus_strstate(backend_state), >> + xenbus_strstate(xb_dev->state)); >> + >> + switch (backend_state) { >> + case XenbusStateReconfiguring: >> + /* fall through */ >> + case XenbusStateReconfigured: >> + /* fall through */ >> + case XenbusStateInitialised: >> + break; >> + >> + case XenbusStateInitialising: >> + /* recovering after backend unexpected closure */ >> + backend_on_disconnected(front_info); >> + break; >> + >> + case XenbusStateInitWait: >> + /* recovering after backend unexpected closure */ >> + backend_on_disconnected(front_info); >> + if (xb_dev->state != XenbusStateInitialising) >> + break; >> + >> + ret = backend_on_initwait(front_info); >> + if (ret < 0) >> + xenbus_dev_fatal(xb_dev, ret, "initializing frontend"); >> + else >> + xenbus_switch_state(xb_dev, XenbusStateInitialised); >> + break; >> + >> + case XenbusStateConnected: >> + if (xb_dev->state != XenbusStateInitialised) >> + break; >> + >> + ret = backend_on_connected(front_info); >> + if (ret < 0) >> + xenbus_dev_fatal(xb_dev, ret, "initializing DRM driver"); >> + else >> + xenbus_switch_state(xb_dev, XenbusStateConnected); >> + break; >> + >> + case XenbusStateClosing: >> + /* >> + * in this state backend starts freeing resources, >> + * so let it go into closed state, so we can also >> + * remove ours >> + */ >> + break; >> + >> + case XenbusStateUnknown: >> + /* fall through */ >> + case XenbusStateClosed: >> + if (xb_dev->state == XenbusStateClosed) >> + break; >> + >> + backend_on_disconnected(front_info); >> + break; >> + } >> } >> >> static int xen_drv_probe(struct xenbus_device *xb_dev, >> const struct xenbus_device_id *id) >> { >> - return 0; >> + struct xen_drm_front_info *front_info; >> + >> + front_info = devm_kzalloc(&xb_dev->dev, >> + sizeof(*front_info), GFP_KERNEL); >> + if (!front_info) { >> + xenbus_dev_fatal(xb_dev, -ENOMEM, "allocating device memory"); > No need for message in case of allocation failure: this is > handled in memory allocation already. Will remove, thank you > > Juergen