From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleksandr Andrushchenko Subject: Re: [PATCH v5] xen/displif: add ABI for para-virtual display Date: Wed, 5 Apr 2017 09:11:43 +0300 Message-ID: <5d9fcc61-c7f6-1f06-f69c-3bdaa14d6881@gmail.com> References: <1491372547-10236-1-git-send-email-andr2000@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------757D3E3F2E63A5128D8B175C" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cveAV-0000R8-8h for xen-devel@lists.xenproject.org; Wed, 05 Apr 2017 06:11:47 +0000 Received: by mail-lf0-f68.google.com with SMTP id v2so292595lfi.2 for ; Tue, 04 Apr 2017 23:11:45 -0700 (PDT) In-Reply-To: <1491372547-10236-1-git-send-email-andr2000@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel@lists.xenproject.org Cc: lars.kurth@citrix.com, vlad.babchuk@gmail.com, Oleksandr Andrushchenko , julien.grall@arm.com, andrii.anisov@gmail.com, olekstysh@gmail.com, al1img@gmail.com, joculator@gmail.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------757D3E3F2E63A5128D8B175C Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit For your convenience, PFA diff between v4..v5 Thank you, Oleksandr On 04/05/2017 09:09 AM, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > This is the ABI for the two halves of a para-virtualized > display driver. > > This protocol aims to provide a unified protocol which fits more > sophisticated use-cases than a framebuffer device can handle. At the > moment basic functionality is supported with the intention to extend: > o multiple dynamically allocated/destroyed framebuffers > o buffers of arbitrary sizes > o better configuration options including multiple display support > > Note: existing fbif can be used together with displif running at the > same time, e.g. on Linux one provides framebuffer and another DRM/KMS > > Future extensions to the existing protocol may include: > o allow display/connector cloning > o allow allocating objects other than display buffers > o add planes/overlays support > o support scaling > o support rotation > > Thank you, > Oleksandr Andrushchenko > Oleksandr Grytsov > > Oleksandr Andrushchenko (1): > displif: add ABI for para-virtual display > > xen/include/public/io/displif.h | 864 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 864 insertions(+) > create mode 100644 xen/include/public/io/displif.h > --------------757D3E3F2E63A5128D8B175C Content-Type: text/x-patch; name="displif-v5.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="displif-v5.diff" diff --git a/xen/include/public/io/displif.h b/xen/include/public/io/displif.h index ac55c4fe8bbe..8a94f1f9b9d0 100644 --- a/xen/include/public/io/displif.h +++ b/xen/include/public/io/displif.h @@ -35,6 +35,13 @@ /* ****************************************************************************** + * Protocol version + ****************************************************************************** + */ +#define XENDISPL_PROTOCOL_VERSION "1" + +/* + ****************************************************************************** * Main features provided by the protocol ****************************************************************************** * This protocol aims to provide a unified protocol which fits more @@ -111,7 +118,7 @@ * /local/domain/1/device/vdispl/0/backend = "/local/domain/0/backend/vdispl/1/0" * /local/domain/1/device/vdispl/0/state = "4" * /local/domain/1/device/vdispl/0/version = "1" - * /local/domain/1/device/vdispl/0/be_alloc = "1" + * /local/domain/1/device/vdispl/0/be-alloc = "1" * *-------------------------- Connector 0 configuration ------------------------ * @@ -172,7 +179,7 @@ * *------------------------- Backend buffer allocation ------------------------- * - * be_alloc + * be-alloc * Values: "0", "1" * * If value is set to "1", then backend can be a buffer provider/allocator @@ -205,7 +212,7 @@ * Values: * * The Xen grant reference granting permission for the backend to map - * a sole page in a single page sized connector's control ring buffer. + * a sole page of connector's control ring buffer. * *------------------- Connector Event Transport Parameters -------------------- * @@ -222,7 +229,7 @@ * Values: * * The Xen grant reference granting permission for the backend to map - * a sole page in a single page sized connector's event ring buffer. + * a sole page of connector's event ring buffer. */ /* @@ -295,7 +302,7 @@ * then frontend goes into the XenbusStateInitialising state and is ready for * new connection with backend. If the virtualized device is still in use and * cannot be removed, then frontend goes into the XenbusStateReconfiguring state - * until either the virtualized device removed or backend initiates a new + * until either the virtualized device is removed or backend initiates a new * connection. On the virtualized device removal frontend goes into the * XenbusStateInitialising state. * @@ -304,7 +311,7 @@ * and thus cannot provide functionality of the virtualized device anymore. * After backend is back to normal the virtualized device may still hold some * state: configuration in use, allocated buffers, client application state etc. - * So, in most cases, this will require frontend to implement complex recovery + * In most cases, this will require frontend to implement complex recovery * reconnect logic. Instead, by going into XenbusStateReconfiguring state, * frontend will make sure no new clients of the virtualized device are * accepted, allow existing client(s) to exit gracefully by signaling error @@ -360,7 +367,7 @@ #define XENDISPL_FIELD_EVT_RING_REF "evt-ring-ref" #define XENDISPL_FIELD_EVT_CHANNEL "evt-event-channel" #define XENDISPL_FIELD_RESOLUTION "resolution" -#define XENDISPL_FIELD_BE_ALLOC "be_alloc" +#define XENDISPL_FIELD_BE_ALLOC "be-alloc" /* ****************************************************************************** @@ -387,8 +394,8 @@ * Shared page contains a ring with request/response packets. * * All reserved fields in the structures below must be 0. - * Display buffers's cookie of value 0 treated as invalid. - * Framebuffer's cookie of value 0 treated as invalid. + * Display buffers's cookie of value 0 is treated as invalid. + * Framebuffer's cookie of value 0 is treated as invalid. * * For all request/response/event packets that use cookies: * dbuf_cookie - uint64_t, unique to guest domain value used by the backend @@ -399,7 +406,8 @@ *---------------------------------- Requests --------------------------------- * * All requests/responses, which are not connector specific, must be sent over - * control ring of the connector with index 0. + * control ring of the connector which has the index value of 0: + * /local/domain//device/vdispl//0/req-ring-ref * * All request packets have the same length (64 octets) * All request packets have common header: @@ -442,7 +450,9 @@ * | reserved | 64 * +----------------+----------------+----------------+----------------+ * - * Must be sent over control ring of the connector with index 0. + * Must be sent over control ring of the connector which has the index + * value of 0: + * /local/domain//device/vdispl//0/req-ring-ref * All unused bits in flags field must be set to 0. * * An attempt to create multiple display buffers with the same dbuf_cookie is @@ -464,12 +474,13 @@ * Frontend on request: * o allocates pages for the directory (gref_directory, * gref_dir_next_page(s) - * o grants permissions for the pages of the directory + * o grants permissions for the pages of the directory to the backend * o sets gref_dir_next_page fields * Backend on response: - * o grants permissions for the pages of the buffer allocated + * o grants permissions for the pages of the buffer allocated to + * the frontend * o fills in page directory with grant references - * (gref[] in struct xendispl_page_directorygref) + * (gref[] in struct xendispl_page_directory) * gref_directory - grant_ref_t, a reference to the first shared page * describing shared buffer references. At least one page exists. If shared * buffer size (buffer_sz) exceeds what can be addressed by this single page, @@ -543,7 +554,9 @@ struct xendispl_page_directory { * | reserved | 64 * +----------------+----------------+----------------+----------------+ * - * Must be sent over control ring of the connector with index 0. + * Must be sent over control ring of the connector which has the index + * value of 0: + * /local/domain//device/vdispl//0/req-ring-ref */ struct xendispl_dbuf_destroy_req { @@ -580,7 +593,9 @@ struct xendispl_dbuf_destroy_req { * | reserved | 64 * +----------------+----------------+----------------+----------------+ * - * Must be sent over control ring of the connector with index 0. + * Must be sent over control ring of the connector which has the index + * value of 0: + * /local/domain//device/vdispl//0/req-ring-ref * Width and height can be smaller, equal or bigger than the connector's * resolution. * @@ -621,7 +636,9 @@ struct xendispl_fb_attach_req { * | reserved | 64 * +----------------+----------------+----------------+----------------+ * - * Must be sent over control ring of the connector with index 0. + * Must be sent over control ring of the connector which has the index + * value of 0: + * /local/domain//device/vdispl//0/req-ring-ref */ struct xendispl_fb_detach_req { @@ -809,7 +826,7 @@ DEFINE_RING_TYPES(xen_displif, struct xendispl_req, struct xendispl_resp); ****************************************************************************** * In order to deliver asynchronous events from back to front a shared page is * allocated by front and its granted reference propagated to back via - * XenStore entries (event-XXX). + * XenStore entries (evt-ring-ref/evt-event-channel). * This page has a common header used by both front and back to synchronize * access and control event's ring buffer, while back being a producer of the * events and front being a consumer. The rest of the page after the header --------------757D3E3F2E63A5128D8B175C Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --------------757D3E3F2E63A5128D8B175C--