Skip to contentSkip to conversation

drm/shmem: Dual licence the files as GPL-2 and MIT

PATCH In review Robert Swindells 11 participants 12 messages Nov 13, 2022 – Nov 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover drm/shmem: Dual licence the files as GPL-2 and MIT

There was some earlier discussion on dual licencing as GPL-2 and MIT some files that were previously just GPL-2:

<https://lore.kernel.org/dri-devel/CAKMK7uH-8+tbKsAoiChsxELEc_77RVVxP2wapHWhqB+0Viifog@mail.gmail.com/>

Would it be possible to dual licence two more of the files?

drivers/gpu/drm/drm_gem_shmem_helper.c
include/drm/drm_gem_shmem_helper.h

They are used by the lima driver, which is dual licenced.

Robert Swindells
[email protected]

Robert Swindells (1):
drm/shmem: Dual licence the files as GPL-2 and MIT

 drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
 include/drm/drm_gem_shmem_helper.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.38.0
#1 lore raw

PATCH 1/1 drm/shmem: Dual licence the files as GPL-2 and MIT

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>
Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>
Boris Brezillon <[email protected]>
Dan Carpenter <[email protected]>

---
 drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
 include/drm/drm_gem_shmem_helper.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_gem_shmem_helper.c +1 -1
index 35138f8a375c..f1a68a71f876 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0 or MIT
 /*
  * Copyright 2018 Noralf Trønnes
  */
include/drm/drm_gem_shmem_helper.h +1 -1
index a2201b2488c5..56ac32947d1c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 or MIT */
 
 #ifndef __DRM_GEM_SHMEM_HELPER_H__
 #define __DRM_GEM_SHMEM_HELPER_H__
Signature · 1 line
2.38.0
Acked-by on v1 1/1
#2 lore raw
Quoted 21 lines · On Sat, 12 Nov 2022 19:42:10 +0000 Robert Swindells wrote:

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>
Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>
Boris Brezillon <[email protected]>
Dan Carpenter <[email protected]>

Quoted 1 line

For the one-line #include addition I've contributed:

:)

Acked-by on v1 1/1
#3 lore raw
In reply to Robert Swindells

Den 12.11.2022 20.42, skrev Robert Swindells:

Quoted 3 lines

Contributors to these files are:

Noralf Trønnes <[email protected]>

Quoted 44 lines

Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>
Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>
Boris Brezillon <[email protected]>
Dan Carpenter <[email protected]>

---
 drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
 include/drm/drm_gem_shmem_helper.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_gem_shmem_helper.c +1 -1
index 35138f8a375c..f1a68a71f876 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0 or MIT
 /*
  * Copyright 2018 Noralf Trønnes
  */
include/drm/drm_gem_shmem_helper.h +1 -1
index a2201b2488c5..56ac32947d1c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 or MIT */
 
 #ifndef __DRM_GEM_SHMEM_HELPER_H__
 #define __DRM_GEM_SHMEM_HELPER_H__
Acked-by on v1 1/1
#4 lore raw
In reply to Robert Swindells
Quoted 11 lines · On Sat, 12 Nov 2022 19:42:10 +0000 Robert Swindells <[email protected]> wrote:

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>

Quoted 8 lines

Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>
Boris Brezillon <[email protected]>

Quoted 28 lines

Dan Carpenter <[email protected]>

---
 drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
 include/drm/drm_gem_shmem_helper.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_gem_shmem_helper.c +1 -1
index 35138f8a375c..f1a68a71f876 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0 or MIT
 /*
  * Copyright 2018 Noralf Trønnes
  */
include/drm/drm_gem_shmem_helper.h +1 -1
index a2201b2488c5..56ac32947d1c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 or MIT */
 
 #ifndef __DRM_GEM_SHMEM_HELPER_H__
 #define __DRM_GEM_SHMEM_HELPER_H__
#5 lore raw
In reply to Robert Swindells
Quoted 10 lines · Robert Swindells

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>

