Re: [PATCH libdrm] libdrm: enclose __FreeBSD__ behind a define
On Tue, 19 May 2020 12:04:58 -0700 Carlos Santa wrote: > Not doing the above can cause compilation errors on > platforms that don't define it. > > [1/25] Compiling C object 'drm@sha/xf86drm.c.o. > FAILED: drm@sha/xf86drm.c.o > ../xf86drm.c: In function 'drmGetMinorNameForFD': > ../xf86drm.c:2938:7: error: "__FreeBSD__" is not defined [-Werror=undef] > #elif __FreeBSD__ >^ > ../xf86drm.c: In function 'drmParsePciBusInfo': > ../xf86drm.c:3258:7 error: "__FreeBSD__" is not defined [-Werror=undef] > #elif __FreeBSD__ >^ > ../x86drm.c: In function 'drmParsePciDeviceInfo': > ../x86drm.c:3427:7 error: "__FreeBSD__" is not defined [-Werror=undef] > #elif __FreeBSD__ > > ../x86drm.c: In function 'drmGetDeviceNameFromFd2': > ../xf86drm.c:4305:7 error: "__FreeBSD__" is not defined [-Werror=undef] > #elif __FreeBSD__ >^ > cc1: some warnigns being treated as errors > ninja: build stopped: subcommand failed. > > Signed-off-by: Carlos Santa > --- > xf86drm.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/xf86drm.c b/xf86drm.c > index b49d42f70dbe..3965b4be366d 100644 > --- a/xf86drm.c > +++ b/xf86drm.c > @@ -2822,7 +2822,7 @@ static bool drmNodeIsDRM(int maj, int min) > snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm", > maj, min); > return stat(path, ) == 0; > -#elif __FreeBSD__ > +#elif defined(__FreeBSD__) > char name[SPECNAMELEN]; > > if (!devname_r(makedev(maj, min), S_IFCHR, name, sizeof(name))) > @@ -2935,7 +2935,7 @@ static char *drmGetMinorNameForFD(int fd, int type) > > closedir(sysdir); > return NULL; > -#elif __FreeBSD__ > +#elif defined(__FreeBSD__) > struct stat sbuf; > char dname[SPECNAMELEN]; > const char *mname; > @@ -3255,7 +3255,7 @@ static int drmParsePciBusInfo(int maj, int min, > drmPciBusInfoPtr info) > info->func = pinfo.func; > > return 0; > -#elif __FreeBSD__ > +#elif defined(__FreeBSD__) > return get_sysctl_pci_bus_info(maj, min, info); > #else > #warning "Missing implementation of drmParsePciBusInfo" > @@ -3424,7 +3424,7 @@ static int drmParsePciDeviceInfo(int maj, int min, > device->subdevice_id = pinfo.subdevice_id; > > return 0; > -#elif __FreeBSD__ > +#elif defined(__FreeBSD__) > drmPciBusInfo info; > struct pci_conf_io pc; > struct pci_match_conf patterns[1]; > @@ -4302,7 +4302,7 @@ drm_public char *drmGetDeviceNameFromFd2(int fd) > free(value); > > return strdup(path); > -#elif __FreeBSD__ > +#elif defined(__FreeBSD__) > return drmGetDeviceNameFromFd(fd); > #else > struct stat sbuf; > -- > 2.20.1 > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel Ouch, sorry. Reviewed-by: Emmanuel Vadot -- Emmanuel Vadot ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 2/2] drm/format_helper: Dual licence the header in GPL-2 and MIT
Source file was dual licenced but the header was omitted, fix that. Contributors for this file are: Noralf Trønnes Gerd Hoffmann Thomas Gleixner Acked-by: Gerd Hoffmann Acked-by: Noralf Trønnes Signed-off-by: Emmanuel Vadot --- Change in v2: Retain the GPL-2.0-or-later SPDF identifier. include/drm/drm_format_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h index ac220aa1a245..b8ddf473ef77 100644 --- a/include/drm/drm_format_helper.h +++ b/include/drm/drm_format_helper.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-License-Identifier: GPL-2.0-or-later or MIT */ /* * Copyright (C) 2016 Noralf Trønnes */ -- 2.25.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[RESEND 2/2] drm/format_helper: Dual licence the header in GPL-2 and MIT
Source file was dual licenced but the header was omitted, fix that. Contributors for this file are: Noralf Trønnes Gerd Hoffmann Thomas Gleixner Acked-by: Gerd Hoffmann Acked-by: Noralf Trønnes Signed-off-by: Emmanuel Vadot --- include/drm/drm_format_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h index ac220aa1a245..7c5d4ffb2af2 100644 --- a/include/drm/drm_format_helper.h +++ b/include/drm/drm_format_helper.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-License-Identifier: GPL-2.0 or MIT */ /* * Copyright (C) 2016 Noralf Trønnes */ -- 2.25.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[RESEND 1/2] drm/client: Dual licence the header in GPL-2 and MIT
Source file was dual licenced but the header was omitted, fix that. Contributors for this file are: Daniel Vetter Matt Roper Maxime Ripard Noralf Trønnes Thomas Zimmermann Acked-by: Noralf Trønnes Acked-by: Matt Roper Acked-by: Daniel Vetter Signed-off-by: Emmanuel Vadot --- include/drm/drm_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index 7402f852d3c4..eb259c2547af 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 or MIT */ #ifndef _DRM_CLIENT_H_ #define _DRM_CLIENT_H_ -- 2.25.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 1/2] drm/client: Dual licence the header in GPL-2 and MIT
Source file was dual licenced but the header was omitted, fix that. Contributors for this file are: Daniel Vetter Matt Roper Maxime Ripard Noralf Trønnes Thomas Zimmermann Acked-by: Noralf Trønnes Acked-by: Matt Roper Acked-by: Daniel Vetter Acked-by: Maxime Ripard Acked-by: Thomas Zimmermann Signed-off-by: Emmanuel Vadot --- include/drm/drm_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index 7402f852d3c4..eb259c2547af 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 or MIT */ #ifndef _DRM_CLIENT_H_ #define _DRM_CLIENT_H_ -- 2.25.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RESEND 2/2] drm/format_helper: Dual licence the header in GPL-2 and MIT
On Thu, 30 Apr 2020 17:06:34 +0200 Maxime Ripard wrote: > On Thu, Apr 30, 2020 at 04:55:37PM +0200, Emmanuel Vadot wrote: > > Source file was dual licenced but the header was omitted, fix that. > > Contributors for this file are: > > Noralf Trønnes > > Gerd Hoffmann > > Thomas Gleixner > > > > Acked-by: Gerd Hoffmann > > Acked-by: Noralf Trønnes > > Signed-off-by: Emmanuel Vadot > > --- > > include/drm/drm_format_helper.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/drm/drm_format_helper.h > > b/include/drm/drm_format_helper.h > > index ac220aa1a245..7c5d4ffb2af2 100644 > > --- a/include/drm/drm_format_helper.h > > +++ b/include/drm/drm_format_helper.h > > @@ -1,4 +1,4 @@ > > -/* SPDX-License-Identifier: GPL-2.0-or-later */ > > +/* SPDX-License-Identifier: GPL-2.0 or MIT */ > > You changed the GPL license there, was that intentional? > > Maxime No sorry, fixed in v2. Thanks for noticing that. -- Emmanuel Vadot ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 1/2] drm/client: Dual licence the header in GPL-2 and MIT
Source file was dual licenced but the header was omitted, fix that. Contributors for this file are: Daniel Vetter Matt Roper Maxime Ripard Noralf Trønnes Thomas Zimmermann Signed-off-by: Emmanuel Vadot --- include/drm/drm_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h index 3ed5dee899fd..94c9c72c206d 100644 --- a/include/drm/drm_client.h +++ b/include/drm/drm_client.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 or MIT */ #ifndef _DRM_CLIENT_H_ #define _DRM_CLIENT_H_ -- 2.25.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 2/2] drm/format_helper: Dual licence the header in GPL-2 and MIT
Source file was dual licenced but the header was omitted, fix that. Contributors for this file are: Noralf Trønnes Gerd Hoffmann Thomas Gleixner Signed-off-by: Emmanuel Vadot --- include/drm/drm_format_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h index ac220aa1a245..7c5d4ffb2af2 100644 --- a/include/drm/drm_format_helper.h +++ b/include/drm/drm_format_helper.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-License-Identifier: GPL-2.0 or MIT */ /* * Copyright (C) 2016 Noralf Trønnes */ -- 2.25.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 1/2] drm/client: Dual licence the file in GPL-2 and MIT
On Mon, 24 Feb 2020 11:40:38 + Chris Wilson wrote: > Quoting Jani Nikula (2020-02-15 18:33:09) > > On Sat, 15 Feb 2020, Emmanuel Vadot wrote: > > > From: Emmanuel Vadot > > > > > > Contributors for this file are : > > > Chris Wilson > > > Denis Efremov > > > Jani Nikula > > > Maxime Ripard > > > Noralf Trønnes > > > Sam Ravnborg > > > Thomas Zimmermann > > > > > > Signed-off-by: Emmanuel Vadot > > > > I've only converted some logging. > > > > Acked-by: Jani Nikula > > Bonus ack from another Intel employee to cover all Intel copyright in > this file, > Acked-by: Chris Wilson > -Chris Thanks Chris, Daniel, if I'm counting right this was the last ack needed. -- Emmanuel Vadot ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 1/2] drm/client: Dual licence the file in GPL-2 and MIT
From: Emmanuel Vadot Contributors for this file are : Chris Wilson Denis Efremov Jani Nikula Maxime Ripard Noralf Trønnes Sam Ravnborg Thomas Zimmermann Signed-off-by: Emmanuel Vadot --- drivers/gpu/drm/drm_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index b031b45aa8ef..6b0c6ef8b9b3 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0 or MIT /* * Copyright 2018 Noralf Trønnes */ -- 2.25.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 0/2] Dual licence some files in GPL-2.0 and MIT
Hello all, We had a discussion a while back with Noralf where he said that he wouldn't mind dual licence his work under GPL-2 and MIT. Those files are a problem with BSDs as we cannot include them. For drm_client.c the main contributors are Noralf Trønnes and Thomas Zimmermann, the other commits are just catch ups from changes elsewhere (return values, struct member names, function renames etc ...). For drm_format_helper the main contributors are Noralf Trønnes and Gerd Hoffmann. Same comment as for drm_client.c for the other commits. Emmanuel Vadot (2): drm/client: Dual licence the file in GPL-2 and MIT drm/format_helper: Dual licence the file in GPL 2 and MIT drivers/gpu/drm/drm_client.c| 2 +- drivers/gpu/drm/drm_format_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.25.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v2 2/2] drm/format_helper: Dual licence the file in GPL 2 and MIT
From: Emmanuel Vadot Contributors for this file are : Gerd Hoffmann Maxime Ripard Noralf Trønnes Signed-off-by: Emmanuel Vadot --- drivers/gpu/drm/drm_format_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_format_helper.c b/drivers/gpu/drm/drm_format_helper.c index 0897cb9aeaff..3b818f2b2392 100644 --- a/drivers/gpu/drm/drm_format_helper.c +++ b/drivers/gpu/drm/drm_format_helper.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +// SPDX-License-Identifier: GPL-2.0 or MIT /* * Copyright (C) 2016 Noralf Trønnes * -- 2.25.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 1/2] drm/client: Dual licence the file in GPL-2 and MIT
From: Emmanuel Vadot Change the licence to a dual one with MIT so BSDs could use this file. Signed-off-by: Emmanuel Vadot --- drivers/gpu/drm/drm_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index b031b45aa8ef..6b0c6ef8b9b3 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0 or MIT /* * Copyright 2018 Noralf Trønnes */ -- 2.25.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 2/2] drm/format_helper: Dual licence the file in GPL 2 and MIT
From: Emmanuel Vadot Change the licence to a dual one with MIT so BSDs could use this file. Signed-off-by: Emmanuel Vadot --- drivers/gpu/drm/drm_format_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_format_helper.c b/drivers/gpu/drm/drm_format_helper.c index 0897cb9aeaff..3b818f2b2392 100644 --- a/drivers/gpu/drm/drm_format_helper.c +++ b/drivers/gpu/drm/drm_format_helper.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +// SPDX-License-Identifier: GPL-2.0 or MIT /* * Copyright (C) 2016 Noralf Trønnes * -- 2.25.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 0/2] Dual licence some files in GPL-2.0 and MIT
Hello all, We had a discussion a while back with Noralf where he said that he wouldn't mind dual licence his work under GPL-2 and MIT. Those files are a problem with BSDs as we cannot include them. For drm_client.c the main contributors are Noralf Trønnes and Thomas Zimmermann, the other commits are just catch ups from changes elsewhere (return values, struct member names, function renames etc ...). For drm_format_helper the main contributors are Noralf Trønnes and Gerd Hoffmann. Same comment as for drm_client.c for the other commits. Emmanuel Vadot (2): drm/client: Dual licence the file in GPL-2 and MIT drm/format_helper: Dual licence the file in GPL 2 and MIT drivers/gpu/drm/drm_client.c| 2 +- drivers/gpu/drm/drm_format_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.25.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: drm core/helpers and MIT license
rivers that we have don't need them for now (writeback, hdcp etc ...) To finish this mail, I'd like to say that I would love to contribute to DRM and some drivers (lima/panfrost mostly) but for now I need to keep in sync with Linux and finish my work so I can commit it into the FreeBSD kernel. Knowing that future updates will be easier for me because of a licence issue would be great to know otherwise I think that all the available time that I have for DRM on FreeBSD will be 100% rewritting compatibility layers. Cheers, -- Emmanuel Vadot ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: drm core/helpers and MIT license
On Fri, 15 Nov 2019 15:33:46 +0100 Noralf Trønnes wrote: > > > Den 15.11.2019 13.34, skrev Ville Syrjälä: > > On Thu, Nov 14, 2019 at 08:01:32PM +, co...@sdf.org wrote: > >> Hi Daniel, > >> > >> I don't think we can make any complaints about GPL being more widely > >> used in the DRM code. It's nice to have the code at all, the MIT license > >> is a bonus. Thanks for writing it and bearing with us. > >> > >> Would rewrites done purely for licensing reasons be accepted upstream? > > > > Rewrite should be the last resort. I think a lot of the GPL only stuff > > is quite recent so there's a good chance the author(s) are still around > > to discuss relicensing. > > > > If someone sends patches to MIT license the work I've done, I'll be > happy to ack it. It's only recently that I've been aware of the fact > that MIT licensed was a thing in the kernel. I was under the impression > that all new code should be GPL and MIT were for code imported from > elsewhere. I would love to see my work being used on the BSD's. And I would love to be able to use your work on FreeBSD :) I don't really know the rules but shouldn't you send a patch to relicence ? Right now for me drm_client (and others) being GPL is a problem for my update of DRM in FreeBSD so I'm not using it (which is bad and will probably cause problems). > Noralf. > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Emmanuel Vadot ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/fb-helper: Move out commit code
On Wed, 27 Mar 2019 16:01:01 +0100 Noralf Trønnes wrote: > > > Den 27.03.2019 15.13, skrev Emmanuel Vadot: > > > > Hi Noralf, > > > > On Tue, 26 Mar 2019 18:55:39 +0100 > > Noralf Trønnes wrote: > > > >> Move the modeset commit code to drm_client. > >> No changes except exporting API. > >> > >> Signed-off-by: Noralf Trønnes > >> --- > >> drivers/gpu/drm/drm_client.c| 236 > >> drivers/gpu/drm/drm_fb_helper.c | 232 --- > >> include/drm/drm_client.h| 3 + > >> 3 files changed, 239 insertions(+), 232 deletions(-) > >> > > > > It looks like you are moving MIT licenced code to a GPL-only > > licenced file. > > > > I had planned to copy over the copyrights, but forgot. Didn't know it > was MIT though. I think I'll just copy over the whole copyrights section > from drm_fb_helper to drm_client and drop GPL. I wrote the whole of > drm_client so that should be fine. That would be awesome if you relicence drm_client. Thanks, > Thanks, > Noralf > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Emmanuel Vadot ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/fb-helper: Move out commit code
Hi Noralf, On Tue, 26 Mar 2019 18:55:39 +0100 Noralf Trønnes wrote: > Move the modeset commit code to drm_client. > No changes except exporting API. > > Signed-off-by: Noralf Trønnes > --- > drivers/gpu/drm/drm_client.c| 236 > drivers/gpu/drm/drm_fb_helper.c | 232 --- > include/drm/drm_client.h| 3 + > 3 files changed, 239 insertions(+), 232 deletions(-) > It looks like you are moving MIT licenced code to a GPL-only licenced file. Cheers, -- Emmanuel Vadot ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel