All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Oleksandr Andrushchenko <andr2000@gmail.com>
Cc: lars.kurth@citrix.com, iurii.konovalenko@globallogic.com,
	vlad.babchuk@gmail.com, tim@xen.org, dario.faggioli@citrix.com,
	ian.jackson@eu.citrix.com, andrii.anisov@gmail.com,
	olekstysh@gmail.com, embedded-pv-devel@lists.xenproject.org,
	al1img@gmail.com, david.vrabel@citrix.com,
	xen-devel <xen-devel@lists.xenproject.org>,
	oleksandr.dmytryshyn@globallogic.com, joculator@gmail.com
Subject: Re: [PATCH] drmif: add ABI for para-virtual DRM/KMS
Date: Thu, 24 Nov 2016 05:25:08 -0700	[thread overview]
Message-ID: <5836EA340200007800121A70@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1479987046-7226-2-git-send-email-andr2000@gmail.com>

>>> On 24.11.16 at 12:30, <andr2000@gmail.com> wrote:
> --- /dev/null
> +++ b/include/xen/interface/io/drmif_linux.h
> @@ -0,0 +1,142 @@
> +/******************************************************************************
> + * drmif_linux.h
> + *
> + *  Unified DRM-device I/O interface for Xen guest OSes
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a copy
> + * of this software and associated documentation files (the "Software"), to
> + * deal in the Software without restriction, including without limitation the
> + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the Software is
> + * furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + * Copyright (C) 2016 EPAM Systems Inc.
> + *
> + * Authors: Oleksandr Andrushchenko <andr2000@gmail.com>
> + *          Oleksandr Grytsov <al1img@gmail.com>
> + */
> +
> +#ifndef __XEN_PUBLIC_IO_XENSND_LINUX_H__
> +#define __XEN_PUBLIC_IO_XENSND_LINUX_H__
> +
> +#include <xen/interface/io/ring.h>
> +#include <xen/interface/io/drmif.h>
> +#include <xen/interface/grant_table.h>
> +
> +struct xendrm_dumb_create_req {
> +	uint64_t dumb_cookie;
> +	uint32_t width;
> +	uint32_t height;
> +	uint32_t bpp;
> +	grant_ref_t gref_directory_start;
> +} __packed;

So looking a little more closely at the split here - what's the Linux
specific part of the above structure? I.e. perhaps my sndif related
comment was then also wrong, and instead you mean to just have
everything in a single file? At least that's what it looks like here.
May I suggest that you try to follow the fundamental model the
other, pre-existing interface headers use? And along that line
please keep in mind that frontend and backend may anyway be
running in different OSes, so the split done here isn't really
architecturally correct.

Also please note that __packed is undefined here.

> +struct xendrm_req {
> +	union {
> +		struct xendrm_request raw;
> +		struct {
> +			uint16_t id;
> +			uint8_t operation;
> +			uint8_t reserved;
> +			union {
> +				struct xendrm_dumb_create_req dumb_create;
> +				struct xendrm_dumb_destroy_req dumb_destroy;
> +				struct xendrm_fb_create_req fb_create;
> +				struct xendrm_fb_destroy_req fb_destroy;
> +				struct xendrm_set_config_req set_config;
> +				struct xendrm_page_flip_req pg_flip;
> +			} op;
> +		} data __packed;
> +	} u;
> +};

A structure whose only member is a union is odd - please make this
a union itself.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-11-24 12:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 11:30 [PATCH] drmif: add ABI for para-virtual DRM/KMS Oleksandr Andrushchenko
2016-11-24 11:30 ` Oleksandr Andrushchenko
2016-11-24 12:25   ` Jan Beulich [this message]
2016-11-24 12:32   ` [Embedded-pv-devel] " Julien Grall
2016-11-24 14:42     ` Oleksandr Andrushchenko
2016-11-24 15:08       ` Jan Beulich
2016-11-24 15:44         ` Oleksandr Andrushchenko
2016-11-24 16:06           ` Jan Beulich
2016-11-24 18:31             ` Oleksandr Andrushchenko
2016-11-24 22:14               ` Dario Faggioli
2016-11-25  7:20                 ` Jan Beulich
2016-11-25  7:35                   ` Oleksandr Andrushchenko
2016-11-24 15:05   ` Lars Kurth
2016-11-24 15:38     ` Oleksandr Andrushchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5836EA340200007800121A70@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=al1img@gmail.com \
    --cc=andr2000@gmail.com \
    --cc=andrii.anisov@gmail.com \
    --cc=dario.faggioli@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=embedded-pv-devel@lists.xenproject.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=iurii.konovalenko@globallogic.com \
    --cc=joculator@gmail.com \
    --cc=lars.kurth@citrix.com \
    --cc=oleksandr.dmytryshyn@globallogic.com \
    --cc=olekstysh@gmail.com \
    --cc=tim@xen.org \
    --cc=vlad.babchuk@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.