* [PATCH] drm/amd/display: Fix annotations for connector poll/detect parameters
@ 2025-11-07 14:15 Srinivasan Shanmugam
2025-11-07 16:38 ` Aurabindo Pillai
0 siblings, 1 reply; 2+ messages in thread
From: Srinivasan Shanmugam @ 2025-11-07 14:15 UTC (permalink / raw)
To: Aurabindo Pillai, Roman Li
Cc: amd-gfx, Srinivasan Shanmugam, Harry Wentland, Tom Chung
Adds the missing @aconnector, @connector, and @force descriptions:
@aconnector – This is the DM (Display Manager) connector. It gives
access to the DRM connector, the DC link, and hotplug/poll state. The
code uses it to check the link, update the sink, and manage connector
state changes.
@connector – This is the main DRM connector given by the DRM core.
Inside the detect function, it is converted to amdgpu_dm_connector so we
can run DC link detection, either light or full.
@force – This flag tells the function whether to run a full detect
again. If false, we avoid heavy DAC load detect steps to prevent
flicker. If true, we force a re-detect even when we normally skip it.
Fixes the below with gcc W=1:
function param 'aconnector' not described in 'amdgpu_dm_connector_poll'
function param 'force' not described in 'amdgpu_dm_connector_poll'
function param 'connector' not described in 'amdgpu_dm_connector_detect'
function param 'force' not described in 'amdgpu_dm_connector_detect'
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index ba11421332da..aa31e969b39d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7220,10 +7220,18 @@ create_stream_for_sink(struct drm_connector *connector,
}
/**
- * amdgpu_dm_connector_poll() - Poll a connector to see if it's connected to a display
+ * amdgpu_dm_connector_poll - Poll a connector to see if it's connected to a display
+ * @aconnector: DM connector to poll (owns @base drm_connector and @dc_link)
+ * @force: if true, force polling even when DAC load detection was used
*
- * Used for connectors that don't support HPD (hotplug detection)
- * to periodically checked whether the connector is connected to a display.
+ * Used for connectors that don't support HPD (hotplug detection) to
+ * periodically check whether the connector is connected to a display.
+ *
+ * When connection was determined via DAC load detection, we avoid
+ * re-running it on normal polls to prevent visible glitches, unless
+ * @force is set.
+ *
+ * Return: The probed connector status (connected/disconnected/unknown).
*/
static enum drm_connector_status
amdgpu_dm_connector_poll(struct amdgpu_dm_connector *aconnector, bool force)
@@ -7291,6 +7299,14 @@ amdgpu_dm_connector_poll(struct amdgpu_dm_connector *aconnector, bool force)
* 1. This interface is NOT called in context of HPD irq.
* 2. This interface *is called* in context of user-mode ioctl. Which
* makes it a bad place for *any* MST-related activity.
+ *
+ * @connector: The DRM connector we are checking. We convert it to
+ * amdgpu_dm_connector so we can read the DC link and state.
+ * @force: If true, do a full detect again. This is used even when
+ * a lighter check would normally be used to avoid flicker.
+ *
+ * Return: The connector status (connected, disconnected, or unknown).
+ *
*/
static enum drm_connector_status
amdgpu_dm_connector_detect(struct drm_connector *connector, bool force)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: Fix annotations for connector poll/detect parameters
2025-11-07 14:15 [PATCH] drm/amd/display: Fix annotations for connector poll/detect parameters Srinivasan Shanmugam
@ 2025-11-07 16:38 ` Aurabindo Pillai
0 siblings, 0 replies; 2+ messages in thread
From: Aurabindo Pillai @ 2025-11-07 16:38 UTC (permalink / raw)
To: Srinivasan Shanmugam, Roman Li; +Cc: amd-gfx, Harry Wentland, Tom Chung
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
On 11/7/25 9:15 AM, Srinivasan Shanmugam wrote:
> Adds the missing @aconnector, @connector, and @force descriptions:
>
> @aconnector – This is the DM (Display Manager) connector. It gives
> access to the DRM connector, the DC link, and hotplug/poll state. The
> code uses it to check the link, update the sink, and manage connector
> state changes.
>
> @connector – This is the main DRM connector given by the DRM core.
> Inside the detect function, it is converted to amdgpu_dm_connector so we
> can run DC link detection, either light or full.
>
> @force – This flag tells the function whether to run a full detect
> again. If false, we avoid heavy DAC load detect steps to prevent
> flicker. If true, we force a re-detect even when we normally skip it.
>
> Fixes the below with gcc W=1:
> function param 'aconnector' not described in 'amdgpu_dm_connector_poll'
> function param 'force' not described in 'amdgpu_dm_connector_poll'
> function param 'connector' not described in 'amdgpu_dm_connector_detect'
> function param 'force' not described in 'amdgpu_dm_connector_detect'
>
> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Cc: Roman Li <roman.li@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Tom Chung <chiahsuan.chung@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
> ---
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++++++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index ba11421332da..aa31e969b39d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -7220,10 +7220,18 @@ create_stream_for_sink(struct drm_connector *connector,
> }
>
> /**
> - * amdgpu_dm_connector_poll() - Poll a connector to see if it's connected to a display
> + * amdgpu_dm_connector_poll - Poll a connector to see if it's connected to a display
> + * @aconnector: DM connector to poll (owns @base drm_connector and @dc_link)
> + * @force: if true, force polling even when DAC load detection was used
> *
> - * Used for connectors that don't support HPD (hotplug detection)
> - * to periodically checked whether the connector is connected to a display.
> + * Used for connectors that don't support HPD (hotplug detection) to
> + * periodically check whether the connector is connected to a display.
> + *
> + * When connection was determined via DAC load detection, we avoid
> + * re-running it on normal polls to prevent visible glitches, unless
> + * @force is set.
> + *
> + * Return: The probed connector status (connected/disconnected/unknown).
> */
> static enum drm_connector_status
> amdgpu_dm_connector_poll(struct amdgpu_dm_connector *aconnector, bool force)
> @@ -7291,6 +7299,14 @@ amdgpu_dm_connector_poll(struct amdgpu_dm_connector *aconnector, bool force)
> * 1. This interface is NOT called in context of HPD irq.
> * 2. This interface *is called* in context of user-mode ioctl. Which
> * makes it a bad place for *any* MST-related activity.
> + *
> + * @connector: The DRM connector we are checking. We convert it to
> + * amdgpu_dm_connector so we can read the DC link and state.
> + * @force: If true, do a full detect again. This is used even when
> + * a lighter check would normally be used to avoid flicker.
> + *
> + * Return: The connector status (connected, disconnected, or unknown).
> + *
> */
> static enum drm_connector_status
> amdgpu_dm_connector_detect(struct drm_connector *connector, bool force)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-07 16:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 14:15 [PATCH] drm/amd/display: Fix annotations for connector poll/detect parameters Srinivasan Shanmugam
2025-11-07 16:38 ` Aurabindo Pillai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox