FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

v5.0 does ont build after "__deprecated" removal in 13-CURRENT #198

Closed evilham closed 4 years ago

evilham commented 4 years ago

Hello, I decided to take a look into this since the timeout thing got removed form the kernel in 13-CURRENT; saw that it was being worked on and indeed there is 19f227f826fb730db0020c0024a1bb5d978d0749 talking about this.

However, when trying to build it, it failed with a reference to a line including __deprecated. Searching in the codebase I found just two instances:

linuxkpi/gplv2/include/linux/i2c.h
180:    int (*attach_adapter)(struct i2c_adapter *) __deprecated;

drivers/gpu/drm/i915/i915_gem_object.h
330:__deprecated

By removing the __deprecated text on both files (both were needed), the port builds correctly in poudriere and works correctly with the latest 13-CURRENT kernel.

I hope this is useful, but since I don't actually know what the __deprecated text is supposed to do, don't feel confident enough to propose a patch.

Thank you!

evilham commented 4 years ago

Just in case this is of interest:

> cd graphics/drm-devel-kmod

> svn diff .
Index: Makefile
===================================================================
--- Makefile    (revision 520178)
+++ Makefile    (working copy)
@@ -2,7 +2,7 @@
 # $FreeBSD$

 PORTNAME=  drm-devel-kmod
-PORTVERSION=   5.0.g20191120
+PORTVERSION=   5.0.g20191214
 CATEGORIES=    graphics kld

 MAINTAINER=    x11@FreeBSD.org
@@ -28,7 +28,7 @@
 USE_GITHUB=    yes
 GH_ACCOUNT=    FreeBSDDesktop
 GH_PROJECT=    kms-drm
-GH_TAGNAME=    a51a918
+GH_TAGNAME=    19f227f

 .include <bsd.port.options.mk>

Index: distinfo
===================================================================
--- distinfo    (revision 520178)
+++ distinfo    (working copy)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1574247920
-SHA256 (FreeBSDDesktop-kms-drm-5.0.g20191120-a51a918_GH0.tar.gz) = f3aad4dea75e421c7b00ab9c3c6f8a09af733faa8843045be8650a489d6bb356
-SIZE (FreeBSDDesktop-kms-drm-5.0.g20191120-a51a918_GH0.tar.gz) = 14635788
+TIMESTAMP = 1576414130
+SHA256 (FreeBSDDesktop-kms-drm-5.0.g20191214-19f227f_GH0.tar.gz) = 1891721a876e9956cca36b1f0f284de3d55d876067d74cc4dbd5a1be8d02248b
+SIZE (FreeBSDDesktop-kms-drm-5.0.g20191214-19f227f_GH0.tar.gz) = 14636036

> shar (find files -print)
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#   files
#   files/patch-linuxkpi_gplv2_include_linux_i2c.h
#   files/patch-drivers_gpu_drm_i915_i915__gem__object.h
#
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/patch-linuxkpi_gplv2_include_linux_i2c.h
sed 's/^X//' >files/patch-linuxkpi_gplv2_include_linux_i2c.h << '469603812dd3fe992f9a98946bad42ba'
X--- linuxkpi/gplv2/include/linux/i2c.h.orig    2019-12-14 05:32:42 UTC
X+++ linuxkpi/gplv2/include/linux/i2c.h
X@@ -177,7 +177,7 @@ struct i2c_driver {
X   /* Notifies the driver that a new bus has appeared. You should avoid
X    * using this, it will be removed in a near future.
X    */
X-  int (*attach_adapter)(struct i2c_adapter *) __deprecated;
X+  int (*attach_adapter)(struct i2c_adapter *);
X 
X   /* Standard driver model interfaces */
X   int (*probe)(struct i2c_client *, const struct i2c_device_id *);
469603812dd3fe992f9a98946bad42ba
echo x - files/patch-drivers_gpu_drm_i915_i915__gem__object.h
sed 's/^X//' >files/patch-drivers_gpu_drm_i915_i915__gem__object.h << 'b73f66ca3c7fb48e3a0fb27a244455d3'
X--- drivers/gpu/drm/i915/i915_gem_object.h.orig    2019-12-15 13:06:56 UTC
X+++ drivers/gpu/drm/i915/i915_gem_object.h
X@@ -327,7 +327,6 @@ i915_gem_object_lookup(struct drm_file *file, u32 hand
X   return obj;
X }
X 
X-__deprecated
X extern struct drm_gem_object *
X drm_gem_object_lookup(struct drm_file *file, u32 handle);
X 
b73f66ca3c7fb48e3a0fb27a244455d3
exit
valpackett commented 4 years ago

https://github.com/freebsd/freebsd/commit/039992743e2c116f2bb7f98f3d0e63de527fb714

evilham commented 4 years ago

Closed by: https://github.com/freebsd/freebsd/commit/5b3e917aa9bd77a7b6e81eff6478393f82ee6034 For completeness' sake, this also fixes it in kms-drm's code: https://github.com/FreeBSDDesktop/kms-drm/commit/ee53eaeee63ee10ff0f79325387fc101e213062e