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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 E5FF3C64E7A for ; Thu, 3 Dec 2020 12:54:09 +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 7483622245 for ; Thu, 3 Dec 2020 12:54:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7483622245 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.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 966896E9AF; Thu, 3 Dec 2020 12:54:07 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 429206E9AF for ; Thu, 3 Dec 2020 12:54:06 +0000 (UTC) IronPort-SDR: O4eL6sXBYW5FPu4CgtTNVZgxCTxLzCNX4qMYpm0vVfszJqSoo2LJR9kCjVFmhgwxtGMTA0+9un Fizb5bJp5DRw== X-IronPort-AV: E=McAfee;i="6000,8403,9823"; a="153012880" X-IronPort-AV: E=Sophos;i="5.78,389,1599548400"; d="scan'208";a="153012880" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 04:54:05 -0800 IronPort-SDR: u/ZzMiE6b+dhj9SHs1bfz6iOvmo6Alof09j1Nwdr8V6CvUMLSPMAD2AMFOY9b4burfPVVnCsN7 JPPU3+rZLT6Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,389,1599548400"; d="scan'208";a="346224350" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga002.jf.intel.com with SMTP; 03 Dec 2020 04:54:02 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 03 Dec 2020 14:54:02 +0200 Date: Thu, 3 Dec 2020 14:54:02 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Daniel Vetter Subject: Re: [PATCH] drm: Fix drm.h uapi header for Windows Message-ID: <20201203125402.GH6112@intel.com> References: <1606816916-3724-1-git-send-email-jpark37@lagfreegames.com> <1606816916-3724-2-git-send-email-jpark37@lagfreegames.com> <2dbbc3dc-4df8-9ca4-4dce-808df0b24950@daenzer.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) 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: Michel =?iso-8859-1?Q?D=E4nzer?= , dri-devel , James Park , James Park Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Dec 02, 2020 at 11:25:58PM +0100, Daniel Vetter wrote: > On Wed, Dec 2, 2020 at 8:48 PM James Park w= rote: > > > > I can avoid modifying drm.h by doing this to drm_fourcc.h: > > > > #ifdef _WIN32 > > #include > > typedef uint64_t __u64; > > #else > > #include "drm.h" > > #endif > > > > And this to amdgpu_drm.h: > > > > #ifdef _WIN32 > > #include > > typedef int32_t __s32; > > typedef uint32_t __u32; > > typedef uint64_t __u64; > > #else > > #include "drm.h" > > #endif > > > > But now I'm touching two files under drm-uapi instead of one, and weird= ly. > > > > If we're trying to cut ties with the drm-uapi folder entirely, the stuf= f ac_surface.c need includes the AMD_FMT_MOD stuff in drm_fourcc.h, and AMD= GPU_TILING_* under amdgpu_drm.h. Is there a better spot for these definitio= ns? > = > The drm_fourcc.h maybe makes some sense (I think in some places mesa > uses these internally, and many drivers use the modifiers directly in > the main driver). But the amdgpu header should be all ioctl stuff, > which should be all entirely in the winsys only. > = > Also kinda disappointing that drm_fourcc.h includes drm.h and isn't > standalone, but I guess that sailed (at least for linux). Isn't the only thing it needs the __u32? I would think we could just replace those with unsigned int (DRM_FORMAT_BIG_ENDIAN already assumes int is 32bit it seems) and drop the drm.h. Or are we're worried something already depends on getting drm.h via just including drm_fourcc.h? -- = Ville Syrj=E4l=E4 Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel