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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 68290C4361A for ; Fri, 4 Dec 2020 08:34:23 +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 E1B9D22515 for ; Fri, 4 Dec 2020 08:34:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1B9D22515 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 716E16EC71; Fri, 4 Dec 2020 08:33:40 +0000 (UTC) Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 876866E056 for ; Thu, 3 Dec 2020 18:55:55 +0000 (UTC) Received: by mail-vk1-xa2d.google.com with SMTP id 145so659984vky.2 for ; Thu, 03 Dec 2020 10:55:55 -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 :cc; bh=ROBCAp0290we+VI2Iq0YmJ+Slmu/Ml/AstasaU/FxAA=; b=AFHQqrIszh36CQQZ23M5iM4JxOjADMjZS0KLXpyJwiQ8VEWPkVCjFHFswXICM/G64j GZn/sWF9LsZLAWpDLNVBGtMiYizFgYuS5UcN33ZjCWp/6gUTaQ1KK+SsbTTIq+GOC8Fv jGpy472xOFWciIwjoMG78ybzVTT5GB3b/QVul+R6OptK4ODbYRSS5IUPdA56nayegIQC +vQx5DlXgRmVpgTupGPQ7RoFAE9K6nnB2wTGhK+v7HIcgZCy9Yzc+7hNoIFu7uvn8C7P J80nwE7ZchPa7wOdute5DOucESZSp9aIHhinEx+s/SS3R+qdFjRerWzJFKt1SxRmCRYk h4Xw== 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:cc; bh=ROBCAp0290we+VI2Iq0YmJ+Slmu/Ml/AstasaU/FxAA=; b=qpBVK+W4KDjxpC3wBOj6hs61qLo6UWY+W3OamtGVvIePEeOr3xYPVJyOgFce51bHS6 mBNl+RSpVAvBEpGQu7Y6apz+gwY2iDWjFoiTpDMhOvUrARtXyXHRztyEO2rk/DxhYp0e us1vp3PAh3ENf7jMw3xpObeXiBhe1/K72m+28IAsedGqGx/ITlpWbaQptR6NMsnAByWs BEIA6293JPawlHszkN6iGW5W8+LLlXD1PPdLgc5PKbK15+GRrEay0a9NHSW/spXAR/42 PsbSbF2ljHgDqAbOxvlKANAMTXiIrhCd70Il/wkFOTdwYzmmltKhEaX5b1PbciSrkb4b IaNg== X-Gm-Message-State: AOAM531tlftqmbnTjoD4Jvzi8e5LyGtBVbJXVQDTg1t8kGL+ni0wscym 7jucirfpz9DR1rq/faQEimOrzpZ/DIQB7EFSuG5xUg== X-Google-Smtp-Source: ABdhPJxjTEHVzagN7NuZoTQW3Gt/ln/UX3XiZVzlV5wIECBcTwYrJFYY/fxti8hzCs0YJV/JznGnZ0CgzIJ9WFN/hcE= X-Received: by 2002:a05:6122:84f:: with SMTP id 15mr617018vkk.25.1607021754610; Thu, 03 Dec 2020 10:55:54 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: From: James Park Date: Thu, 3 Dec 2020 10:55:07 -0800 Message-ID: Subject: Re: [PATCH] drm: Fix drm.h uapi header for Windows To: Daniel Vetter X-Mailman-Approved-At: Fri, 04 Dec 2020 08:33:34 +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: =?UTF-8?Q?Michel_D=C3=A4nzer?= , James Park , dri-devel Content-Type: multipart/mixed; boundary="===============1192418987==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============1192418987== Content-Type: multipart/alternative; boundary="000000000000d4906d05b593e89f" --000000000000d4906d05b593e89f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The trailing underscore for DRM_FOURCC_STANDALONE_ isn't intentional, right? Should I put all the integer types, or just the ones that are used in that file? Thanks, James On Thu, Dec 3, 2020 at 6:52 AM Daniel Vetter wrote: > On Thu, Dec 3, 2020 at 9:18 AM Michel D=C3=A4nzer wr= ote: > > > > On 2020-12-02 8:47 p.m., James Park wrote: > > > > > > If we're trying to cut ties with the drm-uapi folder entirely, the > stuff > > > ac_surface.c need includes the AMD_FMT_MOD stuff in drm_fourcc.h, > > > and AMDGPU_TILING_* under amdgpu_drm.h. Is there a better spot for > these > > > definitions? > > > > The Mesa src/amd/ code should use platform-neutral abstractions for > > these. This wasn't deemed necessary before, because nobody was trying t= o > > build these drivers for non-UNIX OSes. But now you are. > > I think that's a bit much busy work for not much gain. drm_fourcc.h is > even included as the official source of truth of some khr extensions, > making that header stand-alone and useable cross-platform sounds like > a good idea to me. Something like the below is imo perfectly fine: > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.= h > index ca48ed0e6bc1..0a121b3efb58 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 > > +#ifndef DRM_FOURCC_STANDALONE_ > +/* include the linux uapi types here */ > +#else > #include "drm.h" > +#endif > > #if defined(__cplusplus) > extern "C" { > > > Cheers, Daniel > > > > > > > -- > > Earthling Michel D=C3=A4nzer | https://redh= at.com > > Libre software enthusiast | Mesa and X develope= r > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch > --000000000000d4906d05b593e89f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The trailing underscore for=C2=A0 DRM_FOURCC_STANDALONE_ isn't intentional, right? Should I put all the integer types, or just = the ones that are used in that file?

Thanks,
J= ames

On Thu, Dec 3, 2020 at 6:52 AM Daniel Vetter <daniel@ffwll.ch> wrote:
On Thu, Dec 3, 2020 at 9:18 AM Michel D= =C3=A4nzer <mich= el@daenzer.net> wrote:
>
> On 2020-12-02 8:47 p.m., James Park wrote:
> >
> > If we're trying to cut ties with the drm-uapi folder entirely= , the stuff
> > ac_surface.c need includes the AMD_FMT_MOD stuff in drm_fourcc.h,=
> > and AMDGPU_TILING_* under amdgpu_drm.h. Is there a better spot fo= r these
> > definitions?
>
> The Mesa src/amd/ code should use platform-neutral abstractions for > these. This wasn't deemed necessary before, because nobody was try= ing to
> build these drivers for non-UNIX OSes. But now you are.

I think that's a bit much busy work for not much gain. drm_fourcc.h is<= br> even included as the official source of truth of some khr extensions,
making that header stand-alone and useable cross-platform sounds like
a good idea to me. Something like the below is imo perfectly fine:

diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h<= br> index ca48ed0e6bc1..0a121b3efb58 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

+#ifndef DRM_FOURCC_STANDALONE_
+/* include the linux uapi types here */
+#else
#include "drm.h"
+#endif

#if defined(__cplusplus)
extern "C" {


Cheers, Daniel

>
>
> --
> Earthling Michel D=C3=A4nzer=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0https://redha= t.com
> Libre software enthusiast=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0|=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Mesa and X developer > _______________________________________________
> dri-devel mailing list
> d= ri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/l= istinfo/dri-devel



--
Daniel Vetter
Software Engineer, Intel Corporation
http:= //blog.ffwll.ch
--000000000000d4906d05b593e89f-- --===============1192418987== 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 --===============1192418987==--