From patchwork Fri Mar 8 11:55:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586759 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF2F2C54E4A for ; Fri, 8 Mar 2024 11:56:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B6E24113881; Fri, 8 Mar 2024 11:56:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="DC505XQd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4AA6D113881; Fri, 8 Mar 2024 11:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709898978; x=1741434978; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rK7kWWs4+hVfvlukxJc/lA8cslM+lNCJn3z4mbIHEm8=; b=DC505XQdlukoCgFomJasIDknoYYpBbtNbcCZD9UufCG1BqHOSzOugTHZ wGPGOlACLUf0MFmvyykL1NpYU42OiizPi4llCTYUygWs/aVYO8VsfeSfw URls2ZiGD+bG/oDFVtRmVTIVrOBVe5mme3WbYXDPboqDzlYj6opEZBsti +usZilTPbar2svQnQq69cPxqWcW6+7mVLd88ivszmzCunCUX+r01k12Gh WZFevoX2yQPPB8NBg04cv2ZzjUlO0/ujvcf3BW8tAIsy7Pj0VeirhbSdV Jm2k2ctSfKEJoWluWvJLpnbvW2Xx2eQMz7ZOPtCCSi1YeyP2mtS/Xtbqx A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="22139932" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="22139932" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10487644" Received: from unknown (HELO localhost) ([10.252.34.187]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:14 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 01/16] drm: add missing header guards to drm_crtc_internal.h Date: Fri, 8 Mar 2024 13:55:39 +0200 Message-Id: <7ad51d9fb9c42c9901c5c1d5d16e32e857da9758.1709898638.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Including the file twice can lead to errors. Signed-off-by: Jani Nikula Reviewed-by: Alex Deucher --- 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 #include @@ -305,3 +308,5 @@ drm_edid_load_firmware(struct drm_connector *connector) return ERR_PTR(-ENOENT); } #endif + +#endif /* __DRM_CRTC_INTERNAL_H__ */ From patchwork Fri Mar 8 11:55:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586760 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F09BC54E4A for ; Fri, 8 Mar 2024 11:56:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 696CF113890; Fri, 8 Mar 2024 11:56:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="BId0Xjb6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F35C113891; Fri, 8 Mar 2024 11:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709898985; x=1741434985; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CTPcs7gJuj6JlaTYnuH/lcoKl2nbSpOCazCs7Xt3yAA=; b=BId0Xjb6oAsUmQlTl47gADK5FWCFpdaNr/81SFFkzP1TGfXrsi4suOI6 GxYgnx40YggggVZwYwWzbVWBPuJZ4qKjafj44YrO7pQtwN+ItMtvHOVHA c2u2p9JKR562VlTMm+dl5AeQWcGCYkgHxEc+A3ieN83fvWWSLfJJJ6PBJ jfpRv/mn8qkN4ydoPiGRyHT+78C0bns0UYiLJQb6qoP2cSu7OyPDe6wZZ NeOyPK6ZxEDRt8B/xwLZMG3jyeIo2eZ94s2d35/jd7srK+pE22jCsiqcY dp/x5mJNtvNAT5GkNJ3i6l7wIuKUKbGD8E9zMSBSoJj/+XZPcJlkLB7UJ A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="15262246" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15262246" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10892592" Received: from unknown (HELO localhost) ([10.252.34.187]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:21 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 02/16] drm: add missing header guards to drm_crtc_helper_internal.h Date: Fri, 8 Mar 2024 13:55:40 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Including the file twice can lead to errors. Signed-off-by: Jani Nikula Reviewed-by: Alex Deucher --- drivers/gpu/drm/drm_crtc_helper_internal.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h index 28e04e750130..ed4deed07abd 100644 --- a/drivers/gpu/drm/drm_crtc_helper_internal.h +++ b/drivers/gpu/drm/drm_crtc_helper_internal.h @@ -26,6 +26,9 @@ * implementation details and are not exported to drivers. */ +#ifndef __DRM_CRTC_HELPER_INTERNAL_H__ +#define __DRM_CRTC_HELPER_INTERNAL_H__ + #include #include #include @@ -44,3 +47,5 @@ drm_connector_mode_valid(struct drm_connector *connector, struct drm_encoder * drm_connector_get_single_encoder(struct drm_connector *connector); + +#endif /* __DRM_CRTC_HELPER_INTERNAL_H__ */ From patchwork Fri Mar 8 11:55:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA7CBC54E4A for ; Fri, 8 Mar 2024 11:56:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9480E10F9BE; Fri, 8 Mar 2024 11:56:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ExiAqTHt"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1987A113883; Fri, 8 Mar 2024 11:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709898991; x=1741434991; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pCwJ989y+j9spvEsft2cGhoJEcdlh4IqKS2sC6UaPkg=; b=ExiAqTHtBlblLFjI6VUdofHRm5n9Q1t2FCDJIHvKejm7Y6EFA6A+sss1 fkKTnCy8GfLVGJNFhgfNACay/BDsl/CO9xCeET/Hkt/SVe0aiRPzRqynm XZ7UM80dTugHckZoYFyvDL1GIRX6sXzCXdVTx0ote/YHOxrxYVmEgHQoV qV1NZSkrFfbRLPhRAz3GzXik2NMp9hCVmulrM8HFTCW1je/m8WnXobFwV KQg1+HkH10vw1/WQXZWLEpYJTvvW8vz5V9HjgAZiaBqnmSuFR4MtJVFJv 9UOZoTr9ytco7hhPlrNTgbkUjoCNN6RUyt2eCnLqlSjN6zAlPCYGgz51h A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="15262261" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15262261" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10892621" Received: from unknown (HELO localhost) ([10.252.34.187]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:27 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 03/16] drm/encoder: improve drm_encoder_slave.h kernel-doc Date: Fri, 8 Mar 2024 13:55:41 +0200 Message-Id: <19bc9672c8ae4f7aee235665a4d2360e8790193d.1709898638.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Document structs drm_encoder_slave_funcs, drm_encoder_slave, and drm_i2c_encoder_driver. v2: Actually document the structs instead of just silencing kernel-doc Signed-off-by: Jani Nikula Reviewed-by: Alex Deucher --- include/drm/drm_encoder_slave.h | 91 +++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/include/drm/drm_encoder_slave.h b/include/drm/drm_encoder_slave.h index 7214101fd731..49172166a164 100644 --- a/include/drm/drm_encoder_slave.h +++ b/include/drm/drm_encoder_slave.h @@ -34,12 +34,6 @@ /** * struct drm_encoder_slave_funcs - Entry points exposed by a slave encoder driver - * @set_config: Initialize any encoder-specific modesetting parameters. - * The meaning of the @params parameter is implementation - * dependent. It will usually be a structure with DVO port - * data format settings or timings. It's not required for - * the new parameters to take effect until the next mode - * is set. * * Most of its members are analogous to the function pointers in * &drm_encoder_helper_funcs and they can optionally be used to @@ -48,41 +42,85 @@ * if the encoder is the currently selected one for the connector. */ struct drm_encoder_slave_funcs { + /** + * @set_config: Initialize any encoder-specific modesetting parameters. + * The meaning of the @params parameter is implementation dependent. It + * will usually be a structure with DVO port data format settings or + * timings. It's not required for the new parameters to take effect + * until the next mode is set. + */ void (*set_config)(struct drm_encoder *encoder, void *params); + /** + * @destroy: Analogous to &drm_encoder_funcs @destroy callback. + */ void (*destroy)(struct drm_encoder *encoder); + + /** + * @dpms: Analogous to &drm_encoder_helper_funcs @dpms callback. Wrapped + * by drm_i2c_encoder_dpms(). + */ void (*dpms)(struct drm_encoder *encoder, int mode); + + /** + * @save: Save state. Wrapped by drm_i2c_encoder_save(). + */ void (*save)(struct drm_encoder *encoder); + + /** + * @restore: Restore state. Wrapped by drm_i2c_encoder_restore(). + */ void (*restore)(struct drm_encoder *encoder); + + /** + * @mode_fixup: Analogous to &drm_encoder_helper_funcs @mode_fixup + * callback. Wrapped by drm_i2c_encoder_mode_fixup(). + */ bool (*mode_fixup)(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode); + + /** + * @mode_valid: Analogous to &drm_encoder_helper_funcs @mode_valid. + */ int (*mode_valid)(struct drm_encoder *encoder, struct drm_display_mode *mode); + /** + * @mode_set: Analogous to &drm_encoder_helper_funcs @mode_set + * callback. Wrapped by drm_i2c_encoder_mode_set(). + */ void (*mode_set)(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode); + /** + * @detect: Analogous to &drm_encoder_helper_funcs @detect + * callback. Wrapped by drm_i2c_encoder_detect(). + */ enum drm_connector_status (*detect)(struct drm_encoder *encoder, struct drm_connector *connector); + /** + * @get_modes: Get modes. + */ int (*get_modes)(struct drm_encoder *encoder, struct drm_connector *connector); + /** + * @create_resources: Create resources. + */ int (*create_resources)(struct drm_encoder *encoder, struct drm_connector *connector); + /** + * @set_property: Set property. + */ int (*set_property)(struct drm_encoder *encoder, struct drm_connector *connector, struct drm_property *property, uint64_t val); - }; /** * struct drm_encoder_slave - Slave encoder struct - * @base: DRM encoder object. - * @slave_funcs: Slave encoder callbacks. - * @slave_priv: Slave encoder private data. - * @bus_priv: Bus specific data. * * A &drm_encoder_slave has two sets of callbacks, @slave_funcs and the * ones in @base. The former are never actually called by the common @@ -95,10 +133,24 @@ struct drm_encoder_slave_funcs { * this. */ struct drm_encoder_slave { + /** + * @base: DRM encoder object. + */ struct drm_encoder base; + /** + * @slave_funcs: Slave encoder callbacks. + */ const struct drm_encoder_slave_funcs *slave_funcs; + + /** + * @slave_priv: Slave encoder private data. + */ void *slave_priv; + + /** + * @bus_priv: Bus specific data. + */ void *bus_priv; }; #define to_encoder_slave(x) container_of((x), struct drm_encoder_slave, base) @@ -112,16 +164,20 @@ int drm_i2c_encoder_init(struct drm_device *dev, /** * struct drm_i2c_encoder_driver * - * Describes a device driver for an encoder connected to the GPU - * through an I2C bus. In addition to the entry points in @i2c_driver - * an @encoder_init function should be provided. It will be called to - * give the driver an opportunity to allocate any per-encoder data - * structures and to initialize the @slave_funcs and (optionally) - * @slave_priv members of @encoder. + * Describes a device driver for an encoder connected to the GPU through an I2C + * bus. */ struct drm_i2c_encoder_driver { + /** + * @i2c_driver: I2C device driver description. + */ struct i2c_driver i2c_driver; + /** + * @encoder_init: Callback to allocate any per-encoder data structures + * and to initialize the @slave_funcs and (optionally) @slave_priv + * members of @encoder. + */ int (*encoder_init)(struct i2c_client *client, struct drm_device *dev, struct drm_encoder_slave *encoder); @@ -133,6 +189,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) { From patchwork Fri Mar 8 11:55:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586770 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A437C54E5C for ; Fri, 8 Mar 2024 11:56:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EE79113883; Fri, 8 Mar 2024 11:56:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="fang5CYS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id B213D11388F; Fri, 8 Mar 2024 11:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709898998; x=1741434998; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mZ4QfHTH+CICXYP+1epY9WX7JiwgAqcPDAtQdheafXI=; b=fang5CYSw+7XncL294xjztfFai3AL2FFofIoiouUNwJjQ3fXI5uB+LIa UVCAMghsdbzzWm9HMlNJgvRSfq63dfi/ezf/xbAQbal+2o1xEO+h6W+XU sDCD2nwQ5d588brALHSqkZyMoLbRkZfnKcbuOi8ME3I3WEbQd1BvaJ2WW 3Mk6Nnl5L4fSnGKxW+Avow/YxErT6hg90b+hTo8ZL79T6BuiEDqE5ezFt yoU1Pg6mRCgmCnXTlEGqAktbrK3zgva6jFuhqaykkwbaJxRTvpjp2Jv4U QTR9rrC6JPCuK2bNQKiEfXgL//ZWC+j4v2Kem1BjCiV2JDe9vND5h34IJ g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="15262300" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15262300" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10892643" Received: from unknown (HELO localhost) ([10.252.34.187]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:34 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 04/16] drm/i2c: silence ch7006.h and sil164.h kernel-doc warnings Date: Fri, 8 Mar 2024 13:55:42 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Mark some members private to silence kernel-doc warnings, and add FIXME comments. Signed-off-by: Jani Nikula --- 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 From patchwork Fri Mar 8 11:55:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586771 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0EF4C54E4A for ; Fri, 8 Mar 2024 11:56:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F7DF11388C; Fri, 8 Mar 2024 11:56:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WDymRn06"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 14E2811388C; Fri, 8 Mar 2024 11:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899004; x=1741435004; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=veV3equEGpYJ2h8Ax6fu9UAn5vO9DE9popUiEGr9tjo=; b=WDymRn06FxzjiTRdeyPNnaoSBMgIMDaMv2rw8ANh0rx17ecA0sFzbCF0 Y4LvdNoThS4ZiyVBCwplrMxuMPeLqbfite47TbJTfNph0fB56HSkiCTbo JDRTZoFlL+OWUlkBo2JJ5LiZ8Im7LFUIFHMNLMMWSIAFIkJCU/erF0pfq r7OWNrOVJBS1rxvjR+1W9GH6XYAFwQgK+epblkRKeNhm2sO9Wx6zTxsk0 RDvhzPt8NSbclaiblLZMRuMwohbVHa1gBz//19ELpHXonslkw9LT2c95A dsxrfjTaxdYHr3y+n1oCns0m8DZ++BAd2rJF99jx/pURoh4oN/NOjkQD1 g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794515" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794515" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378505" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:40 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 05/16] drm/i915: fix i915_gsc_proxy_mei_interface.h kernel-doc Date: Fri, 8 Mar 2024 13:55:43 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There's no proper way to document function pointer members, but at least silence the warnings. Acked-by: Thomas Zimmermann Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula --- 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 From patchwork Fri Mar 8 11:55:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586772 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09BE3C54E5D for ; Fri, 8 Mar 2024 11:56:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12B11113898; Fri, 8 Mar 2024 11:56:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="NMYGzpNh"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 931D3113895; Fri, 8 Mar 2024 11:56:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899010; x=1741435010; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JwmzW4U97OcFzhsYUgZu7ZmtooXKIzJVIR2+CjQ5nMU=; b=NMYGzpNhbr12yRG07m8nw8DESrybRjU3G3tO44o+BAcE7qGwk217FjeZ qejioz+omQALd6sxuSNBima60koYpRBEZ1IkGM2NO0MRDGSFUs2uzbmA6 YwFLRlCLgFWWDWj0i7523u1dHc1qsrTHHZNO9wUFsZM2Jj0kHE4gKzokQ EQNVFvEnBj/nFcf1NXbGdKUyiQ4wFdkIHcEmwZ8O07oFmLQ9PA42gs7// BguKKhk+GTx9X3c2V/l/PHm5npktr1xF+LWxK52r3SfeLWrsXcgdOYfP8 uuksGX3bZ+XDRE2CrbPxTr+A7U/ZMJobUpi41OM7kT7Z6vW3sNk2ii/MG w==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="15336102" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15336102" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10542720" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:46 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 06/16] drm/i915/hdcp: fix i915_hdcp_interface.h kernel-doc warnings Date: Fri, 8 Mar 2024 13:55:44 +0200 Message-Id: <5c7ba8db172101c40b686463f169ec579a509f29.1709898638.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make the documentation match code. v2: Small fixups while at it (Lucas) Acked-by: Thomas Zimmermann Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula --- 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..d776ed7dcd00 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 provides 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; }; From patchwork Fri Mar 8 11:55:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586773 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A57AEC54E5C for ; Fri, 8 Mar 2024 11:56:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7292B10F9BB; Fri, 8 Mar 2024 11:56:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gv9nkQeX"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 76822113899; Fri, 8 Mar 2024 11:56:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899017; x=1741435017; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CiyAoGYZGai14HYlsnf44c0YjkSUv+QGeyyuybfNDtY=; b=gv9nkQeX9yh5eJGUfDvOp2ALTPbTVveuln1jjNLOm+T06/lcjU0EGBUo mumZ2Y+HlQwbA6MK+3Ek4yy0hCS3ZWcHVuZTtM6ZmTadYMOXTpdlr78DI 4R89tgdpXhEqI3RE6bTeXjNMRRI573XVyUHem7UIyvPof/EBw3hmjLPQl 1OUpluvdM5ZHMhHQMZQuc00rgfqRcVsnHemzRlh5rCJwTd6U3WwqgTrxV SDkCkl/uby/dTq7jB1eyDlOKgXStA1N1YEj/0QkVMPzkPD0C+11xXh9xz SDHQpX3GcbiMOQsN6VqKV5S1oF755Cqb6HJaFDQI8XPxUNrzNO6XdaTz7 g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794534" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794534" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378561" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:53 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 07/16] drm/i915/pxp: fix i915_pxp_tee_interface.h kernel-doc warnings Date: Fri, 8 Mar 2024 13:55:45 +0200 Message-Id: <7c26256dc00f970f94d145b73e341c36f553dfe4.1709898638.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make documentation match code. Slightly fix up the documentation comments while at it. v2: - Move comments next to members instead of struct comment (Lucas) - Small fixups while at it Cc: Lucas De Marchi Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula Reviewed-by: Lucas De Marchi --- include/drm/i915_pxp_tee_interface.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/include/drm/i915_pxp_tee_interface.h b/include/drm/i915_pxp_tee_interface.h index 7d96985f2d05..a532d32f58f3 100644 --- a/include/drm/i915_pxp_tee_interface.h +++ b/include/drm/i915_pxp_tee_interface.h @@ -12,20 +12,26 @@ 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 */ struct i915_pxp_component_ops { /** - * @owner: owner of the module provding the ops + * @owner: Module providing the ops. */ struct module *owner; + /** + * @send: Send a PXP message. + */ int (*send)(struct device *dev, const void *message, size_t size, unsigned long timeout_ms); + /** + * @recv: Receive a PXP message. + */ int (*recv)(struct device *dev, void *buffer, size_t size, unsigned long timeout_ms); + /** + * @gsc_command: Send a GSC command. + */ ssize_t (*gsc_command)(struct device *dev, u8 client_id, u32 fence_id, struct scatterlist *sg_in, size_t total_in_len, struct scatterlist *sg_out); @@ -35,14 +41,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; }; From patchwork Fri Mar 8 11:55:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586774 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58D64C54E5D for ; Fri, 8 Mar 2024 11:57:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61026113897; Fri, 8 Mar 2024 11:57:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gI4WC5e2"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92C9411388D; Fri, 8 Mar 2024 11:57:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899023; x=1741435023; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yw2AQU+xKWtINom5CX+Xoavf7lFYsBroDjnW8m3JRh8=; b=gI4WC5e2Y4NeO8CiLeDuGi08FrHYwWOPnfbX/0FMrp1qK66IZ1iA+XaI Wbbo71YOABFS8nwIlIkFtZGYYasSnv0vBuaw9VKEj7a52PGv/9wamGHJ4 FMmTD6CIy9QE4QL2UcJFgSt65bD7CWzIKadePLhtXfyvhaMmSKRzV38go Ef4qsN+nt8h5QFcBBVlEMVyFyx65auHwWOoJWlhYqJTuu/Pks5X+ae5zr AWRByaYaavbUbI7ZLT7z50BSnvSqMkOnJNLDUWb2Ln4bv+20x4IcXnLAD LZHS+qPVQIU7YgMD5IWfAPw1NCbsIIgy2guQyX4gAOdkOAQLXOwRzvtqb w==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794545" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794545" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378578" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:56:59 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com, Geert Uytterhoeven Subject: [PATCH v2 08/16] m68k: pgtable: Add missing #include Date: Fri, 8 Mar 2024 13:55:46 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Geert Uytterhoeven When just including : include/asm-generic/pgtable-nop4d.h:9:18: error: unknown type name ‘pgd_t’ 9 | typedef struct { pgd_t pgd; } p4d_t; | ^~~~~ Make self-contained by including . Reported-by: Jani Nikula Closes: https://lore.kernel.org/r/878r2uxwha.fsf@intel.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Jani Nikula --- arch/m68k/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/m68k/include/asm/pgtable.h b/arch/m68k/include/asm/pgtable.h index 27525c6a12fd..49fcfd734860 100644 --- a/arch/m68k/include/asm/pgtable.h +++ b/arch/m68k/include/asm/pgtable.h @@ -2,6 +2,8 @@ #ifndef __M68K_PGTABLE_H #define __M68K_PGTABLE_H +#include + #ifdef __uClinux__ #include #else From patchwork Fri Mar 8 11:55:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A50A9C54E4A for ; Fri, 8 Mar 2024 11:57:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE13B113899; Fri, 8 Mar 2024 11:57:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Hdng7vy6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4325011389A; Fri, 8 Mar 2024 11:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899029; x=1741435029; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XOvwpxtMLS91XNHKuhCHjLkFXhUKzy8vr1s/svPWN2s=; b=Hdng7vy6TKImAiHX2vEJHAdkViiWJezF8uXVz2ejA9u0Tlu1m8h8+nfZ onb4tQbgNOWZIkMt/dlFSFftclpmVca8L6WAXZhDEtJtBkHIjKArC5hGg c70PXBytSTdMFguyMIPlum/ATQolYXnTlPcbTjaXkT6YkNnGz43OmNpPS KmDMKxxDVJTAX6VDlOlufxwYWLt0tbOA9nqLKxLR7PFcJh+1yyCIiI0QU 8c3Zakc3tMmmfObaaW6Flni04iPO7QoKvqmH8JKRHNCrMphHQD6my+O+a b19k00qGT+mF1xQ33gHb0SorUbktd4C0dSuq1FR1xwy++nPianvq0KgNa g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794560" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794560" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378591" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:05 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com, Christian Koenig , Huang Rui Subject: [PATCH v2 09/16] drm/ttm: fix ttm_bo.h kernel-doc warnings Date: Fri, 8 Mar 2024 13:55:47 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Some renames, some formatting fixes, add some missing documentation. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- 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..59151ecb2db3 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: The bulk move object. + * @priority: Priority for LRU, BOs with lower priority are evicted first. + * @pin_count: Pin count. * * 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: The TTM BO. * * 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: Statistics on how many bytes have been moved. * * 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: Ticket used to acquire the ww_mutex. * * 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. * From patchwork Fri Mar 8 11:55:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79988C5475B for ; Fri, 8 Mar 2024 11:57:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D39B111389C; Fri, 8 Mar 2024 11:57:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="GG7iNoFt"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 80AE911388D; Fri, 8 Mar 2024 11:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899037; x=1741435037; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o8uVRDOzaaFZdZ+mhJs2cTvzBRyLjiIu6MVzg+k8KHA=; b=GG7iNoFt50cRtr4VgTliWiq+xGLYhXP8cNPgyB82gk7NxpLO+A1GvpuE GmZqwxlP7FqRaoJKKj/CYDlZM6qntU9HFiAPeiYOdCJV7uVM4Vf7Yz5SP d9G7ArX6ERi5gi+TpikZ/KQrJbevzfJ1y+nDOTi/OZWss1E9ucyHz6+iK A2yDTWEIEeWzsZdp3xW1fTcTuPrwUHN4/VUuDah0rndUtEX1PNhfXYyNf zFNnzP8/Qn//O0GEsDtG7Q9asltGyGoCDFB/CRAEiZb23gG2U0mAjpEra UtxaRBnm1/f7J26Tx9EJmwJnq6THMN+vF7Qz6Y6NpRu5wbpraxuKynjds g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794566" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794566" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378597" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:12 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com, Christian Koenig , Huang Rui Subject: [PATCH v2 10/16] drm/ttm: make ttm_caching.h self-contained Date: Fri, 8 Mar 2024 13:55:48 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Include for pgprot_t. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula Reviewed-by: Alex Deucher --- 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 + #define TTM_NUM_CACHING_TYPES 3 /** From patchwork Fri Mar 8 11:55:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 568BEC5475B for ; Fri, 8 Mar 2024 11:57:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5549A11389B; Fri, 8 Mar 2024 11:57:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="i/WBDm6U"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id E3B1111389B; Fri, 8 Mar 2024 11:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899043; x=1741435043; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IIXti1MkTqvTVA94CoqBqdartGD2UQ8jqU4O6AEfrYw=; b=i/WBDm6UfnIVImxUOEMfw+zE3kbqbElJpDRTKSE2MAE2XXEJksBQbeCH AOh6lKIcW89mQOnD2kHHTGvERuSnPRdgJ4S73vrq+zkGJZbHMvt22U1Qf QWlGyPj62X9eO2fJiVXqLDQHL99RU8XNKLZrP11wHj/H5oqap6jfi2B4P FwvMGpKagWI1kPPUnYNY8smeh1M79gyM85xBO49t+MajKd4ZQFhDFcL0x blqcts5PLQ/oleNaq8Yi2zFAhG1RBte0228ACNH+JZAI8xZ0wk6xGbZeN isGeup3H5SS0zd9HI6GzOm8TSjCPjprDeLQuHAu6AMTjwlVYqe8jeLLQ7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794572" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794572" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378601" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:19 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com, Christian Koenig , Huang Rui Subject: [PATCH v2 11/16] drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings Date: Fri, 8 Mar 2024 13:55:49 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fix some formatting errors and excess documentation. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- 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. From patchwork Fri Mar 8 11:55:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586778 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D026DC54E4A for ; Fri, 8 Mar 2024 11:57:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E0D111388D; Fri, 8 Mar 2024 11:57:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CebGMTwz"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFC5B11388D; Fri, 8 Mar 2024 11:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899050; x=1741435050; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=elOtPKkOr4UKttRzpakNREhjj46j10Np7/4B9ThmkmE=; b=CebGMTwzt/vEbCkr7cKUDVhBnBq9kN7JMyiRBzE4tMa1jSu1Asdz7Dhy T8csmQEVrU8h+9liW6vwgjyKouMJCs2PVukvb/wf6+R1n/sI6ygaYZDyE FJ+d5kQN0ou/m56S0nUd/TtSq3J5V6XXx+WACZMHnQnzdJq4XlS60GxoX rcNBykGn5VE6guEHXRU5+rei/oClpnuFFRMuNO3+3Ejw1WW4JTjuyTJOQ PRuIywR9vV3+wrYt415Bj9jFBgIeXK1XAD9HO6VO9pnYLTFfaJQyNQ3F0 RtUXcxlXtGsJiRxo+WZIuVugQ4IKuDqMSRHKOzFyDiCoKHkAuPaaZuJ5j A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794577" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794577" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378619" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:26 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com, Christian Koenig , Huang Rui Subject: [PATCH v2 12/16] drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings Date: Fri, 8 Mar 2024 13:55:50 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There's no proper way to document function pointer members, but at least silence the warnings. Cc: Christian Koenig Cc: Huang Rui Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- 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. From patchwork Fri Mar 8 11:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586779 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD25DC54E4A for ; Fri, 8 Mar 2024 11:57:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0070B1138A4; Fri, 8 Mar 2024 11:57:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jNXNObr2"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65E4511389F; Fri, 8 Mar 2024 11:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899058; x=1741435058; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TF0lzgQn23Y7ii7VeTzRt/zkxkPp119DqGByGL8Vc+0=; b=jNXNObr2vijVLyZp+4M5Jyw9Rsv3wzDoqTsiLbj7FellW8d5U4MGhmnF FSVIavVgHNBjQMhvtRI7lU5lJLLycl7+JiirPhpsaFgAvE+sb6xHssvgY Dz2k0iuyQXTHfI8+ScB3FxnRnOmyX8mk1FgSX7s2/hclaBWWa6sucqLdm COa5M1Z59elV1BoyzYtFItXgLsD14ZL4Q6qHe1yqz7/lDKeSgas8dP3Or auhuF2+J209EiaOiIlNGRunVtQvJW7hykd1n+BKK0mzWYjxXQUVxn+7el y7GEUgCm2Bidfg+W/bPOWMhityxB0qRUQN0/ugJ/u+8JCgfgtx2FZlod2 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794590" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794590" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378645" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:32 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com, Christian Koenig , Huang Rui , kernel test robot Subject: [PATCH v2 13/16] drm/ttm: make ttm_pool.h self-contained Date: Fri, 8 Mar 2024 13:55:51 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" struct seq_file needs a forward declaration in some configs. Sort the forward declarations while at it. Cc: Christian Koenig Cc: Huang Rui Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403072259.EEC2Vf1X-lkp@intel.com/ Signed-off-by: Jani Nikula Reviewed-by: Alex Deucher --- include/drm/ttm/ttm_pool.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/drm/ttm/ttm_pool.h b/include/drm/ttm/ttm_pool.h index 4490d43c63e3..160d954a261e 100644 --- a/include/drm/ttm/ttm_pool.h +++ b/include/drm/ttm/ttm_pool.h @@ -32,9 +32,10 @@ #include struct device; -struct ttm_tt; -struct ttm_pool; +struct seq_file; struct ttm_operation_ctx; +struct ttm_pool; +struct ttm_tt; /** * struct ttm_pool_type - Pool for a certain memory type From patchwork Fri Mar 8 11:55:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586780 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAC14C54E5C for ; Fri, 8 Mar 2024 11:57:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB5351138A8; Fri, 8 Mar 2024 11:57:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="A0kFX4zY"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 593231138A5; Fri, 8 Mar 2024 11:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899063; x=1741435063; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=apBQzrxYabSZtNDVkTPPvcdYVaeGK2mcjHuAwdYr2Q8=; b=A0kFX4zYFeNBsRHKVaJPmjCdmqx1v7JFwoGpb7TTSXuGGUtyYS24rn29 8B8kxMRWQVeH0xpS1Z11I9Fexx0RgJmJIEVbFl+L5Hz+A6F6/IS4synYT fbVYpZR9rN9Cok1lb3mxNxCYQ0wtP0c5glDm62GuXHhaUnMRn73nH2WeM QUKbVsa+M56c496jR0GNZdGJbN3Hb6+iL38EgKxX+oyGzJESxog8a5y2p h9c7y5sEunhku83sAkZ/NQqPDUAIleGfI+RFx0B/AtH2KSFFwTDr0oNcY 5Xxcreb9ajIsCsuCJjmD9zRL9cYdVnDYRDdiH+Mik3zahkIktimMaPi6n w==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4794603" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="4794603" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10378665" Received: from unknown (HELO localhost) ([10.252.34.187]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:40 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 14/16] drm/dp_mst: avoid includes in drm_dp_mst_topology_internal.h Date: Fri, 8 Mar 2024 13:55:52 +0200 Message-Id: <83d96b40724e7fd18bec81a9c6c935dbe924da91.1709898638.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Prefer forward declarations over includes where possible. Signed-off-by: Jani Nikula Reviewed-by: Lucas De Marchi --- drivers/gpu/drm/display/drm_dp_mst_topology_internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology_internal.h b/drivers/gpu/drm/display/drm_dp_mst_topology_internal.h index a785ccbfdd73..f41c34e26be2 100644 --- a/drivers/gpu/drm/display/drm_dp_mst_topology_internal.h +++ b/drivers/gpu/drm/display/drm_dp_mst_topology_internal.h @@ -10,7 +10,9 @@ #ifndef _DRM_DP_MST_HELPER_INTERNAL_H_ #define _DRM_DP_MST_HELPER_INTERNAL_H_ -#include +struct drm_dp_sideband_msg_req_body; +struct drm_dp_sideband_msg_tx; +struct drm_printer; void drm_dp_encode_sideband_req(const struct drm_dp_sideband_msg_req_body *req, From patchwork Fri Mar 8 11:55:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B909C54E5C for ; Fri, 8 Mar 2024 11:57:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 601291138AC; Fri, 8 Mar 2024 11:57:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ZrkZLjPX"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5884511389F; Fri, 8 Mar 2024 11:57:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899070; x=1741435070; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gV5JhL2Ws+DNnnOufGaa75CdQlGS2UAeU2QL5WdrS30=; b=ZrkZLjPXj2cMn/GgoYxU0reLFL9iX8KXuuJ4Yo9p8JXis86kitDMz3f5 mL649+BlwKXib4JijImPdqWeZLkCjgj7kQPBIOQzKe1MqLhFJRr2qbJXM zsXams0HsPBOd5h+RUZ28ZAzv0OUn5CX0MGXoHZh6/8Yt8s+VzmvBrfrF BIo7NmKsm3jbkMd9nuLwjAmFeWi2R8FdZ2FB8FslgMlSIO6PAMYLDgAcP Kclf7yw6Pf69LfJtgHCv0Ybgr6riwhRnHWugJK3OhsCd5e4v8uY9pO1+V aURRnRDGsoj+SuzyMSmkvr+uHV+YND8l/LL0lrFZLQ5X1BdYnynWsRKiH A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="15262446" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15262446" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10487914" Received: from unknown (HELO localhost) ([10.252.34.187]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:47 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 15/16] drm: avoid includes in drm_crtc_helper_internal.h Date: Fri, 8 Mar 2024 13:55:53 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Prefer forward declarations over includes where possible. Signed-off-by: Jani Nikula Reviewed-by: Lucas De Marchi --- drivers/gpu/drm/drm_crtc_helper_internal.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h index ed4deed07abd..8059f65c5d6c 100644 --- a/drivers/gpu/drm/drm_crtc_helper_internal.h +++ b/drivers/gpu/drm/drm_crtc_helper_internal.h @@ -29,10 +29,12 @@ #ifndef __DRM_CRTC_HELPER_INTERNAL_H__ #define __DRM_CRTC_HELPER_INTERNAL_H__ -#include -#include -#include -#include +enum drm_mode_status; +struct drm_connector; +struct drm_crtc; +struct drm_display_mode; +struct drm_encoder; +struct drm_modeset_acquire_ctx; /* drm_probe_helper.c */ enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc, From patchwork Fri Mar 8 11:55:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65CBAC54E5D for ; Fri, 8 Mar 2024 11:57:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8013F1138B3; Fri, 8 Mar 2024 11:57:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ZLST9wA9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id B57FC1138AB; Fri, 8 Mar 2024 11:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709899077; x=1741435077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xEZPiOuwz/IqmQQHkYnuuAN/wvniqGJc+dYiDHNlB/E=; b=ZLST9wA9MZ2LAz/flJMPvdHfejsBV9ljs68dpdSdXoFMijmMLvhcPdvD Ua0eFcOjLtShNI12PG6RYZCmV0VXDmE7F0o/h1ZTQOAi36xXObwT9eW6P F7hrLjQ4eVJapFUUAuQ/RfWDKKo9Jl6UT/E/eNayi9/ty4mFiwfVHKSGS QUljiYZWDwz7w+ke91D6IaBjpBlTb8ZBrVLjG45ahlf5czJ21/kmlIzoH +rAbLHQFJdk0zzNVAKGU8gj0c+I6cyrglP6nP+GSe5znZdZI2hYHbV2eE Pj7X/s6RQtgB8Yn5uJZ6jDc76XTslj0l9Rv8Orya6ziyMLXH0OjwEXAO3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="15262455" X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="15262455" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,109,1708416000"; d="scan'208";a="10487934" Received: from unknown (HELO localhost) ([10.252.34.187]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2024 03:57:53 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com, David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Masahiro Yamada , lucas.demarchi@intel.com Subject: [PATCH v2 16/16] drm: ensure drm headers are self-contained and pass kernel-doc Date: Fri, 8 Mar 2024 13:55:54 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Masahiro Yamada Acked-by: Thomas Zimmermann Signed-off-by: Jani Nikula --- 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)