From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933478AbdDGLcM (ORCPT ); Fri, 7 Apr 2017 07:32:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:49031 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933374AbdDGLcA (ORCPT ); Fri, 7 Apr 2017 07:32:00 -0400 Subject: Re: [Xen-devel] [For Linux 4/4] xen/displif: add ABI for para-virtual display To: Oleksandr Andrushchenko , xen-devel@lists.xenproject.org References: <1491553840-5180-1-git-send-email-andr2000@gmail.com> <1491553840-5180-5-git-send-email-andr2000@gmail.com> Cc: lars.kurth@citrix.com, sstabellini@kernel.org, vlad.babchuk@gmail.com, linux-kernel@vger.kernel.org, Oleksandr Andrushchenko , julien.grall@arm.com, andrii.anisov@gmail.com, olekstysh@gmail.com, al1img@gmail.com, Oleksandr Grytsov , joculator@gmail.com, Boris Ostrovsky From: Juergen Gross Message-ID: <4048cdfe-8a6b-7246-69b6-094142991647@suse.com> Date: Fri, 7 Apr 2017 13:31:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1491553840-5180-5-git-send-email-andr2000@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/04/17 10:30, 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 > > Note, that this protocol doesn't use ring macros for > bi-directional exchange (PV calls/9pfs) bacause: > o it statically defines the use of a single page > for the ring buffer > o it uses direct memory access to ring's contents > w/o memory copying > o re-uses the same idea that kbdif/fbif use > which for this use-case seems to be appropriate > > ================================================== > Rationale for introducing this protocol instead of > using the existing fbif: > ================================================== > > 1. In/out event sizes > o fbif - 40 octets > o displif - 40 octets > This is only the initial version of the displif protocol > which means that there could be requests which will not fit > (WRT introducing some GPU related functionality > later on). In that case we cannot alter fbif sizes as we need to > be backward compatible an will be forced to handle those > apart of fbif. > > 2. Shared page > Displif doesn't use anything like struct xenfb_page, but > DEFINE_RING_TYPES(xen_displif, struct xendispl_req, struct > xendispl_resp) which is a better and more common way. > Output events use a shared page which only has in_cons and in_prod > and all the rest is used for incoming events. Here struct xenfb_page > could probably be used as is despite the fact that it only has a half > of a page for incoming events which is only 50 events. (consider > something like 60Hz display) > > 3. Amount of changes. > fbif only provides XENFB_TYPE_UPDATE and XENFB_TYPE_RESIZE > events, so it looks like it is easier to get fb support into displif > than vice versa. displif at the moment has 6 requests and 1 event, > multiple connector support, etc. > > Reviewed-by: Konrad Rzeszutek Wilk > Signed-off-by: Oleksandr Grytsov > Signed-off-by: Oleksandr Andrushchenko Acked-by: Juergen Gross Juergen