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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 BF3D0C4361B for ; Tue, 8 Dec 2020 08:33:22 +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 7AD7223A7D for ; Tue, 8 Dec 2020 08:33:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AD7223A7D 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 2F0166E9BC; Tue, 8 Dec 2020 08:32:25 +0000 (UTC) Received: from mail-pf1-x463.google.com (mail-pf1-x463.google.com [IPv6:2607:f8b0:4864:20::463]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9FAF389E1B for ; Mon, 7 Dec 2020 18:16:38 +0000 (UTC) Received: by mail-pf1-x463.google.com with SMTP id b26so10860909pfi.3 for ; Mon, 07 Dec 2020 10:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lagfreegames.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9PCQJCtHGcbt78oKyLMduI3qhRhK5FQL8fGW261JSag=; b=eAbw+HpwQhKdYtLC+av6zXgMY+83EtjEaWbSrk7fkfgMxd4HAhtlnyjE40lOPuUOoo druQw4xyo6V94isoXycBmyobZoSuhnrRZayDdCKONtxxV9+XVbBVqig17+isnmBoOxQ7 Tzu5q1tklBS19XpddoQiuv5TJh8qykdHmAVQlclOb2fOjpr+7+SpeDPgMWzMP1IvyLy4 yDY4ufF3kuzGRt/bDqcrrbdIAvmVTUcEG+zeM39f3CksBLvIClQCGKAAGG2weswHvjy7 IEdIAWvrK8qLyKCV/tyGBpV6u+R//k8/FlxjRoqXmZUyubyOHo7Bv6hdcD9FWgIeCP9c H+jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9PCQJCtHGcbt78oKyLMduI3qhRhK5FQL8fGW261JSag=; b=VplgbnqAC/GWIZhnogU7+GhT+TyLgcBNG41LPCydgjuBgDfLefYkGXll/OlThttnLC PTcVecFneK2RH6wKAGT2u0K8jBGKKpBe1MW2LpP7EexMqmD6QLtnLdKPqkXOPaw8cOVe q2tnAO/8486lT3QAqeM466zwSxNXj5lM0Xy7zCWWMKp9ExuT2s2KAJmbrR7EtqL0GoVp +Eob9MuT7pc4EJCL8/SkKNeTocng7IlpTrrceG8FAPjcTK3FFMI6xbalSYit+vZaKwg2 QdgDSTz6KcrvZ34aqQKD0rxFTdCS7rxzt0FN0jOA0kw+d9GebsPtory09zKeL++90PB3 s3pQ== X-Gm-Message-State: AOAM532RXqWJbQb34BGjsOp9Irr/JGxVPihiUCnw9fib7mNVevLIfQ2q VJM2kKoi5IdJS+fpiSknBs1JzMlUy19ZQM0Wim5lVfTnSA4l9Q== X-Google-Smtp-Source: ABdhPJx0P4VuaGsZ/ESvobjKj+N5CcQVQuZVrP5Eq3fBX0Oqp6MmjC3nbwumzY6vKuhT6UbByRD8WRHe1XXE X-Received: by 2002:a63:4e07:: with SMTP id c7mr19245854pgb.414.1607364998219; Mon, 07 Dec 2020 10:16:38 -0800 (PST) Received: from DESKTOP-G3VVM7A.localdomain (c-24-5-176-39.hsd1.ca.comcast.net. [24.5.176.39]) by smtp-relay.gmail.com with ESMTPS id c18sm9523pjr.12.2020.12.07.10.16.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2020 10:16:38 -0800 (PST) X-Relaying-Domain: lagfreegames.com From: James Park To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: drm_basic_types.h, DRM_FOURCC_STANDALONE Date: Mon, 7 Dec 2020 10:15:39 -0800 Message-Id: <1607364939-640-2-git-send-email-jpark37@lagfreegames.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1607364939-640-1-git-send-email-jpark37@lagfreegames.com> References: <202012080129.qAoCOovN-lkp@intel.com> <1607364939-640-1-git-send-email-jpark37@lagfreegames.com> X-Mailman-Approved-At: Tue, 08 Dec 2020 08:32:06 +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: , Cc: James Park MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel