From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 880F7C433E6 for ; Tue, 2 Feb 2021 08:27:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E20F64EC3 for ; Tue, 2 Feb 2021 08:27:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E20F64EC3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lagfreegames.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE2336E949; Tue, 2 Feb 2021 08:27:07 +0000 (UTC) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by gabe.freedesktop.org (Postfix) with ESMTPS id E52706E882 for ; Mon, 1 Feb 2021 21:46:15 +0000 (UTC) Received: by mail-ed1-x52f.google.com with SMTP id s11so20674519edd.5 for ; Mon, 01 Feb 2021 13:46:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lagfreegames.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=AfcJDDwn5kLNZUEZ4Xv3StVrzRnSsE+T390sG7juLfA=; b=Kv8omafXo8fx/bhdu3T/Q413fBFM+QtZ2kRitCG46+qNZuyazms/Bu+zRlvHl/uIVN aZDiK0pI+HjZrHDYfZQzSgMEOrfTqYUXBoRFKFCknOj/WSb7ZuHg61Gvay57EZZBP8C1 mb1uUbautjvWDU/RzFlZzluWRsLAPjz4ozBpq1K1IxhuhYTEK/zecpPVcTy0pVc7jCQk UsMd3bSiVV3pEM0XBwhOOvIJlI557yj5b02OF0ilh0oehqi8FZAdFYL92f3DNYplsgf1 REEOZVwM5dok5sCAddoMxCLteXQ2jFD/g8dtVDZP50cyZYHJMk/QgyeSWTgSkiO4ugXY awgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=AfcJDDwn5kLNZUEZ4Xv3StVrzRnSsE+T390sG7juLfA=; b=TH0IwVLQO8sclSHv4Pncofi56awPd6KGvuT/XgASsE4/4DgaSmtqH25SDoy7Ff9ua+ Ve2lkvNUE6B2kPqP2e58uyRVftHof0qseTHcL2rHmHHvuy34rSWA5owr8QakHnENsLIZ b9L2NHNg6eVT8QZm+fApyU8MGIOEDtKbtsRHRV1e2FyZJmT94TyUO4I3HFre0kie1ube 9qekG8bOv5//du+DGCjlb0eRQqm0QYlfM3Zq/1bEOhm/g+GiFogGxtH5QI5BY+k+sMdE 5tn3CscnyXJFB3IOWVIC4NI0c9R6WBVuI4xAXojgt/GsPUKK/QAps7diKR21OCBCqt81 1LWQ== X-Gm-Message-State: AOAM531amTAD3ep1xHg0Mma2U3Jlc83t0LXdR57UVcsEOWfRpKV5I790 3InnnMKvKAiDC20mAqH9tWOtgLNRHPlPoJHy4fbNzfyqai1kfw== X-Google-Smtp-Source: ABdhPJwSuReNzRzAx1/Ay3lMz//BN2lY/JC3KC6TfpUykgtmqqwgUA9jVW/VkIuCEPxGFzJujAvR3CDUBqgsfK0F2Z8= X-Received: by 2002:aa7:d511:: with SMTP id y17mr21243776edq.112.1612215974223; Mon, 01 Feb 2021 13:46:14 -0800 (PST) MIME-Version: 1.0 References: <20201210103553.1ae238d2@eldfell> <1607591574-949-1-git-send-email-jpark37@lagfreegames.com> <1607591574-949-2-git-send-email-jpark37@lagfreegames.com> In-Reply-To: <1607591574-949-2-git-send-email-jpark37@lagfreegames.com> From: James Park Date: Mon, 1 Feb 2021 13:45:42 -0800 Message-ID: Subject: Re: [PATCH] drm: drm_basic_types.h, DRM_FOURCC_STANDALONE To: dri-devel X-Mailman-Approved-At: Tue, 02 Feb 2021 08:27:00 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1953650558==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============1953650558== Content-Type: multipart/alternative; boundary="00000000000071f58005ba4d488d" --00000000000071f58005ba4d488d Content-Type: text/plain; charset="UTF-8" Hello, Is there something I can do to help move this patch along? Thanks, James Park On Thu, Dec 10, 2020 at 1:13 AM James Park wrote: > Create drm_basic_types.h to define types previously defined by drm.h. > > Use DRM_FOURCC_STANDALONE to include drm_fourcc.h without drm.h. > > This will allow Mesa to port code to Windows more easily. > > Signed-off-by: James Park > Acked-by: Simon Ser > Reviewed-by: Pekka Paalanen > --- > include/uapi/drm/drm.h | 12 ++------- > include/uapi/drm/drm_basic_types.h | 52 > ++++++++++++++++++++++++++++++++++++++ > include/uapi/drm/drm_fourcc.h | 4 +++ > 3 files changed, 58 insertions(+), 10 deletions(-) > create mode 100644 include/uapi/drm/drm_basic_types.h > > diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h > index 808b48a..d9ba922 100644 > --- a/include/uapi/drm/drm.h > +++ b/include/uapi/drm/drm.h > @@ -36,6 +36,8 @@ > #ifndef _DRM_H_ > #define _DRM_H_ > > +#include "drm_basic_types.h" > + > #if defined(__KERNEL__) > > #include > @@ -50,18 +52,8 @@ typedef unsigned int drm_handle_t; > > #else /* One of the BSDs */ > > -#include > #include > #include > -typedef int8_t __s8; > -typedef uint8_t __u8; > -typedef int16_t __s16; > -typedef uint16_t __u16; > -typedef int32_t __s32; > -typedef uint32_t __u32; > -typedef int64_t __s64; > -typedef uint64_t __u64; > -typedef size_t __kernel_size_t; > typedef unsigned long drm_handle_t; > > #endif > diff --git a/include/uapi/drm/drm_basic_types.h > b/include/uapi/drm/drm_basic_types.h > new file mode 100644 > index 0000000..da1f2c0 > --- /dev/null > +++ b/include/uapi/drm/drm_basic_types.h > @@ -0,0 +1,52 @@ > +/* > + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. > + * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. > + * All rights reserved. > + * > + * 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 (including the > next > + * paragraph) 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 > + * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS 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. > + */ > + > +#ifndef _DRM_BASIC_TYPES_H_ > +#define _DRM_BASIC_TYPES_H_ > + > +#if defined(__KERNEL__) > + > +#include > + > +#elif defined(__linux__) > + > +#include > + > +#else /* Not Linux */ > + > +#include > +typedef int8_t __s8; > +typedef uint8_t __u8; > +typedef int16_t __s16; > +typedef uint16_t __u16; > +typedef int32_t __s32; > +typedef uint32_t __u32; > +typedef int64_t __s64; > +typedef uint64_t __u64; > +typedef size_t __kernel_size_t; > + > +#endif > + > +#endif > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index 82f3278..539870f 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -24,7 +24,11 @@ > #ifndef DRM_FOURCC_H > #define DRM_FOURCC_H > > +#include "drm_basic_types.h" > + > +#ifndef DRM_FOURCC_STANDALONE > #include "drm.h" > +#endif > > #if defined(__cplusplus) > extern "C" { > -- > 2.7.4 > > --00000000000071f58005ba4d488d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