My contributions are related to the madvise functions. That's largely lifted or inspired from the MSM code which is GPL only. That in turn looks inspired from i915 which is MIT (though not much more than the comment):

$ git grep 'Our goal here is to return as much of the memory'
drivers/gpu/drm/drm_gem_shmem_helper.c: /* Our goal here is to return
as much of the memory as
drivers/gpu/drm/i915/gem/i915_gem_shmem.c:       * Our goal here is to
return as much of the memory as
drivers/gpu/drm/msm/msm_gem.c:  /* Our goal here is to return as much
of the memory as

I imagine this is not the only example in this file. In fact, looking at the introduction of this file, it looks like it originated from V3D code as that was the first driver to convert over. V3D is licensed GPL2+. Of course, its code was not written in a vacuum either and came from ???

This to me is a problem with the dual licensing in DRM drivers. Code moves around with little attention paid at the time to licensing. I wouldn't trust anything claiming MIT license is not GPL 'contaminated'.

OTOH, there's really only one way for the madvise code to work, so maybe not a copyrightable work on its own.

Rob

Acked-by on v1 1/1
#6 lore raw
In reply to Robert Swindells
Quoted 18 lines · Robert Swindells

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>
Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>

maintainer Acked-by on v1 1/1
#9 lore raw
In reply to Robert Swindells

Hi

Am 12.11.22 um 20:42 schrieb Robert Swindells:

Quoted 21 lines

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>
Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>
Boris Brezillon <[email protected]>
Dan Carpenter <[email protected]>

Quoted 4 lines
---
  drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
  include/drm/drm_gem_shmem_helper.h     | 2 +-

You're welcome to dual-license my contributions to these files under GPL-2.0 and MIT.

drivers/gpu/drm/drm_gem_shmem_helper.c line 1

Quoted 9 lines
  2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_gem_shmem_helper.c +1 -1
index 35138f8a375c..f1a68a71f876 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0 or MIT

IDK for sure, but I think 'or' should be written in capital letters by common convention. [1]

include/drm/drm_gem_shmem_helper.h line 1

Quoted 10 lines
drivers/gpu/drm/drm_gem_shmem_helper.c +0 -0
  /*
   * Copyright 2018 Noralf Trønnes
   */
include/drm/drm_gem_shmem_helper.h +1 -1
index a2201b2488c5..56ac32947d1c 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0 or MIT */

OR

Best regards
Thomas

[1] https://github.com/david-a-wheeler/spdx-tutorial#spdx-tutorial

Quoted 3 lines
include/drm/drm_gem_shmem_helper.h +0 -0
  #ifndef __DRM_GEM_SHMEM_HELPER_H__
  #define __DRM_GEM_SHMEM_HELPER_H__
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
Acked-by on v1 1/1
#10 lore raw
In reply to Robert Swindells
Quoted 21 lines · Robert Swindells

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>
Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>
Boris Brezillon <[email protected]>
Dan Carpenter <[email protected]>

Quoted 6 lines
---
 drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +-
 include/drm/drm_gem_shmem_helper.h     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

As far as my changes are concerned, this patch is:

HTH
Emil

Acked-by on v1 1/1
#11 lore raw
In reply to Robert Swindells
Quoted 21 lines · Robert Swindells

Contributors to these files are:

Noralf Trønnes <[email protected]>
Liu Zixian <[email protected]>
Dave Airlie <[email protected]>
Thomas Zimmermann <[email protected]>
Lucas De Marchi <[email protected]>
Gerd Hoffmann <[email protected]>
Rob Herring <[email protected]>
Jakub Kicinski <[email protected]>
Marcel Ziswiler <[email protected]>
Stephen Rothwell <[email protected]>
Daniel Vetter <[email protected]>
Cai Huoqing <[email protected]>
Neil Roberts <[email protected]>
Marek Szyprowski <[email protected]>
Emil Velikov <[email protected]>
Sam Ravnborg <[email protected]>
Boris Brezillon <[email protected]>
Dan Carpenter <[email protected]>

Quoted 1 line

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland