* [PATCH 00/22] drm: fix headers, add header test facility
@ 2024-03-06 18:31 Jani Nikula
2024-03-06 18:31 ` [PATCH 01/22] drm/crtc: make drm_crtc_internal.h self-contained Jani Nikula
` (23 more replies)
0 siblings, 24 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel
Cc: intel-gfx, intel-xe, jani.nikula, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Masahiro Yamada
First, fix a bunch of issues in drm headers, uncovered with the last
patch. A few kernel-doc warnings are just brushed under the carpet for
now, with a FIXME comment. Otherwise, pretty straightforward stuff.
Second, add a header test facility to catch issues at build time when
CONFIG_DRM_HEADER_TEST=y. This is the last patch, and I think needs
Masahiro's ack.
BR,
Jani.
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Jani Nikula (22):
drm/crtc: make drm_crtc_internal.h self-contained
drm: add missing header guards to drm_internal.h
drm/kunit: fix drm_kunit_helpers.h kernel-doc
drm/amdgpu: make amd_asic_type.h self-contained
drm: bridge: samsung-dsim: make samsung-dsim.h self-contained
drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc
drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc
drm/encoder: silence drm_encoder_slave.h kernel-doc
drm: fix drm_format_helper.h kernel-doc warnings
drm/lease: make drm_lease.h self-contained
drm: fix drm_gem_vram_helper.h kernel-doc
drm/of: make drm_of.h self-contained
drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings
drm/suballoc: fix drm_suballoc.h kernel-doc
drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc
drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings
drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
drm/ttm: fix ttm_bo.h kernel-doc warnings
drm/ttm: make ttm_caching.h self-contained
drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings
drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings
drm: ensure drm headers are self-contained and pass kernel-doc
Kbuild | 1 +
drivers/gpu/drm/Kconfig | 11 +++++++++++
drivers/gpu/drm/Makefile | 18 ++++++++++++++++++
drivers/gpu/drm/drm_crtc_internal.h | 1 +
drivers/gpu/drm/drm_internal.h | 5 +++++
include/Kbuild | 1 +
include/drm/Makefile | 18 ++++++++++++++++++
include/drm/amd_asic_type.h | 3 +++
include/drm/bridge/samsung-dsim.h | 4 +++-
include/drm/display/drm_dp_mst_helper.h | 1 -
include/drm/drm_debugfs_crc.h | 8 +++++++-
include/drm/drm_encoder_slave.h | 3 +++
include/drm/drm_format_helper.h | 1 +
include/drm/drm_gem_vram_helper.h | 1 -
include/drm/drm_kunit_helpers.h | 2 +-
include/drm/drm_lease.h | 2 ++
include/drm/drm_of.h | 1 +
include/drm/drm_suballoc.h | 2 +-
include/drm/i2c/ch7006.h | 1 +
include/drm/i2c/sil164.h | 1 +
include/drm/i915_gsc_proxy_mei_interface.h | 4 ++--
include/drm/i915_hdcp_interface.h | 18 +++++++++++++-----
include/drm/i915_pxp_tee_interface.h | 19 ++++++++++++-------
include/drm/ttm/ttm_bo.h | 18 ++++++++++++------
include/drm/ttm/ttm_caching.h | 2 ++
include/drm/ttm/ttm_execbuf_util.h | 7 +++----
include/drm/ttm/ttm_kmap_iter.h | 4 ++--
27 files changed, 125 insertions(+), 32 deletions(-)
create mode 100644 include/Kbuild
create mode 100644 include/drm/Makefile
--
2.39.2
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH 01/22] drm/crtc: make drm_crtc_internal.h self-contained
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-07 8:34 ` [PATCH v2] " Jani Nikula
2024-03-06 18:31 ` [PATCH 02/22] drm: add missing header guards to drm_internal.h Jani Nikula
` (22 subsequent siblings)
23 siblings, 1 reply; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Forward declare struct drm_printer.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_crtc_internal.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
index a514d5207e41..72c26f996b3b 100644
--- a/drivers/gpu/drm/drm_crtc_internal.h
+++ b/drivers/gpu/drm/drm_crtc_internal.h
@@ -54,6 +54,7 @@ struct drm_mode_object;
struct drm_mode_set;
struct drm_plane;
struct drm_plane_state;
+struct drm_printer;
struct drm_property;
struct edid;
struct fwnode_handle;
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 02/22] drm: add missing header guards to drm_internal.h
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
2024-03-06 18:31 ` [PATCH 01/22] drm/crtc: make drm_crtc_internal.h self-contained Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 03/22] drm/kunit: fix drm_kunit_helpers.h kernel-doc Jani Nikula
` (21 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Including the file twice leads to errors.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_internal.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index 8e4faf0a28e6..d69744c9ac15 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -21,6 +21,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifndef __DRM_INTERNAL_H__
+#define __DRM_INTERNAL_H__
+
#include <linux/kthread.h>
#include <linux/types.h>
@@ -276,3 +279,5 @@ void drm_framebuffer_debugfs_init(struct drm_device *dev);
/* drm_edid.c */
void drm_edid_cta_sad_get(const struct cea_sad *cta_sad, u8 *sad);
void drm_edid_cta_sad_set(struct cea_sad *cta_sad, const u8 *sad);
+
+#endif /* __DRM_INTERNAL_H__ */
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 03/22] drm/kunit: fix drm_kunit_helpers.h kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
2024-03-06 18:31 ` [PATCH 01/22] drm/crtc: make drm_crtc_internal.h self-contained Jani Nikula
2024-03-06 18:31 ` [PATCH 02/22] drm: add missing header guards to drm_internal.h Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained Jani Nikula
` (20 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
s/_features/_feat/ to match code.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_kunit_helpers.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_kunit_helpers.h b/include/drm/drm_kunit_helpers.h
index 6e99627edf45..e7cc17ee4934 100644
--- a/include/drm/drm_kunit_helpers.h
+++ b/include/drm/drm_kunit_helpers.h
@@ -75,7 +75,7 @@ __drm_kunit_helper_alloc_drm_device(struct kunit *test,
* @_dev: The parent device object
* @_type: the type of the struct which contains struct &drm_device
* @_member: the name of the &drm_device within @_type.
- * @_features: Mocked DRM device driver features
+ * @_feat: Mocked DRM device driver features
*
* This function creates a struct &drm_driver and will create a struct
* &drm_device from @_dev and that driver.
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (2 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 03/22] drm/kunit: fix drm_kunit_helpers.h kernel-doc Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-07 14:36 ` Alex Deucher
2024-03-06 18:31 ` [PATCH 05/22] drm: bridge: samsung-dsim: make samsung-dsim.h self-contained Jani Nikula
` (19 subsequent siblings)
23 siblings, 1 reply; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Include <linux/types.h> for u8.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/amd_asic_type.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/drm/amd_asic_type.h b/include/drm/amd_asic_type.h
index 724c45e3e9a7..9be85b821aa6 100644
--- a/include/drm/amd_asic_type.h
+++ b/include/drm/amd_asic_type.h
@@ -22,6 +22,9 @@
#ifndef __AMD_ASIC_TYPE_H__
#define __AMD_ASIC_TYPE_H__
+
+#include <linux/types.h>
+
/*
* Supported ASIC types
*/
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 05/22] drm: bridge: samsung-dsim: make samsung-dsim.h self-contained
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (3 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 06/22] drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc Jani Nikula
` (18 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Include <drm/drm_bridge.h> and forward declare struct platform device.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/bridge/samsung-dsim.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/drm/bridge/samsung-dsim.h b/include/drm/bridge/samsung-dsim.h
index e0c105051246..9764d6eb5beb 100644
--- a/include/drm/bridge/samsung-dsim.h
+++ b/include/drm/bridge/samsung-dsim.h
@@ -11,9 +11,11 @@
#include <linux/regulator/consumer.h>
#include <drm/drm_atomic_helper.h>
-#include <drm/drm_of.h>
+#include <drm/drm_bridge.h>
#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_of.h>
+struct platform_device;
struct samsung_dsim;
#define DSIM_STATE_ENABLED BIT(0)
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 06/22] drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (4 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 05/22] drm: bridge: samsung-dsim: make samsung-dsim.h self-contained Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 07/22] drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc Jani Nikula
` (17 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Drop excess vcpi member documentation.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/display/drm_dp_mst_helper.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/drm/display/drm_dp_mst_helper.h b/include/drm/display/drm_dp_mst_helper.h
index 9b19d8bd520a..3ae88a383a41 100644
--- a/include/drm/display/drm_dp_mst_helper.h
+++ b/include/drm/display/drm_dp_mst_helper.h
@@ -83,7 +83,6 @@ struct drm_dp_mst_branch;
* @passthrough_aux: parent aux to which DSC pass-through requests should be
* sent, only set if DSC pass-through is possible.
* @parent: branch device parent of this port
- * @vcpi: Virtual Channel Payload info for this port.
* @connector: DRM connector this port is connected to. Protected by
* &drm_dp_mst_topology_mgr.base.lock.
* @mgr: topology manager this port lives under.
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 07/22] drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (5 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 06/22] drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 08/22] drm/encoder: silence drm_encoder_slave.h kernel-doc Jani Nikula
` (16 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Add a number of require includes and forward declare struct
drm_crtc. s/crc/crcs/ kernel-doc to match code.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_debugfs_crc.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/drm/drm_debugfs_crc.h b/include/drm/drm_debugfs_crc.h
index b225eeb30d05..1b4c98c2f838 100644
--- a/include/drm/drm_debugfs_crc.h
+++ b/include/drm/drm_debugfs_crc.h
@@ -22,13 +22,19 @@
#ifndef __DRM_DEBUGFS_CRC_H__
#define __DRM_DEBUGFS_CRC_H__
+#include <linux/spinlock_types.h>
+#include <linux/types.h>
+#include <linux/wait.h>
+
+struct drm_crtc;
+
#define DRM_MAX_CRC_NR 10
/**
* struct drm_crtc_crc_entry - entry describing a frame's content
* @has_frame_counter: whether the source was able to provide a frame number
* @frame: number of the frame this CRC is about, if @has_frame_counter is true
- * @crc: array of values that characterize the frame
+ * @crcs: array of values that characterize the frame
*/
struct drm_crtc_crc_entry {
bool has_frame_counter;
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 08/22] drm/encoder: silence drm_encoder_slave.h kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (6 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 07/22] drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 09/22] drm: fix drm_format_helper.h kernel-doc warnings Jani Nikula
` (15 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Mark some parts private to silence kernel-doc warnings, and add FIXME.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_encoder_slave.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/drm/drm_encoder_slave.h b/include/drm/drm_encoder_slave.h
index 7214101fd731..7f0ee97bb3a5 100644
--- a/include/drm/drm_encoder_slave.h
+++ b/include/drm/drm_encoder_slave.h
@@ -51,6 +51,7 @@ struct drm_encoder_slave_funcs {
void (*set_config)(struct drm_encoder *encoder,
void *params);
+ /* private: FIXME: document the hooks */
void (*destroy)(struct drm_encoder *encoder);
void (*dpms)(struct drm_encoder *encoder, int mode);
void (*save)(struct drm_encoder *encoder);
@@ -120,6 +121,7 @@ int drm_i2c_encoder_init(struct drm_device *dev,
* @slave_priv members of @encoder.
*/
struct drm_i2c_encoder_driver {
+ /* private: FIXME: document the members */
struct i2c_driver i2c_driver;
int (*encoder_init)(struct i2c_client *client,
@@ -133,6 +135,7 @@ struct drm_i2c_encoder_driver {
/**
* drm_i2c_encoder_get_client - Get the I2C client corresponding to an encoder
+ * @encoder: The encoder
*/
static inline struct i2c_client *drm_i2c_encoder_get_client(struct drm_encoder *encoder)
{
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 09/22] drm: fix drm_format_helper.h kernel-doc warnings
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (7 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 08/22] drm/encoder: silence drm_encoder_slave.h kernel-doc Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 10/22] drm/lease: make drm_lease.h self-contained Jani Nikula
` (14 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
As the documentation says, all the fields are considered private. Mark
them private also for kernel-doc to silence warnings.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_format_helper.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h
index f13b34e0b752..428d81afe215 100644
--- a/include/drm/drm_format_helper.h
+++ b/include/drm/drm_format_helper.h
@@ -25,6 +25,7 @@ struct iosys_map;
* All fields are considered private.
*/
struct drm_format_conv_state {
+ /* private: */
struct {
void *mem;
size_t size;
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 10/22] drm/lease: make drm_lease.h self-contained
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (8 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 09/22] drm: fix drm_format_helper.h kernel-doc warnings Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 11/22] drm: fix drm_gem_vram_helper.h kernel-doc Jani Nikula
` (13 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Include <linux/types.h> for types used.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_lease.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/drm/drm_lease.h b/include/drm/drm_lease.h
index 5c9ef6a2aeae..53545b4ca9ef 100644
--- a/include/drm/drm_lease.h
+++ b/include/drm/drm_lease.h
@@ -6,6 +6,8 @@
#ifndef _DRM_LEASE_H_
#define _DRM_LEASE_H_
+#include <linux/types.h>
+
struct drm_file;
struct drm_device;
struct drm_master;
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 11/22] drm: fix drm_gem_vram_helper.h kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (9 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 10/22] drm/lease: make drm_lease.h self-contained Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 12/22] drm/of: make drm_of.h self-contained Jani Nikula
` (12 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Remove excess funcs kernel-doc.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_gem_vram_helper.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h
index e18429f09e53..c89c9bafeb44 100644
--- a/include/drm/drm_gem_vram_helper.h
+++ b/include/drm/drm_gem_vram_helper.h
@@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cleanup_fb(
* @vram_base: Base address of the managed video memory
* @vram_size: Size of the managed video memory in bytes
* @bdev: The TTM BO device.
- * @funcs: TTM BO functions
*
* The fields &struct drm_vram_mm.vram_base and
* &struct drm_vram_mm.vrm_size are managed by VRAM MM, but are
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 12/22] drm/of: make drm_of.h self-contained
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (10 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 11/22] drm: fix drm_gem_vram_helper.h kernel-doc Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 13/22] drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings Jani Nikula
` (11 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Include <linux/err.h> for ERR_PTR.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_of.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index 082a6e980d01..02d1cdd7f798 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -2,6 +2,7 @@
#ifndef __DRM_OF_H__
#define __DRM_OF_H__
+#include <linux/err.h>
#include <linux/of_graph.h>
#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE)
#include <drm/drm_bridge.h>
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 13/22] drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (11 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 12/22] drm/of: make drm_of.h self-contained Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 14/22] drm/suballoc: fix drm_suballoc.h kernel-doc Jani Nikula
` (10 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Mark some members private to silence kernel-doc warnings, and add FIXME
comments.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/i2c/ch7006.h | 1 +
include/drm/i2c/sil164.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/drm/i2c/ch7006.h b/include/drm/i2c/ch7006.h
index 8390b437a1f8..5305b9797f93 100644
--- a/include/drm/i2c/ch7006.h
+++ b/include/drm/i2c/ch7006.h
@@ -37,6 +37,7 @@
* meaning.
*/
struct ch7006_encoder_params {
+ /* private: FIXME: document the members */
enum {
CH7006_FORMAT_RGB16 = 0,
CH7006_FORMAT_YCrCb24m16,
diff --git a/include/drm/i2c/sil164.h b/include/drm/i2c/sil164.h
index 205e27384c83..ddf248693c8b 100644
--- a/include/drm/i2c/sil164.h
+++ b/include/drm/i2c/sil164.h
@@ -36,6 +36,7 @@
* See "http://www.siliconimage.com/docs/SiI-DS-0021-E-164.pdf".
*/
struct sil164_encoder_params {
+ /* private: FIXME: document the members */
enum {
SIL164_INPUT_EDGE_FALLING = 0,
SIL164_INPUT_EDGE_RISING
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 14/22] drm/suballoc: fix drm_suballoc.h kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (12 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 13/22] drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 15/22] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc Jani Nikula
` (9 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Rename dma_fence to fence to match code.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drm_suballoc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_suballoc.h b/include/drm/drm_suballoc.h
index c2188bb0b157..7ba72a81a808 100644
--- a/include/drm/drm_suballoc.h
+++ b/include/drm/drm_suballoc.h
@@ -37,7 +37,7 @@ struct drm_suballoc_manager {
* @manager: The drm_suballoc_manager.
* @soffset: Start offset.
* @eoffset: End offset + 1 so that @eoffset - @soffset = size.
- * @dma_fence: The fence protecting the allocation.
+ * @fence: The fence protecting the allocation.
*/
struct drm_suballoc {
struct list_head olist;
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 15/22] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (13 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 14/22] drm/suballoc: fix drm_suballoc.h kernel-doc Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-07 17:56 ` Lucas De Marchi
2024-03-06 18:31 ` [PATCH 16/22] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings Jani Nikula
` (8 subsequent siblings)
23 siblings, 1 reply; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
There's no proper way to document function pointer members, but at least
silence the warnings.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/i915_gsc_proxy_mei_interface.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/drm/i915_gsc_proxy_mei_interface.h b/include/drm/i915_gsc_proxy_mei_interface.h
index 9462341d3ae1..850dfbf40607 100644
--- a/include/drm/i915_gsc_proxy_mei_interface.h
+++ b/include/drm/i915_gsc_proxy_mei_interface.h
@@ -21,7 +21,7 @@ struct i915_gsc_proxy_component_ops {
struct module *owner;
/**
- * send - Sends a proxy message to ME FW.
+ * @send: Sends a proxy message to ME FW.
* @dev: device struct corresponding to the mei device
* @buf: message buffer to send
* @size: size of the message
@@ -30,7 +30,7 @@ struct i915_gsc_proxy_component_ops {
int (*send)(struct device *dev, const void *buf, size_t size);
/**
- * recv - Receives a proxy message from ME FW.
+ * @recv: Receives a proxy message from ME FW.
* @dev: device struct corresponding to the mei device
* @buf: message buffer to contain the received message
* @size: size of the buffer
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 16/22] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (14 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 15/22] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-07 18:00 ` Lucas De Marchi
2024-03-06 18:31 ` [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h " Jani Nikula
` (7 subsequent siblings)
23 siblings, 1 reply; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Make the documentation match code.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/i915_hdcp_interface.h | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/include/drm/i915_hdcp_interface.h b/include/drm/i915_hdcp_interface.h
index 4c9c8167c2d5..a9f2ee576de8 100644
--- a/include/drm/i915_hdcp_interface.h
+++ b/include/drm/i915_hdcp_interface.h
@@ -54,7 +54,7 @@ enum hdcp_ddi {
};
/**
- * enum hdcp_tc - ME/GSC Firmware defined index for transcoders
+ * enum hdcp_transcoder - ME/GSC Firmware defined index for transcoders
* @HDCP_INVALID_TRANSCODER: Index for Invalid transcoder
* @HDCP_TRANSCODER_EDP: Index for EDP Transcoder
* @HDCP_TRANSCODER_DSI0: Index for DSI0 Transcoder
@@ -106,7 +106,7 @@ struct hdcp_port_data {
* And Prepare AKE_Init.
* @verify_receiver_cert_prepare_km: Verify the Receiver Certificate
* AKE_Send_Cert and prepare
- AKE_Stored_Km/AKE_No_Stored_Km
+ * AKE_Stored_Km/AKE_No_Stored_Km
* @verify_hprime: Verify AKE_Send_H_prime
* @store_pairing_info: Store pairing info received
* @initiate_locality_check: Prepare LC_Init
@@ -170,14 +170,22 @@ struct i915_hdcp_ops {
/**
* struct i915_hdcp_arbiter - Used for communication between i915
* and hdcp drivers for the HDCP2.2 services
- * @hdcp_dev: device that provide the HDCP2.2 service from MEI Bus.
- * @hdcp_ops: Ops implemented by hdcp driver or intel_hdcp_gsc , used by i915 driver.
*/
struct i915_hdcp_arbiter {
+ /**
+ * @hdcp_dev: device that provide the HDCP2.2 service from MEI Bus.
+ */
struct device *hdcp_dev;
+
+ /**
+ * @ops: Ops implemented by hdcp driver or intel_hdcp_gsc , used by i915
+ * driver.
+ */
const struct i915_hdcp_ops *ops;
- /* To protect the above members. */
+ /**
+ * @mutex: To protect the above members.
+ */
struct mutex mutex;
};
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (15 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 16/22] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-07 18:02 ` Lucas De Marchi
2024-03-06 18:31 ` [PATCH 18/22] drm/ttm: fix ttm_bo.h " Jani Nikula
` (6 subsequent siblings)
23 siblings, 1 reply; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Make documentation match code.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/i915_pxp_tee_interface.h | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/include/drm/i915_pxp_tee_interface.h b/include/drm/i915_pxp_tee_interface.h
index 7d96985f2d05..653e85d6e32b 100644
--- a/include/drm/i915_pxp_tee_interface.h
+++ b/include/drm/i915_pxp_tee_interface.h
@@ -14,12 +14,10 @@ struct scatterlist;
* struct i915_pxp_component_ops - ops for PXP services.
* @owner: Module providing the ops
* @send: sends data to PXP
- * @receive: receives data from PXP
+ * @recv: receives data from PXP
+ * @gsc_command: send gsc command
*/
struct i915_pxp_component_ops {
- /**
- * @owner: owner of the module provding the ops
- */
struct module *owner;
int (*send)(struct device *dev, const void *message, size_t size,
@@ -35,14 +33,21 @@ struct i915_pxp_component_ops {
/**
* struct i915_pxp_component - Used for communication between i915 and TEE
* drivers for the PXP services
- * @tee_dev: device that provide the PXP service from TEE Bus.
- * @pxp_ops: Ops implemented by TEE driver, used by i915 driver.
*/
struct i915_pxp_component {
+ /**
+ * @tee_dev: device that provide the PXP service from TEE Bus.
+ */
struct device *tee_dev;
+
+ /**
+ * @ops: Ops implemented by TEE driver, used by i915 driver.
+ */
const struct i915_pxp_component_ops *ops;
- /* To protect the above members. */
+ /**
+ * @mutex: To protect the above members.
+ */
struct mutex mutex;
};
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 18/22] drm/ttm: fix ttm_bo.h kernel-doc warnings
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (16 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h " Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 19/22] drm/ttm: make ttm_caching.h self-contained Jani Nikula
` (5 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Some renames, some formatting fixes, add some as FIXME.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/ttm/ttm_bo.h | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 0223a41a64b2..8b1eb6828f0a 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -83,6 +83,9 @@ enum ttm_bo_type {
* @resource: structure describing current placement.
* @ttm: TTM structure holding system pages.
* @deleted: True if the object is only a zombie and already deleted.
+ * @bulk_move: FIXME
+ * @priority: FIXME
+ * @pin_count: FIXME
*
* Base class for TTM buffer object, that deals with data placement and CPU
* mappings. GPU mappings are really up to the driver, but for simpler GPUs
@@ -128,26 +131,28 @@ struct ttm_buffer_object {
struct work_struct delayed_delete;
/**
- * Special members that are protected by the reserve lock
- * and the bo::lock when written to. Can be read with
- * either of these locks held.
+ * @sg: Special members that are protected by the reserve lock and the
+ * bo::lock when written to. Can be read with either of these locks
+ * held.
*/
struct sg_table *sg;
};
+#define TTM_BO_MAP_IOMEM_MASK 0x80
+
/**
* struct ttm_bo_kmap_obj
*
* @virtual: The current kernel virtual address.
* @page: The page when kmap'ing a single page.
* @bo_kmap_type: Type of bo_kmap.
+ * @bo: FIXME
*
* Object describing a kernel mapping. Since a TTM bo may be located
* in various memory types with various caching policies, the
* mapping can either be an ioremap, a vmap, a kmap or part of a
* premapped region.
*/
-#define TTM_BO_MAP_IOMEM_MASK 0x80
struct ttm_bo_kmap_obj {
void *virtual;
struct page *page;
@@ -171,6 +176,7 @@ struct ttm_bo_kmap_obj {
* @force_alloc: Don't check the memory account during suspend or CPU page
* faults. Should only be used by TTM internally.
* @resv: Reservation object to allow reserved evictions with.
+ * @bytes_moved: FIXME
*
* Context for TTM operations like changing buffer placement or general memory
* allocation.
@@ -264,7 +270,7 @@ static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
* ttm_bo_reserve_slowpath:
* @bo: A pointer to a struct ttm_buffer_object.
* @interruptible: Sleep interruptible if waiting.
- * @sequence: Set (@bo)->sequence to this value after lock
+ * @ticket: FIXME
*
* This is called after ttm_bo_reserve returns -EAGAIN and we backed off
* from all our other reservations. Because there are no other reservations
@@ -303,7 +309,7 @@ static inline void ttm_bo_assign_mem(struct ttm_buffer_object *bo,
}
/**
- * ttm_bo_move_null = assign memory for a buffer object.
+ * ttm_bo_move_null - assign memory for a buffer object.
* @bo: The bo to assign the memory to
* @new_mem: The memory to be assigned.
*
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 19/22] drm/ttm: make ttm_caching.h self-contained
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (17 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 18/22] drm/ttm: fix ttm_bo.h " Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 20/22] drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings Jani Nikula
` (4 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Include <linux/pgtable.h> for pgprot_t.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/ttm/ttm_caching.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/drm/ttm/ttm_caching.h b/include/drm/ttm/ttm_caching.h
index 235a743d90e1..a18f43e93aba 100644
--- a/include/drm/ttm/ttm_caching.h
+++ b/include/drm/ttm/ttm_caching.h
@@ -25,6 +25,8 @@
#ifndef _TTM_CACHING_H_
#define _TTM_CACHING_H_
+#include <linux/pgtable.h>
+
#define TTM_NUM_CACHING_TYPES 3
/**
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 20/22] drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (18 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 19/22] drm/ttm: make ttm_caching.h self-contained Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 21/22] drm/ttm: fix ttm_kmap_iter.h " Jani Nikula
` (3 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
Fix some formatting errors and excess documentation.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/ttm/ttm_execbuf_util.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/drm/ttm/ttm_execbuf_util.h b/include/drm/ttm/ttm_execbuf_util.h
index 03aca29d3ce4..fac1e3e57ebd 100644
--- a/include/drm/ttm/ttm_execbuf_util.h
+++ b/include/drm/ttm/ttm_execbuf_util.h
@@ -52,7 +52,7 @@ struct ttm_validate_buffer {
};
/**
- * function ttm_eu_backoff_reservation
+ * ttm_eu_backoff_reservation
*
* @ticket: ww_acquire_ctx from reserve call
* @list: thread private list of ttm_validate_buffer structs.
@@ -64,14 +64,13 @@ void ttm_eu_backoff_reservation(struct ww_acquire_ctx *ticket,
struct list_head *list);
/**
- * function ttm_eu_reserve_buffers
+ * ttm_eu_reserve_buffers
*
* @ticket: [out] ww_acquire_ctx filled in by call, or NULL if only
* non-blocking reserves should be tried.
* @list: thread private list of ttm_validate_buffer structs.
* @intr: should the wait be interruptible
* @dups: [out] optional list of duplicates.
- * @del_lru: true if BOs should be removed from the LRU.
*
* Tries to reserve bos pointed to by the list entries for validation.
* If the function returns 0, all buffers are marked as "unfenced",
@@ -102,7 +101,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
struct list_head *dups);
/**
- * function ttm_eu_fence_buffer_objects.
+ * ttm_eu_fence_buffer_objects
*
* @ticket: ww_acquire_ctx from reserve call
* @list: thread private list of ttm_validate_buffer structs.
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 21/22] drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (19 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 20/22] drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc Jani Nikula
` (2 subsequent siblings)
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula
There's no proper way to document function pointer members, but at least
silence the warnings.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/ttm/ttm_kmap_iter.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/drm/ttm/ttm_kmap_iter.h b/include/drm/ttm/ttm_kmap_iter.h
index cc5c09a211b4..fe72631a6e93 100644
--- a/include/drm/ttm/ttm_kmap_iter.h
+++ b/include/drm/ttm/ttm_kmap_iter.h
@@ -20,7 +20,7 @@ struct iosys_map;
*/
struct ttm_kmap_iter_ops {
/**
- * kmap_local() - Map a PAGE_SIZE part of the resource using
+ * @map_local: Map a PAGE_SIZE part of the resource using
* kmap_local semantics.
* @res_iter: Pointer to the struct ttm_kmap_iter representing
* the resource.
@@ -31,7 +31,7 @@ struct ttm_kmap_iter_ops {
void (*map_local)(struct ttm_kmap_iter *res_iter,
struct iosys_map *dmap, pgoff_t i);
/**
- * unmap_local() - Unmap a PAGE_SIZE part of the resource previously
+ * @unmap_local: Unmap a PAGE_SIZE part of the resource previously
* mapped using kmap_local.
* @res_iter: Pointer to the struct ttm_kmap_iter representing
* the resource.
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (20 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 21/22] drm/ttm: fix ttm_kmap_iter.h " Jani Nikula
@ 2024-03-06 18:31 ` Jani Nikula
2024-03-07 5:06 ` kernel test robot
` (2 more replies)
2024-03-07 8:35 ` [PATCH] drm: add missing header guards to drm_crtc_internal.h Jani Nikula
2024-03-07 8:55 ` [PATCH 00/22] drm: fix headers, add header test facility Thomas Zimmermann
23 siblings, 3 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-06 18:31 UTC (permalink / raw)
To: dri-devel
Cc: intel-gfx, intel-xe, jani.nikula, Daniel Vetter, David Airlie,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Masahiro Yamada
Ensure drm headers build, are self-contained, have header guards, and
have no kernel-doc warnings, when CONFIG_DRM_HEADER_TEST=y.
The mechanism follows similar patters used in i915, xe, and usr/include.
To cover include/drm, we need to recurse there using the top level
Kbuild and the new include/Kbuild files.
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
Kbuild | 1 +
drivers/gpu/drm/Kconfig | 11 +++++++++++
drivers/gpu/drm/Makefile | 18 ++++++++++++++++++
include/Kbuild | 1 +
include/drm/Makefile | 18 ++++++++++++++++++
5 files changed, 49 insertions(+)
create mode 100644 include/Kbuild
create mode 100644 include/drm/Makefile
diff --git a/Kbuild b/Kbuild
index 464b34a08f51..f327ca86990c 100644
--- a/Kbuild
+++ b/Kbuild
@@ -97,3 +97,4 @@ obj-$(CONFIG_SAMPLES) += samples/
obj-$(CONFIG_NET) += net/
obj-y += virt/
obj-y += $(ARCH_DRIVERS)
+obj-$(CONFIG_DRM_HEADER_TEST) += include/
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index c08e18108c2a..dd17685ef6e7 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -429,3 +429,14 @@ config DRM_WERROR
this config option is disabled by default.
If in doubt, say N.
+
+config DRM_HEADER_TEST
+ bool "Ensure DRM headers are self-contained and pass kernel-doc"
+ depends on EXPERT
+ default n
+ help
+ Ensure the DRM subsystem headers both under drivers/gpu/drm and
+ include/drm compile, are self-contained, have header guards, and have
+ no kernel-doc warnings.
+
+ If in doubt, say N.
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index a73c04d2d7a3..6605d5686d01 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -218,3 +218,21 @@ obj-y += solomon/
obj-$(CONFIG_DRM_SPRD) += sprd/
obj-$(CONFIG_DRM_LOONGSON) += loongson/
obj-$(CONFIG_DRM_POWERVR) += imagination/
+
+# Ensure drm headers are self-contained and pass kernel-doc
+hdrtest-files := \
+ $(shell cd $(srctree)/$(src) && find . -maxdepth 1 -name 'drm_*.h') \
+ $(shell cd $(srctree)/$(src) && find display lib -name '*.h')
+
+always-$(CONFIG_DRM_HEADER_TEST) += \
+ $(patsubst %.h,%.hdrtest, $(hdrtest-files))
+
+# Include the header twice to detect missing include guard.
+quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
+ cmd_hdrtest = \
+ $(CC) $(c_flags) -fsyntax-only -x c /dev/null -include $< -include $<; \
+ $(srctree)/scripts/kernel-doc -none $(if $(CONFIG_DRM_WERROR),-Werror) $<; \
+ touch $@
+
+$(obj)/%.hdrtest: $(src)/%.h FORCE
+ $(call if_changed_dep,hdrtest)
diff --git a/include/Kbuild b/include/Kbuild
new file mode 100644
index 000000000000..5e76a599e2dd
--- /dev/null
+++ b/include/Kbuild
@@ -0,0 +1 @@
+obj-$(CONFIG_DRM_HEADER_TEST) += drm/
diff --git a/include/drm/Makefile b/include/drm/Makefile
new file mode 100644
index 000000000000..b9f391d7aadd
--- /dev/null
+++ b/include/drm/Makefile
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0
+
+# Ensure drm headers are self-contained and pass kernel-doc
+hdrtest-files := \
+ $(shell cd $(srctree)/$(src) && find * -name '*.h' 2>/dev/null)
+
+always-$(CONFIG_DRM_HEADER_TEST) += \
+ $(patsubst %.h,%.hdrtest, $(hdrtest-files))
+
+# Include the header twice to detect missing include guard.
+quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
+ cmd_hdrtest = \
+ $(CC) $(c_flags) -fsyntax-only -x c /dev/null -include $< -include $<; \
+ $(srctree)/scripts/kernel-doc -none $(if $(CONFIG_DRM_WERROR),-Werror) $<; \
+ touch $@
+
+$(obj)/%.hdrtest: $(src)/%.h FORCE
+ $(call if_changed_dep,hdrtest)
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
2024-03-06 18:31 ` [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc Jani Nikula
@ 2024-03-07 5:06 ` kernel test robot
2024-03-07 5:28 ` kernel test robot
2024-03-07 14:49 ` kernel test robot
2 siblings, 0 replies; 40+ messages in thread
From: kernel test robot @ 2024-03-07 5:06 UTC (permalink / raw)
To: Jani Nikula, dri-devel
Cc: oe-kbuild-all, intel-gfx, intel-xe, jani.nikula, Daniel Vetter,
David Airlie, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Masahiro Yamada
Hi Jani,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[cannot apply to drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.8-rc7 next-20240306]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-crtc-make-drm_crtc_internal-h-self-contained/20240307-023603
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/e22ab28836ee1689ea4781ed53fd2e4e4f84728e.1709749576.git.jani.nikula%40intel.com
patch subject: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240307/202403071204.gJtMneoq-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240307/202403071204.gJtMneoq-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403071204.gJtMneoq-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from <command-line>:
drivers/gpu/drm/./drm_crtc_internal.h: In function 'drm_edid_load_firmware':
>> drivers/gpu/drm/./drm_crtc_internal.h:304:16: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]
304 | return ERR_PTR(-ENOENT);
| ^~~~~~~
>> drivers/gpu/drm/./drm_crtc_internal.h:304:25: error: 'ENOENT' undeclared (first use in this function)
304 | return ERR_PTR(-ENOENT);
| ^~~~~~
drivers/gpu/drm/./drm_crtc_internal.h:304:25: note: each undeclared identifier is reported only once for each function it appears in
In file included from <command-line>:
drivers/gpu/drm/./drm_crtc_internal.h: At top level:
>> drivers/gpu/drm/./drm_crtc_internal.h:302:1: error: redefinition of 'drm_edid_load_firmware'
302 | drm_edid_load_firmware(struct drm_connector *connector)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/./drm_crtc_internal.h:302:1: note: previous definition of 'drm_edid_load_firmware' with type 'const struct drm_edid *(struct drm_connector *)'
302 | drm_edid_load_firmware(struct drm_connector *connector)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/./drm_crtc_internal.h: In function 'drm_edid_load_firmware':
>> drivers/gpu/drm/./drm_crtc_internal.h:304:25: error: 'ENOENT' undeclared (first use in this function)
304 | return ERR_PTR(-ENOENT);
| ^~~~~~
cc1: all warnings being treated as errors
vim +/ERR_PTR +304 drivers/gpu/drm/./drm_crtc_internal.h
5f2d0ed49036a0 Jani Nikula 2022-10-24 296
5f2d0ed49036a0 Jani Nikula 2022-10-24 297 /* drm_edid_load.c */
5f2d0ed49036a0 Jani Nikula 2022-10-24 298 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
5f2d0ed49036a0 Jani Nikula 2022-10-24 299 const struct drm_edid *drm_edid_load_firmware(struct drm_connector *connector);
5f2d0ed49036a0 Jani Nikula 2022-10-24 300 #else
5f2d0ed49036a0 Jani Nikula 2022-10-24 301 static inline const struct drm_edid *
5f2d0ed49036a0 Jani Nikula 2022-10-24 @302 drm_edid_load_firmware(struct drm_connector *connector)
5f2d0ed49036a0 Jani Nikula 2022-10-24 303 {
5f2d0ed49036a0 Jani Nikula 2022-10-24 @304 return ERR_PTR(-ENOENT);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
2024-03-06 18:31 ` [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc Jani Nikula
2024-03-07 5:06 ` kernel test robot
@ 2024-03-07 5:28 ` kernel test robot
2024-03-07 8:44 ` Jani Nikula
2024-03-07 14:49 ` kernel test robot
2 siblings, 1 reply; 40+ messages in thread
From: kernel test robot @ 2024-03-07 5:28 UTC (permalink / raw)
To: Jani Nikula, dri-devel
Cc: oe-kbuild-all, intel-gfx, intel-xe, jani.nikula, Daniel Vetter,
David Airlie, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Masahiro Yamada
Hi Jani,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[cannot apply to drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.8-rc7 next-20240306]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-crtc-make-drm_crtc_internal-h-self-contained/20240307-023603
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/e22ab28836ee1689ea4781ed53fd2e4e4f84728e.1709749576.git.jani.nikula%40intel.com
patch subject: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20240307/202403071317.uoW18ZR3-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240307/202403071317.uoW18ZR3-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403071317.uoW18ZR3-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from include/asm-generic/pgtable-nopud.h:7,
from arch/m68k/include/asm/pgtable_mm.h:9,
from arch/m68k/include/asm/pgtable.h:8,
from include/linux/pgtable.h:6,
from include/drm/ttm/ttm_caching.h:28,
from <command-line>:
>> include/asm-generic/pgtable-nop4d.h:9:18: error: unknown type name 'pgd_t'
9 | typedef struct { pgd_t pgd; } p4d_t;
| ^~~~~
include/asm-generic/pgtable-nop4d.h:21:28: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
21 | static inline int pgd_none(pgd_t pgd) { return 0; }
| ^~~~~
| p4d_t
include/asm-generic/pgtable-nop4d.h:22:27: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
22 | static inline int pgd_bad(pgd_t pgd) { return 0; }
| ^~~~~
| p4d_t
include/asm-generic/pgtable-nop4d.h:23:31: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
23 | static inline int pgd_present(pgd_t pgd) { return 1; }
| ^~~~~
| p4d_t
include/asm-generic/pgtable-nop4d.h:24:30: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
24 | static inline void pgd_clear(pgd_t *pgd) { }
| ^~~~~
| p4d_t
include/asm-generic/pgtable-nop4d.h:35:33: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
35 | static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
| ^~~~~
| p4d_t
In file included from arch/m68k/include/asm/thread_info.h:6,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from arch/m68k/include/asm/processor.h:11,
from arch/m68k/include/asm/pgtable_mm.h:15:
arch/m68k/include/asm/motorola_pgtable.h: In function 'pud_set':
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
48 | #define pud_val(x) (p4d_val((x).p4d))
| ^~~~~~~
arch/m68k/include/asm/motorola_pgtable.h:103:9: note: in expansion of macro 'pud_val'
103 | pud_val(*pudp) = _PAGE_TABLE | _PAGE_ACCESSED | __pa(pmdp);
| ^~~~~~~
include/linux/pgtable.h: In function 'pmd_offset':
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
48 | #define pud_val(x) (p4d_val((x).p4d))
| ^~~~~~~
arch/m68k/include/asm/motorola_pgtable.h:108:41: note: in expansion of macro 'pud_val'
108 | #define pud_pgtable(pud) ((pmd_t *)__va(pud_val(pud) & _TABLE_MASK))
| ^~~~~~~
include/linux/pgtable.h:123:16: note: in expansion of macro 'pud_pgtable'
123 | return pud_pgtable(*pud) + pmd_index(address);
| ^~~~~~~~~~~
include/linux/pgtable.h: In function 'pmd_off':
>> include/linux/pgtable.h:165:38: error: implicit declaration of function 'p4d_offset'; did you mean 'pmd_offset'? [-Werror=implicit-function-declaration]
165 | return pmd_offset(pud_offset(p4d_offset(pgd_offset(mm, va), va), va), va);
| ^~~~~~~~~~
| pmd_offset
>> include/linux/pgtable.h:165:38: warning: passing argument 1 of 'pud_offset' makes pointer from integer without a cast [-Wint-conversion]
165 | return pmd_offset(pud_offset(p4d_offset(pgd_offset(mm, va), va), va), va);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/asm-generic/pgtable-nopud.h:42:40: note: expected 'p4d_t *' but argument is of type 'int'
42 | static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
| ~~~~~~~^~~
include/linux/pgtable.h: In function 'pmd_off_k':
include/linux/pgtable.h:170:38: warning: passing argument 1 of 'pud_offset' makes pointer from integer without a cast [-Wint-conversion]
170 | return pmd_offset(pud_offset(p4d_offset(pgd_offset_k(va), va), va), va);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/asm-generic/pgtable-nopud.h:42:40: note: expected 'p4d_t *' but argument is of type 'int'
42 | static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
| ~~~~~~~^~~
include/linux/pgtable.h: In function 'pud_same':
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
48 | #define pud_val(x) (p4d_val((x).p4d))
| ^~~~~~~
include/linux/pgtable.h:829:16: note: in expansion of macro 'pud_val'
829 | return pud_val(pud_a) == pud_val(pud_b);
| ^~~~~~~
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
48 | #define pud_val(x) (p4d_val((x).p4d))
| ^~~~~~~
include/linux/pgtable.h:829:34: note: in expansion of macro 'pud_val'
829 | return pud_val(pud_a) == pud_val(pud_b);
| ^~~~~~~
>> include/linux/pgtable.h:827:34: warning: parameter 'pud_a' set but not used [-Wunused-but-set-parameter]
827 | static inline int pud_same(pud_t pud_a, pud_t pud_b)
| ~~~~~~^~~~~
>> include/linux/pgtable.h:827:47: warning: parameter 'pud_b' set but not used [-Wunused-but-set-parameter]
827 | static inline int pud_same(pud_t pud_a, pud_t pud_b)
| ~~~~~~^~~~~
include/linux/pgtable.h: In function 'p4d_same':
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/linux/pgtable.h:837:16: note: in expansion of macro 'p4d_val'
837 | return p4d_val(p4d_a) == p4d_val(p4d_b);
| ^~~~~~~
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/linux/pgtable.h:837:34: note: in expansion of macro 'p4d_val'
837 | return p4d_val(p4d_a) == p4d_val(p4d_b);
| ^~~~~~~
>> include/linux/pgtable.h:835:34: warning: parameter 'p4d_a' set but not used [-Wunused-but-set-parameter]
835 | static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
| ~~~~~~^~~~~
>> include/linux/pgtable.h:835:47: warning: parameter 'p4d_b' set but not used [-Wunused-but-set-parameter]
835 | static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
| ~~~~~~^~~~~
include/linux/pgtable.h: In function 'pgd_none_or_clear_bad':
>> include/linux/pgtable.h:1021:13: error: implicit declaration of function 'pgd_none'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
1021 | if (pgd_none(*pgd))
| ^~~~~~~~
| p4d_none
In file included from include/linux/export.h:5,
from include/linux/linkage.h:7,
from include/linux/preempt.h:10:
>> include/linux/pgtable.h:1023:22: error: implicit declaration of function 'pgd_bad'; did you mean 'p4d_bad'? [-Werror=implicit-function-declaration]
1023 | if (unlikely(pgd_bad(*pgd))) {
| ^~~~~~~
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/pgtable.h: In function 'pud_none_or_clear_bad':
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
48 | #define pud_val(x) (p4d_val((x).p4d))
| ^~~~~~~
arch/m68k/include/asm/motorola_pgtable.h:134:35: note: in expansion of macro 'pud_val'
134 | #define pud_none(pud) (!pud_val(pud))
| ^~~~~~~
include/linux/pgtable.h:1043:13: note: in expansion of macro 'pud_none'
1043 | if (pud_none(*pud))
| ^~~~~~~~
>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
46 | #define pgd_val(x) ((x).pgd)
| ^
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
40 | #define p4d_val(x) (pgd_val((x).pgd))
| ^~~~~~~
include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
48 | #define pud_val(x) (p4d_val((x).p4d))
| ^~~~~~~
arch/m68k/include/asm/motorola_pgtable.h:135:35: note: in expansion of macro 'pud_val'
135 | #define pud_bad(pud) ((pud_val(pud) & _DESCTYPE_MASK) != _PAGE_TABLE)
| ^~~~~~~
include/linux/pgtable.h:1045:22: note: in expansion of macro 'pud_bad'
1045 | if (unlikely(pud_bad(*pud))) {
| ^~~~~~~
cc1: some warnings being treated as errors
vim +/pgd_t +9 include/asm-generic/pgtable-nop4d.h
048456dcf2c56a Kirill A. Shutemov 2017-03-09 8
048456dcf2c56a Kirill A. Shutemov 2017-03-09 @9 typedef struct { pgd_t pgd; } p4d_t;
048456dcf2c56a Kirill A. Shutemov 2017-03-09 10
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 40+ messages in thread
* [PATCH v2] drm/crtc: make drm_crtc_internal.h self-contained
2024-03-06 18:31 ` [PATCH 01/22] drm/crtc: make drm_crtc_internal.h self-contained Jani Nikula
@ 2024-03-07 8:34 ` Jani Nikula
0 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 8:34 UTC (permalink / raw)
To: Jani Nikula, dri-devel; +Cc: intel-gfx, intel-xe
Forward declare struct drm_printer and include <linux/err.h>.
v2: Include <linux/err.h> (kernel test robot)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_crtc_internal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
index a514d5207e41..c0c5d79ed4c9 100644
--- a/drivers/gpu/drm/drm_crtc_internal.h
+++ b/drivers/gpu/drm/drm_crtc_internal.h
@@ -32,6 +32,7 @@
* and are not exported to drivers.
*/
+#include <linux/err.h>
#include <linux/types.h>
enum drm_color_encoding;
@@ -54,6 +55,7 @@ struct drm_mode_object;
struct drm_mode_set;
struct drm_plane;
struct drm_plane_state;
+struct drm_printer;
struct drm_property;
struct edid;
struct fwnode_handle;
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* [PATCH] drm: add missing header guards to drm_crtc_internal.h
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (21 preceding siblings ...)
2024-03-06 18:31 ` [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc Jani Nikula
@ 2024-03-07 8:35 ` Jani Nikula
2024-03-07 8:55 ` [PATCH 00/22] drm: fix headers, add header test facility Thomas Zimmermann
23 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 8:35 UTC (permalink / raw)
To: Jani Nikula, dri-devel; +Cc: intel-gfx, intel-xe
Including the file twice can lead to errors.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/drm_crtc_internal.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
index c0c5d79ed4c9..0c693229a1c9 100644
--- a/drivers/gpu/drm/drm_crtc_internal.h
+++ b/drivers/gpu/drm/drm_crtc_internal.h
@@ -32,6 +32,9 @@
* and are not exported to drivers.
*/
+#ifndef __DRM_CRTC_INTERNAL_H__
+#define __DRM_CRTC_INTERNAL_H__
+
#include <linux/err.h>
#include <linux/types.h>
@@ -305,3 +308,5 @@ drm_edid_load_firmware(struct drm_connector *connector)
return ERR_PTR(-ENOENT);
}
#endif
+
+#endif /* __DRM_CRTC_INTERNAL_H__ */
--
2.39.2
^ permalink raw reply related [flat|nested] 40+ messages in thread
* Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
2024-03-07 5:28 ` kernel test robot
@ 2024-03-07 8:44 ` Jani Nikula
2024-03-07 9:36 ` Geert Uytterhoeven
0 siblings, 1 reply; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 8:44 UTC (permalink / raw)
To: kernel test robot, dri-devel
Cc: oe-kbuild-all, intel-gfx, intel-xe, Daniel Vetter, David Airlie,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
Masahiro Yamada, Thomas Hellström, Geert Uytterhoeven
On Thu, 07 Mar 2024, kernel test robot <lkp@intel.com> wrote:
> Hi Jani,
>
> kernel test robot noticed the following build errors:
So I'm trying to make include/drm/ttm/ttm_caching.h self-contained by
including <linux/pgtable.h> with [1], but it fails like below.
Cc: Thomas and Geert, better ideas for the include there? Looks like
include/asm-generic/pgtable-nop4d.h isn't self-contained on m68k.
BR,
Jani.
[1] https://lore.kernel.org/r/c35ce1a59d0796da32b32e4c8f59464de35f200a.1709749576.git.jani.nikula@intel.com
>
> [auto build test ERROR on drm-misc/drm-misc-next]
> [cannot apply to drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.8-rc7 next-20240306]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-crtc-make-drm_crtc_internal-h-self-contained/20240307-023603
> base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
> patch link: https://lore.kernel.org/r/e22ab28836ee1689ea4781ed53fd2e4e4f84728e.1709749576.git.jani.nikula%40intel.com
> patch subject: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
> config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20240307/202403071317.uoW18ZR3-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240307/202403071317.uoW18ZR3-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202403071317.uoW18ZR3-lkp@intel.com/
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from include/asm-generic/pgtable-nopud.h:7,
> from arch/m68k/include/asm/pgtable_mm.h:9,
> from arch/m68k/include/asm/pgtable.h:8,
> from include/linux/pgtable.h:6,
> from include/drm/ttm/ttm_caching.h:28,
> from <command-line>:
>>> include/asm-generic/pgtable-nop4d.h:9:18: error: unknown type name 'pgd_t'
> 9 | typedef struct { pgd_t pgd; } p4d_t;
> | ^~~~~
> include/asm-generic/pgtable-nop4d.h:21:28: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
> 21 | static inline int pgd_none(pgd_t pgd) { return 0; }
> | ^~~~~
> | p4d_t
> include/asm-generic/pgtable-nop4d.h:22:27: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
> 22 | static inline int pgd_bad(pgd_t pgd) { return 0; }
> | ^~~~~
> | p4d_t
> include/asm-generic/pgtable-nop4d.h:23:31: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
> 23 | static inline int pgd_present(pgd_t pgd) { return 1; }
> | ^~~~~
> | p4d_t
> include/asm-generic/pgtable-nop4d.h:24:30: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
> 24 | static inline void pgd_clear(pgd_t *pgd) { }
> | ^~~~~
> | p4d_t
> include/asm-generic/pgtable-nop4d.h:35:33: error: unknown type name 'pgd_t'; did you mean 'p4d_t'?
> 35 | static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
> | ^~~~~
> | p4d_t
> In file included from arch/m68k/include/asm/thread_info.h:6,
> from include/linux/thread_info.h:60,
> from include/asm-generic/preempt.h:5,
> from ./arch/m68k/include/generated/asm/preempt.h:1,
> from include/linux/preempt.h:79,
> from arch/m68k/include/asm/processor.h:11,
> from arch/m68k/include/asm/pgtable_mm.h:15:
> arch/m68k/include/asm/motorola_pgtable.h: In function 'pud_set':
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
> 48 | #define pud_val(x) (p4d_val((x).p4d))
> | ^~~~~~~
> arch/m68k/include/asm/motorola_pgtable.h:103:9: note: in expansion of macro 'pud_val'
> 103 | pud_val(*pudp) = _PAGE_TABLE | _PAGE_ACCESSED | __pa(pmdp);
> | ^~~~~~~
> include/linux/pgtable.h: In function 'pmd_offset':
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
> 48 | #define pud_val(x) (p4d_val((x).p4d))
> | ^~~~~~~
> arch/m68k/include/asm/motorola_pgtable.h:108:41: note: in expansion of macro 'pud_val'
> 108 | #define pud_pgtable(pud) ((pmd_t *)__va(pud_val(pud) & _TABLE_MASK))
> | ^~~~~~~
> include/linux/pgtable.h:123:16: note: in expansion of macro 'pud_pgtable'
> 123 | return pud_pgtable(*pud) + pmd_index(address);
> | ^~~~~~~~~~~
> include/linux/pgtable.h: In function 'pmd_off':
>>> include/linux/pgtable.h:165:38: error: implicit declaration of function 'p4d_offset'; did you mean 'pmd_offset'? [-Werror=implicit-function-declaration]
> 165 | return pmd_offset(pud_offset(p4d_offset(pgd_offset(mm, va), va), va), va);
> | ^~~~~~~~~~
> | pmd_offset
>>> include/linux/pgtable.h:165:38: warning: passing argument 1 of 'pud_offset' makes pointer from integer without a cast [-Wint-conversion]
> 165 | return pmd_offset(pud_offset(p4d_offset(pgd_offset(mm, va), va), va), va);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | int
> include/asm-generic/pgtable-nopud.h:42:40: note: expected 'p4d_t *' but argument is of type 'int'
> 42 | static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
> | ~~~~~~~^~~
> include/linux/pgtable.h: In function 'pmd_off_k':
> include/linux/pgtable.h:170:38: warning: passing argument 1 of 'pud_offset' makes pointer from integer without a cast [-Wint-conversion]
> 170 | return pmd_offset(pud_offset(p4d_offset(pgd_offset_k(va), va), va), va);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | int
> include/asm-generic/pgtable-nopud.h:42:40: note: expected 'p4d_t *' but argument is of type 'int'
> 42 | static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
> | ~~~~~~~^~~
> include/linux/pgtable.h: In function 'pud_same':
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
> 48 | #define pud_val(x) (p4d_val((x).p4d))
> | ^~~~~~~
> include/linux/pgtable.h:829:16: note: in expansion of macro 'pud_val'
> 829 | return pud_val(pud_a) == pud_val(pud_b);
> | ^~~~~~~
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
> 48 | #define pud_val(x) (p4d_val((x).p4d))
> | ^~~~~~~
> include/linux/pgtable.h:829:34: note: in expansion of macro 'pud_val'
> 829 | return pud_val(pud_a) == pud_val(pud_b);
> | ^~~~~~~
>>> include/linux/pgtable.h:827:34: warning: parameter 'pud_a' set but not used [-Wunused-but-set-parameter]
> 827 | static inline int pud_same(pud_t pud_a, pud_t pud_b)
> | ~~~~~~^~~~~
>>> include/linux/pgtable.h:827:47: warning: parameter 'pud_b' set but not used [-Wunused-but-set-parameter]
> 827 | static inline int pud_same(pud_t pud_a, pud_t pud_b)
> | ~~~~~~^~~~~
> include/linux/pgtable.h: In function 'p4d_same':
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/linux/pgtable.h:837:16: note: in expansion of macro 'p4d_val'
> 837 | return p4d_val(p4d_a) == p4d_val(p4d_b);
> | ^~~~~~~
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/linux/pgtable.h:837:34: note: in expansion of macro 'p4d_val'
> 837 | return p4d_val(p4d_a) == p4d_val(p4d_b);
> | ^~~~~~~
>>> include/linux/pgtable.h:835:34: warning: parameter 'p4d_a' set but not used [-Wunused-but-set-parameter]
> 835 | static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
> | ~~~~~~^~~~~
>>> include/linux/pgtable.h:835:47: warning: parameter 'p4d_b' set but not used [-Wunused-but-set-parameter]
> 835 | static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
> | ~~~~~~^~~~~
> include/linux/pgtable.h: In function 'pgd_none_or_clear_bad':
>>> include/linux/pgtable.h:1021:13: error: implicit declaration of function 'pgd_none'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
> 1021 | if (pgd_none(*pgd))
> | ^~~~~~~~
> | p4d_none
> In file included from include/linux/export.h:5,
> from include/linux/linkage.h:7,
> from include/linux/preempt.h:10:
>>> include/linux/pgtable.h:1023:22: error: implicit declaration of function 'pgd_bad'; did you mean 'p4d_bad'? [-Werror=implicit-function-declaration]
> 1023 | if (unlikely(pgd_bad(*pgd))) {
> | ^~~~~~~
> include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
> 77 | # define unlikely(x) __builtin_expect(!!(x), 0)
> | ^
> include/linux/pgtable.h: In function 'pud_none_or_clear_bad':
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
> 48 | #define pud_val(x) (p4d_val((x).p4d))
> | ^~~~~~~
> arch/m68k/include/asm/motorola_pgtable.h:134:35: note: in expansion of macro 'pud_val'
> 134 | #define pud_none(pud) (!pud_val(pud))
> | ^~~~~~~
> include/linux/pgtable.h:1043:13: note: in expansion of macro 'pud_none'
> 1043 | if (pud_none(*pud))
> | ^~~~~~~~
>>> arch/m68k/include/asm/page.h:46:29: error: request for member 'pgd' in something not a structure or union
> 46 | #define pgd_val(x) ((x).pgd)
> | ^
> include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
> 77 | # define unlikely(x) __builtin_expect(!!(x), 0)
> | ^
> include/asm-generic/pgtable-nop4d.h:40:50: note: in expansion of macro 'pgd_val'
> 40 | #define p4d_val(x) (pgd_val((x).pgd))
> | ^~~~~~~
> include/asm-generic/pgtable-nopud.h:48:50: note: in expansion of macro 'p4d_val'
> 48 | #define pud_val(x) (p4d_val((x).p4d))
> | ^~~~~~~
> arch/m68k/include/asm/motorola_pgtable.h:135:35: note: in expansion of macro 'pud_val'
> 135 | #define pud_bad(pud) ((pud_val(pud) & _DESCTYPE_MASK) != _PAGE_TABLE)
> | ^~~~~~~
> include/linux/pgtable.h:1045:22: note: in expansion of macro 'pud_bad'
> 1045 | if (unlikely(pud_bad(*pud))) {
> | ^~~~~~~
> cc1: some warnings being treated as errors
>
>
> vim +/pgd_t +9 include/asm-generic/pgtable-nop4d.h
>
> 048456dcf2c56a Kirill A. Shutemov 2017-03-09 8
> 048456dcf2c56a Kirill A. Shutemov 2017-03-09 @9 typedef struct { pgd_t pgd; } p4d_t;
> 048456dcf2c56a Kirill A. Shutemov 2017-03-09 10
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 00/22] drm: fix headers, add header test facility
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
` (22 preceding siblings ...)
2024-03-07 8:35 ` [PATCH] drm: add missing header guards to drm_crtc_internal.h Jani Nikula
@ 2024-03-07 8:55 ` Thomas Zimmermann
2024-03-07 9:04 ` Jani Nikula
2024-03-07 15:23 ` Jani Nikula
23 siblings, 2 replies; 40+ messages in thread
From: Thomas Zimmermann @ 2024-03-07 8:55 UTC (permalink / raw)
To: Jani Nikula, dri-devel
Cc: intel-gfx, intel-xe, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Masahiro Yamada
Hi
Am 06.03.24 um 19:31 schrieb Jani Nikula:
> First, fix a bunch of issues in drm headers, uncovered with the last
> patch. A few kernel-doc warnings are just brushed under the carpet for
> now, with a FIXME comment. Otherwise, pretty straightforward stuff.
Nice, thanks a lot. For the FIXME comments, maybe maintainers can
provide the docs to include in your patchset. But that wouldn't be a
blocker IMHO. The /* private: */ comments make kernel-doc ignore the
rest of the structure, right?
With the required fixes applied, for patches 1 to 14:
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
For patches 15 to 22:
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Best regards
Thomas
>
> Second, add a header test facility to catch issues at build time when
> CONFIG_DRM_HEADER_TEST=y. This is the last patch, and I think needs
> Masahiro's ack.
>
> BR,
> Jani.
>
>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
>
> Jani Nikula (22):
> drm/crtc: make drm_crtc_internal.h self-contained
> drm: add missing header guards to drm_internal.h
> drm/kunit: fix drm_kunit_helpers.h kernel-doc
> drm/amdgpu: make amd_asic_type.h self-contained
> drm: bridge: samsung-dsim: make samsung-dsim.h self-contained
> drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc
> drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc
> drm/encoder: silence drm_encoder_slave.h kernel-doc
> drm: fix drm_format_helper.h kernel-doc warnings
> drm/lease: make drm_lease.h self-contained
> drm: fix drm_gem_vram_helper.h kernel-doc
> drm/of: make drm_of.h self-contained
> drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings
> drm/suballoc: fix drm_suballoc.h kernel-doc
> drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc
> drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings
> drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
> drm/ttm: fix ttm_bo.h kernel-doc warnings
> drm/ttm: make ttm_caching.h self-contained
> drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings
> drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings
> drm: ensure drm headers are self-contained and pass kernel-doc
>
> Kbuild | 1 +
> drivers/gpu/drm/Kconfig | 11 +++++++++++
> drivers/gpu/drm/Makefile | 18 ++++++++++++++++++
> drivers/gpu/drm/drm_crtc_internal.h | 1 +
> drivers/gpu/drm/drm_internal.h | 5 +++++
> include/Kbuild | 1 +
> include/drm/Makefile | 18 ++++++++++++++++++
> include/drm/amd_asic_type.h | 3 +++
> include/drm/bridge/samsung-dsim.h | 4 +++-
> include/drm/display/drm_dp_mst_helper.h | 1 -
> include/drm/drm_debugfs_crc.h | 8 +++++++-
> include/drm/drm_encoder_slave.h | 3 +++
> include/drm/drm_format_helper.h | 1 +
> include/drm/drm_gem_vram_helper.h | 1 -
> include/drm/drm_kunit_helpers.h | 2 +-
> include/drm/drm_lease.h | 2 ++
> include/drm/drm_of.h | 1 +
> include/drm/drm_suballoc.h | 2 +-
> include/drm/i2c/ch7006.h | 1 +
> include/drm/i2c/sil164.h | 1 +
> include/drm/i915_gsc_proxy_mei_interface.h | 4 ++--
> include/drm/i915_hdcp_interface.h | 18 +++++++++++++-----
> include/drm/i915_pxp_tee_interface.h | 19 ++++++++++++-------
> include/drm/ttm/ttm_bo.h | 18 ++++++++++++------
> include/drm/ttm/ttm_caching.h | 2 ++
> include/drm/ttm/ttm_execbuf_util.h | 7 +++----
> include/drm/ttm/ttm_kmap_iter.h | 4 ++--
> 27 files changed, 125 insertions(+), 32 deletions(-)
> create mode 100644 include/Kbuild
> create mode 100644 include/drm/Makefile
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 00/22] drm: fix headers, add header test facility
2024-03-07 8:55 ` [PATCH 00/22] drm: fix headers, add header test facility Thomas Zimmermann
@ 2024-03-07 9:04 ` Jani Nikula
2024-03-07 15:23 ` Jani Nikula
1 sibling, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 9:04 UTC (permalink / raw)
To: Thomas Zimmermann, dri-devel
Cc: intel-gfx, intel-xe, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Masahiro Yamada
On Thu, 07 Mar 2024, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Hi
>
> Am 06.03.24 um 19:31 schrieb Jani Nikula:
>> First, fix a bunch of issues in drm headers, uncovered with the last
>> patch. A few kernel-doc warnings are just brushed under the carpet for
>> now, with a FIXME comment. Otherwise, pretty straightforward stuff.
>
> Nice, thanks a lot. For the FIXME comments, maybe maintainers can
> provide the docs to include in your patchset. But that wouldn't be a
> blocker IMHO. The /* private: */ comments make kernel-doc ignore the
> rest of the structure, right?
That's right. In some cases it's the appropriate thing to do, like patch
9/22 where the members of struct drm_format_conv_state should be
private.
>
> With the required fixes applied, for patches 1 to 14:
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> For patches 15 to 22:
>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks!
BR,
Jani.
>
> Best regards
> Thomas
>
>>
>> Second, add a header test facility to catch issues at build time when
>> CONFIG_DRM_HEADER_TEST=y. This is the last patch, and I think needs
>> Masahiro's ack.
>>
>> BR,
>> Jani.
>>
>>
>> Cc: David Airlie <airlied@gmail.com>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Maxime Ripard <mripard@kernel.org>
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Masahiro Yamada <masahiroy@kernel.org>
>>
>> Jani Nikula (22):
>> drm/crtc: make drm_crtc_internal.h self-contained
>> drm: add missing header guards to drm_internal.h
>> drm/kunit: fix drm_kunit_helpers.h kernel-doc
>> drm/amdgpu: make amd_asic_type.h self-contained
>> drm: bridge: samsung-dsim: make samsung-dsim.h self-contained
>> drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc
>> drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc
>> drm/encoder: silence drm_encoder_slave.h kernel-doc
>> drm: fix drm_format_helper.h kernel-doc warnings
>> drm/lease: make drm_lease.h self-contained
>> drm: fix drm_gem_vram_helper.h kernel-doc
>> drm/of: make drm_of.h self-contained
>> drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings
>> drm/suballoc: fix drm_suballoc.h kernel-doc
>> drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc
>> drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings
>> drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
>> drm/ttm: fix ttm_bo.h kernel-doc warnings
>> drm/ttm: make ttm_caching.h self-contained
>> drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings
>> drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings
>> drm: ensure drm headers are self-contained and pass kernel-doc
>>
>> Kbuild | 1 +
>> drivers/gpu/drm/Kconfig | 11 +++++++++++
>> drivers/gpu/drm/Makefile | 18 ++++++++++++++++++
>> drivers/gpu/drm/drm_crtc_internal.h | 1 +
>> drivers/gpu/drm/drm_internal.h | 5 +++++
>> include/Kbuild | 1 +
>> include/drm/Makefile | 18 ++++++++++++++++++
>> include/drm/amd_asic_type.h | 3 +++
>> include/drm/bridge/samsung-dsim.h | 4 +++-
>> include/drm/display/drm_dp_mst_helper.h | 1 -
>> include/drm/drm_debugfs_crc.h | 8 +++++++-
>> include/drm/drm_encoder_slave.h | 3 +++
>> include/drm/drm_format_helper.h | 1 +
>> include/drm/drm_gem_vram_helper.h | 1 -
>> include/drm/drm_kunit_helpers.h | 2 +-
>> include/drm/drm_lease.h | 2 ++
>> include/drm/drm_of.h | 1 +
>> include/drm/drm_suballoc.h | 2 +-
>> include/drm/i2c/ch7006.h | 1 +
>> include/drm/i2c/sil164.h | 1 +
>> include/drm/i915_gsc_proxy_mei_interface.h | 4 ++--
>> include/drm/i915_hdcp_interface.h | 18 +++++++++++++-----
>> include/drm/i915_pxp_tee_interface.h | 19 ++++++++++++-------
>> include/drm/ttm/ttm_bo.h | 18 ++++++++++++------
>> include/drm/ttm/ttm_caching.h | 2 ++
>> include/drm/ttm/ttm_execbuf_util.h | 7 +++----
>> include/drm/ttm/ttm_kmap_iter.h | 4 ++--
>> 27 files changed, 125 insertions(+), 32 deletions(-)
>> create mode 100644 include/Kbuild
>> create mode 100644 include/drm/Makefile
>>
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
2024-03-07 8:44 ` Jani Nikula
@ 2024-03-07 9:36 ` Geert Uytterhoeven
2024-03-07 15:43 ` Jani Nikula
0 siblings, 1 reply; 40+ messages in thread
From: Geert Uytterhoeven @ 2024-03-07 9:36 UTC (permalink / raw)
To: Jani Nikula
Cc: kernel test robot, dri-devel, oe-kbuild-all, intel-gfx, intel-xe,
Daniel Vetter, David Airlie, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Masahiro Yamada, Thomas Hellström
Hi Jani,
On Thu, Mar 7, 2024 at 9:44 AM Jani Nikula <jani.nikula@intel.com> wrote:
> On Thu, 07 Mar 2024, kernel test robot <lkp@intel.com> wrote:
> > kernel test robot noticed the following build errors:
>
> So I'm trying to make include/drm/ttm/ttm_caching.h self-contained by
> including <linux/pgtable.h> with [1], but it fails like below.
>
> Cc: Thomas and Geert, better ideas for the include there? Looks like
> include/asm-generic/pgtable-nop4d.h isn't self-contained on m68k.
I have sent a fix
https://lore.kernel.org/r/ba359be013f379ff10f3afcea13e2f78dd9717be.1709804021.git.geert@linux-m68k.org
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained
2024-03-06 18:31 ` [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained Jani Nikula
@ 2024-03-07 14:36 ` Alex Deucher
2024-03-07 15:02 ` Jani Nikula
0 siblings, 1 reply; 40+ messages in thread
From: Alex Deucher @ 2024-03-07 14:36 UTC (permalink / raw)
To: Jani Nikula; +Cc: dri-devel, intel-gfx, intel-xe
On Wed, Mar 6, 2024 at 1:43 PM Jani Nikula <jani.nikula@intel.com> wrote:
>
> Include <linux/types.h> for u8.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Do you want me to pick this up? Otherwise, feel free to take it via
whatever tree makes sense.
Alex
> ---
> include/drm/amd_asic_type.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/drm/amd_asic_type.h b/include/drm/amd_asic_type.h
> index 724c45e3e9a7..9be85b821aa6 100644
> --- a/include/drm/amd_asic_type.h
> +++ b/include/drm/amd_asic_type.h
> @@ -22,6 +22,9 @@
>
> #ifndef __AMD_ASIC_TYPE_H__
> #define __AMD_ASIC_TYPE_H__
> +
> +#include <linux/types.h>
> +
> /*
> * Supported ASIC types
> */
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
2024-03-06 18:31 ` [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc Jani Nikula
2024-03-07 5:06 ` kernel test robot
2024-03-07 5:28 ` kernel test robot
@ 2024-03-07 14:49 ` kernel test robot
2 siblings, 0 replies; 40+ messages in thread
From: kernel test robot @ 2024-03-07 14:49 UTC (permalink / raw)
To: Jani Nikula, dri-devel
Cc: llvm, oe-kbuild-all, intel-gfx, intel-xe, jani.nikula,
Daniel Vetter, David Airlie, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Masahiro Yamada
Hi Jani,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-misc/drm-misc-next]
[cannot apply to drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes linus/master v6.8-rc7 next-20240307]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-crtc-make-drm_crtc_internal-h-self-contained/20240307-023603
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/e22ab28836ee1689ea4781ed53fd2e4e4f84728e.1709749576.git.jani.nikula%40intel.com
patch subject: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240307/202403072259.EEC2Vf1X-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 325f51237252e6dab8e4e1ea1fa7acbb4faee1cd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240307/202403072259.EEC2Vf1X-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403072259.EEC2Vf1X-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from <built-in>:4:
>> include/drm/ttm/ttm_pool.h:89:52: warning: declaration of 'struct seq_file' will not be visible outside of this function [-Wvisibility]
89 | int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m);
| ^
1 warning generated.
vim +89 include/drm/ttm/ttm_pool.h
d099fc8f540add Christian König 2020-10-22 88
d099fc8f540add Christian König 2020-10-22 @89 int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m);
d099fc8f540add Christian König 2020-10-22 90
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained
2024-03-07 14:36 ` Alex Deucher
@ 2024-03-07 15:02 ` Jani Nikula
0 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 15:02 UTC (permalink / raw)
To: Alex Deucher; +Cc: dri-devel, intel-gfx, intel-xe
On Thu, 07 Mar 2024, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Wed, Mar 6, 2024 at 1:43 PM Jani Nikula <jani.nikula@intel.com> wrote:
>>
>> Include <linux/types.h> for u8.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
>
> Do you want me to pick this up? Otherwise, feel free to take it via
> whatever tree makes sense.
Thanks, I'd like to take it along with the rest via drm-misc-next.
BR,
Jani.
>
> Alex
>
>> ---
>> include/drm/amd_asic_type.h | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/include/drm/amd_asic_type.h b/include/drm/amd_asic_type.h
>> index 724c45e3e9a7..9be85b821aa6 100644
>> --- a/include/drm/amd_asic_type.h
>> +++ b/include/drm/amd_asic_type.h
>> @@ -22,6 +22,9 @@
>>
>> #ifndef __AMD_ASIC_TYPE_H__
>> #define __AMD_ASIC_TYPE_H__
>> +
>> +#include <linux/types.h>
>> +
>> /*
>> * Supported ASIC types
>> */
>> --
>> 2.39.2
>>
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 00/22] drm: fix headers, add header test facility
2024-03-07 8:55 ` [PATCH 00/22] drm: fix headers, add header test facility Thomas Zimmermann
2024-03-07 9:04 ` Jani Nikula
@ 2024-03-07 15:23 ` Jani Nikula
1 sibling, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 15:23 UTC (permalink / raw)
To: Thomas Zimmermann, dri-devel, Alex Deucher
Cc: intel-gfx, intel-xe, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Masahiro Yamada
On Thu, 07 Mar 2024, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Hi
>
> Am 06.03.24 um 19:31 schrieb Jani Nikula:
>> First, fix a bunch of issues in drm headers, uncovered with the last
>> patch. A few kernel-doc warnings are just brushed under the carpet for
>> now, with a FIXME comment. Otherwise, pretty straightforward stuff.
>
> Nice, thanks a lot. For the FIXME comments, maybe maintainers can
> provide the docs to include in your patchset. But that wouldn't be a
> blocker IMHO. The /* private: */ comments make kernel-doc ignore the
> rest of the structure, right?
>
> With the required fixes applied, for patches 1 to 14:
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks for the review, I started off with pushing patches 1-7, 9-12, and
14 to drm-misc-next, with Alex's ack on patch 4.
Patches 8 and 13 have fixmes, so skipped those for now.
BR,
Jani.
>
> For patches 15 to 22:
>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> Best regards
> Thomas
>
>>
>> Second, add a header test facility to catch issues at build time when
>> CONFIG_DRM_HEADER_TEST=y. This is the last patch, and I think needs
>> Masahiro's ack.
>>
>> BR,
>> Jani.
>>
>>
>> Cc: David Airlie <airlied@gmail.com>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Maxime Ripard <mripard@kernel.org>
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Masahiro Yamada <masahiroy@kernel.org>
>>
>> Jani Nikula (22):
>> drm/crtc: make drm_crtc_internal.h self-contained
>> drm: add missing header guards to drm_internal.h
>> drm/kunit: fix drm_kunit_helpers.h kernel-doc
>> drm/amdgpu: make amd_asic_type.h self-contained
>> drm: bridge: samsung-dsim: make samsung-dsim.h self-contained
>> drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc
>> drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc
>> drm/encoder: silence drm_encoder_slave.h kernel-doc
>> drm: fix drm_format_helper.h kernel-doc warnings
>> drm/lease: make drm_lease.h self-contained
>> drm: fix drm_gem_vram_helper.h kernel-doc
>> drm/of: make drm_of.h self-contained
>> drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings
>> drm/suballoc: fix drm_suballoc.h kernel-doc
>> drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc
>> drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings
>> drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
>> drm/ttm: fix ttm_bo.h kernel-doc warnings
>> drm/ttm: make ttm_caching.h self-contained
>> drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings
>> drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings
>> drm: ensure drm headers are self-contained and pass kernel-doc
>>
>> Kbuild | 1 +
>> drivers/gpu/drm/Kconfig | 11 +++++++++++
>> drivers/gpu/drm/Makefile | 18 ++++++++++++++++++
>> drivers/gpu/drm/drm_crtc_internal.h | 1 +
>> drivers/gpu/drm/drm_internal.h | 5 +++++
>> include/Kbuild | 1 +
>> include/drm/Makefile | 18 ++++++++++++++++++
>> include/drm/amd_asic_type.h | 3 +++
>> include/drm/bridge/samsung-dsim.h | 4 +++-
>> include/drm/display/drm_dp_mst_helper.h | 1 -
>> include/drm/drm_debugfs_crc.h | 8 +++++++-
>> include/drm/drm_encoder_slave.h | 3 +++
>> include/drm/drm_format_helper.h | 1 +
>> include/drm/drm_gem_vram_helper.h | 1 -
>> include/drm/drm_kunit_helpers.h | 2 +-
>> include/drm/drm_lease.h | 2 ++
>> include/drm/drm_of.h | 1 +
>> include/drm/drm_suballoc.h | 2 +-
>> include/drm/i2c/ch7006.h | 1 +
>> include/drm/i2c/sil164.h | 1 +
>> include/drm/i915_gsc_proxy_mei_interface.h | 4 ++--
>> include/drm/i915_hdcp_interface.h | 18 +++++++++++++-----
>> include/drm/i915_pxp_tee_interface.h | 19 ++++++++++++-------
>> include/drm/ttm/ttm_bo.h | 18 ++++++++++++------
>> include/drm/ttm/ttm_caching.h | 2 ++
>> include/drm/ttm/ttm_execbuf_util.h | 7 +++----
>> include/drm/ttm/ttm_kmap_iter.h | 4 ++--
>> 27 files changed, 125 insertions(+), 32 deletions(-)
>> create mode 100644 include/Kbuild
>> create mode 100644 include/drm/Makefile
>>
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc
2024-03-07 9:36 ` Geert Uytterhoeven
@ 2024-03-07 15:43 ` Jani Nikula
0 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 15:43 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: kernel test robot, dri-devel, oe-kbuild-all, intel-gfx, intel-xe,
Daniel Vetter, David Airlie, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Masahiro Yamada, Thomas Hellström
On Thu, 07 Mar 2024, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Jani,
>
> On Thu, Mar 7, 2024 at 9:44 AM Jani Nikula <jani.nikula@intel.com> wrote:
>> On Thu, 07 Mar 2024, kernel test robot <lkp@intel.com> wrote:
>> > kernel test robot noticed the following build errors:
>>
>> So I'm trying to make include/drm/ttm/ttm_caching.h self-contained by
>> including <linux/pgtable.h> with [1], but it fails like below.
>>
>> Cc: Thomas and Geert, better ideas for the include there? Looks like
>> include/asm-generic/pgtable-nop4d.h isn't self-contained on m68k.
>
> I have sent a fix
>
> https://lore.kernel.org/r/ba359be013f379ff10f3afcea13e2f78dd9717be.1709804021.git.geert@linux-m68k.org
Thanks! I've picked this up as part of my series, and will include it
with the other remaining patches when I post a v2, aiming to merge all
of them via drm-misc-next.
BR,
Jani.
>
> Gr{oetje,eeting}s,
>
> Geert
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 15/22] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc
2024-03-06 18:31 ` [PATCH 15/22] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc Jani Nikula
@ 2024-03-07 17:56 ` Lucas De Marchi
0 siblings, 0 replies; 40+ messages in thread
From: Lucas De Marchi @ 2024-03-07 17:56 UTC (permalink / raw)
To: Jani Nikula; +Cc: dri-devel, intel-gfx, intel-xe
On Wed, Mar 06, 2024 at 08:31:20PM +0200, Jani Nikula wrote:
>There's no proper way to document function pointer members, but at least
>silence the warnings.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Lucas De Marchi
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 16/22] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings
2024-03-06 18:31 ` [PATCH 16/22] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings Jani Nikula
@ 2024-03-07 18:00 ` Lucas De Marchi
0 siblings, 0 replies; 40+ messages in thread
From: Lucas De Marchi @ 2024-03-07 18:00 UTC (permalink / raw)
To: Jani Nikula; +Cc: dri-devel, intel-gfx, intel-xe
On Wed, Mar 06, 2024 at 08:31:21PM +0200, Jani Nikula wrote:
>Make the documentation match code.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>---
> include/drm/i915_hdcp_interface.h | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
>diff --git a/include/drm/i915_hdcp_interface.h b/include/drm/i915_hdcp_interface.h
>index 4c9c8167c2d5..a9f2ee576de8 100644
>--- a/include/drm/i915_hdcp_interface.h
>+++ b/include/drm/i915_hdcp_interface.h
>@@ -54,7 +54,7 @@ enum hdcp_ddi {
> };
>
> /**
>- * enum hdcp_tc - ME/GSC Firmware defined index for transcoders
>+ * enum hdcp_transcoder - ME/GSC Firmware defined index for transcoders
> * @HDCP_INVALID_TRANSCODER: Index for Invalid transcoder
> * @HDCP_TRANSCODER_EDP: Index for EDP Transcoder
> * @HDCP_TRANSCODER_DSI0: Index for DSI0 Transcoder
>@@ -106,7 +106,7 @@ struct hdcp_port_data {
> * And Prepare AKE_Init.
> * @verify_receiver_cert_prepare_km: Verify the Receiver Certificate
> * AKE_Send_Cert and prepare
>- AKE_Stored_Km/AKE_No_Stored_Km
>+ * AKE_Stored_Km/AKE_No_Stored_Km
> * @verify_hprime: Verify AKE_Send_H_prime
> * @store_pairing_info: Store pairing info received
> * @initiate_locality_check: Prepare LC_Init
>@@ -170,14 +170,22 @@ struct i915_hdcp_ops {
> /**
> * struct i915_hdcp_arbiter - Used for communication between i915
> * and hdcp drivers for the HDCP2.2 services
>- * @hdcp_dev: device that provide the HDCP2.2 service from MEI Bus.
>- * @hdcp_ops: Ops implemented by hdcp driver or intel_hdcp_gsc , used by i915 driver.
you are just moving what was already there, but may be a good
opportunity for small fixups?
> */
> struct i915_hdcp_arbiter {
>+ /**
>+ * @hdcp_dev: device that provide the HDCP2.2 service from MEI Bus.
^provides
>+ */
> struct device *hdcp_dev;
>+
>+ /**
>+ * @ops: Ops implemented by hdcp driver or intel_hdcp_gsc , used by i915
extra space before ","
anyway,
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Lucas De Marchi
>+ * driver.
>+ */
> const struct i915_hdcp_ops *ops;
>
>- /* To protect the above members. */
>+ /**
>+ * @mutex: To protect the above members.
>+ */
> struct mutex mutex;
> };
>
>--
>2.39.2
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
2024-03-06 18:31 ` [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h " Jani Nikula
@ 2024-03-07 18:02 ` Lucas De Marchi
2024-03-07 20:49 ` Jani Nikula
0 siblings, 1 reply; 40+ messages in thread
From: Lucas De Marchi @ 2024-03-07 18:02 UTC (permalink / raw)
To: Jani Nikula; +Cc: dri-devel, intel-gfx, intel-xe
On Wed, Mar 06, 2024 at 08:31:22PM +0200, Jani Nikula wrote:
>Make documentation match code.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>---
> include/drm/i915_pxp_tee_interface.h | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
>diff --git a/include/drm/i915_pxp_tee_interface.h b/include/drm/i915_pxp_tee_interface.h
>index 7d96985f2d05..653e85d6e32b 100644
>--- a/include/drm/i915_pxp_tee_interface.h
>+++ b/include/drm/i915_pxp_tee_interface.h
>@@ -14,12 +14,10 @@ struct scatterlist;
> * struct i915_pxp_component_ops - ops for PXP services.
> * @owner: Module providing the ops
> * @send: sends data to PXP
>- * @receive: receives data from PXP
>+ * @recv: receives data from PXP
>+ * @gsc_command: send gsc command
> */
> struct i915_pxp_component_ops {
>- /**
>- * @owner: owner of the module provding the ops
>- */
isn't the other way around the more common one? i.e. document the
struct members closer to their declaration.
> struct module *owner;
>
> int (*send)(struct device *dev, const void *message, size_t size,
>@@ -35,14 +33,21 @@ struct i915_pxp_component_ops {
> /**
> * struct i915_pxp_component - Used for communication between i915 and TEE
> * drivers for the PXP services
>- * @tee_dev: device that provide the PXP service from TEE Bus.
>- * @pxp_ops: Ops implemented by TEE driver, used by i915 driver.
> */
... which you follow here.
Lucas De Marchi
> struct i915_pxp_component {
>+ /**
>+ * @tee_dev: device that provide the PXP service from TEE Bus.
>+ */
> struct device *tee_dev;
>+
>+ /**
>+ * @ops: Ops implemented by TEE driver, used by i915 driver.
>+ */
> const struct i915_pxp_component_ops *ops;
>
>- /* To protect the above members. */
>+ /**
>+ * @mutex: To protect the above members.
>+ */
> struct mutex mutex;
> };
>
>--
>2.39.2
>
^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings
2024-03-07 18:02 ` Lucas De Marchi
@ 2024-03-07 20:49 ` Jani Nikula
0 siblings, 0 replies; 40+ messages in thread
From: Jani Nikula @ 2024-03-07 20:49 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: dri-devel, intel-gfx, intel-xe
On Thu, 07 Mar 2024, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> On Wed, Mar 06, 2024 at 08:31:22PM +0200, Jani Nikula wrote:
>>Make documentation match code.
>>
>>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>---
>> include/drm/i915_pxp_tee_interface.h | 19 ++++++++++++-------
>> 1 file changed, 12 insertions(+), 7 deletions(-)
>>
>>diff --git a/include/drm/i915_pxp_tee_interface.h b/include/drm/i915_pxp_tee_interface.h
>>index 7d96985f2d05..653e85d6e32b 100644
>>--- a/include/drm/i915_pxp_tee_interface.h
>>+++ b/include/drm/i915_pxp_tee_interface.h
>>@@ -14,12 +14,10 @@ struct scatterlist;
>> * struct i915_pxp_component_ops - ops for PXP services.
>> * @owner: Module providing the ops
>> * @send: sends data to PXP
>>- * @receive: receives data from PXP
>>+ * @recv: receives data from PXP
>>+ * @gsc_command: send gsc command
>> */
>> struct i915_pxp_component_ops {
>>- /**
>>- * @owner: owner of the module provding the ops
>>- */
>
>
> isn't the other way around the more common one? i.e. document the
> struct members closer to their declaration.
>
>> struct module *owner;
>>
>> int (*send)(struct device *dev, const void *message, size_t size,
>>@@ -35,14 +33,21 @@ struct i915_pxp_component_ops {
>> /**
>> * struct i915_pxp_component - Used for communication between i915 and TEE
>> * drivers for the PXP services
>>- * @tee_dev: device that provide the PXP service from TEE Bus.
>>- * @pxp_ops: Ops implemented by TEE driver, used by i915 driver.
>> */
>
> ... which you follow here.
Yeah, fixed locally, ditto for previous patch. Thanks for the reviews.
BR,
Jani.
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2024-03-07 20:49 UTC | newest]
Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06 18:31 [PATCH 00/22] drm: fix headers, add header test facility Jani Nikula
2024-03-06 18:31 ` [PATCH 01/22] drm/crtc: make drm_crtc_internal.h self-contained Jani Nikula
2024-03-07 8:34 ` [PATCH v2] " Jani Nikula
2024-03-06 18:31 ` [PATCH 02/22] drm: add missing header guards to drm_internal.h Jani Nikula
2024-03-06 18:31 ` [PATCH 03/22] drm/kunit: fix drm_kunit_helpers.h kernel-doc Jani Nikula
2024-03-06 18:31 ` [PATCH 04/22] drm/amdgpu: make amd_asic_type.h self-contained Jani Nikula
2024-03-07 14:36 ` Alex Deucher
2024-03-07 15:02 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 05/22] drm: bridge: samsung-dsim: make samsung-dsim.h self-contained Jani Nikula
2024-03-06 18:31 ` [PATCH 06/22] drm/dp_mst: fix drm_dp_mst_helper.h kernel-doc Jani Nikula
2024-03-06 18:31 ` [PATCH 07/22] drm/crc: make drm_debugfs_crc.h self-contained and fix kernel-doc Jani Nikula
2024-03-06 18:31 ` [PATCH 08/22] drm/encoder: silence drm_encoder_slave.h kernel-doc Jani Nikula
2024-03-06 18:31 ` [PATCH 09/22] drm: fix drm_format_helper.h kernel-doc warnings Jani Nikula
2024-03-06 18:31 ` [PATCH 10/22] drm/lease: make drm_lease.h self-contained Jani Nikula
2024-03-06 18:31 ` [PATCH 11/22] drm: fix drm_gem_vram_helper.h kernel-doc Jani Nikula
2024-03-06 18:31 ` [PATCH 12/22] drm/of: make drm_of.h self-contained Jani Nikula
2024-03-06 18:31 ` [PATCH 13/22] drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings Jani Nikula
2024-03-06 18:31 ` [PATCH 14/22] drm/suballoc: fix drm_suballoc.h kernel-doc Jani Nikula
2024-03-06 18:31 ` [PATCH 15/22] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc Jani Nikula
2024-03-07 17:56 ` Lucas De Marchi
2024-03-06 18:31 ` [PATCH 16/22] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings Jani Nikula
2024-03-07 18:00 ` Lucas De Marchi
2024-03-06 18:31 ` [PATCH 17/22] drm/i915/pxp: fix i915_pxp_tee_interface.h " Jani Nikula
2024-03-07 18:02 ` Lucas De Marchi
2024-03-07 20:49 ` Jani Nikula
2024-03-06 18:31 ` [PATCH 18/22] drm/ttm: fix ttm_bo.h " Jani Nikula
2024-03-06 18:31 ` [PATCH 19/22] drm/ttm: make ttm_caching.h self-contained Jani Nikula
2024-03-06 18:31 ` [PATCH 20/22] drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings Jani Nikula
2024-03-06 18:31 ` [PATCH 21/22] drm/ttm: fix ttm_kmap_iter.h " Jani Nikula
2024-03-06 18:31 ` [PATCH 22/22] drm: ensure drm headers are self-contained and pass kernel-doc Jani Nikula
2024-03-07 5:06 ` kernel test robot
2024-03-07 5:28 ` kernel test robot
2024-03-07 8:44 ` Jani Nikula
2024-03-07 9:36 ` Geert Uytterhoeven
2024-03-07 15:43 ` Jani Nikula
2024-03-07 14:49 ` kernel test robot
2024-03-07 8:35 ` [PATCH] drm: add missing header guards to drm_crtc_internal.h Jani Nikula
2024-03-07 8:55 ` [PATCH 00/22] drm: fix headers, add header test facility Thomas Zimmermann
2024-03-07 9:04 ` Jani Nikula
2024-03-07 15:23 ` Jani Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).