Is there someth= ing I can do to help move this patch along?

Thanks= ,
James Park

On Thu, Dec 10, 2020 at 1:13 AM James Park &l= t;jpark37@lagfreegames.com&= gt; wrote:
Creat= e drm_basic_types.h to define types previously defined by drm.h.

Use DRM_FOURCC_STANDALONE to include drm_fourcc.h without drm.h.

This will allow Mesa to port code to Windows more easily.

Signed-off-by: James Park <jpark37@lagfreegames.com>
Acked-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
---
=C2=A0include/uapi/drm/drm.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0| 12 ++-------
=C2=A0include/uapi/drm/drm_basic_types.h | 52 +++++++++++++++++++++++++++++= +++++++++
=C2=A0include/uapi/drm/drm_fourcc.h=C2=A0 =C2=A0 =C2=A0 |=C2=A0 4 +++
=C2=A03 files changed, 58 insertions(+), 10 deletions(-)
=C2=A0create mode 100644 include/uapi/drm/drm_basic_types.h

diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 808b48a..d9ba922 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -36,6 +36,8 @@
=C2=A0#ifndef _DRM_H_
=C2=A0#define _DRM_H_

+#include "drm_basic_types.h"
+
=C2=A0#if defined(__KERNEL__)

=C2=A0#include <linux/types.h>
@@ -50,18 +52,8 @@ typedef unsigned int drm_handle_t;

=C2=A0#else /* One of the BSDs */

-#include <stdint.h>
=C2=A0#include <sys/ioccom.h>
=C2=A0#include <sys/types.h>
-typedef int8_t=C2=A0 =C2=A0__s8;
-typedef uint8_t=C2=A0 __u8;
-typedef int16_t=C2=A0 __s16;
-typedef uint16_t __u16;
-typedef int32_t=C2=A0 __s32;
-typedef uint32_t __u32;
-typedef int64_t=C2=A0 __s64;
-typedef uint64_t __u64;
-typedef size_t=C2=A0 =C2=A0__kernel_size_t;
=C2=A0typedef unsigned long drm_handle_t;

=C2=A0#endif
diff --git a/include/uapi/drm/drm_basic_types.h b/include/uapi/drm/drm_basi= c_types.h
new file mode 100644
index 0000000..da1f2c0
--- /dev/null
+++ b/include/uapi/drm/drm_basic_types.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a=
+ * copy of this software and associated documentation files (the "Sof= tware"),
+ * to deal in the Software without restriction, including without limitati= on
+ * 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 (including the ne= xt
+ * paragraph) shall be included in all copies or substantial portions of t= he
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIN= D, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY= ,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.=C2=A0 IN NO EVENT= SHALL
+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS 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.
+ */
+
+#ifndef _DRM_BASIC_TYPES_H_
+#define _DRM_BASIC_TYPES_H_
+
+#if defined(__KERNEL__)
+
+#include <linux/types.h>
+
+#elif defined(__linux__)
+
+#include <linux/types.h>
+
+#else /* Not Linux */
+
+#include <stdint.h>
+typedef int8_t=C2=A0 =C2=A0__s8;
+typedef uint8_t=C2=A0 __u8;
+typedef int16_t=C2=A0 __s16;
+typedef uint16_t __u16;
+typedef int32_t=C2=A0 __s32;
+typedef uint32_t __u32;
+typedef int64_t=C2=A0 __s64;
+typedef uint64_t __u64;
+typedef size_t=C2=A0 =C2=A0__kernel_size_t;
+
+#endif
+
+#endif
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h<= br> index 82f3278..539870f 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -24,7 +24,11 @@
=C2=A0#ifndef DRM_FOURCC_H
=C2=A0#define DRM_FOURCC_H

+#include "drm_basic_types.h"
+
+#ifndef DRM_FOURCC_STANDALONE
=C2=A0#include "drm.h"
+#endif

=C2=A0#if defined(__cplusplus)
=C2=A0extern "C" {
--
2.7.4

--00000000000071f58005ba4d488d-- --===============1953650558== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1953650558==--