drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers
Subsystems (15)
Lyude Paul
maintainerv3 cover drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers
Since it's been asked quite a few times on some of the various DP related patch series I've submitted to use the new DRM printk helpers, and it technically wasn't really trivial to do this before due to the lack of a consistent way to find a drm_device for an AUX channel, this patch series aims to address this. In this series we:
* (NEW!) Move i2c adapter setup into drm_dp_aux_init() and add drm_dp_aux_fini()
* Clean-up potentially erroneous usages of drm_dp_aux_init() and drm_dp_aux_register() so that actual AUX registration doesn't happen until we have an associated DRM device
* Clean-up any obvious errors in drivers we find along the way
* Add a backpointer to the respective drm_device for an AUX channel in drm_dp_aux.drm_dev, and hook it up in every driver with an AUX channel across the tree
* Add a new ratelimited print helper we'll need for converting the DP helpers over to using the new DRM printk helpers
* Fix any inconsistencies with logging in drm_dp_helper.c so we always have the aux channel name printed
* Prepare the various DP helpers so they can find the correct drm_device to use for logging
* And finally, convert all of the DP helpers over to using drm_dbg_*() and drm_err().
Lyude Paul (20):
drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector() drm/dp: Add __no_check to drm_dp_aux_register()
drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late
register/early unregister
drm/dp: Add backpointer to drm_device in drm_dp_aux drm/dp: Clarify DP AUX registration time
drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay() drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay() drm/dp: Always print aux channel name in logs drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect() drm/dp_dual_mode: Pass drm_device to
drm_dp_dual_mode_set_tmds_output()
drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock() drm/dp_dual_mode: Pass drm_device to
drm_dp_dual_mode_get_tmds_output()
drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode() drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw() drm/print: Handle potentially NULL drm_devices in drm_dbg_* drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*() drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using
drm_err/drm_dbg_kms()
drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()
.../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 7 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 17 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.h | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 49 ++- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 6 +- .../drm/bridge/analogix/analogix-anx6345.c | 3 + .../drm/bridge/analogix/analogix-anx78xx.c | 3 + .../drm/bridge/analogix/analogix_dp_core.c | 2 + .../drm/bridge/cadence/cdns-mhdp8546-core.c | 26 +- drivers/gpu/drm/bridge/tc358767.c | 6 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 17 +- drivers/gpu/drm/drm_dp_aux_dev.c | 6 + drivers/gpu/drm/drm_dp_dual_mode_helper.c | 68 ++-- drivers/gpu/drm/drm_dp_helper.c | 260 +++++++----- drivers/gpu/drm/drm_dp_mst_topology.c | 376 +++++++++--------- drivers/gpu/drm/i915/display/intel_dp_aux.c | 11 +- drivers/gpu/drm/i915/display/intel_dp_aux.h | 2 +- .../drm/i915/display/intel_dp_link_training.c | 6 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 7 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 17 +- drivers/gpu/drm/msm/dp/dp_aux.c | 1 + drivers/gpu/drm/msm/dp/dp_ctrl.c | 6 +- drivers/gpu/drm/msm/edp/edp.h | 3 +- drivers/gpu/drm/msm/edp/edp_aux.c | 6 +- drivers/gpu/drm/msm/edp/edp_ctrl.c | 8 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 27 +- drivers/gpu/drm/radeon/atombios_dp.c | 5 +- drivers/gpu/drm/radeon/radeon_connectors.c | 1 + drivers/gpu/drm/tegra/dpaux.c | 15 +- drivers/gpu/drm/xlnx/zynqmp_dp.c | 6 +- include/drm/drm_dp_dual_mode_helper.h | 14 +- include/drm/drm_dp_helper.h | 24 +- include/drm/drm_dp_mst_helper.h | 3 +- include/drm/drm_print.h | 20 +- 36 files changed, 631 insertions(+), 431 deletions(-)
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Lyude Paul
maintainerPATCH v3 1/20 drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()
While working on moving i2c device registration into drm_dp_aux_init() - I realized that in order to do so we need to make sure that drivers calling drm_dp_aux_init() handle any errors it could possibly return. In the process of doing that, I noticed that the majority of AMD's code for DP connector creation doesn't attempt to do any real error handling.
So, let's fix this and also cleanup amdgpu_dm_initialize_dp_connector() while we're at it. This way we can handle the error codes from drm_dp_aux_init().
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 +++++++----- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 44 +++++++++++-------- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 6 +-- 3 files changed, 45 insertions(+), 34 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +17 -12
@@ -7608,10 +7608,9 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm, aconnector->i2c = i2c; res =i2c_add_adapter (&i2c->base); -if (res) {DRM_ERROR ("Failed to register hw i2c %d\n" , link->link_index); - goto out_free; + goto fail_free; } connector_type =to_drm_connector_type (link->connector_signal);
@@ -7625,8 +7624,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,if (res) {DRM_ERROR ("connector_init failed\n" ); - aconnector->connector_id =-1 ; - goto out_free; + goto fail_id; } drm_connector_helper_add(
@@ -7643,15 +7641,22 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,drm_connector_attach_encoder ( &aconnector->base, &aencoder->base); -if (connector_type == DRM_MODE_CONNECTOR_DisplayPort - || connector_type == DRM_MODE_CONNECTOR_eDP) -amdgpu_dm_initialize_dp_connector (dm, aconnector, link->link_index); - -out_free: -if (res) { -kfree (i2c); - aconnector->i2c =NULL ; +if (connector_type == DRM_MODE_CONNECTOR_DisplayPort || + connector_type == DRM_MODE_CONNECTOR_eDP) { + res =amdgpu_dm_initialize_dp_connector (dm, aconnector, link->link_index); +if (res) + goto fail_cleanup; } + +return 0 ; +fail_cleanup: +drm_connector_cleanup (&aconnector->base); +fail_id: + aconnector->connector_id =-1 ; +fail_free: +kfree (i2c); + aconnector->i2c =NULL ; +return res; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +25 -19
58 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h +3 -3
@@ -31,9 +31,9 @@ struct amdgpu_dm_connector;int dm_mst_get_pbn_divider (struct dc_link *link); -void amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, -struct amdgpu_dm_connector *aconnector, -int link_index); +int amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, +struct amdgpu_dm_connector *aconnector, +int link_index);void dm_dp_create_fake_mst_encoders (struct amdgpu_device *adev);
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()
Thanks for the change!
Quoted 145 lines · Lyude Paul
While working on moving i2c device registration into
drm_dp_aux_init()- I realized that in order to do so we need to make sure that drivers callingdrm_dp_aux_init()handle any errors it could possibly return. In the process of doing that, I noticed that the majority of AMD's code for DP connector creation doesn't attempt to do any real error handling.So, let's fix this and also cleanup
amdgpu_dm_initialize_dp_connector()while we're at it. This way we can handle the error codes fromdrm_dp_aux_init().Signed-off-by Lyude Paul <[email protected]>--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 +++++++----- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 44 +++++++++++-------- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 6 +-- 3 files changed, 45 insertions(+), 34 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +17
-12@@ -7608,10 +7608,9 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm, aconnector->i2c = i2c; res =i2c_add_adapter (&i2c->base); -if (res) {DRM_ERROR ("Failed to register hw i2c %d\n" , link->link_index); - goto out_free; + goto fail_free; } connector_type =to_drm_connector_type (link->connector_signal);@@ -7625,8 +7624,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,if (res) {DRM_ERROR ("connector_init failed\n" ); - aconnector->connector_id =-1 ; - goto out_free; + goto fail_id; } drm_connector_helper_add(@@ -7643,15 +7641,22 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,drm_connector_attach_encoder ( &aconnector->base, &aencoder->base); -if (connector_type == DRM_MODE_CONNECTOR_DisplayPort - || connector_type == DRM_MODE_CONNECTOR_eDP) -amdgpu_dm_initialize_dp_connector (dm, aconnector, link->link_index); - -out_free: -if (res) { -kfree (i2c); - aconnector->i2c =NULL ; +if (connector_type == DRM_MODE_CONNECTOR_DisplayPort || + connector_type == DRM_MODE_CONNECTOR_eDP) { + res =amdgpu_dm_initialize_dp_connector (dm, aconnector, link->link_index); +if (res) + goto fail_cleanup; } + +return 0 ; +fail_cleanup: +drm_connector_cleanup (&aconnector->base); +fail_id: + aconnector->connector_id =-1 ; +fail_free: +kfree (i2c); + aconnector->i2c =NULL ; +return res; }drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +25
-19@@ -425,33 +425,39 @@ static const struct drm_dp_mst_topology_cbs dm_mst_cbs = { .add_connector = dm_dp_add_mst_connector, }; -void amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, -struct amdgpu_dm_connector *aconnector, -int link_index) +int amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, +struct amdgpu_dm_connector *aconnector, +int link_index) { - aconnector->dm_dp_aux.aux.name = -kasprintf (GFP_KERNEL ,"AMDGPU DM aux hw bus %d" , - link_index); - aconnector->dm_dp_aux.aux.transfer = dm_dp_aux_transfer; - aconnector->dm_dp_aux.ddc_service = aconnector->dc_link->ddc; +struct amdgpu_dm_dp_aux *dm_aux = &aconnector->dm_dp_aux; +int ret; -drm_dp_aux_init (&aconnector->dm_dp_aux.aux); -drm_dp_cec_register_connector (&aconnector->dm_dp_aux.aux, - &aconnector->base); + dm_aux->aux.name =kasprintf (GFP_KERNEL ,"AMDGPU DM aux hw bus %d" , link_index); +if (!dm_aux->aux.name) +return -ENOMEM ; + + dm_aux->aux.transfer = dm_dp_aux_transfer; + dm_aux->ddc_service = aconnector->dc_link->ddc; + +drm_dp_aux_init (&dm_aux->aux); +drm_dp_cec_register_connector (&dm_aux->aux, &aconnector->base);if (aconnector->base.connector_type == DRM_MODE_CONNECTOR_eDP) -return ; +return 0 ; aconnector->mst_mgr.cbs = &dm_mst_cbs; -drm_dp_mst_topology_mgr_init ( - &aconnector->mst_mgr, -adev_to_drm (dm->adev), - &aconnector->dm_dp_aux.aux, -16 , -4 , - aconnector->connector_id); + ret =drm_dp_mst_topology_mgr_init (&aconnector->mst_mgr,adev_to_drm (dm->adev), + &dm_aux->aux,16 ,4 , aconnector->connector_id); +if (ret) + goto unreg_cec;drm_connector_attach_dp_subconnector_property (&aconnector->base); + +return 0 ; +unreg_cec: +drm_dp_cec_unregister_connector (&dm_aux->aux); +kfree (dm_aux->aux.name); +return ret; }int dm_mst_get_pbn_divider (struct dc_link *link)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h +0
-0@@ -31,9 +31,9 @@ struct amdgpu_dm_connector;int dm_mst_get_pbn_divider (struct dc_link *link);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h struct amdgpu_dm_connector; · line 39
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h +3
-3-void amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, -struct amdgpu_dm_connector *aconnector, -int link_index); +int amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, +struct amdgpu_dm_connector *aconnector, +int link_index);void dm_dp_create_fake_mst_encoders (struct amdgpu_device *adev);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()
[AMD Official Use Only - Internal Distribution Only]
I'm fine with having these changes go through drm-misc.
Alex
________________________________
From: Lipski, Mikita <[email protected]>
Sent: Wednesday, April 21, 2021 10:23 AM
To: Lyude Paul <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>; Ville Syrjälä <[email protected]>; Jani Nikula <[email protected]>; Rodrigo Vivi <[email protected]>; Thomas Zimmermann <[email protected]>; Thierry Reding <[email protected]>
Cc: Wang, Chao-kai (Stylon) <[email protected]>; Lipski, Mikita <[email protected]>; Park, Chris <[email protected]>; Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Lin, Wayne <[email protected]>; Siqueira, Rodrigo <[email protected]>; open list <[email protected]>; Kazlauskas, Nicholas <[email protected]>; Somasundaram, Meenakshikumar <[email protected]>; David Airlie <[email protected]>; Pillai, Aurabindo <[email protected]>; Daniel Vetter <[email protected]>; Bas Nieuwenhuizen <[email protected]>; Deucher, Alexander <[email protected]>; Cornij, Nikola <[email protected]>; Wentland, Harry <[email protected]>; Koenig, Christian <[email protected]>
Subject: Re: [PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()
Thanks for the change!
Quoted 145 lines · Lyude Paul
While working on moving i2c device registration into
drm_dp_aux_init()- I realized that in order to do so we need to make sure that drivers callingdrm_dp_aux_init()handle any errors it could possibly return. In the process of doing that, I noticed that the majority of AMD's code for DP connector creation doesn't attempt to do any real error handling.So, let's fix this and also cleanup
amdgpu_dm_initialize_dp_connector()while we're at it. This way we can handle the error codes fromdrm_dp_aux_init().Signed-off-by Lyude Paul <[email protected]>--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 +++++++----- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 44 +++++++++++-------- .../display/amdgpu_dm/amdgpu_dm_mst_types.h | 6 +-- 3 files changed, 45 insertions(+), 34 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +17
-12@@ -7608,10 +7608,9 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm, aconnector->i2c = i2c; res =i2c_add_adapter (&i2c->base); -if (res) {DRM_ERROR ("Failed to register hw i2c %d\n" , link->link_index); - goto out_free; + goto fail_free; } connector_type =to_drm_connector_type (link->connector_signal);@@ -7625,8 +7624,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,if (res) {DRM_ERROR ("connector_init failed\n" ); - aconnector->connector_id =-1 ; - goto out_free; + goto fail_id; } drm_connector_helper_add(@@ -7643,15 +7641,22 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,drm_connector_attach_encoder ( &aconnector->base, &aencoder->base); -if (connector_type == DRM_MODE_CONNECTOR_DisplayPort - || connector_type == DRM_MODE_CONNECTOR_eDP) -amdgpu_dm_initialize_dp_connector (dm, aconnector, link->link_index); - -out_free: -if (res) { -kfree (i2c); - aconnector->i2c =NULL ; +if (connector_type == DRM_MODE_CONNECTOR_DisplayPort || + connector_type == DRM_MODE_CONNECTOR_eDP) { + res =amdgpu_dm_initialize_dp_connector (dm, aconnector, link->link_index); +if (res) + goto fail_cleanup; } + +return 0 ; +fail_cleanup: +drm_connector_cleanup (&aconnector->base); +fail_id: + aconnector->connector_id =-1 ; +fail_free: +kfree (i2c); + aconnector->i2c =NULL ; +return res; }drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +25
-19@@ -425,33 +425,39 @@ static const struct drm_dp_mst_topology_cbs dm_mst_cbs = { .add_connector = dm_dp_add_mst_connector, }; -void amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, -struct amdgpu_dm_connector *aconnector, -int link_index) +int amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, +struct amdgpu_dm_connector *aconnector, +int link_index) { - aconnector->dm_dp_aux.aux.name = -kasprintf (GFP_KERNEL ,"AMDGPU DM aux hw bus %d" , - link_index); - aconnector->dm_dp_aux.aux.transfer = dm_dp_aux_transfer; - aconnector->dm_dp_aux.ddc_service = aconnector->dc_link->ddc; +struct amdgpu_dm_dp_aux *dm_aux = &aconnector->dm_dp_aux; +int ret; -drm_dp_aux_init (&aconnector->dm_dp_aux.aux); -drm_dp_cec_register_connector (&aconnector->dm_dp_aux.aux, - &aconnector->base); + dm_aux->aux.name =kasprintf (GFP_KERNEL ,"AMDGPU DM aux hw bus %d" , link_index); +if (!dm_aux->aux.name) +return -ENOMEM ; + + dm_aux->aux.transfer = dm_dp_aux_transfer; + dm_aux->ddc_service = aconnector->dc_link->ddc; + +drm_dp_aux_init (&dm_aux->aux); +drm_dp_cec_register_connector (&dm_aux->aux, &aconnector->base);if (aconnector->base.connector_type == DRM_MODE_CONNECTOR_eDP) -return ; +return 0 ; aconnector->mst_mgr.cbs = &dm_mst_cbs; -drm_dp_mst_topology_mgr_init ( - &aconnector->mst_mgr, -adev_to_drm (dm->adev), - &aconnector->dm_dp_aux.aux, -16 , -4 , - aconnector->connector_id); + ret =drm_dp_mst_topology_mgr_init (&aconnector->mst_mgr,adev_to_drm (dm->adev), + &dm_aux->aux,16 ,4 , aconnector->connector_id); +if (ret) + goto unreg_cec;drm_connector_attach_dp_subconnector_property (&aconnector->base); + +return 0 ; +unreg_cec: +drm_dp_cec_unregister_connector (&dm_aux->aux); +kfree (dm_aux->aux.name); +return ret; }int dm_mst_get_pbn_divider (struct dc_link *link)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h +0
-0@@ -31,9 +31,9 @@ struct amdgpu_dm_connector;int dm_mst_get_pbn_divider (struct dc_link *link);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h struct amdgpu_dm_connector; · line 39
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h +3
-3-void amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, -struct amdgpu_dm_connector *aconnector, -int link_index); +int amdgpu_dm_initialize_dp_connector (struct amdgpu_display_manager *dm, +struct amdgpu_dm_connector *aconnector, +int link_index);void dm_dp_create_fake_mst_encoders (struct amdgpu_device *adev);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Lyude Paul
maintainerPATCH v3 2/20 drm/dp: Add __no_check to drm_dp_aux_register()
In reply to Lyude PaulSince we're about to make it so that drm_dp_aux_init() can fail (and thus - should have it's return value checked) - we should require that callers of drm_dp_aux_register() also check it's return value since drm_dp_aux_init() can be called from there.
--- include/drm/drm_dp_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_dp_helper.h +1 -1
@@ -2010,7 +2010,7 @@ bool drm_dp_lttpr_pre_emphasis_level_3_supported(const u8 caps[DP_LTTPR_PHY_CAP_void drm_dp_remote_aux_init (struct drm_dp_aux *aux);void drm_dp_aux_init (struct drm_dp_aux *aux); -int drm_dp_aux_register (struct drm_dp_aux *aux); +__must_check int drm_dp_aux_register (struct drm_dp_aux *aux);void drm_dp_aux_unregister (struct drm_dp_aux *aux);int drm_dp_start_crc (struct drm_dp_aux *aux,struct drm_crtc *crtc);
Signature · 6 lines
2.30.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Lyude Paul
maintainerPATCH v3 3/20 drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
In reply to Lyude PaulWhen moving around drm_dp_aux_register() calls, it turned out we accidentally managed to cause issues with the Tegra driver due to the fact the Tegra driver would attempt to retrieve a reference to the AUX channel's i2c adapter - which wouldn't be initialized until drm_dp_aux_register() is called.
This doesn't actually make a whole ton of sense, as it's not unexpected for a driver to need to be able to use an AUX adapter before it's been registered. Likewise-it's not unexpected for a driver to try using the i2c adapter for said AUX channel before it's been registered as well. In fact, the current documentation for drm_dp_aux_init() even seems to imply that drm_dp_aux_init() is supposed to be handling i2c adapter creation for this precise reason - not drm_dp_aux_register().
Since the i2c adapter doesn't need to be linked to the DRM device in any way, we can just fix this problem by moving i2c adapter creation out of drm_dp_aux_register() and into drm_dp_aux_init(). Additionally, since this means that drm_dp_aux_init() can fail we go ahead and add a __must_check attribute to it so that drivers don't ignore its return status on failures. And finally, we add a drm_dp_aux_fini() and hook it up in all DRM drivers across the kernel to take care of cleaning up the i2c adapter once it's no longer needed.
This should also fix the regressions noted in the Tegra driver.
--- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c | 7 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 10 ++- drivers/gpu/drm/amd/amdgpu/atombios_dp.h | 2 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 +- .../drm/bridge/analogix/analogix-anx6345.c | 2 + .../drm/bridge/analogix/analogix-anx78xx.c | 2 + .../drm/bridge/analogix/analogix_dp_core.c | 1 + .../drm/bridge/cadence/cdns-mhdp8546-core.c | 14 ++- drivers/gpu/drm/bridge/tc358767.c | 5 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 16 ++-- drivers/gpu/drm/drm_dp_helper.c | 88 ++++++++++++++----- drivers/gpu/drm/i915/display/intel_dp_aux.c | 10 ++- drivers/gpu/drm/i915/display/intel_dp_aux.h | 2 +- drivers/gpu/drm/msm/dp/dp_aux.c | 1 + drivers/gpu/drm/msm/edp/edp_aux.c | 1 + drivers/gpu/drm/nouveau/nouveau_connector.c | 1 + drivers/gpu/drm/radeon/radeon_connectors.c | 1 + drivers/gpu/drm/tegra/dpaux.c | 14 ++- drivers/gpu/drm/xlnx/zynqmp_dp.c | 1 + include/drm/drm_dp_helper.h | 3 +- 20 files changed, 140 insertions(+), 47 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +5 -2
@@ -1963,8 +1963,11 @@ amdgpu_connector_add(struct amdgpu_device *adev, connector->display_info.subpixel_order = subpixel_order; -if (has_aux) -amdgpu_atombios_dp_aux_init (amdgpu_connector); +if (has_aux) { +int ret =amdgpu_atombios_dp_aux_init (amdgpu_connector); +if (ret) + goto failed; + }if (connector_type == DRM_MODE_CONNECTOR_DisplayPort || connector_type == DRM_MODE_CONNECTOR_eDP) {
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +8 -2
@@ -184,12 +184,18 @@ amdgpu_atombios_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *mreturn ret; } -void amdgpu_atombios_dp_aux_init (struct amdgpu_connector *amdgpu_connector) +int amdgpu_atombios_dp_aux_init (struct amdgpu_connector *amdgpu_connector) { +int ret; + amdgpu_connector->ddc_bus->rec.hpd = amdgpu_connector->hpd.hpd; amdgpu_connector->ddc_bus->aux.transfer = amdgpu_atombios_dp_aux_transfer; -drm_dp_aux_init (&amdgpu_connector->ddc_bus->aux); + ret =drm_dp_aux_init (&amdgpu_connector->ddc_bus->aux); +if (ret) +return ret; + amdgpu_connector->ddc_bus->has_aux = true; +return ret; }/***** general DP utility functions *****/
drivers/gpu/drm/amd/amdgpu/atombios_dp.h +1 -1
@@ -24,7 +24,7 @@#ifndef __ATOMBIOS_DP_H__#define __ATOMBIOS_DP_H__ -void amdgpu_atombios_dp_aux_init (struct amdgpu_connector *amdgpu_connector); +int amdgpu_atombios_dp_aux_init (struct amdgpu_connector *amdgpu_connector);u8 amdgpu_atombios_dp_get_sinktype (struct amdgpu_connector *amdgpu_connector);int amdgpu_atombios_dp_get_dpcd (struct amdgpu_connector *amdgpu_connector); int amdgpu_atombios_dp_get_panel_mode(struct drm_encoder *encoder,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +5 -1
@@ -439,7 +439,10 @@ int amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm, dm_aux->aux.transfer = dm_dp_aux_transfer; dm_aux->ddc_service = aconnector->dc_link->ddc; -drm_dp_aux_init (&dm_aux->aux); + ret =drm_dp_aux_init (&dm_aux->aux); +if (ret) + goto free_name; +drm_dp_cec_register_connector (&dm_aux->aux, &aconnector->base);if (aconnector->base.connector_type == DRM_MODE_CONNECTOR_eDP)
@@ -456,6 +459,7 @@ int amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,return 0 ; unreg_cec:drm_dp_cec_unregister_connector (&dm_aux->aux); +free_name:kfree (dm_aux->aux.name);return ret; }
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +2 -0
@@ -794,6 +794,8 @@ static int anx6345_i2c_remove(struct i2c_client *client)unregister_i2c_dummy_clients (anx6345); +drm_dp_aux_fini (&anx6345->aux); +kfree (anx6345->edid);mutex_destroy (&anx6345->lock);
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +2 -0
@@ -1364,6 +1364,8 @@ static int anx78xx_i2c_remove(struct i2c_client *client)unregister_i2c_dummy_clients (anx78xx); +drm_dp_aux_fini (&anx78xx->aux); +kfree (anx78xx->edid);return 0 ;
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +1 -0
@@ -1806,6 +1806,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_unbind);void analogix_dp_remove (struct analogix_dp_device *dp) {clk_disable_unprepare (dp->clock); +drm_dp_aux_fini (&dp->aux); }EXPORT_SYMBOL_GPL (analogix_dp_remove);
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +11 -3
@@ -2436,14 +2436,17 @@ static int cdns_mhdp_probe(struct platform_device *pdev)mutex_init (&mhdp->link_mutex);spin_lock_init (&mhdp->start_lock); -drm_dp_aux_init (&mhdp->aux); mhdp->aux.dev = dev; mhdp->aux.transfer = cdns_mhdp_transfer; + ret =drm_dp_aux_init (&mhdp->aux); +if (ret) +return ret; mhdp->regs =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (mhdp->regs)) {dev_err (dev,"Failed to get memory resource\n" ); -return PTR_ERR (mhdp->regs); + ret =PTR_ERR (mhdp->regs); + goto aux_fini; } mhdp->sapb_regs =devm_platform_ioremap_resource_byname (pdev,"mhdptx-sapb" );
@@ -2458,7 +2461,8 @@ static int cdns_mhdp_probe(struct platform_device *pdev) mhdp->phy =devm_of_phy_get_by_index (dev, pdev->dev.of_node,0 );if (IS_ERR (mhdp->phy)) {dev_err (dev,"no PHY configured\n" ); -return PTR_ERR (mhdp->phy); + ret =PTR_ERR (mhdp->phy); + goto aux_fini; }platform_set_drvdata (pdev, mhdp);
@@ -2555,6 +2559,8 @@ static int cdns_mhdp_probe(struct platform_device *pdev)pm_runtime_disable (dev); clk_disable:clk_disable_unprepare (mhdp->clk); +aux_fini: +drm_dp_aux_fini (&mhdp->aux);return ret; }
@@ -2597,6 +2603,8 @@ static int cdns_mhdp_remove(struct platform_device *pdev)clk_disable_unprepare (mhdp->clk); +drm_dp_aux_fini (&mhdp->aux); +return ret; }
drivers/gpu/drm/bridge/tc358767.c +4 -1
@@ -1693,7 +1693,9 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id) tc->aux.name ="TC358767 AUX i2c adapter" ; tc->aux.dev = tc->dev; tc->aux.transfer = tc_aux_transfer; -drm_dp_aux_init (&tc->aux); + ret =drm_dp_aux_init (&tc->aux); +if (ret) +return ret; tc->bridge.funcs = &tc_bridge_funcs;if (tc->hpd_pin >=0 )
@@ -1713,6 +1715,7 @@ static int tc_remove(struct i2c_client *client)struct tc_data *tc =i2c_get_clientdata (client);drm_bridge_remove (&tc->bridge); +drm_dp_aux_fini (&tc->aux);return 0 ; }
drivers/gpu/drm/bridge/ti-sn65dsi86.c +10 -6
@@ -1291,17 +1291,16 @@ static int ti_sn_bridge_probe(struct i2c_client *client,pm_runtime_enable (pdata->dev); ret =ti_sn_setup_gpio_controller (pdata); -if (ret) { -pm_runtime_disable (pdata->dev); -return ret; - } - +if (ret) + goto fail_pm;i2c_set_clientdata (client, pdata); pdata->aux.name ="ti-sn65dsi86-aux" ; pdata->aux.dev = pdata->dev; pdata->aux.transfer = ti_sn_aux_transfer; -drm_dp_aux_init (&pdata->aux); + ret =drm_dp_aux_init (&pdata->aux); +if (ret) + goto fail_pm; pdata->bridge.funcs = &ti_sn_bridge_funcs; pdata->bridge.of_node = client->dev.of_node;
@@ -1311,6 +1310,9 @@ static int ti_sn_bridge_probe(struct i2c_client *client,ti_sn_debugfs_init (pdata);return 0 ; +fail_pm: +pm_runtime_disable (pdata->dev); +return ret; }static int ti_sn_bridge_remove (struct i2c_client *client)
@@ -1332,6 +1334,8 @@ static int ti_sn_bridge_remove(struct i2c_client *client)mipi_dsi_device_unregister (pdata->dsi); } +drm_dp_aux_fini (&pdata->aux); +drm_bridge_remove (&pdata->bridge);return 0 ;
drivers/gpu/drm/drm_dp_helper.c +64 -24
129 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_dp_aux.c +8 -2
@@ -644,15 +644,17 @@ void intel_dp_aux_fini(struct intel_dp *intel_dp)if (cpu_latency_qos_request_active (&intel_dp->pm_qos))cpu_latency_qos_remove_request (&intel_dp->pm_qos); +drm_dp_aux_fini (&intel_dp->aux);kfree (intel_dp->aux.name); } -void intel_dp_aux_init (struct intel_dp *intel_dp) +int intel_dp_aux_init (struct intel_dp *intel_dp) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp);struct intel_digital_port *dig_port =dp_to_dig_port (intel_dp);struct intel_encoder *encoder = &dig_port->base;enum aux_ch aux_ch = dig_port->aux_ch; +int ret;if (DISPLAY_VER (dev_priv) >=12 ) { intel_dp->aux_ch_ctl_reg = tgl_aux_ctl_reg;
@@ -682,7 +684,9 @@ void intel_dp_aux_init(struct intel_dp *intel_dp)else intel_dp->get_aux_send_ctl = g4x_get_aux_send_ctl; -drm_dp_aux_init (&intel_dp->aux); + ret =drm_dp_aux_init (&intel_dp->aux); +if (ret) +return ret;/* Failure to allocate our preferred name is not critical */ if (DISPLAY_VER (dev_priv) >=12 && aux_ch >=AUX_CH_USBC1 )
@@ -696,4 +700,6 @@ void intel_dp_aux_init(struct intel_dp *intel_dp) intel_dp->aux.transfer = intel_dp_aux_transfer;cpu_latency_qos_add_request (&intel_dp->pm_qos,PM_QOS_DEFAULT_VALUE ); + +return ret; }
drivers/gpu/drm/i915/display/intel_dp_aux.h +1 -1
@@ -13,6 +13,6 @@ struct intel_dp;u32 intel_dp_pack_aux (const u8 *src,int src_bytes);void intel_dp_aux_fini (struct intel_dp *intel_dp); -void intel_dp_aux_init (struct intel_dp *intel_dp); +int intel_dp_aux_init (struct intel_dp *intel_dp);#endif /* __INTEL_DP_AUX_H__ */
drivers/gpu/drm/msm/dp/dp_aux.c +1 -0
@@ -494,6 +494,7 @@ int dp_aux_register(struct drm_dp_aux *dp_aux)void dp_aux_unregister (struct drm_dp_aux *dp_aux) {drm_dp_aux_unregister (dp_aux); +drm_dp_aux_fini (dp_aux); }struct drm_dp_aux *dp_aux_get (struct device *dev,struct dp_catalog *catalog)
drivers/gpu/drm/msm/edp/edp_aux.c +1 -0
@@ -218,6 +218,7 @@ void msm_edp_aux_destroy(struct device *dev, struct edp_aux *aux) {if (aux) {drm_dp_aux_unregister (&aux->drm_aux); +drm_dp_aux_fini (&aux->drm_aux);mutex_destroy (&aux->msg_mutex); } }
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -0
@@ -402,6 +402,7 @@ nouveau_connector_destroy(struct drm_connector *connector)if (nv_connector->aux.transfer) {drm_dp_cec_unregister_connector (&nv_connector->aux);drm_dp_aux_unregister (&nv_connector->aux); +drm_dp_aux_fini (&nv_connector->aux);kfree (nv_connector->aux.name); }kfree (connector);
drivers/gpu/drm/radeon/radeon_connectors.c +1 -0
@@ -921,6 +921,7 @@ static void radeon_connector_unregister(struct drm_connector *connector)if (radeon_connector->ddc_bus && radeon_connector->ddc_bus->has_aux) {drm_dp_aux_unregister (&radeon_connector->ddc_bus->aux); +drm_dp_aux_fini (&radeon_connector->ddc_bus->aux); radeon_connector->ddc_bus->has_aux = false; } }
drivers/gpu/drm/tegra/dpaux.c +11 -3
@@ -534,7 +534,9 @@ static int tegra_dpaux_probe(struct platform_device *pdev) dpaux->aux.transfer = tegra_dpaux_transfer; dpaux->aux.dev = &pdev->dev; -drm_dp_aux_init (&dpaux->aux); + err =drm_dp_aux_init (&dpaux->aux); +if (err) +return err;/* * Assume that by default the DPAUX/I2C pads will be used for HDMI,
@@ -546,7 +548,7 @@ static int tegra_dpaux_probe(struct platform_device *pdev)*/ err =tegra_dpaux_pad_config (dpaux,DPAUX_PADCTL_FUNC_I2C );if (err <0 ) -return err; + goto aux_fini;#ifdef CONFIG_GENERIC_PINCONF dpaux->desc.name =dev_name (&pdev->dev);
@@ -559,7 +561,8 @@ static int tegra_dpaux_probe(struct platform_device *pdev) dpaux->pinctrl =devm_pinctrl_register (&pdev->dev, &dpaux->desc, dpaux);if (IS_ERR (dpaux->pinctrl)) {dev_err (&pdev->dev,"failed to register pincontrol\n" ); -return PTR_ERR (dpaux->pinctrl); + err =PTR_ERR (dpaux->pinctrl); + goto aux_fini; }#endif /* enable and clear all interrupts */
@@ -573,6 +576,9 @@ static int tegra_dpaux_probe(struct platform_device *pdev)mutex_unlock (&dpaux_lock);return 0 ; +aux_fini: +drm_dp_aux_fini (&dpaux->aux); +return err; }static int tegra_dpaux_remove (struct platform_device *pdev)
@@ -584,6 +590,8 @@ static int tegra_dpaux_remove(struct platform_device *pdev)/* make sure pads are powered down when not in use */ tegra_dpaux_pad_power_down (dpaux); +drm_dp_aux_fini (&dpaux->aux); +pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);
drivers/gpu/drm/xlnx/zynqmp_dp.c +1 -0
@@ -1083,6 +1083,7 @@ static int zynqmp_dp_aux_init(struct zynqmp_dp *dp)static void zynqmp_dp_aux_cleanup (struct zynqmp_dp *dp) {drm_dp_aux_unregister (&dp->aux); +drm_dp_aux_fini (&dp->aux); }/* -----------------------------------------------------------------------------
include/drm/drm_dp_helper.h +2 -1
@@ -2009,7 +2009,8 @@ bool drm_dp_lttpr_voltage_swing_level_3_supported(const u8 caps[DP_LTTPR_PHY_CAPbool drm_dp_lttpr_pre_emphasis_level_3_supported (const u8 caps[DP_LTTPR_PHY_CAP_SIZE ]);void drm_dp_remote_aux_init (struct drm_dp_aux *aux); -void drm_dp_aux_init (struct drm_dp_aux *aux); +__must_check int drm_dp_aux_init (struct drm_dp_aux *aux); +void drm_dp_aux_fini (struct drm_dp_aux *aux);__must_check int drm_dp_aux_register (struct drm_dp_aux *aux);void drm_dp_aux_unregister (struct drm_dp_aux *aux);
Signature · 6 lines
2.30.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
Quoted 23 lines · Lyude Paul
When moving around
drm_dp_aux_register()calls, it turned out we accidentally managed to cause issues with the Tegra driver due to the fact the Tegra driver would attempt to retrieve a reference to the AUX channel's i2c adapter - which wouldn't be initialized untildrm_dp_aux_register()is called.This doesn't actually make a whole ton of sense, as it's not unexpected for a driver to need to be able to use an AUX adapter before it's been registered. Likewise-it's not unexpected for a driver to try using the i2c adapter for said AUX channel before it's been registered as well. In fact, the current documentation for
drm_dp_aux_init()even seems to imply thatdrm_dp_aux_init()is supposed to be handling i2c adapter creation for this precise reason - notdrm_dp_aux_register().Since the i2c adapter doesn't need to be linked to the DRM device in any way, we can just fix this problem by moving i2c adapter creation out of
drm_dp_aux_register()and intodrm_dp_aux_init(). Additionally, since this means thatdrm_dp_aux_init()can fail we go ahead and add a__must_checkattribute to it so that drivers don't ignore its return status on failures. And finally, we add adrm_dp_aux_fini()and hook it up in all DRM drivers across the kernel to take care of cleaning up the i2c adapter once it's no longer needed.
Quoted 1 line
This should also fix the regressions noted in the Tegra driver.
The init vs. register split is intentional. Registering the thing and allowing userspace access to it before the rest of the driver is ready isn't particularly great. For a while now we've tried to move towards an architecture where the driver is fully initialzied before anything gets exposed to userspace.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerRe: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
Quoted 6 lines · Ville Syrjälä
The init vs. register split is intentional. Registering the thing and allowing userspace access to it before the rest of the driver is ready isn't particularly great. For a while now we've tried to move towards an architecture where the driver is fully initialzied before anything gets exposed to userspace.
Yeah-thank you for pointing this out. Thierry - do you think there's an alternate solution we could go with in Tegra to fix the get_device() issue that wouldn't require us trying to expose the i2c adapter early?
Quoted 1 line
Signature · 8 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerRe: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
OK - talked with Ville a bit on this and did some of my own research, I actually think that moving i2c to drm_dp_aux_init() is the right decision for the time being. The reasoning behind this being that as shown by my previous work of fixing drivers that call drm_dp_aux_register() too early - it seems like there's already been drivers that have been working just fine with setting up the i2c device before DRM registration.
In the future, it'd probably be better if we can split up i2c_add_adapter() into an init and register function - but we'll have to talk with the i2c maintainers to see if this is acceptable w/ them
Quoted 14 lines · Lyude Paul
Quoted 6 lines · Ville Syrjälä
The init vs. register split is intentional. Registering the thing and allowing userspace access to it before the rest of the driver is ready isn't particularly great. For a while now we've tried to move towards an architecture where the driver is fully initialzied before anything gets exposed to userspace.
Yeah-thank you for pointing this out. Thierry - do you think there's an alternate solution we could go with in Tegra to fix the
get_device()issue that wouldn't require us trying to expose the i2c adapter early?Quoted 1 line
Signature · 8 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Lyude Paul
maintainerRe: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
Quoted 11 lines · Lyude Paul
OK - talked with Ville a bit on this and did some of my own research, I actually think that moving i2c to
drm_dp_aux_init()is the right decision for
the time being. The reasoning behind this being that as shown by my previous work of fixing drivers that calldrm_dp_aux_register()too early - it seems like there's already been drivers that have been working just fine with setting up the i2c device before DRM registration.In the future, it'd probably be better if we can split up
i2c_add_adapter()into an init and register function - but we'll have to talk with the i2c maintainers to see if this is acceptable w/ them
Actually - I think adding the ability to refcount dp aux adapters might be a better solution so I'm going to try that!
Quoted 17 lines · Lyude Paul
Quoted 14 lines · Ville Syrjälä
Quoted 6 lines
The init vs. register split is intentional. Registering the thing and allowing userspace access to it before the rest of the driver is ready isn't particularly great. For a while now we've tried to move towards an architecture where the driver is fully initialzied before anything gets exposed to userspace.
Yeah-thank you for pointing this out. Thierry - do you think there's an alternate solution we could go with in Tegra to fix the
get_device()issue that wouldn't require us trying to expose the i2c adapter early?Quoted 1 line
Signature · 8 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
Quoted 9 lines · Lyude Paul
Quoted 8 lines · Lyude Paul
OK - talked with Ville a bit on this and did some of my own research, I actually think that moving i2c to
drm_dp_aux_init()is the right decision for
the time being. The reasoning behind this being that as shown by my previous work of fixing drivers that calldrm_dp_aux_register()too early - it seems like there's already been drivers that have been working just fine with setting up the i2c device before DRM registration.
Quoted 6 lines
Quoted 3 lines
In the future, it'd probably be better if we can split up
i2c_add_adapter()into an init and register function - but we'll have to talk with the i2c maintainers to see if this is acceptable w/ themActually - I think adding the ability to refcount dp aux adapters might be a better solution so I'm going to try that!
I'm curious: how is a DP AUX adapter reference count going to solve the issue of potentially registering devices too early (i.e. before the DRM is registered)?
Is it because registering too early could cause a reference count problem if somebody get a hold of the DP AUX adapter before the parent DRM device is around?
Thierry
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Lyude Paul
maintainerRe: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
Quoted 8 lines · Thierry Reding
I'm curious: how is a DP AUX adapter reference count going to solve the issue of potentially registering devices too early (i.e. before the DRM is registered)?
Is it because registering too early could cause a reference count problem if somebody get a hold of the DP AUX adapter before the parent DRM device is around?
Well currently the problem is that we kind of want to avoid setting up the i2c adapter before the DRM driver is registered with userspace, but it's not really possible to do that if we need the core device struct for the ddc adapter initialized so that tegra can call get_device() on it in drivers/gpu/drm/tegra/sor.c. So my thought is instead of calling get_device() on the ddc adapter that the AUX channel provides, why not just call it on the actual platform device that implements the AUX channel instead? I think this should work pretty nicely while still preventing the platform device for the AUX channel from disappearing before the SOR has disappeared.
Quoted 2 lines
Thierry
Signature · 8 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
In reply to Lyude PaulQuoted 10 lines · Lyude Paul
OK - talked with Ville a bit on this and did some of my own research, I actually think that moving i2c to
drm_dp_aux_init()is the right decision for the time being. The reasoning behind this being that as shown by my previous work of fixing drivers that calldrm_dp_aux_register()too early - it seems like there's already been drivers that have been working just fine with setting up the i2c device before DRM registration.In the future, it'd probably be better if we can split up
i2c_add_adapter()into an init and register function - but we'll have to talk with the i2c maintainers to see if this is acceptable w/ them
Yeah, that sounds like a better long-term solution. We could leave i2c_add_adapter() in place, since it's already half-way split up into some initialization code and i2c_register_adapter(), so it shouldn't be all that difficult to split out an i2c_init_adapter() so that outside users can do the split setup.
Thierry
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini
In reply to Lyude PaulQuoted 11 lines · Lyude Paul
Quoted 6 lines · Ville Syrjälä
The init vs. register split is intentional. Registering the thing and allowing userspace access to it before the rest of the driver is ready isn't particularly great. For a while now we've tried to move towards an architecture where the driver is fully initialzied before anything gets exposed to userspace.
Yeah-thank you for pointing this out. Thierry - do you think there's an alternate solution we could go with in Tegra to fix the
get_device()issue that wouldn't require us trying to expose the i2c adapter early?
I suppose we could do it in a hackish way that grabs a reference to the I2C adapter only upon registration. We can't do that for the regular I2C DDC case where the I2C controller is an external one because by the time we get to registration it could've gone again. This would make both code paths asymmetric, so I'd prefer not to do it. Perhaps it could serve as an stop-gap solution until something better is in place, though.
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerPATCH v3 4/20 drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace
In reply to Lyude PaulJust adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge.
--- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +10 -1
@@ -1719,10 +1719,14 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge,dev_dbg (mhdp->dev,"%s\n" , __func__); + ret =drm_dp_aux_register (&mhdp->aux); +if (ret <0 ) +return ret; +if (!(flags &DRM_BRIDGE_ATTACH_NO_CONNECTOR )) { ret =cdns_mhdp_connector_init (mhdp);if (ret) -return ret; + goto aux_unregister; }spin_lock (&mhdp->start_lock);
@@ -1738,6 +1742,9 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge, mhdp->regs + CDNS_APB_INT_MASK);return 0 ; +aux_unregister: +drm_dp_aux_unregister (&mhdp->aux); +return ret; } static void cdns_mhdp_configure_video(struct cdns_mhdp_device *mhdp,
@@ -2082,6 +2089,8 @@ static void cdns_mhdp_detach(struct drm_bridge *bridge)dev_dbg (mhdp->dev,"%s\n" , __func__); +drm_dp_aux_unregister (&mhdp->aux); +spin_lock (&mhdp->start_lock); mhdp->bridge_attached = false;
Signature · 6 lines
2.30.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerPATCH v3 5/20 drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister
In reply to Lyude PaulSince AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors.
--- drivers/gpu/drm/nouveau/nouveau_connector.c | 25 ++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
drivers/gpu/drm/nouveau/nouveau_connector.c +20 -5
@@ -401,7 +401,6 @@ nouveau_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector);if (nv_connector->aux.transfer) {drm_dp_cec_unregister_connector (&nv_connector->aux); -drm_dp_aux_unregister (&nv_connector->aux);drm_dp_aux_fini (&nv_connector->aux);kfree (nv_connector->aux.name); }
@@ -906,13 +905,29 @@ nouveau_connector_late_register(struct drm_connector *connector)int ret; ret =nouveau_backlight_init (connector); +if (ret) +return ret; +if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || + connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { + ret =drm_dp_aux_register (&nouveau_connector (connector)->aux); +if (ret) + goto backlight_fini; + } + +return 0 ; +backlight_fini: +nouveau_backlight_fini (connector);return ret; }static void nouveau_connector_early_unregister (struct drm_connector *connector) { +if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || + connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) +drm_dp_aux_unregister (&nouveau_connector (connector)->aux); +nouveau_backlight_fini (connector); }
@@ -1344,14 +1359,14 @@ nouveau_connector_create(struct drm_device *dev,snprintf (aux_name,sizeof (aux_name),"sor-%04x-%04x" , dcbe->hasht, dcbe->hashm); nv_connector->aux.name =kstrdup (aux_name,GFP_KERNEL ); - ret =drm_dp_aux_register (&nv_connector->aux); + ret =drm_dp_aux_init (&nv_connector->aux);if (ret) { -NV_ERROR (drm,"failed to register aux channel\n" ); +NV_ERROR (drm,"Failed to init AUX adapter for sor-%04x-%04x: %d\n" , + dcbe->hasht, dcbe->hashm, ret);kfree (nv_connector);return ERR_PTR (ret); } - funcs = &nouveau_connector_funcs; -break ; + fallthrough;default : funcs = &nouveau_connector_funcs;break ;
Signature · 6 lines
2.30.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Lyude Paul
maintainerPATCH v3 6/20 drm/dp: Add backpointer to drm_device in drm_dp_aux
In reply to Lyude PaulThis is something that we've wanted for a while now: the ability to actually look up the respective drm_device for a given drm_dp_aux struct. This will also allow us to transition over to using the drm_dbg_*() helpers for debug message printing, as we'll finally have a drm_device to reference for doing so.
Note that there is one limitation with this - because some DP AUX adapters exist as platform devices which are initialized independently of their respective DRM devices, one cannot rely on drm_dp_aux->drm_dev to always be non-NULL until drm_dp_aux_register() has been called. We make sure to point this out in the documentation for struct drm_dp_aux.
v3:
* Add WARN_ON_ONCE() to drm_dp_aux_register() if drm_dev isn't filled out
--- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 7 ++++--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 + drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 1 + drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 1 + drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 1 + drivers/gpu/drm/bridge/tc358767.c | 1 + drivers/gpu/drm/bridge/ti-sn65dsi86.c | 1 + drivers/gpu/drm/drm_dp_aux_dev.c | 6 ++++++ drivers/gpu/drm/drm_dp_helper.c | 2 ++ drivers/gpu/drm/drm_dp_mst_topology.c | 1 + drivers/gpu/drm/i915/display/intel_dp_aux.c | 1 + drivers/gpu/drm/msm/edp/edp.h | 3 +-- drivers/gpu/drm/msm/edp/edp_aux.c | 5 +++-- drivers/gpu/drm/msm/edp/edp_ctrl.c | 2 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 1 + drivers/gpu/drm/radeon/atombios_dp.c | 1 + drivers/gpu/drm/tegra/dpaux.c | 1 + drivers/gpu/drm/xlnx/zynqmp_dp.c | 1 + include/drm/drm_dp_helper.h | 9 ++++++++- 20 files changed, 38 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +4 -3
@@ -190,11 +190,12 @@ int amdgpu_atombios_dp_aux_init(struct amdgpu_connector *amdgpu_connector) amdgpu_connector->ddc_bus->rec.hpd = amdgpu_connector->hpd.hpd; amdgpu_connector->ddc_bus->aux.transfer = amdgpu_atombios_dp_aux_transfer; + amdgpu_connector->ddc_bus->aux.drm_dev = amdgpu_connector->base.dev; + ret =drm_dp_aux_init (&amdgpu_connector->ddc_bus->aux); -if (ret) -return ret; +if (!ret) + amdgpu_connector->ddc_bus->has_aux = true; - amdgpu_connector->ddc_bus->has_aux = true;return ret; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +1 -0
@@ -438,6 +438,7 @@ int amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm, dm_aux->aux.transfer = dm_dp_aux_transfer; dm_aux->ddc_service = aconnector->dc_link->ddc; + dm_aux->aux.drm_dev = dm->ddev; ret =drm_dp_aux_init (&dm_aux->aux);if (ret)
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +1 -0
@@ -537,6 +537,7 @@ static int anx6345_bridge_attach(struct drm_bridge *bridge,/* Register aux channel */ anx6345->aux.name ="DP-AUX" ; anx6345->aux.dev = &anx6345->client->dev; + anx6345->aux.drm_dev = bridge->dev; anx6345->aux.transfer = anx6345_aux_transfer; err =drm_dp_aux_register (&anx6345->aux);
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +1 -0
@@ -905,6 +905,7 @@ static int anx78xx_bridge_attach(struct drm_bridge *bridge,/* Register aux channel */ anx78xx->aux.name ="DP-AUX" ; anx78xx->aux.dev = &anx78xx->client->dev; + anx78xx->aux.drm_dev = bridge->dev; anx78xx->aux.transfer = anx78xx_aux_transfer; err =drm_dp_aux_register (&anx78xx->aux);
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +1 -0
@@ -1765,6 +1765,7 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev) dp->aux.name ="DP-AUX" ; dp->aux.transfer = analogix_dpaux_transfer; dp->aux.dev = dp->dev; + dp->aux.drm_dev = drm_dev; ret =drm_dp_aux_register (&dp->aux);if (ret)
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +1 -0
@@ -1719,6 +1719,7 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge,dev_dbg (mhdp->dev,"%s\n" , __func__); + mhdp->aux.drm_dev = bridge->dev; ret =drm_dp_aux_register (&mhdp->aux);if (ret <0 )return ret;
drivers/gpu/drm/bridge/tc358767.c +1 -0
@@ -1414,6 +1414,7 @@ static int tc_bridge_attach(struct drm_bridge *bridge,if (flags &DRM_BRIDGE_ATTACH_NO_CONNECTOR )return 0 ; + tc->aux.drm_dev = drm; ret =drm_dp_aux_register (&tc->aux);if (ret <0 )return ret;
drivers/gpu/drm/bridge/ti-sn65dsi86.c +1 -0
@@ -362,6 +362,7 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge,return -EINVAL ; } + pdata->aux.drm_dev = bridge->dev; ret =drm_dp_aux_register (&pdata->aux);if (ret <0 ) {drm_err (bridge->dev,"Failed to register DP AUX channel: %d\n" , ret);
drivers/gpu/drm/drm_dp_aux_dev.c +6 -0
@@ -278,6 +278,12 @@ void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux)if (!aux_dev)/* attach must have failed */ return ; +/* +* As some AUX adapters may exist as platform devices which outlive their respective DRM +* devices, we clear drm_dev to ensure that we never accidentally reference a stale pointer +*/ + aux->drm_dev =NULL ; +mutex_lock (&aux_idr_mutex);idr_remove (&aux_idr, aux_dev->index);mutex_unlock (&aux_idr_mutex);
drivers/gpu/drm/drm_dp_helper.c +2 -0
@@ -1815,6 +1815,8 @@ int drm_dp_aux_register(struct drm_dp_aux *aux)int ret;const bool init_aux = !aux->ddc.algo; +WARN_ON_ONCE (!aux->drm_dev); +if (init_aux) { ret =drm_dp_aux_init (aux);if (ret)
drivers/gpu/drm/drm_dp_mst_topology.c +1 -0
@@ -2350,6 +2350,7 @@ drm_dp_mst_add_port(struct drm_device *dev, port->aux.is_remote = true;/* initialize the MST downstream port's AUX crc work queue */ + port->aux.drm_dev = dev;drm_dp_remote_aux_init (&port->aux);/*
drivers/gpu/drm/i915/display/intel_dp_aux.c +1 -0
@@ -684,6 +684,7 @@ int intel_dp_aux_init(struct intel_dp *intel_dp)else intel_dp->get_aux_send_ctl = g4x_get_aux_send_ctl; + intel_dp->aux.drm_dev = &dev_priv->drm; ret =drm_dp_aux_init (&intel_dp->aux);if (ret)return ret;
drivers/gpu/drm/msm/edp/edp.h +1 -2
@@ -46,8 +46,7 @@ void edp_bridge_destroy(struct drm_bridge *bridge);struct drm_connector *msm_edp_connector_init (struct msm_edp *edp);/* AUX */ -void *msm_edp_aux_init (struct device *dev,void __iomem *regbase, -struct drm_dp_aux **drm_aux); +void *msm_edp_aux_init (struct msm_edp *edp,void __iomem *regbase,struct drm_dp_aux **drm_aux);void msm_edp_aux_destroy (struct device *dev,struct edp_aux *aux);irqreturn_t msm_edp_aux_irq (struct edp_aux *aux,u32 isr);void msm_edp_aux_ctrl (struct edp_aux *aux,int enable);
drivers/gpu/drm/msm/edp/edp_aux.c +3 -2
@@ -184,9 +184,9 @@ static ssize_t edp_aux_transfer(struct drm_dp_aux *drm_aux,return ret; } -void *msm_edp_aux_init (struct device *dev,void __iomem *regbase, -struct drm_dp_aux **drm_aux) +void *msm_edp_aux_init (struct msm_edp *edp,void __iomem *regbase,struct drm_dp_aux **drm_aux) { +struct device *dev = &edp->pdev->dev;struct edp_aux *aux =NULL ;int ret;
@@ -201,6 +201,7 @@ void *msm_edp_aux_init(struct device *dev, void __iomem *regbase, aux->drm_aux.name ="msm_edp_aux" ; aux->drm_aux.dev = dev; + aux->drm_aux.drm_dev = edp->dev; aux->drm_aux.transfer = edp_aux_transfer; ret =drm_dp_aux_register (&aux->drm_aux);if (ret) {
drivers/gpu/drm/msm/edp/edp_ctrl.c +1 -1
@@ -1153,7 +1153,7 @@ int msm_edp_ctrl_init(struct msm_edp *edp) }/* Init aux and phy */ - ctrl->aux =msm_edp_aux_init (dev, ctrl->base, &ctrl->drm_aux); + ctrl->aux =msm_edp_aux_init (edp, ctrl->base, &ctrl->drm_aux);if (!ctrl->aux || !ctrl->drm_aux) {pr_err ("%s:failed to init aux\n" , __func__);return -ENOMEM ;
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -0
@@ -1355,6 +1355,7 @@ nouveau_connector_create(struct drm_device *dev,case DRM_MODE_CONNECTOR_DisplayPort:case DRM_MODE_CONNECTOR_eDP: nv_connector->aux.dev = connector->kdev; + nv_connector->aux.drm_dev = dev; nv_connector->aux.transfer = nouveau_connector_aux_xfer;snprintf (aux_name,sizeof (aux_name),"sor-%04x-%04x" , dcbe->hasht, dcbe->hashm);
drivers/gpu/drm/radeon/atombios_dp.c +1 -0
@@ -232,6 +232,7 @@ void radeon_dp_aux_init(struct radeon_connector *radeon_connector) radeon_connector->ddc_bus->rec.hpd = radeon_connector->hpd.hpd; radeon_connector->ddc_bus->aux.dev = radeon_connector->base.kdev; + radeon_connector->ddc_bus->aux.drm_dev = radeon_connector->base.dev;if (ASIC_IS_DCE5 (rdev)) {if (radeon_auxch) radeon_connector->ddc_bus->aux.transfer = radeon_dp_aux_transfer_native;
drivers/gpu/drm/tegra/dpaux.c +1 -0
@@ -727,6 +727,7 @@ int drm_dp_aux_attach(struct drm_dp_aux *aux, struct tegra_output *output)unsigned long timeout;int err; + aux->drm_dev = output->connector.dev; err =drm_dp_aux_register (aux);if (err <0 )return err;
drivers/gpu/drm/xlnx/zynqmp_dp.c +1 -0
@@ -1069,6 +1069,7 @@ static int zynqmp_dp_aux_init(struct zynqmp_dp *dp) dp->aux.name ="ZynqMP DP AUX" ; dp->aux.dev = dp->dev; + dp->aux.drm_dev = dp->drm; dp->aux.transfer = zynqmp_dp_aux_transfer;return drm_dp_aux_register (&dp->aux);
include/drm/drm_dp_helper.h +8 -1
@@ -1840,6 +1840,8 @@ struct drm_dp_aux_cec {* @name: user-visible name of this AUX channel and the I2C-over-AUX adapter * @ddc: I2C adapter that can be used for I2C-over-AUX communication * @dev: pointer to struct device that is the parent for this AUX channel +* @drm_dev: pointer to the &drm_device that owns this AUX channel. Beware, this may be %NULL +* before drm_dp_aux_register() has been called. * @crtc: backpointer to the crtc that is currently using this AUX channel * @hw_mutex: internal mutex used for locking transfers * @crc_work: worker that captures CRCs for each frame
@@ -1847,7 +1849,11 @@ struct drm_dp_aux_cec {* @transfer: transfers a message representing a single AUX transaction * * The @dev field should be set to a pointer to the device that implements the -* AUX channel. +* AUX channel. As well, the @drm_dev field should be set to the &drm_device +* that will be using this AUX channel as early as possible. For many graphics +* drivers this should happen before drm_dp_aux_init(), however it's perfectly +* fine to set this field later so long as it's assigned before calling +* drm_dp_aux_register(). * * The @name field may be used to specify the name of the I2C adapter. If set to * %NULL, dev_name() of @dev will be used.
@@ -1879,6 +1885,7 @@ struct drm_dp_aux {const char *name;struct i2c_adapter ddc;struct device *dev; +struct drm_device *drm_dev;struct drm_crtc *crtc;struct mutex hw_mutex;struct work_struct crc_work;
Signature · 1 line
2.30.2
Lyude Paul
maintainerPATCH v3 7/20 drm/dp: Clarify DP AUX registration time
In reply to Lyude PaulThe docs we had for drm_dp_aux_init() and drm_dp_aux_register() were mostly correct, except for the fact that they made the assumption that all AUX devices were grandchildren of their respective DRM devices. This is the case for most normal GPUs, but is almost never the case with SoCs and display bridges. So, let's fix this documentation to clarify when the right time to use drm_dp_aux_init() or drm_dp_aux_register() is.
--- drivers/gpu/drm/drm_dp_helper.c | 57 +++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 20 deletions(-)
drivers/gpu/drm/drm_dp_helper.c +37 -20
@@ -1728,13 +1728,21 @@ EXPORT_SYMBOL(drm_dp_remote_aux_init);* drm_dp_aux_init() - minimally initialise an aux channel * @aux: DisplayPort AUX channel * -* If you need to use the drm_dp_aux's i2c adapter prior to registering it -* with the outside world, call drm_dp_aux_init() first. You must still -* call drm_dp_aux_register() once the connector has been registered to -* allow userspace access to the auxiliary DP channel. Once the AUX channel is -* no longer being used and has been unregistered with -* drm_dp_aux_unregister(), the driver must clean up any resources it's -* allocated with drm_dp_aux_fini(). +* If you need to use the drm_dp_aux's i2c adapter prior to registering it with +* the outside world, call drm_dp_aux_init() first. For drivers which are +* grandparents to their AUX adapters (e.g. the AUX adapter is parented by a +* &drm_connector), you must still call drm_dp_aux_register() once the connector +* has been registered to allow userspace access to the auxiliary DP channel. +* Likewise, for such drivers you should also assign &drm_dp_aux.drm_dev as +* early as possible so that the &drm_device that corresponds to the AUX adapter +* may be mentioned in debugging output from the DRM DP helpers. +* +* For devices which use a separate platform device for their AUX adapters, this +* may be called as early as required by the driver. +* +* Once the AUX channel is no longer being used and has been unregistered with +* drm_dp_aux_unregister(), the driver must clean up any resources its allocated with +* drm_dp_aux_fini(). * * Returns: * %0 on success, negative error code on failure
@@ -1794,19 +1802,28 @@ EXPORT_SYMBOL(drm_dp_aux_fini);* drm_dp_aux_register() - register aux channel * @aux: DisplayPort AUX channel * -* Automatically calls drm_dp_aux_init() if this hasn't been done yet. The -* driver must make sure to call drm_dp_aux_unregister() to unregister the -* device, and drm_dp_aux_fini() to cleanup the device after it's been -* unregistered. -* -* This should only be called when the underlying &struct drm_connector is -* initialized already. Therefore the best place to call this is from -* &drm_connector_funcs.late_register. Not that drivers which don't follow this -* will Oops when CONFIG_DRM_DP_AUX_CHARDEV is enabled. -* -* Drivers which need to use the aux channel before that point (e.g. at driver -* load time, before drm_dev_register() has been called) need to call -* drm_dp_aux_init(). +* Automatically calls drm_dp_aux_init() if this hasn't been done yet. This +* should only be called once the parent of @aux, &drm_dp_aux.dev, is +* initialized. For devices which are grandparents of their AUX channels, +* &drm_dp_aux.dev will typically be the &drm_connector &device which +* corresponds to @aux. For these devices, it's advised to call +* drm_dp_aux_register() in &drm_connector_funcs.late_register, and likewise to +* call drm_dp_aux_unregister() in &drm_connector_funcs.early_unregister. +* Functions which don't follow this will likely Oops when +* %CONFIG_DRM_DP_AUX_CHARDEV is enabled. +* +* For devices where the AUX channel is a device that exists independently of +* the &drm_device that uses it, such as SoCs and bridge devices, it is +* recommended to call drm_dp_aux_register() after a &drm_device has been +* assigned to &drm_dp_aux.drm_dev, and likewise to call +* drm_dp_aux_unregister() once the &drm_device should no longer be associated +* with the AUX channel (e.g. on bridge detach). Additionally, the driver must +* call drm_dp_aux_fini() on @aux once it's been unregistered and is no longer +* in use. +* +* Drivers which need to use the aux channel before either of the two points +* mentioned above need to call drm_dp_aux_init() in order to use the AUX +* channel before registration. * * Returns 0 on success or a negative error code on failure. */
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Lyude Paul
maintainerPATCH v3 8/20 drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay()
In reply to Lyude PaulSo that we can start using drm_dbg_*() indrm_dp_link_train_clock_recovery_delay().
--- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +- drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +- drivers/gpu/drm/msm/edp/edp_ctrl.c | 2 +- drivers/gpu/drm/radeon/atombios_dp.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- include/drm/drm_dp_helper.h | 4 +++- 8 files changed, 11 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +1 -1
@@ -617,7 +617,7 @@ amdgpu_atombios_dp_link_train_cr(struct amdgpu_atombios_dp_link_train_info *dp_i dp_info->tries =0 ; voltage =0xff ;while (1 ) { -drm_dp_link_train_clock_recovery_delay (dp_info->dpcd); +drm_dp_link_train_clock_recovery_delay (dp_info->aux, dp_info->dpcd);if (drm_dp_dpcd_read_link_status (dp_info->aux, dp_info->link_status) <=0 ) {
drivers/gpu/drm/drm_dp_helper.c +2 -1
@@ -132,7 +132,8 @@ u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZ }EXPORT_SYMBOL (drm_dp_get_adjust_request_post_cursor); -void drm_dp_link_train_clock_recovery_delay (const u8 dpcd[DP_RECEIVER_CAP_SIZE ]) +void drm_dp_link_train_clock_recovery_delay (const struct drm_dp_aux *aux, +const u8 dpcd[DP_RECEIVER_CAP_SIZE ]) {unsigned long rd_interval = dpcd[DP_TRAINING_AUX_RD_INTERVAL ] &DP_TRAINING_AUX_RD_MASK ;
drivers/gpu/drm/i915/display/intel_dp_link_training.c +1 -1
@@ -513,7 +513,7 @@ static void intel_dp_link_training_clock_recovery_delay(struct intel_dp *intel_d enum drm_dp_phy dp_phy) {if (dp_phy ==DP_PHY_DPRX ) -drm_dp_link_train_clock_recovery_delay (intel_dp->dpcd); +drm_dp_link_train_clock_recovery_delay (&intel_dp->aux, intel_dp->dpcd);else drm_dp_lttpr_link_train_clock_recovery_delay (); }
drivers/gpu/drm/msm/dp/dp_ctrl.c +1 -1
@@ -1103,7 +1103,7 @@ static int dp_ctrl_link_train_1(struct dp_ctrl_private *ctrl, tries =0 ; old_v_level = ctrl->link->phy_params.v_level;for (tries =0 ; tries < maximum_retries; tries++) { -drm_dp_link_train_clock_recovery_delay (ctrl->panel->dpcd); +drm_dp_link_train_clock_recovery_delay (ctrl->aux, ctrl->panel->dpcd); ret =dp_ctrl_read_link_status (ctrl, link_status);if (ret)
drivers/gpu/drm/msm/edp/edp_ctrl.c +1 -1
@@ -608,7 +608,7 @@ static int edp_start_link_train_1(struct edp_ctrl *ctrl) tries =0 ; old_v_level = ctrl->v_level;while (1 ) { -drm_dp_link_train_clock_recovery_delay (ctrl->dpcd); +drm_dp_link_train_clock_recovery_delay (ctrl->drm_aux, ctrl->dpcd); rlen =drm_dp_dpcd_read_link_status (ctrl->drm_aux, link_status);if (rlen <DP_LINK_STATUS_SIZE ) {
drivers/gpu/drm/radeon/atombios_dp.c +1 -1
@@ -680,7 +680,7 @@ static int radeon_dp_link_train_cr(struct radeon_dp_link_train_info *dp_info) dp_info->tries =0 ; voltage =0xff ;while (1 ) { -drm_dp_link_train_clock_recovery_delay (dp_info->dpcd); +drm_dp_link_train_clock_recovery_delay (dp_info->aux, dp_info->dpcd);if (drm_dp_dpcd_read_link_status (dp_info->aux, dp_info->link_status) <=0 ) {
drivers/gpu/drm/xlnx/zynqmp_dp.c +1 -1
@@ -713,7 +713,7 @@ static int zynqmp_dp_link_train_cr(struct zynqmp_dp *dp)if (ret)return ret; -drm_dp_link_train_clock_recovery_delay (dp->dpcd); +drm_dp_link_train_clock_recovery_delay (&dp->aux, dp->dpcd); ret =drm_dp_dpcd_read_link_status (&dp->aux, link_status);if (ret <0 )return ret;
include/drm/drm_dp_helper.h +3 -1
@@ -29,6 +29,7 @@#include <drm/drm_connector.h> struct drm_device ; +struct drm_dp_aux ;/* * Unless otherwise noted, all values are from the DP 1.1a spec. Note that
@@ -1482,7 +1483,8 @@ u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZ#define DP_LTTPR_COMMON_CAP_SIZE 8#define DP_LTTPR_PHY_CAP_SIZE 3 -void drm_dp_link_train_clock_recovery_delay (const u8 dpcd[DP_RECEIVER_CAP_SIZE ]); +void drm_dp_link_train_clock_recovery_delay (const struct drm_dp_aux *aux, +const u8 dpcd[DP_RECEIVER_CAP_SIZE ]);void drm_dp_lttpr_link_train_clock_recovery_delay (void );void drm_dp_link_train_channel_eq_delay (const u8 dpcd[DP_RECEIVER_CAP_SIZE ]);void drm_dp_lttpr_link_train_channel_eq_delay (const u8 caps[DP_LTTPR_PHY_CAP_SIZE ]);
Signature · 6 lines
2.30.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerPATCH v3 9/20 drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay()
In reply to Lyude PaulSo that we can start using drm_dbg_*() fordrm_dp_link_train_channel_eq_delay() anddrm_dp_lttpr_link_train_channel_eq_delay().
--- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 14 +++++++++----- .../gpu/drm/i915/display/intel_dp_link_training.c | 4 ++-- drivers/gpu/drm/msm/dp/dp_ctrl.c | 4 ++-- drivers/gpu/drm/msm/edp/edp_ctrl.c | 4 ++-- drivers/gpu/drm/radeon/atombios_dp.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- include/drm/drm_dp_helper.h | 6 ++++-- 8 files changed, 22 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +1 -1
@@ -682,7 +682,7 @@ amdgpu_atombios_dp_link_train_ce(struct amdgpu_atombios_dp_link_train_info *dp_i dp_info->tries =0 ; channel_eq = false;while (1 ) { -drm_dp_link_train_channel_eq_delay (dp_info->dpcd); +drm_dp_link_train_channel_eq_delay (dp_info->aux, dp_info->dpcd);if (drm_dp_dpcd_read_link_status (dp_info->aux, dp_info->link_status) <=0 ) {
drivers/gpu/drm/drm_dp_helper.c +9 -5
@@ -151,7 +151,8 @@ void drm_dp_link_train_clock_recovery_delay(const struct drm_dp_aux *aux, }EXPORT_SYMBOL (drm_dp_link_train_clock_recovery_delay); -static void __drm_dp_link_train_channel_eq_delay (unsigned long rd_interval) +static void __drm_dp_link_train_channel_eq_delay (const struct drm_dp_aux *aux, +unsigned long rd_interval) {if (rd_interval >4 ) DRM_DEBUG_KMS("AUX interval %lu, out of range (max 4)\n",
@@ -165,9 +166,11 @@ static void __drm_dp_link_train_channel_eq_delay(unsigned long rd_interval)usleep_range (rd_interval, rd_interval *2 ); } -void drm_dp_link_train_channel_eq_delay (const u8 dpcd[DP_RECEIVER_CAP_SIZE ]) +void drm_dp_link_train_channel_eq_delay (const struct drm_dp_aux *aux, +const u8 dpcd[DP_RECEIVER_CAP_SIZE ]) { -__drm_dp_link_train_channel_eq_delay (dpcd[DP_TRAINING_AUX_RD_INTERVAL ] & +__drm_dp_link_train_channel_eq_delay (aux, + dpcd[DP_TRAINING_AUX_RD_INTERVAL ] &DP_TRAINING_AUX_RD_MASK ); }EXPORT_SYMBOL (drm_dp_link_train_channel_eq_delay);
@@ -183,13 +186,14 @@ static u8 dp_lttpr_phy_cap(const u8 phy_cap[DP_LTTPR_PHY_CAP_SIZE], int r)return phy_cap[r -DP_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER1 ]; } -void drm_dp_lttpr_link_train_channel_eq_delay (const u8 phy_cap[DP_LTTPR_PHY_CAP_SIZE ]) +void drm_dp_lttpr_link_train_channel_eq_delay (const struct drm_dp_aux *aux, +const u8 phy_cap[DP_LTTPR_PHY_CAP_SIZE ]) {u8 interval =dp_lttpr_phy_cap (phy_cap,DP_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER1 ) &DP_TRAINING_AUX_RD_MASK ; -__drm_dp_link_train_channel_eq_delay (interval); +__drm_dp_link_train_channel_eq_delay (aux, interval); }EXPORT_SYMBOL (drm_dp_lttpr_link_train_channel_eq_delay);
drivers/gpu/drm/i915/display/intel_dp_link_training.c +2 -2
@@ -665,11 +665,11 @@ intel_dp_link_training_channel_equalization_delay(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy) {if (dp_phy ==DP_PHY_DPRX ) { -drm_dp_link_train_channel_eq_delay (intel_dp->dpcd); +drm_dp_link_train_channel_eq_delay (&intel_dp->aux, intel_dp->dpcd); }else {const u8 *phy_caps =intel_dp_lttpr_phy_caps (intel_dp, dp_phy); -drm_dp_lttpr_link_train_channel_eq_delay (phy_caps); +drm_dp_lttpr_link_train_channel_eq_delay (&intel_dp->aux, phy_caps); } }
drivers/gpu/drm/msm/dp/dp_ctrl.c +2 -2
@@ -1184,7 +1184,7 @@ static int dp_ctrl_link_lane_down_shift(struct dp_ctrl_private *ctrl)static void dp_ctrl_clear_training_pattern (struct dp_ctrl_private *ctrl) {dp_ctrl_train_pattern_set (ctrl,DP_TRAINING_PATTERN_DISABLE ); -drm_dp_link_train_channel_eq_delay (ctrl->panel->dpcd); +drm_dp_link_train_channel_eq_delay (ctrl->aux, ctrl->panel->dpcd); } static int dp_ctrl_link_train_2(struct dp_ctrl_private *ctrl,
@@ -1215,7 +1215,7 @@ static int dp_ctrl_link_train_2(struct dp_ctrl_private *ctrl,dp_ctrl_train_pattern_set (ctrl, pattern |DP_RECOVERED_CLOCK_OUT_EN );for (tries =0 ; tries <= maximum_retries; tries++) { -drm_dp_link_train_channel_eq_delay (ctrl->panel->dpcd); +drm_dp_link_train_channel_eq_delay (ctrl->aux, ctrl->panel->dpcd); ret =dp_ctrl_read_link_status (ctrl, link_status);if (ret)
drivers/gpu/drm/msm/edp/edp_ctrl.c +2 -2
@@ -665,7 +665,7 @@ static int edp_start_link_train_2(struct edp_ctrl *ctrl)return ret;while (1 ) { -drm_dp_link_train_channel_eq_delay (ctrl->dpcd); +drm_dp_link_train_channel_eq_delay (ctrl->drm_aux, ctrl->dpcd); rlen =drm_dp_dpcd_read_link_status (ctrl->drm_aux, link_status);if (rlen <DP_LINK_STATUS_SIZE ) {
@@ -743,7 +743,7 @@ static int edp_clear_training_pattern(struct edp_ctrl *ctrl) ret =edp_train_pattern_set_write (ctrl,0 ); -drm_dp_link_train_channel_eq_delay (ctrl->dpcd); +drm_dp_link_train_channel_eq_delay (ctrl->drm_aux, ctrl->dpcd);return ret; }
drivers/gpu/drm/radeon/atombios_dp.c +1 -1
@@ -743,7 +743,7 @@ static int radeon_dp_link_train_ce(struct radeon_dp_link_train_info *dp_info) dp_info->tries =0 ; channel_eq = false;while (1 ) { -drm_dp_link_train_channel_eq_delay (dp_info->dpcd); +drm_dp_link_train_channel_eq_delay (dp_info->aux, dp_info->dpcd);if (drm_dp_dpcd_read_link_status (dp_info->aux, dp_info->link_status) <=0 ) {
drivers/gpu/drm/xlnx/zynqmp_dp.c +1 -1
@@ -778,7 +778,7 @@ static int zynqmp_dp_link_train_ce(struct zynqmp_dp *dp)if (ret)return ret; -drm_dp_link_train_channel_eq_delay (dp->dpcd); +drm_dp_link_train_channel_eq_delay (&dp->aux, dp->dpcd); ret =drm_dp_dpcd_read_link_status (&dp->aux, link_status);if (ret <0 )return ret;
include/drm/drm_dp_helper.h +4 -2
@@ -1486,8 +1486,10 @@ u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZvoid drm_dp_link_train_clock_recovery_delay (const struct drm_dp_aux *aux,const u8 dpcd[DP_RECEIVER_CAP_SIZE ]);void drm_dp_lttpr_link_train_clock_recovery_delay (void ); -void drm_dp_link_train_channel_eq_delay (const u8 dpcd[DP_RECEIVER_CAP_SIZE ]); -void drm_dp_lttpr_link_train_channel_eq_delay (const u8 caps[DP_LTTPR_PHY_CAP_SIZE ]); +void drm_dp_link_train_channel_eq_delay (const struct drm_dp_aux *aux, +const u8 dpcd[DP_RECEIVER_CAP_SIZE ]); +void drm_dp_lttpr_link_train_channel_eq_delay (const struct drm_dp_aux *aux, +const u8 caps[DP_LTTPR_PHY_CAP_SIZE ]);u8 drm_dp_link_rate_to_bw_code (int link_rate);int drm_dp_bw_code_to_link_rate (u8 link_bw);
Signature · 6 lines
2.30.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerPATCH v3 10/20 drm/dp: Always print aux channel name in logs
In reply to Lyude PaulSince we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question.
--- drivers/gpu/drm/drm_dp_helper.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_dp_helper.c +7 -6
@@ -139,8 +139,8 @@ void drm_dp_link_train_clock_recovery_delay(const struct drm_dp_aux *aux,DP_TRAINING_AUX_RD_MASK ;if (rd_interval >4 ) -DRM_DEBUG_KMS ("AUX interval %lu, out of range (max 4)\n" , - rd_interval); +DRM_DEBUG_KMS ("%s: AUX interval %lu, out of range (max 4)\n" , + aux->name, rd_interval);if (rd_interval ==0 || dpcd[DP_DPCD_REV ] >=DP_DPCD_REV_14 ) rd_interval =100 ;
@@ -155,8 +155,8 @@ static void __drm_dp_link_train_channel_eq_delay(const struct drm_dp_aux *aux, unsigned long rd_interval) {if (rd_interval >4 ) -DRM_DEBUG_KMS ("AUX interval %lu, out of range (max 4)\n" , - rd_interval); +DRM_DEBUG_KMS ("%s: AUX interval %lu, out of range (max 4)\n" , + aux->name, rd_interval);if (rd_interval ==0 ) rd_interval =400 ;
@@ -2819,7 +2819,7 @@ int drm_dp_pcon_frl_enable(struct drm_dp_aux *aux)if (ret <0 )return ret;if (!(buf &DP_PCON_ENABLE_SOURCE_CTL_MODE )) { -DRM_DEBUG_KMS ("PCON in Autonomous mode, can't enable FRL\n" ); +DRM_DEBUG_KMS ("%s: PCON in Autonomous mode, can't enable FRL\n" , aux->name);return -EINVAL ; } buf |=DP_PCON_ENABLE_HDMI_LINK ;
@@ -2914,7 +2914,8 @@ void drm_dp_pcon_hdmi_frl_link_error_count(struct drm_dp_aux *aux, num_error =0 ; } -DRM_ERROR ("More than %d errors since the last read for lane %d" , num_error, i); +DRM_ERROR ("%s: More than %d errors since the last read for lane %d" , + aux->name, num_error, i); } }EXPORT_SYMBOL (drm_dp_pcon_hdmi_frl_link_error_count);
Signature · 6 lines
2.30.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Lyude Paul
maintainerPATCH v3 11/20 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()
In reply to Lyude PaulSince we're about to be using drm_dbg_*() throughout the DP helpers, we'll need to be able to access the DRM device in the dual mode DP helpers as well. Note however that since drm_dp_dual_mode_detect() can be called with DDC adapters that aren't part of a drm_dp_aux struct, we need to pass down the drm_device to these functions instead of using drm_dp_aux.
--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 4 +++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 4 +++- 4 files changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_dp_dual_mode_helper.c +3 -1
@@ -165,6 +165,7 @@ static bool is_lspcon_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN],/** * drm_dp_dual_mode_detect - Identify the DP dual mode adaptor +* @dev: &drm_device to use * @adapter: I2C adapter for the DDC bus * * Attempt to identify the type of the DP dual mode adaptor used.
@@ -178,7 +179,8 @@ static bool is_lspcon_adaptor(const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN],* Returns: * The type of the DP dual mode adaptor used */ -enum drm_dp_dual_mode_type drm_dp_dual_mode_detect (struct i2c_adapter *adapter) +enum drm_dp_dual_mode_type drm_dp_dual_mode_detect (const struct drm_device *dev, +struct i2c_adapter *adapter) {char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN ] = {};uint8_t adaptor_id =0x00 ;
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -1
@@ -2224,7 +2224,7 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid)enum port port =hdmi_to_dig_port (hdmi)->base.port;struct i2c_adapter *adapter =intel_gmbus_get_adapter (dev_priv, hdmi->ddc_bus); -enum drm_dp_dual_mode_type type =drm_dp_dual_mode_detect (adapter); +enum drm_dp_dual_mode_type type =drm_dp_dual_mode_detect (&dev_priv->drm, adapter);/* * Type 1 DVI adaptors are not required to implement any
drivers/gpu/drm/i915/display/intel_lspcon.c +3 -2
@@ -221,7 +221,8 @@ static bool lspcon_probe(struct intel_lspcon *lspcon) {int retry;enum drm_dp_dual_mode_type adaptor_type; -struct i2c_adapter *adapter = &lspcon_to_intel_dp (lspcon)->aux.ddc; +struct intel_dp *intel_dp =lspcon_to_intel_dp (lspcon); +struct i2c_adapter *adapter = &intel_dp->aux.ddc;enum drm_lspcon_mode expected_mode; expected_mode = lspcon_wake_native_aux_ch(lspcon) ?
@@ -232,7 +233,7 @@ static bool lspcon_probe(struct intel_lspcon *lspcon)if (retry)usleep_range (500 ,1000 ); - adaptor_type =drm_dp_dual_mode_detect (adapter); + adaptor_type =drm_dp_dual_mode_detect (intel_dp->aux.drm_dev, adapter);if (adaptor_type ==DRM_DP_DUAL_MODE_LSPCON )break ; }
include/drm/drm_dp_dual_mode_helper.h +3 -1
@@ -62,6 +62,7 @@#define DP_DUAL_MODE_LSPCON_CURRENT_MODE 0x41#define DP_DUAL_MODE_LSPCON_MODE_PCON 0x1 +struct drm_device ;struct i2c_adapter ; ssize_t drm_dp_dual_mode_read(struct i2c_adapter *adapter,
@@ -103,7 +104,8 @@ enum drm_dp_dual_mode_type { DRM_DP_DUAL_MODE_LSPCON, }; -enum drm_dp_dual_mode_type drm_dp_dual_mode_detect (struct i2c_adapter *adapter); +enum drm_dp_dual_mode_type +drm_dp_dual_mode_detect (const struct drm_device *dev,struct i2c_adapter *adapter);int drm_dp_dual_mode_max_tmds_clock (enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter); int drm_dp_dual_mode_get_tmds_output(enum drm_dp_dual_mode_type type,
Signature · 6 lines
2.30.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Lyude Paul
maintainerPATCH v3 12/20 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output()
In reply to Lyude PaulAnother function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*().
--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_dp_dual_mode_helper.c +2 -1
@@ -336,6 +336,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_get_tmds_output);/** * drm_dp_dual_mode_set_tmds_output - Enable/disable TMDS output buffers in the DP dual mode adaptor +* @dev: &drm_device to use * @type: DP dual mode adaptor type * @adapter: I2C adapter for the DDC bus * @enable: enable (as opposed to disable) the TMDS output buffers
@@ -349,7 +350,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_get_tmds_output);* Returns: * 0 on success, negative error code on failure */ -int drm_dp_dual_mode_set_tmds_output (enum drm_dp_dual_mode_type type, +int drm_dp_dual_mode_set_tmds_output (const struct drm_device *dev,enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter,bool enable) {uint8_t tmds_oen = enable ?0 :DP_DUAL_MODE_TMDS_DISABLE ;
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -2
@@ -1251,8 +1251,7 @@ void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable)drm_dbg_kms (&dev_priv->drm,"%s DP dual mode adaptor TMDS output\n" , enable ?"Enabling" :"Disabling" ); -drm_dp_dual_mode_set_tmds_output (hdmi->dp_dual_mode.type, - adapter, enable); +drm_dp_dual_mode_set_tmds_output (&dev_priv->drm, hdmi->dp_dual_mode.type, adapter, enable); } static int intel_hdmi_hdcp_read(struct intel_digital_port *dig_port,
include/drm/drm_dp_dual_mode_helper.h +1 -1
@@ -110,7 +110,7 @@ int drm_dp_dual_mode_max_tmds_clock(enum drm_dp_dual_mode_type type, struct i2c_adapter *adapter);int drm_dp_dual_mode_get_tmds_output (enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter,bool *enabled); -int drm_dp_dual_mode_set_tmds_output (enum drm_dp_dual_mode_type type, +int drm_dp_dual_mode_set_tmds_output (const struct drm_device *dev,enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter,bool enable);const char *drm_dp_get_dual_mode_type_name (enum drm_dp_dual_mode_type type);
Signature · 6 lines
2.30.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerPATCH v3 13/20 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock()
In reply to Lyude PaulAnother function we need to pass drm_device down to in order to start using drm_dbg_*().
--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_dp_dual_mode_helper.c +2 -1
@@ -252,6 +252,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_detect);/** * drm_dp_dual_mode_max_tmds_clock - Max TMDS clock for DP dual mode adaptor +* @dev: &drm_device to use * @type: DP dual mode adaptor type * @adapter: I2C adapter for the DDC bus *
@@ -265,7 +266,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_detect);* Returns: * Maximum supported TMDS clock rate for the DP dual mode adaptor in kHz. */ -int drm_dp_dual_mode_max_tmds_clock (enum drm_dp_dual_mode_type type, +int drm_dp_dual_mode_max_tmds_clock (const struct drm_device *dev,enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter) {uint8_t max_tmds_clock;
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -1
@@ -2256,7 +2256,7 @@ intel_hdmi_dp_dual_mode_detect(struct drm_connector *connector, bool has_edid) hdmi->dp_dual_mode.type = type; hdmi->dp_dual_mode.max_tmds_clock = -drm_dp_dual_mode_max_tmds_clock (type, adapter); +drm_dp_dual_mode_max_tmds_clock (&dev_priv->drm, type, adapter); drm_dbg_kms(&dev_priv->drm, "DP dual mode adaptor (%s) detected (max TMDS clock: %d kHz)\n",
include/drm/drm_dp_dual_mode_helper.h +1 -1
@@ -106,7 +106,7 @@ enum drm_dp_dual_mode_type {enum drm_dp_dual_mode_type drm_dp_dual_mode_detect (const struct drm_device *dev,struct i2c_adapter *adapter); -int drm_dp_dual_mode_max_tmds_clock (enum drm_dp_dual_mode_type type, +int drm_dp_dual_mode_max_tmds_clock (const struct drm_device *dev,enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter);int drm_dp_dual_mode_get_tmds_output (enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter,bool *enabled);
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Lyude Paul
maintainerPATCH v3 14/20 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output()
In reply to Lyude PaulAnother function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers.
--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_dp_dual_mode_helper.c +3 -2
@@ -296,6 +296,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_max_tmds_clock);/** * drm_dp_dual_mode_get_tmds_output - Get the state of the TMDS output buffers in the DP dual mode adaptor +* @dev: &drm_device to use * @type: DP dual mode adaptor type * @adapter: I2C adapter for the DDC bus * @enabled: current state of the TMDS output buffers
@@ -310,8 +311,8 @@ EXPORT_SYMBOL(drm_dp_dual_mode_max_tmds_clock);* Returns: * 0 on success, negative error code on failure */ -int drm_dp_dual_mode_get_tmds_output (enum drm_dp_dual_mode_type type, -struct i2c_adapter *adapter, +int drm_dp_dual_mode_get_tmds_output (const struct drm_device *dev, +enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter,bool *enabled) {uint8_t tmds_oen;
include/drm/drm_dp_dual_mode_helper.h +1 -1
@@ -108,7 +108,7 @@ enum drm_dp_dual_mode_type drm_dp_dual_mode_detect(const struct drm_device *dev, struct i2c_adapter *adapter);int drm_dp_dual_mode_max_tmds_clock (const struct drm_device *dev,enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter); -int drm_dp_dual_mode_get_tmds_output (enum drm_dp_dual_mode_type type, +int drm_dp_dual_mode_get_tmds_output (const struct drm_device *dev,enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter,bool *enabled);int drm_dp_dual_mode_set_tmds_output (const struct drm_device *dev,enum drm_dp_dual_mode_type type,struct i2c_adapter *adapter,bool enable);
Signature · 6 lines
2.30.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lyude Paul
maintainerPATCH v3 15/20 drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode()
In reply to Lyude PaulSo that we can start using drm_dbg_*() throughout the DRM DP helpers.
--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 8 +++++--- drivers/gpu/drm/i915/display/intel_lspcon.c | 12 +++++++----- include/drm/drm_dp_dual_mode_helper.h | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-)
drivers/gpu/drm/drm_dp_dual_mode_helper.c +5 -3
@@ -430,6 +430,7 @@ EXPORT_SYMBOL(drm_dp_get_dual_mode_type_name);/** * drm_lspcon_get_mode: Get LSPCON's current mode of operation by * reading offset (0x80, 0x41) +* @dev: &drm_device to use * @adapter: I2C-over-aux adapter * @mode: current lspcon mode of operation output variable *
@@ -437,7 +438,7 @@ EXPORT_SYMBOL(drm_dp_get_dual_mode_type_name);* 0 on success, sets the current_mode value to appropriate mode * -error on failure */ -int drm_lspcon_get_mode (struct i2c_adapter *adapter, +int drm_lspcon_get_mode (const struct drm_device *dev,struct i2c_adapter *adapter,enum drm_lspcon_mode *mode) {u8 data;
@@ -477,13 +478,14 @@ EXPORT_SYMBOL(drm_lspcon_get_mode);/** * drm_lspcon_set_mode: Change LSPCON's mode of operation by * writing offset (0x80, 0x40) +* @dev: &drm_device to use * @adapter: I2C-over-aux adapter * @mode: required mode of operation * * Returns: * 0 on success, -error on failure/timeout */ -int drm_lspcon_set_mode (struct i2c_adapter *adapter, +int drm_lspcon_set_mode (const struct drm_device *dev,struct i2c_adapter *adapter,enum drm_lspcon_mode mode) {u8 data =0 ;
@@ -508,7 +510,7 @@ int drm_lspcon_set_mode(struct i2c_adapter *adapter,* so wait and retry until time out or done. */ do { - ret = drm_lspcon_get_mode(adapter, ¤t_mode); + ret = drm_lspcon_get_mode(dev, adapter, ¤t_mode); if (ret) { DRM_ERROR("can't confirm LSPCON mode change\n"); return ret;
drivers/gpu/drm/i915/display/intel_lspcon.c +7 -5
@@ -139,10 +139,11 @@ void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon)static enum drm_lspcon_mode lspcon_get_current_mode (struct intel_lspcon *lspcon) { +struct intel_dp *intel_dp =lspcon_to_intel_dp (lspcon);enum drm_lspcon_mode current_mode; -struct i2c_adapter *adapter = &lspcon_to_intel_dp (lspcon)->aux.ddc; +struct i2c_adapter *adapter = &intel_dp->aux.ddc; -if (drm_lspcon_get_mode (adapter, ¤t_mode)) { +if (drm_lspcon_get_mode (intel_dp->aux.drm_dev, adapter, ¤t_mode)) {DRM_DEBUG_KMS ("Error reading LSPCON mode\n" );return DRM_LSPCON_MODE_INVALID ; }
@@ -175,11 +176,12 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,static int lspcon_change_mode (struct intel_lspcon *lspcon,enum drm_lspcon_mode mode) { +struct intel_dp *intel_dp =lspcon_to_intel_dp (lspcon);int err;enum drm_lspcon_mode current_mode; -struct i2c_adapter *adapter = &lspcon_to_intel_dp (lspcon)->aux.ddc; +struct i2c_adapter *adapter = &intel_dp->aux.ddc; - err =drm_lspcon_get_mode (adapter, ¤t_mode); + err =drm_lspcon_get_mode (intel_dp->aux.drm_dev, adapter, ¤t_mode);if (err) {DRM_ERROR ("Error reading LSPCON mode\n" );return err;
@@ -190,7 +192,7 @@ static int lspcon_change_mode(struct intel_lspcon *lspcon,return 0 ; } - err =drm_lspcon_set_mode (adapter, mode); + err =drm_lspcon_set_mode (intel_dp->aux.drm_dev, adapter, mode);if (err <0 ) {DRM_ERROR ("LSPCON mode change failed\n" );return err;
include/drm/drm_dp_dual_mode_helper.h +2 -2
@@ -114,8 +114,8 @@ int drm_dp_dual_mode_set_tmds_output(const struct drm_device *dev, enum drm_dp_d struct i2c_adapter *adapter, bool enable);const char *drm_dp_get_dual_mode_type_name (enum drm_dp_dual_mode_type type); -int drm_lspcon_get_mode (struct i2c_adapter *adapter, +int drm_lspcon_get_mode (const struct drm_device *dev,struct i2c_adapter *adapter,enum drm_lspcon_mode *current_mode); -int drm_lspcon_set_mode (struct i2c_adapter *adapter, +int drm_lspcon_set_mode (const struct drm_device *dev,struct i2c_adapter *adapter,enum drm_lspcon_mode reqd_mode);#endif
Signature · 6 lines
2.30.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Lyude Paul
maintainerPATCH v3 16/20 drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()
In reply to Lyude PaulSince this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms().
--- drivers/gpu/drm/drm_dp_mst_topology.c | 7 +++++-- drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 ++- include/drm/drm_dp_mst_helper.h | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +5 -2
@@ -3638,6 +3638,7 @@ static int drm_dp_send_up_ack_reply(struct drm_dp_mst_topology_mgr *mgr,/** * drm_dp_get_vc_payload_bw - get the VC payload BW for an MST link +* @mgr: The &drm_dp_mst_topology_mgr to use * @link_rate: link rate in 10kbits/s units * @link_lane_count: lane count *
@@ -3646,7 +3647,8 @@ static int drm_dp_send_up_ack_reply(struct drm_dp_mst_topology_mgr *mgr,* convert the number of PBNs required for a given stream to the number of * timeslots this stream requires in each MTP. */ -int drm_dp_get_vc_payload_bw (int link_rate,int link_lane_count) +int drm_dp_get_vc_payload_bw (const struct drm_dp_mst_topology_mgr *mgr, +int link_rate,int link_lane_count) {if (link_rate ==0 || link_lane_count ==0 ) DRM_DEBUG_KMS("invalid link rate/lane count: (%d / %d)\n",
@@ -3711,7 +3713,8 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms goto out_unlock; } - mgr->pbn_div =drm_dp_get_vc_payload_bw (drm_dp_bw_code_to_link_rate (mgr->dpcd[1 ]), + mgr->pbn_div =drm_dp_get_vc_payload_bw (mgr, +drm_dp_bw_code_to_link_rate (mgr->dpcd[1 ]), mgr->dpcd[2 ] &DP_MAX_LANE_COUNT_MASK );if (mgr->pbn_div ==0 ) { ret = -EINVAL ;
drivers/gpu/drm/i915/display/intel_dp_mst.c +2 -1
@@ -70,7 +70,8 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, slots =drm_dp_atomic_find_vcpi_slots (state, &intel_dp->mst_mgr, connector->port, crtc_state->pbn, -drm_dp_get_vc_payload_bw (crtc_state->port_clock, +drm_dp_get_vc_payload_bw (&intel_dp->mst_mgr, + crtc_state->port_clock, crtc_state->lane_count));if (slots == -EDEADLK )return slots;
include/drm/drm_dp_mst_helper.h +2 -1
@@ -783,7 +783,8 @@ drm_dp_mst_detect_port(struct drm_connector *connector,struct edid *drm_dp_mst_get_edid (struct drm_connector *connector,struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port); -int drm_dp_get_vc_payload_bw (int link_rate,int link_lane_count); +int drm_dp_get_vc_payload_bw (const struct drm_dp_mst_topology_mgr *mgr, +int link_rate,int link_lane_count);int drm_dp_calc_pbn_mode (int clock,int bpp,bool dsc);
Signature · 6 lines
2.30.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Lyude Paul
maintainerPATCH v3 17/20 drm/print: Handle potentially NULL drm_devices in drm_dbg_*
In reply to Lyude PaulWhile this shouldn't really be something that happens all that often, since we're going to be using the drm_dbg_* log helpers in DRM helpers it's technically possible that a driver could use an AUX adapter before it's been associated with it's respective drm_device. While drivers should take care to avoid this, there's likely going to be situations where it's difficult to workaround. And since other logging helpers in the kernel tend to be OK with NULL pointers (for instance, passing a NULL pointer to a "%s" argument for a printk-like function in the kernel doesn't break anything), we should do the same for ours.
--- include/drm/drm_print.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
include/drm/drm_print.h +10 -10
@@ -443,25 +443,25 @@ void drm_dev_dbg(const struct device *dev, enum drm_debug_category category,#define drm_dbg_core (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_CORE, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_CORE, fmt, ##__VA_ARGS__)#define drm_dbg (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)#define drm_dbg_kms (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_KMS, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_KMS, fmt, ##__VA_ARGS__)#define drm_dbg_prime (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_PRIME, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_PRIME, fmt, ##__VA_ARGS__)#define drm_dbg_atomic (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_ATOMIC, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_ATOMIC, fmt, ##__VA_ARGS__)#define drm_dbg_vbl (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_VBL, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_VBL, fmt, ##__VA_ARGS__)#define drm_dbg_state (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_STATE, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_STATE, fmt, ##__VA_ARGS__)#define drm_dbg_lease (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_LEASE, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_LEASE, fmt, ##__VA_ARGS__)#define drm_dbg_dp (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_DP, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_DP, fmt, ##__VA_ARGS__)#define drm_dbg_drmres (drm, fmt, ...) \ - drm_dev_dbg((drm)->dev, DRM_UT_DRMRES, fmt, ##__VA_ARGS__) + drm_dev_dbg((drm) ? (drm)->dev : NULL, DRM_UT_DRMRES, fmt, ##__VA_ARGS__)/*
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Lyude Paul
maintainerPATCH v3 18/20 drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*()
In reply to Lyude PaulNow that we've added a back-pointer to drm_device to drm_dp_aux, made drm_dp_aux available to any functions in drm_dp_helper.c which need to print to the kernel log, and ensured all of our logging uses a consistent format, let's do the final step of the conversion and actually move everything over to using drm_err() and drm_dbg_*().
This was done by using the following cocci script:
@@
expression list expr;
@@
(
- DRM_DEBUG_KMS(expr);
+ drm_dbg_kms(aux->drm_dev, expr);
|
- DRM_DEBUG_DP(expr);
+ drm_dbg_dp(aux->drm_dev, expr);
|
- DRM_DEBUG_ATOMIC(expr);
+ drm_dbg_atomic(aux->drm_dev, expr);
|
- DRM_DEBUG_KMS_RATELIMITED(expr);
+ drm_dbg_kms_ratelimited(aux->drm_dev, expr);
|
- DRM_ERROR(expr);
+ drm_err(aux->drm_dev, expr);
)
Followed by correcting the resulting line-wrapping in the results by hand.
v2:
* Fix indenting in drm_dp_dump_access
--- drivers/gpu/drm/drm_dp_helper.c | 121 ++++++++++++++++---------------- 1 file changed, 59 insertions(+), 62 deletions(-)
drivers/gpu/drm/drm_dp_helper.c +59 -62
@@ -139,8 +139,8 @@ void drm_dp_link_train_clock_recovery_delay(const struct drm_dp_aux *aux,DP_TRAINING_AUX_RD_MASK ;if (rd_interval >4 ) -DRM_DEBUG_KMS ("%s: AUX interval %lu, out of range (max 4)\n" , - aux->name, rd_interval); +drm_dbg_kms (aux->drm_dev,"%s: AUX interval %lu, out of range (max 4)\n" , + aux->name, rd_interval);if (rd_interval ==0 || dpcd[DP_DPCD_REV ] >=DP_DPCD_REV_14 ) rd_interval =100 ;
@@ -155,8 +155,8 @@ static void __drm_dp_link_train_channel_eq_delay(const struct drm_dp_aux *aux, unsigned long rd_interval) {if (rd_interval >4 ) -DRM_DEBUG_KMS ("%s: AUX interval %lu, out of range (max 4)\n" , - aux->name, rd_interval); +drm_dbg_kms (aux->drm_dev,"%s: AUX interval %lu, out of range (max 4)\n" , + aux->name, rd_interval);if (rd_interval ==0 ) rd_interval =400 ;
@@ -220,11 +220,11 @@ drm_dp_dump_access(const struct drm_dp_aux *aux,const char *arrow = request ==DP_AUX_NATIVE_READ ?"->" :"<-" ;if (ret >0 ) -DRM_DEBUG_DP ("%s: 0x%05x AUX %s (ret=%3d) %*ph\n" , - aux->name, offset, arrow, ret,min (ret,20 ), buffer); +drm_dbg_dp (aux->drm_dev,"%s: 0x%05x AUX %s (ret=%3d) %*ph\n" , + aux->name, offset, arrow, ret,min (ret,20 ), buffer);else -DRM_DEBUG_DP ("%s: 0x%05x AUX %s (ret=%3d)\n" , - aux->name, offset, arrow, ret); +drm_dbg_dp (aux->drm_dev,"%s: 0x%05x AUX %s (ret=%3d)\n" , + aux->name, offset, arrow, ret); }/**
@@ -287,8 +287,8 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request, err = ret; } -DRM_DEBUG_KMS ("%s: Too many retries, giving up. First error: %d\n" , - aux->name, err); +drm_dbg_kms (aux->drm_dev,"%s: Too many retries, giving up. First error: %d\n" , + aux->name, err); ret = err; unlock:
@@ -524,44 +524,44 @@ bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,if (drm_dp_dpcd_read (aux,DP_DEVICE_SERVICE_IRQ_VECTOR , &auto_test_req,1 ) <1 ) { -DRM_ERROR ("%s: DPCD failed read at register 0x%x\n" , - aux->name,DP_DEVICE_SERVICE_IRQ_VECTOR ); +drm_err (aux->drm_dev,"%s: DPCD failed read at register 0x%x\n" , + aux->name,DP_DEVICE_SERVICE_IRQ_VECTOR );return false; } auto_test_req &=DP_AUTOMATED_TEST_REQUEST ;if (drm_dp_dpcd_read (aux,DP_TEST_REQUEST , &link_edid_read,1 ) <1 ) { -DRM_ERROR ("%s: DPCD failed read at register 0x%x\n" , - aux->name,DP_TEST_REQUEST ); +drm_err (aux->drm_dev,"%s: DPCD failed read at register 0x%x\n" , + aux->name,DP_TEST_REQUEST );return false; } link_edid_read &=DP_TEST_LINK_EDID_READ ;if (!auto_test_req || !link_edid_read) { -DRM_DEBUG_KMS ("%s: Source DUT does not support TEST_EDID_READ\n" , - aux->name); +drm_dbg_kms (aux->drm_dev,"%s: Source DUT does not support TEST_EDID_READ\n" , + aux->name);return false; }if (drm_dp_dpcd_write (aux,DP_DEVICE_SERVICE_IRQ_VECTOR , &auto_test_req,1 ) <1 ) { -DRM_ERROR ("%s: DPCD failed write at register 0x%x\n" , - aux->name,DP_DEVICE_SERVICE_IRQ_VECTOR ); +drm_err (aux->drm_dev,"%s: DPCD failed write at register 0x%x\n" , + aux->name,DP_DEVICE_SERVICE_IRQ_VECTOR );return false; }/* send back checksum for the last edid extension block data */ if (drm_dp_dpcd_write (aux,DP_TEST_EDID_CHECKSUM , &real_edid_checksum,1 ) <1 ) { -DRM_ERROR ("%s: DPCD failed write at register 0x%x\n" , - aux->name,DP_TEST_EDID_CHECKSUM ); +drm_err (aux->drm_dev,"%s: DPCD failed write at register 0x%x\n" , + aux->name,DP_TEST_EDID_CHECKSUM );return false; } test_resp |=DP_TEST_EDID_CHECKSUM_WRITE ;if (drm_dp_dpcd_write (aux,DP_TEST_RESPONSE , &test_resp,1 ) <1 ) { -DRM_ERROR ("%s: DPCD failed write at register 0x%x\n" , - aux->name,DP_TEST_RESPONSE ); +drm_err (aux->drm_dev,"%s: DPCD failed write at register 0x%x\n" , + aux->name,DP_TEST_RESPONSE );return false; }
@@ -604,17 +604,16 @@ static int drm_dp_read_extended_dpcd_caps(struct drm_dp_aux *aux,return -EIO ;if (dpcd[DP_DPCD_REV ] > dpcd_ext[DP_DPCD_REV ]) { -DRM_DEBUG_KMS ("%s: Extended DPCD rev less than base DPCD rev (%d > %d)\n" , - aux->name, dpcd[DP_DPCD_REV ], - dpcd_ext[DP_DPCD_REV ]); +drm_dbg_kms (aux->drm_dev, +"%s: Extended DPCD rev less than base DPCD rev (%d > %d)\n" , + aux->name, dpcd[DP_DPCD_REV ], dpcd_ext[DP_DPCD_REV ]);return 0 ; }if (!memcmp (dpcd, dpcd_ext,sizeof (dpcd_ext)))return 0 ; -DRM_DEBUG_KMS ("%s: Base DPCD: %*ph\n" , - aux->name,DP_RECEIVER_CAP_SIZE , dpcd); +drm_dbg_kms (aux->drm_dev,"%s: Base DPCD: %*ph\n" , aux->name,DP_RECEIVER_CAP_SIZE , dpcd);memcpy (dpcd, dpcd_ext,sizeof (dpcd_ext));
@@ -649,8 +648,7 @@ int drm_dp_read_dpcd_caps(struct drm_dp_aux *aux,if (ret <0 )return ret; -DRM_DEBUG_KMS ("%s: DPCD: %*ph\n" , - aux->name,DP_RECEIVER_CAP_SIZE , dpcd); +drm_dbg_kms (aux->drm_dev,"%s: DPCD: %*ph\n" , aux->name,DP_RECEIVER_CAP_SIZE , dpcd);return ret; }
@@ -694,8 +692,7 @@ int drm_dp_read_downstream_info(struct drm_dp_aux *aux,if (ret != len)return -EIO ; -DRM_DEBUG_KMS ("%s: DPCD DFP: %*ph\n" , - aux->name, len, downstream_ports); +drm_dbg_kms (aux->drm_dev,"%s: DPCD DFP: %*ph\n" , aux->name, len, downstream_ports);return 0 ; }
@@ -1412,11 +1409,11 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)* Avoid spamming the kernel log with timeout errors. */ if (ret == -ETIMEDOUT ) -DRM_DEBUG_KMS_RATELIMITED ("%s: transaction timed out\n" , - aux->name); +drm_dbg_kms_ratelimited (aux->drm_dev,"%s: transaction timed out\n" , + aux->name);else -DRM_DEBUG_KMS ("%s: transaction failed: %d\n" , - aux->name, ret); +drm_dbg_kms (aux->drm_dev,"%s: transaction failed: %d\n" , + aux->name, ret);return ret; }
@@ -1430,12 +1427,12 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)break ;case DP_AUX_NATIVE_REPLY_NACK : -DRM_DEBUG_KMS ("%s: native nack (result=%d, size=%zu)\n" , - aux->name, ret, msg->size); +drm_dbg_kms (aux->drm_dev,"%s: native nack (result=%d, size=%zu)\n" , + aux->name, ret, msg->size);return -EREMOTEIO ;case DP_AUX_NATIVE_REPLY_DEFER : -DRM_DEBUG_KMS ("%s: native defer\n" , aux->name); +drm_dbg_kms (aux->drm_dev,"%s: native defer\n" , aux->name);/* * We could check for I2C bit rate capabilities and if * available adjust this interval. We could also be
@@ -1449,8 +1446,8 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)continue ;default : -DRM_ERROR ("%s: invalid native reply %#04x\n" , - aux->name, msg->reply); +drm_err (aux->drm_dev,"%s: invalid native reply %#04x\n" , + aux->name, msg->reply);return -EREMOTEIO ; }
@@ -1465,13 +1462,13 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)return ret;case DP_AUX_I2C_REPLY_NACK : -DRM_DEBUG_KMS ("%s: I2C nack (result=%d, size=%zu)\n" , - aux->name, ret, msg->size); +drm_dbg_kms (aux->drm_dev,"%s: I2C nack (result=%d, size=%zu)\n" , + aux->name, ret, msg->size); aux->i2c_nack_count++;return -EREMOTEIO ;case DP_AUX_I2C_REPLY_DEFER : -DRM_DEBUG_KMS ("%s: I2C defer\n" , aux->name); +drm_dbg_kms (aux->drm_dev,"%s: I2C defer\n" , aux->name);/* DP Compliance Test 4.2.2.5 Requirement: * Must have at least 7 retries for I2C defers on the * transaction to pass this test
@@ -1485,13 +1482,13 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)continue ;default : -DRM_ERROR ("%s: invalid I2C reply %#04x\n" , - aux->name, msg->reply); +drm_err (aux->drm_dev,"%s: invalid I2C reply %#04x\n" , + aux->name, msg->reply);return -EREMOTEIO ; } } -DRM_DEBUG_KMS ("%s: Too many retries, giving up\n" , aux->name); +drm_dbg_kms (aux->drm_dev,"%s: Too many retries, giving up\n" , aux->name);return -EREMOTEIO ; }
@@ -1520,8 +1517,9 @@ static int drm_dp_i2c_drain_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *oreturn err ==0 ? -EPROTO : err;if (err < msg.size && err < ret) { -DRM_DEBUG_KMS ("%s: Partial I2C reply: requested %zu bytes got %d bytes\n" , - aux->name, msg.size, err); +drm_dbg_kms (aux->drm_dev, +"%s: Partial I2C reply: requested %zu bytes got %d bytes\n" , + aux->name, msg.size, err); ret = err; }
@@ -1700,12 +1698,11 @@ static void drm_dp_aux_crc_work(struct work_struct *work) }if (ret == -EAGAIN ) { -DRM_DEBUG_KMS ("%s: Get CRC failed after retrying: %d\n" , - aux->name, ret); +drm_dbg_kms (aux->drm_dev,"%s: Get CRC failed after retrying: %d\n" , + aux->name, ret);continue ; }else if (ret) { -DRM_DEBUG_KMS ("%s: Failed to get a CRC: %d\n" , - aux->name, ret); +drm_dbg_kms (aux->drm_dev,"%s: Failed to get a CRC: %d\n" , aux->name, ret);continue ; }
@@ -2047,13 +2044,12 @@ int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc, dev_id_len =strnlen (ident->device_id,sizeof (ident->device_id)); -DRM_DEBUG_KMS ("%s: DP %s: OUI %*phD dev-ID %*pE HW-rev %d.%d SW-rev %d.%d quirks 0x%04x\n" , - aux->name, is_branch ?"branch" :"sink" , - (int )sizeof (ident->oui), ident->oui, - dev_id_len, ident->device_id, - ident->hw_rev >>4 , ident->hw_rev &0xf , - ident->sw_major_rev, ident->sw_minor_rev, - desc->quirks); +drm_dbg_kms (aux->drm_dev, +"%s: DP %s: OUI %*phD dev-ID %*pE HW-rev %d.%d SW-rev %d.%d quirks 0x%04x\n" , + aux->name, is_branch ?"branch" :"sink" , + (int )sizeof (ident->oui), ident->oui, dev_id_len, + ident->device_id, ident->hw_rev >>4 , ident->hw_rev &0xf , + ident->sw_major_rev, ident->sw_minor_rev, desc->quirks);return 0 ; }
@@ -2819,7 +2815,8 @@ int drm_dp_pcon_frl_enable(struct drm_dp_aux *aux)if (ret <0 )return ret;if (!(buf &DP_PCON_ENABLE_SOURCE_CTL_MODE )) { -DRM_DEBUG_KMS ("%s: PCON in Autonomous mode, can't enable FRL\n" , aux->name); +drm_dbg_kms (aux->drm_dev,"%s: PCON in Autonomous mode, can't enable FRL\n" , + aux->name);return -EINVAL ; } buf |=DP_PCON_ENABLE_HDMI_LINK ;
@@ -2914,8 +2911,8 @@ void drm_dp_pcon_hdmi_frl_link_error_count(struct drm_dp_aux *aux, num_error =0 ; } -DRM_ERROR ("%s: More than %d errors since the last read for lane %d" , - aux->name, num_error, i); +drm_err (aux->drm_dev,"%s: More than %d errors since the last read for lane %d" , + aux->name, num_error, i); } }EXPORT_SYMBOL (drm_dp_pcon_hdmi_frl_link_error_count);
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Lyude Paul
maintainerPATCH v3 19/20 drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms()
In reply to Lyude PaulNext step in the conversion, move everything in drm_dp_dual_mode_helper.c over to using drm_err() and drm_dbg_kms(). This was done using the following cocci script:
@@
expression list expr;
@@
(
- DRM_DEBUG_KMS(expr);
+ drm_dbg_kms(dev, expr);
|
- DRM_ERROR(expr);
+ drm_err(dev, expr);
)
And correcting the indentation of the resulting code by hand.
--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 45 +++++++++++------------ 1 file changed, 21 insertions(+), 24 deletions(-)
drivers/gpu/drm/drm_dp_dual_mode_helper.c +21 -24
@@ -27,6 +27,7 @@#include <linux/slab.h> #include <linux/string.h> +#include <drm/drm_device.h> #include <drm/drm_dp_dual_mode_helper.h> #include <drm/drm_print.h>
@@ -202,8 +203,8 @@ enum drm_dp_dual_mode_type drm_dp_dual_mode_detect(const struct drm_device *dev,*/ ret =drm_dp_dual_mode_read (adapter,DP_DUAL_MODE_HDMI_ID , hdmi_id,sizeof (hdmi_id)); -DRM_DEBUG_KMS ("DP dual mode HDMI ID: %*pE (err %zd)\n" , - ret ?0 : (int )sizeof (hdmi_id), hdmi_id, ret); +drm_dbg_kms (dev,"DP dual mode HDMI ID: %*pE (err %zd)\n" , + ret ?0 : (int )sizeof (hdmi_id), hdmi_id, ret);if (ret)return DRM_DP_DUAL_MODE_UNKNOWN ;
@@ -221,8 +222,7 @@ enum drm_dp_dual_mode_type drm_dp_dual_mode_detect(const struct drm_device *dev,*/ ret =drm_dp_dual_mode_read (adapter,DP_DUAL_MODE_ADAPTOR_ID , &adaptor_id,sizeof (adaptor_id)); -DRM_DEBUG_KMS ("DP dual mode adaptor ID: %02x (err %zd)\n" , - adaptor_id, ret); +drm_dbg_kms (dev,"DP dual mode adaptor ID: %02x (err %zd)\n" , adaptor_id, ret);if (ret ==0 ) {if (is_lspcon_adaptor (hdmi_id, adaptor_id))return DRM_DP_DUAL_MODE_LSPCON ;
@@ -238,8 +238,7 @@ enum drm_dp_dual_mode_type drm_dp_dual_mode_detect(const struct drm_device *dev,* that we may have misdetected the type. */ if (!is_type1_adaptor (adaptor_id) && adaptor_id != hdmi_id[0 ]) -DRM_ERROR ("Unexpected DP dual mode adaptor ID %02x\n" , - adaptor_id); +drm_err (dev,"Unexpected DP dual mode adaptor ID %02x\n" , adaptor_id); }
@@ -286,7 +285,7 @@ int drm_dp_dual_mode_max_tmds_clock(const struct drm_device *dev, enum drm_dp_du ret =drm_dp_dual_mode_read (adapter,DP_DUAL_MODE_MAX_TMDS_CLOCK , &max_tmds_clock,sizeof (max_tmds_clock));if (ret || max_tmds_clock ==0x00 || max_tmds_clock ==0xff ) { -DRM_DEBUG_KMS ("Failed to query max TMDS clock\n" ); +drm_dbg_kms (dev,"Failed to query max TMDS clock\n" );return 165000 ; }
@@ -326,7 +325,7 @@ int drm_dp_dual_mode_get_tmds_output(const struct drm_device *dev, ret =drm_dp_dual_mode_read (adapter,DP_DUAL_MODE_TMDS_OEN , &tmds_oen,sizeof (tmds_oen));if (ret) { -DRM_DEBUG_KMS ("Failed to query state of TMDS output buffers\n" ); +drm_dbg_kms (dev,"Failed to query state of TMDS output buffers\n" );return ret; }
@@ -372,18 +371,17 @@ int drm_dp_dual_mode_set_tmds_output(const struct drm_device *dev, enum drm_dp_d ret =drm_dp_dual_mode_write (adapter,DP_DUAL_MODE_TMDS_OEN , &tmds_oen,sizeof (tmds_oen));if (ret) { -DRM_DEBUG_KMS ("Failed to %s TMDS output buffers (%d attempts)\n" , - enable ?"enable" :"disable" , - retry +1 ); +drm_dbg_kms (dev,"Failed to %s TMDS output buffers (%d attempts)\n" , + enable ?"enable" :"disable" , retry +1 );return ret; } ret =drm_dp_dual_mode_read (adapter,DP_DUAL_MODE_TMDS_OEN , &tmp,sizeof (tmp));if (ret) { -DRM_DEBUG_KMS ("I2C read failed during TMDS output buffer %s (%d attempts)\n" , - enable ?"enabling" :"disabling" , - retry +1 ); +drm_dbg_kms (dev, +"I2C read failed during TMDS output buffer %s (%d attempts)\n" , + enable ?"enabling" :"disabling" , retry +1 );return ret; }
@@ -391,8 +389,8 @@ int drm_dp_dual_mode_set_tmds_output(const struct drm_device *dev, enum drm_dp_dreturn 0 ; } -DRM_DEBUG_KMS ("I2C write value mismatch during TMDS output buffer %s\n" , - enable ?"enabling" :"disabling" ); +drm_dbg_kms (dev,"I2C write value mismatch during TMDS output buffer %s\n" , + enable ?"enabling" :"disabling" );return -EIO ; }
@@ -446,7 +444,7 @@ int drm_lspcon_get_mode(const struct drm_device *dev, struct i2c_adapter *adapteint retry;if (!mode) { -DRM_ERROR ("NULL input\n" ); +drm_err (dev,"NULL input\n" );return -EINVAL ; }
@@ -463,7 +461,7 @@ int drm_lspcon_get_mode(const struct drm_device *dev, struct i2c_adapter *adapte }if (ret <0 ) { -DRM_DEBUG_KMS ("LSPCON read(0x80, 0x41) failed\n" ); +drm_dbg_kms (dev,"LSPCON read(0x80, 0x41) failed\n" );return -EFAULT ; }
@@ -500,7 +498,7 @@ int drm_lspcon_set_mode(const struct drm_device *dev, struct i2c_adapter *adapte ret =drm_dp_dual_mode_write (adapter,DP_DUAL_MODE_LSPCON_MODE_CHANGE , &data,sizeof (data));if (ret <0 ) { -DRM_ERROR ("LSPCON mode change failed\n" ); +drm_err (dev,"LSPCON mode change failed\n" );return ret; }
@@ -512,22 +510,21 @@ int drm_lspcon_set_mode(const struct drm_device *dev, struct i2c_adapter *adaptedo { ret =drm_lspcon_get_mode (dev, adapter, ¤t_mode);if (ret) { -DRM_ERROR ("can't confirm LSPCON mode change\n" ); +drm_err (dev,"can't confirm LSPCON mode change\n" );return ret; }else {if (current_mode != mode) {msleep (10 ); time_out -=10 ; }else { -DRM_DEBUG_KMS ("LSPCON mode changed to %s\n" , - mode ==DRM_LSPCON_MODE_LS ? -"LS" :"PCON" ); +drm_dbg_kms (dev,"LSPCON mode changed to %s\n" , + mode ==DRM_LSPCON_MODE_LS ?"LS" :"PCON" );return 0 ; } } }while (time_out); -DRM_ERROR ("LSPCON mode change timed out\n" ); +drm_err (dev,"LSPCON mode change timed out\n" );return -ETIMEDOUT ; }EXPORT_SYMBOL (drm_lspcon_set_mode);
Signature · 6 lines
2.30.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Lyude Paul
maintainerPATCH v3 20/20 drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()
In reply to Lyude PaulAnd finally, convert all of the code in drm_dp_mst_topology.c over to using drm_err() and drm_dbg*(). Note that this refactor would have been a lot more complicated to have tried writing a coccinelle script for, so this whole thing was done by hand.
v2:
* Fix line-wrapping in drm_dp_mst_atomic_check_mstb_bw_limit()
--- drivers/gpu/drm/drm_dp_mst_topology.c | 368 +++++++++++++------------- 1 file changed, 187 insertions(+), 181 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +187 -181
@@ -286,7 +286,8 @@ static void drm_dp_encode_sideband_msg_hdr(struct drm_dp_sideband_msg_hdr *hdr, *len = idx; } -static bool drm_dp_decode_sideband_msg_hdr (struct drm_dp_sideband_msg_hdr *hdr, +static bool drm_dp_decode_sideband_msg_hdr (const struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_sideband_msg_hdr *hdr,u8 *buf,int buflen,u8 *hdrlen) {u8 crc4;
@@ -303,7 +304,7 @@ static bool drm_dp_decode_sideband_msg_hdr(struct drm_dp_sideband_msg_hdr *hdr, crc4 =drm_dp_msg_header_crc4 (buf, (len *2 ) -1 );if ((crc4 &0xf ) != (buf[len -1 ] &0xf )) { -DRM_DEBUG_KMS ("crc4 mismatch 0x%x 0x%x\n" , crc4, buf[len -1 ]); +drm_dbg_kms (mgr->dev,"crc4 mismatch 0x%x 0x%x\n" , crc4, buf[len -1 ]);return false; }
@@ -789,7 +790,8 @@ static bool drm_dp_sideband_append_payload(struct drm_dp_sideband_msg_rx *msg,return true; } -static bool drm_dp_sideband_parse_link_address (struct drm_dp_sideband_msg_rx *raw, +static bool drm_dp_sideband_parse_link_address (const struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_sideband_msg_rx *raw,struct drm_dp_sideband_msg_reply_body *repmsg) {int idx =1 ;
@@ -1014,7 +1016,8 @@ drm_dp_sideband_parse_query_stream_enc_status(return true; } -static bool drm_dp_sideband_parse_reply (struct drm_dp_sideband_msg_rx *raw, +static bool drm_dp_sideband_parse_reply (const struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_sideband_msg_rx *raw,struct drm_dp_sideband_msg_reply_body *msg) {memset (msg,0 ,sizeof (*msg));
@@ -1030,7 +1033,7 @@ static bool drm_dp_sideband_parse_reply(struct drm_dp_sideband_msg_rx *raw,switch (msg->req_type) {case DP_LINK_ADDRESS : -return drm_dp_sideband_parse_link_address (raw, msg); +return drm_dp_sideband_parse_link_address (mgr, raw, msg);case DP_QUERY_PAYLOAD :return drm_dp_sideband_parse_query_payload_ack (raw, msg);case DP_REMOTE_DPCD_READ :
@@ -1053,14 +1056,16 @@ static bool drm_dp_sideband_parse_reply(struct drm_dp_sideband_msg_rx *raw,case DP_QUERY_STREAM_ENC_STATUS :return drm_dp_sideband_parse_query_stream_enc_status (raw, msg);default : -DRM_ERROR ("Got unknown reply 0x%02x (%s)\n" , msg->req_type, -drm_dp_mst_req_type_str (msg->req_type)); +drm_err (mgr->dev,"Got unknown reply 0x%02x (%s)\n" , + msg->req_type,drm_dp_mst_req_type_str (msg->req_type));return false; } } -static bool drm_dp_sideband_parse_connection_status_notify (struct drm_dp_sideband_msg_rx *raw, -struct drm_dp_sideband_msg_req_body *msg) +static bool +drm_dp_sideband_parse_connection_status_notify (const struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_sideband_msg_rx *raw, +struct drm_dp_sideband_msg_req_body *msg) {int idx =1 ;
@@ -1082,12 +1087,14 @@ static bool drm_dp_sideband_parse_connection_status_notify(struct drm_dp_sideban idx++;return true; fail_len: -DRM_DEBUG_KMS ("connection status reply parse length fail %d %d\n" , idx, raw->curlen); +drm_dbg_kms (mgr->dev,"connection status reply parse length fail %d %d\n" , + idx, raw->curlen);return false; } -static bool drm_dp_sideband_parse_resource_status_notify (struct drm_dp_sideband_msg_rx *raw, -struct drm_dp_sideband_msg_req_body *msg) +static bool drm_dp_sideband_parse_resource_status_notify (const struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_sideband_msg_rx *raw, +struct drm_dp_sideband_msg_req_body *msg) {int idx =1 ;
@@ -1105,11 +1112,12 @@ static bool drm_dp_sideband_parse_resource_status_notify(struct drm_dp_sideband_ idx++;return true; fail_len: -DRM_DEBUG_KMS ("resource status reply parse length fail %d %d\n" , idx, raw->curlen); +drm_dbg_kms (mgr->dev,"resource status reply parse length fail %d %d\n" , idx, raw->curlen);return false; } -static bool drm_dp_sideband_parse_req (struct drm_dp_sideband_msg_rx *raw, +static bool drm_dp_sideband_parse_req (const struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_sideband_msg_rx *raw,struct drm_dp_sideband_msg_req_body *msg) {memset (msg,0 ,sizeof (*msg));
@@ -1117,12 +1125,12 @@ static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw,switch (msg->req_type) {case DP_CONNECTION_STATUS_NOTIFY : -return drm_dp_sideband_parse_connection_status_notify (raw, msg); +return drm_dp_sideband_parse_connection_status_notify (mgr, raw, msg);case DP_RESOURCE_STATUS_NOTIFY : -return drm_dp_sideband_parse_resource_status_notify (raw, msg); +return drm_dp_sideband_parse_resource_status_notify (mgr, raw, msg);default : -DRM_ERROR ("Got unknown request 0x%02x (%s)\n" , msg->req_type, -drm_dp_mst_req_type_str (msg->req_type)); +drm_err (mgr->dev,"Got unknown request 0x%02x (%s)\n" , + msg->req_type,drm_dp_mst_req_type_str (msg->req_type));return false; } }
@@ -1232,14 +1240,14 @@ static int drm_dp_mst_assign_payload_id(struct drm_dp_mst_topology_mgr *mgr, ret =find_first_zero_bit (&mgr->payload_mask, mgr->max_payloads +1 );if (ret > mgr->max_payloads) { ret = -EINVAL ; -DRM_DEBUG_KMS ("out of payload ids %d\n" , ret); +drm_dbg_kms (mgr->dev,"out of payload ids %d\n" , ret); goto out_unlock; } vcpi_ret =find_first_zero_bit (&mgr->vcpi_mask, mgr->max_payloads +1 );if (vcpi_ret > mgr->max_payloads) { ret = -EINVAL ; -DRM_DEBUG_KMS ("out of vcpi ids %d\n" , ret); +drm_dbg_kms (mgr->dev,"out of vcpi ids %d\n" , ret); goto out_unlock; }
@@ -1261,7 +1269,7 @@ static void drm_dp_mst_put_payload_id(struct drm_dp_mst_topology_mgr *mgr,return ;mutex_lock (&mgr->payload_lock); -DRM_DEBUG_KMS ("putting payload %d\n" , vcpi); +drm_dbg_kms (mgr->dev,"putting payload %d\n" , vcpi);clear_bit (vcpi -1 , &mgr->vcpi_mask);for (i =0 ; i < mgr->max_payloads; i++) {
@@ -1331,7 +1339,8 @@ static int drm_dp_mst_wait_tx_reply(struct drm_dp_mst_branch *mstb, goto out; } }else { -DRM_DEBUG_KMS ("timedout msg send %p %d %d\n" , txmsg, txmsg->state, txmsg->seqno); +drm_dbg_kms (mgr->dev,"timedout msg send %p %d %d\n" , + txmsg, txmsg->state, txmsg->seqno);/* dump some state */ ret = -EIO ;
@@ -1485,7 +1494,7 @@ static void drm_dp_mst_get_mstb_malloc(struct drm_dp_mst_branch *mstb) {kref_get (&mstb->malloc_kref); -DRM_DEBUG ("mstb %p (%d)\n" , mstb,kref_read (&mstb->malloc_kref)); +drm_dbg (mstb->mgr->dev,"mstb %p (%d)\n" , mstb,kref_read (&mstb->malloc_kref)); }/**
@@ -1502,7 +1511,7 @@ drm_dp_mst_get_mstb_malloc(struct drm_dp_mst_branch *mstb)static void drm_dp_mst_put_mstb_malloc (struct drm_dp_mst_branch *mstb) { -DRM_DEBUG ("mstb %p (%d)\n" , mstb,kref_read (&mstb->malloc_kref) -1 ); +drm_dbg (mstb->mgr->dev,"mstb %p (%d)\n" , mstb,kref_read (&mstb->malloc_kref) -1 );kref_put (&mstb->malloc_kref, drm_dp_free_mst_branch_device); }
@@ -1536,7 +1545,7 @@ void drm_dp_mst_get_port_malloc(struct drm_dp_mst_port *port) {kref_get (&port->malloc_kref); -DRM_DEBUG ("port %p (%d)\n" , port,kref_read (&port->malloc_kref)); +drm_dbg (port->mgr->dev,"port %p (%d)\n" , port,kref_read (&port->malloc_kref)); }EXPORT_SYMBOL (drm_dp_mst_get_port_malloc);
@@ -1553,7 +1562,7 @@ EXPORT_SYMBOL(drm_dp_mst_get_port_malloc);void drm_dp_mst_put_port_malloc (struct drm_dp_mst_port *port) { -DRM_DEBUG ("port %p (%d)\n" , port,kref_read (&port->malloc_kref) -1 ); +drm_dbg (port->mgr->dev,"port %p (%d)\n" , port,kref_read (&port->malloc_kref) -1 );kref_put (&port->malloc_kref, drm_dp_free_mst_port); }EXPORT_SYMBOL (drm_dp_mst_put_port_malloc);
@@ -1778,8 +1787,7 @@ drm_dp_mst_topology_try_get_mstb(struct drm_dp_mst_branch *mstb)topology_ref_history_lock (mstb->mgr); ret =kref_get_unless_zero (&mstb->topology_kref);if (ret) { -DRM_DEBUG ("mstb %p (%d)\n" , - mstb,kref_read (&mstb->topology_kref)); +drm_dbg (mstb->mgr->dev,"mstb %p (%d)\n" , mstb,kref_read (&mstb->topology_kref));save_mstb_topology_ref (mstb,DRM_DP_MST_TOPOLOGY_REF_GET ); }
@@ -1809,7 +1817,7 @@ static void drm_dp_mst_topology_get_mstb(struct drm_dp_mst_branch *mstb)save_mstb_topology_ref (mstb,DRM_DP_MST_TOPOLOGY_REF_GET );WARN_ON (kref_read (&mstb->topology_kref) ==0 );kref_get (&mstb->topology_kref); -DRM_DEBUG ("mstb %p (%d)\n" , mstb,kref_read (&mstb->topology_kref)); +drm_dbg (mstb->mgr->dev,"mstb %p (%d)\n" , mstb,kref_read (&mstb->topology_kref));topology_ref_history_unlock (mstb->mgr); }
@@ -1831,8 +1839,7 @@ drm_dp_mst_topology_put_mstb(struct drm_dp_mst_branch *mstb) {topology_ref_history_lock (mstb->mgr); -DRM_DEBUG ("mstb %p (%d)\n" , - mstb,kref_read (&mstb->topology_kref) -1 ); +drm_dbg (mstb->mgr->dev,"mstb %p (%d)\n" , mstb,kref_read (&mstb->topology_kref) -1 );save_mstb_topology_ref (mstb,DRM_DP_MST_TOPOLOGY_REF_PUT );topology_ref_history_unlock (mstb->mgr);
@@ -1895,8 +1902,7 @@ drm_dp_mst_topology_try_get_port(struct drm_dp_mst_port *port)topology_ref_history_lock (port->mgr); ret =kref_get_unless_zero (&port->topology_kref);if (ret) { -DRM_DEBUG ("port %p (%d)\n" , - port,kref_read (&port->topology_kref)); +drm_dbg (port->mgr->dev,"port %p (%d)\n" , port,kref_read (&port->topology_kref));save_port_topology_ref (port,DRM_DP_MST_TOPOLOGY_REF_GET ); }
@@ -1923,7 +1929,7 @@ static void drm_dp_mst_topology_get_port(struct drm_dp_mst_port *port)WARN_ON (kref_read (&port->topology_kref) ==0 );kref_get (&port->topology_kref); -DRM_DEBUG ("port %p (%d)\n" , port,kref_read (&port->topology_kref)); +drm_dbg (port->mgr->dev,"port %p (%d)\n" , port,kref_read (&port->topology_kref));save_port_topology_ref (port,DRM_DP_MST_TOPOLOGY_REF_GET );topology_ref_history_unlock (port->mgr);
@@ -1944,8 +1950,7 @@ static void drm_dp_mst_topology_put_port(struct drm_dp_mst_port *port) {topology_ref_history_lock (port->mgr); -DRM_DEBUG ("port %p (%d)\n" , - port,kref_read (&port->topology_kref) -1 ); +drm_dbg (port->mgr->dev,"port %p (%d)\n" , port,kref_read (&port->topology_kref) -1 );save_port_topology_ref (port,DRM_DP_MST_TOPOLOGY_REF_PUT );topology_ref_history_unlock (port->mgr);
@@ -2130,8 +2135,7 @@ drm_dp_port_set_pdt(struct drm_dp_mst_port *port, u8 new_pdt, mstb =drm_dp_add_mst_branch_device (lct, rad);if (!mstb) { ret = -ENOMEM ; -DRM_ERROR ("Failed to create MSTB for port %p" , - port); +drm_err (mgr->dev,"Failed to create MSTB for port %p" , port); goto out; }
@@ -2261,8 +2265,8 @@ static void build_mst_prop_path(const struct drm_dp_mst_branch *mstb,int drm_dp_mst_connector_late_register (struct drm_connector *connector,struct drm_dp_mst_port *port) { -DRM_DEBUG_KMS ("registering %s remote bus for %s\n" , - port->aux.name, connector->kdev->kobj.name); +drm_dbg_kms (port->mgr->dev,"registering %s remote bus for %s\n" , + port->aux.name, connector->kdev->kobj.name); port->aux.dev = connector->kdev;return drm_dp_aux_register_devnode (&port->aux);
@@ -2281,8 +2285,8 @@ EXPORT_SYMBOL(drm_dp_mst_connector_late_register);void drm_dp_mst_connector_early_unregister (struct drm_connector *connector,struct drm_dp_mst_port *port) { -DRM_DEBUG_KMS ("unregistering %s remote bus for %s\n" , - port->aux.name, connector->kdev->kobj.name); +drm_dbg_kms (port->mgr->dev,"unregistering %s remote bus for %s\n" , + port->aux.name, connector->kdev->kobj.name);drm_dp_aux_unregister_devnode (&port->aux); }EXPORT_SYMBOL (drm_dp_mst_connector_early_unregister);
@@ -2312,7 +2316,7 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb,return ; error: -DRM_ERROR ("Failed to create connector for port %p: %d\n" , port, ret); +drm_err (mgr->dev,"Failed to create connector for port %p: %d\n" , port, ret); }/*
@@ -2452,8 +2456,7 @@ drm_dp_mst_handle_link_address_port(struct drm_dp_mst_branch *mstb,if (ret ==1 ) { send_link_addr = true; }else if (ret <0 ) { -DRM_ERROR ("Failed to change PDT on port %p: %d\n" , - port, ret); +drm_err (dev,"Failed to change PDT on port %p: %d\n" , port, ret); goto fail; }
@@ -2548,8 +2551,7 @@ drm_dp_mst_handle_conn_stat(struct drm_dp_mst_branch *mstb,if (ret ==1 ) { dowork = true; }else if (ret <0 ) { -DRM_ERROR ("Failed to change PDT for port %p: %d\n" , - port, ret); +drm_err (mgr->dev,"Failed to change PDT for port %p: %d\n" , port, ret); dowork = false; }
@@ -2608,7 +2610,9 @@ static struct drm_dp_mst_branch *drm_dp_get_mst_branch_device(struct drm_dp_mst_if (port->port_num == port_num) { mstb = port->mstb;if (!mstb) { -DRM_ERROR ("failed to lookup MSTB with lct %d, rad %02x\n" , lct, rad[0 ]); +drm_err (mgr->dev, +"failed to lookup MSTB with lct %d, rad %02x\n" , + lct, rad[0 ]); goto out; }
@@ -2744,7 +2748,7 @@ static void drm_dp_mst_link_probe_work(struct work_struct *work)* things work again. */ if (clear_payload_id_table) { -DRM_DEBUG_KMS ("Clearing payload ID table\n" ); +drm_dbg_kms (dev,"Clearing payload ID table\n" );drm_dp_send_clear_payload_id_table (mgr, mstb); }
@@ -2806,7 +2810,7 @@ static int drm_dp_send_sideband_msg(struct drm_dp_mst_topology_mgr *mgr, retries++; goto retry; } -DRM_DEBUG_KMS ("failed to dpcd write %d %d\n" , tosend, ret); +drm_dbg_kms (mgr->dev,"failed to dpcd write %d %d\n" , tosend, ret);return -EIO ; }
@@ -2919,7 +2923,7 @@ static void process_single_down_tx_qlock(struct drm_dp_mst_topology_mgr *mgr) struct drm_dp_sideband_msg_tx, next); ret =process_single_tx_qlock (mgr, txmsg, false);if (ret <0 ) { -DRM_DEBUG_KMS ("failed to send msg in q %d\n" , ret); +drm_dbg_kms (mgr->dev,"failed to send msg in q %d\n" , ret);list_del (&txmsg->next); txmsg->state =DRM_DP_SIDEBAND_TX_TIMEOUT ;wake_up_all (&mgr->tx_waitq);
@@ -2944,24 +2948,26 @@ static void drm_dp_queue_down_tx(struct drm_dp_mst_topology_mgr *mgr, }static void -drm_dp_dump_link_address (struct drm_dp_link_address_ack_reply *reply) +drm_dp_dump_link_address (const struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_link_address_ack_reply *reply) {struct drm_dp_link_addr_reply_port *port_reply;int i;for (i =0 ; i < reply->nports; i++) { port_reply = &reply->ports[i]; -DRM_DEBUG_KMS ("port %d: input %d, pdt: %d, pn: %d, dpcd_rev: %02x, mcs: %d, ddps: %d, ldps %d, sdp %d/%d\n" , - i, - port_reply->input_port, - port_reply->peer_device_type, - port_reply->port_number, - port_reply->dpcd_revision, - port_reply->mcs, - port_reply->ddps, - port_reply->legacy_device_plug_status, - port_reply->num_sdp_streams, - port_reply->num_sdp_stream_sinks); +drm_dbg_kms (mgr->dev, +"port %d: input %d, pdt: %d, pn: %d, dpcd_rev: %02x, mcs: %d, ddps: %d, ldps %d, sdp %d/%d\n" , + i, + port_reply->input_port, + port_reply->peer_device_type, + port_reply->port_number, + port_reply->dpcd_revision, + port_reply->mcs, + port_reply->ddps, + port_reply->legacy_device_plug_status, + port_reply->num_sdp_streams, + port_reply->num_sdp_stream_sinks); } }
@@ -2987,26 +2993,25 @@ static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,/* FIXME: Actually do some real error handling here */ ret =drm_dp_mst_wait_tx_reply (mstb, txmsg);if (ret <=0 ) { -DRM_ERROR ("Sending link address failed with %d\n" , ret); +drm_err (mgr->dev,"Sending link address failed with %d\n" , ret); goto out; }if (txmsg->reply.reply_type ==DP_SIDEBAND_REPLY_NAK ) { -DRM_ERROR ("link address NAK received\n" ); +drm_err (mgr->dev,"link address NAK received\n" ); ret = -EIO ; goto out; } reply = &txmsg->reply.u.link_addr; -DRM_DEBUG_KMS ("link address reply: %d\n" , reply->nports); -drm_dp_dump_link_address (reply); +drm_dbg_kms (mgr->dev,"link address reply: %d\n" , reply->nports); +drm_dp_dump_link_address (mgr, reply); ret =drm_dp_check_mstb_guid (mstb, reply->guid);if (ret) {char buf[64 ];drm_dp_mst_rad_to_str (mstb->rad, mstb->lct, buf,sizeof (buf)); -DRM_ERROR ("GUID check on %s failed: %d\n" , - buf, ret); +drm_err (mgr->dev,"GUID check on %s failed: %d\n" , buf, ret); goto out; }
@@ -3030,8 +3035,8 @@ static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,if (port_mask &BIT (port->port_num))continue ; -DRM_DEBUG_KMS ("port %d was not in link address, removing\n" , - port->port_num); +drm_dbg_kms (mgr->dev,"port %d was not in link address, removing\n" , + port->port_num);list_del (&port->next);drm_dp_mst_topology_put_port (port); changed = true;
@@ -3063,7 +3068,7 @@ drm_dp_send_clear_payload_id_table(struct drm_dp_mst_topology_mgr *mgr, ret =drm_dp_mst_wait_tx_reply (mstb, txmsg);if (ret >0 && txmsg->reply.reply_type ==DP_SIDEBAND_REPLY_NAK ) -DRM_DEBUG_KMS ("clear payload table id nak received\n" ); +drm_dbg_kms (mgr->dev,"clear payload table id nak received\n" );kfree (txmsg); }
@@ -3092,15 +3097,15 @@ drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr, path_res = &txmsg->reply.u.path_resources;if (txmsg->reply.reply_type ==DP_SIDEBAND_REPLY_NAK ) { -DRM_DEBUG_KMS ("enum path resources nak received\n" ); +drm_dbg_kms (mgr->dev,"enum path resources nak received\n" ); }else {if (port->port_num != path_res->port_number)DRM_ERROR ("got incorrect port in response\n" ); -DRM_DEBUG_KMS ("enum path resources %d: %d %d\n" , - path_res->port_number, - path_res->full_payload_bw_number, - path_res->avail_payload_bw_number); +drm_dbg_kms (mgr->dev,"enum path resources %d: %d %d\n" , + path_res->port_number, + path_res->full_payload_bw_number, + path_res->avail_payload_bw_number);/* * If something changed, make sure we send a
@@ -3346,7 +3351,7 @@ static int drm_dp_destroy_payload_step1(struct drm_dp_mst_topology_mgr *mgr,int id, struct drm_dp_payload *payload) { - DRM_DEBUG_KMS("\n"); + drm_dbg_kms(mgr->dev, "\n");/* it's okay for these to fail */ if (port) {drm_dp_payload_send_msg (mgr, port, id,0 );
@@ -3452,7 +3457,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)continue ; } -DRM_DEBUG_KMS ("removing payload %d\n" , i); +drm_dbg_kms (mgr->dev,"removing payload %d\n" , i);for (j = i; j < mgr->max_payloads -1 ; j++) { mgr->payloads[j] = mgr->payloads[j +1 ]; mgr->proposed_vcpis[j] = mgr->proposed_vcpis[j +1 ];
@@ -3499,7 +3504,7 @@ int drm_dp_update_payload_part2(struct drm_dp_mst_topology_mgr *mgr) port = container_of(mgr->proposed_vcpis[i], struct drm_dp_mst_port, vcpi); -DRM_DEBUG_KMS ("payload %d %d\n" , i, mgr->payloads[i].payload_state); +drm_dbg_kms (mgr->dev,"payload %d %d\n" , i, mgr->payloads[i].payload_state);if (mgr->payloads[i].payload_state ==DP_PAYLOAD_LOCAL ) { ret =drm_dp_create_payload_step2 (mgr, port, mgr->proposed_vcpis[i]->vcpi, &mgr->payloads[i]); }else if (mgr->payloads[i].payload_state ==DP_PAYLOAD_DELETE_LOCAL ) {
@@ -3544,8 +3549,8 @@ static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,/* DPCD read should never be NACKed */ if (txmsg->reply.reply_type ==1 ) { -DRM_ERROR ("mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n" , - mstb, port->port_num, offset, size); +drm_err (mgr->dev,"mstb %p port %d: DPCD read on addr 0x%x for %d bytes NAKed\n" , + mstb, port->port_num, offset, size); ret = -EIO ; goto fail_free; }
@@ -3651,8 +3656,8 @@ int drm_dp_get_vc_payload_bw(const struct drm_dp_mst_topology_mgr *mgr, int link_rate, int link_lane_count) {if (link_rate ==0 || link_lane_count ==0 ) -DRM_DEBUG_KMS ("invalid link rate/lane count: (%d / %d)\n" , - link_rate, link_lane_count); +drm_dbg_kms (mgr->dev,"invalid link rate/lane count: (%d / %d)\n" , + link_rate, link_lane_count);/* See DP v2.0 2.6.4.2, VCPayload_Bandwidth_for_OneTimeSlotPer_MTP_Allocation */ return link_rate * link_lane_count /54000 ;
@@ -3709,7 +3714,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms/* get dpcd info */ ret =drm_dp_dpcd_read (mgr->aux,DP_DPCD_REV , mgr->dpcd,DP_RECEIVER_CAP_SIZE );if (ret !=DP_RECEIVER_CAP_SIZE ) { -DRM_DEBUG_KMS ("failed to read DPCD\n" ); +drm_dbg_kms (mgr->dev,"failed to read DPCD\n" ); goto out_unlock; }
@@ -3844,7 +3849,7 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr, ret =drm_dp_dpcd_read (mgr->aux,DP_DPCD_REV , mgr->dpcd,DP_RECEIVER_CAP_SIZE );if (ret !=DP_RECEIVER_CAP_SIZE ) { -DRM_DEBUG_KMS ("dpcd read failed - undocked during suspend?\n" ); +drm_dbg_kms (mgr->dev,"dpcd read failed - undocked during suspend?\n" ); goto out_fail; }
@@ -3853,20 +3858,20 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,DP_UP_REQ_EN | DP_UPSTREAM_IS_SRC);if (ret <0 ) { -DRM_DEBUG_KMS ("mst write failed - undocked during suspend?\n" ); +drm_dbg_kms (mgr->dev,"mst write failed - undocked during suspend?\n" ); goto out_fail; }/* Some hubs forget their guids after they resume */ ret =drm_dp_dpcd_read (mgr->aux,DP_GUID , guid,16 );if (ret !=16 ) { -DRM_DEBUG_KMS ("dpcd read failed - undocked during suspend?\n" ); +drm_dbg_kms (mgr->dev,"dpcd read failed - undocked during suspend?\n" ); goto out_fail; } ret =drm_dp_check_mstb_guid (mgr->mst_primary, guid);if (ret) { -DRM_DEBUG_KMS ("check mstb failed - undocked during suspend?\n" ); +drm_dbg_kms (mgr->dev,"check mstb failed - undocked during suspend?\n" ); goto out_fail; }
@@ -3879,7 +3884,8 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,mutex_unlock (&mgr->lock);if (sync) { -DRM_DEBUG_KMS ("Waiting for link probe work to finish re-syncing topology...\n" ); +drm_dbg_kms (mgr->dev, +"Waiting for link probe work to finish re-syncing topology...\n" );flush_work (&mgr->work); }
@@ -3912,15 +3918,15 @@ drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up, len =min (mgr->max_dpcd_transaction_bytes,16 ); ret =drm_dp_dpcd_read (mgr->aux, basereg, replyblock, len);if (ret != len) { -DRM_DEBUG_KMS ("failed to read DPCD down rep %d %d\n" , len, ret); +drm_dbg_kms (mgr->dev,"failed to read DPCD down rep %d %d\n" , len, ret);return false; } - ret =drm_dp_decode_sideband_msg_hdr (&hdr, replyblock, len, &hdrlen); + ret =drm_dp_decode_sideband_msg_hdr (mgr, &hdr, replyblock, len, &hdrlen);if (ret == false) {print_hex_dump (KERN_DEBUG ,"failed hdr" ,DUMP_PREFIX_NONE ,16 ,1 , replyblock, len, false); -DRM_DEBUG_KMS ("ERROR: failed header\n" ); +drm_dbg_kms (mgr->dev,"ERROR: failed header\n" );return false; }
@@ -3928,22 +3934,20 @@ drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up,/* Caller is responsible for giving back this reference */ *mstb =drm_dp_get_mst_branch_device (mgr, hdr.lct, hdr.rad);if (!*mstb) { -DRM_DEBUG_KMS ("Got MST reply from unknown device %d\n" , - hdr.lct); +drm_dbg_kms (mgr->dev,"Got MST reply from unknown device %d\n" , hdr.lct);return false; } }if (!drm_dp_sideband_msg_set_header (msg, &hdr, hdrlen)) { -DRM_DEBUG_KMS ("sideband msg set header failed %d\n" , - replyblock[0 ]); +drm_dbg_kms (mgr->dev,"sideband msg set header failed %d\n" , replyblock[0 ]);return false; } replylen =min (msg->curchunk_len, (u8)(len - hdrlen)); ret =drm_dp_sideband_append_payload (msg, replyblock + hdrlen, replylen);if (!ret) { -DRM_DEBUG_KMS ("sideband msg build failed %d\n" , replyblock[0 ]); +drm_dbg_kms (mgr->dev,"sideband msg build failed %d\n" , replyblock[0 ]);return false; }
@@ -3954,14 +3958,14 @@ drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up, ret =drm_dp_dpcd_read (mgr->aux, basereg + curreply, replyblock, len);if (ret != len) { -DRM_DEBUG_KMS ("failed to read a chunk (len %d, ret %d)\n" , - len, ret); +drm_dbg_kms (mgr->dev,"failed to read a chunk (len %d, ret %d)\n" , + len, ret);return false; } ret =drm_dp_sideband_append_payload (msg, replyblock, len);if (!ret) { -DRM_DEBUG_KMS ("failed to build sideband msg\n" ); +drm_dbg_kms (mgr->dev,"failed to build sideband msg\n" );return false; }
@@ -3995,21 +3999,21 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr)struct drm_dp_sideband_msg_hdr *hdr; hdr = &msg->initial_hdr; -DRM_DEBUG_KMS ("Got MST reply with no msg %p %d %d %02x %02x\n" , - mstb, hdr->seqno, hdr->lct, hdr->rad[0 ], - msg->msg[0 ]); +drm_dbg_kms (mgr->dev,"Got MST reply with no msg %p %d %d %02x %02x\n" , + mstb, hdr->seqno, hdr->lct, hdr->rad[0 ], msg->msg[0 ]); goto out_clear_reply; } -drm_dp_sideband_parse_reply (msg, &txmsg->reply); +drm_dp_sideband_parse_reply (mgr, msg, &txmsg->reply);if (txmsg->reply.reply_type ==DP_SIDEBAND_REPLY_NAK ) { -DRM_DEBUG_KMS ("Got NAK reply: req 0x%02x (%s), reason 0x%02x (%s), nak data 0x%02x\n" , - txmsg->reply.req_type, -drm_dp_mst_req_type_str (txmsg->reply.req_type), - txmsg->reply.u.nak.reason, -drm_dp_mst_nak_reason_str (txmsg->reply.u.nak.reason), - txmsg->reply.u.nak.nak_data); +drm_dbg_kms (mgr->dev, +"Got NAK reply: req 0x%02x (%s), reason 0x%02x (%s), nak data 0x%02x\n" , + txmsg->reply.req_type, +drm_dp_mst_req_type_str (txmsg->reply.req_type), + txmsg->reply.u.nak.reason, +drm_dp_mst_nak_reason_str (txmsg->reply.u.nak.reason), + txmsg->reply.u.nak.nak_data); }memset (msg,0 ,sizeof (struct drm_dp_sideband_msg_rx ));
@@ -4057,8 +4061,7 @@ drm_dp_mst_process_up_req(struct drm_dp_mst_topology_mgr *mgr, }if (!mstb) { -DRM_DEBUG_KMS ("Got MST reply from unknown device %d\n" , - hdr->lct); +drm_dbg_kms (mgr->dev,"Got MST reply from unknown device %d\n" , hdr->lct);return false; }
@@ -4118,12 +4121,12 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr)INIT_LIST_HEAD (&up_req->next); -drm_dp_sideband_parse_req (&mgr->up_req_recv, &up_req->msg); +drm_dp_sideband_parse_req (mgr, &mgr->up_req_recv, &up_req->msg);if (up_req->msg.req_type !=DP_CONNECTION_STATUS_NOTIFY && up_req->msg.req_type !=DP_RESOURCE_STATUS_NOTIFY ) { -DRM_DEBUG_KMS ("Received unknown up req type, ignoring: %x\n" , - up_req->msg.req_type); +drm_dbg_kms (mgr->dev,"Received unknown up req type, ignoring: %x\n" , + up_req->msg.req_type);kfree (up_req); goto out; }
@@ -4135,20 +4138,20 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr)const struct drm_dp_connection_status_notify *conn_stat = &up_req->msg.u.conn_stat; -DRM_DEBUG_KMS ("Got CSN: pn: %d ldps:%d ddps: %d mcs: %d ip: %d pdt: %d\n" , - conn_stat->port_number, - conn_stat->legacy_device_plug_status, - conn_stat->displayport_device_plug_status, - conn_stat->message_capability_status, - conn_stat->input_port, - conn_stat->peer_device_type); +drm_dbg_kms (mgr->dev,"Got CSN: pn: %d ldps:%d ddps: %d mcs: %d ip: %d pdt: %d\n" , + conn_stat->port_number, + conn_stat->legacy_device_plug_status, + conn_stat->displayport_device_plug_status, + conn_stat->message_capability_status, + conn_stat->input_port, + conn_stat->peer_device_type); }else if (up_req->msg.req_type ==DP_RESOURCE_STATUS_NOTIFY ) {const struct drm_dp_resource_status_notify *res_stat = &up_req->msg.u.resource_stat; -DRM_DEBUG_KMS ("Got RSN: pn: %d avail_pbn %d\n" , - res_stat->port_number, - res_stat->available_pbn); +drm_dbg_kms (mgr->dev,"Got RSN: pn: %d avail_pbn %d\n" , + res_stat->port_number, + res_stat->available_pbn); } up_req->hdr = mgr->up_req_recv.initial_hdr;
@@ -4388,8 +4391,9 @@ int drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state,* which is an error */ if (WARN_ON (!prev_slots)) { -DRM_ERROR ("cannot allocate and release VCPI on [MST PORT:%p] in the same state\n" , - port); +drm_err (mgr->dev, +"cannot allocate and release VCPI on [MST PORT:%p] in the same state\n" , + port);return -EINVAL ; }
@@ -4406,12 +4410,12 @@ int drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state, req_slots =DIV_ROUND_UP (pbn, pbn_div); -DRM_DEBUG_ATOMIC ("[CONNECTOR:%d:%s] [MST PORT:%p] VCPI %d -> %d\n" , - port->connector->base.id, port->connector->name, - port, prev_slots, req_slots); -DRM_DEBUG_ATOMIC ("[CONNECTOR:%d:%s] [MST PORT:%p] PBN %d -> %d\n" , - port->connector->base.id, port->connector->name, - port, prev_bw, pbn); +drm_dbg_atomic (mgr->dev,"[CONNECTOR:%d:%s] [MST PORT:%p] VCPI %d -> %d\n" , + port->connector->base.id, port->connector->name, + port, prev_slots, req_slots); +drm_dbg_atomic (mgr->dev,"[CONNECTOR:%d:%s] [MST PORT:%p] PBN %d -> %d\n" , + port->connector->base.id, port->connector->name, + port, prev_bw, pbn);/* Add the new allocation to the state */ if (!vcpi) {
@@ -4475,12 +4479,12 @@ int drm_dp_atomic_release_vcpi_slots(struct drm_atomic_state *state, } }if (WARN_ON (!found)) { -DRM_ERROR ("no VCPI for [MST PORT:%p] found in mst state %p\n" , - port, &topology_state->base); +drm_err (mgr->dev,"no VCPI for [MST PORT:%p] found in mst state %p\n" , + port, &topology_state->base);return -EINVAL ; } -DRM_DEBUG_ATOMIC ("[MST PORT:%p] VCPI %d -> 0\n" , port, pos->vcpi); +drm_dbg_atomic (mgr->dev,"[MST PORT:%p] VCPI %d -> 0\n" , port, pos->vcpi);if (pos->vcpi) {drm_dp_mst_put_port_malloc (port); pos->vcpi =0 ;
@@ -4511,8 +4515,9 @@ bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr,return false;if (port->vcpi.vcpi >0 ) { -DRM_DEBUG_KMS ("payload: vcpi %d already allocated for pbn %d - requested pbn %d\n" , - port->vcpi.vcpi, port->vcpi.pbn, pbn); +drm_dbg_kms (mgr->dev, +"payload: vcpi %d already allocated for pbn %d - requested pbn %d\n" , + port->vcpi.vcpi, port->vcpi.pbn, pbn);if (pbn == port->vcpi.pbn) {drm_dp_mst_topology_put_port (port);return true;
@@ -4521,13 +4526,12 @@ bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, ret =drm_dp_init_vcpi (mgr, &port->vcpi, pbn, slots);if (ret) { -DRM_DEBUG_KMS ("failed to init vcpi slots=%d max=63 ret=%d\n" , -DIV_ROUND_UP (pbn, mgr->pbn_div), ret); +drm_dbg_kms (mgr->dev,"failed to init vcpi slots=%d max=63 ret=%d\n" , +DIV_ROUND_UP (pbn, mgr->pbn_div), ret);drm_dp_mst_topology_put_port (port); goto out; } -DRM_DEBUG_KMS ("initing vcpi for pbn=%d slots=%d\n" , - pbn, port->vcpi.num_slots); +drm_dbg_kms (mgr->dev,"initing vcpi for pbn=%d slots=%d\n" , pbn, port->vcpi.num_slots);/* Keep port allocated until its payload has been removed */ drm_dp_mst_get_port_malloc (port);
@@ -4609,14 +4613,14 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr, ret =drm_dp_dpcd_write (mgr->aux,DP_PAYLOAD_ALLOCATE_SET , payload_alloc,3 );if (ret !=3 ) { -DRM_DEBUG_KMS ("failed to write payload allocation %d\n" , ret); +drm_dbg_kms (mgr->dev,"failed to write payload allocation %d\n" , ret); goto fail; } retry: ret =drm_dp_dpcd_readb (mgr->aux,DP_PAYLOAD_TABLE_UPDATE_STATUS , &status);if (ret <0 ) { -DRM_DEBUG_KMS ("failed to read payload table status %d\n" , ret); +drm_dbg_kms (mgr->dev,"failed to read payload table status %d\n" , ret); goto fail; }
@@ -4626,7 +4630,8 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,usleep_range (10000 ,20000 ); goto retry; } -DRM_DEBUG_KMS ("status not set after read payload table status %d\n" , status); +drm_dbg_kms (mgr->dev,"status not set after read payload table status %d\n" , + status); ret = -EINVAL ; goto fail; }
@@ -4673,16 +4678,15 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr) status &DP_PAYLOAD_ACT_HANDLED || status <0 , 200, timeout_ms * USEC_PER_MSEC);if (ret <0 && status >=0 ) { -DRM_ERROR ("Failed to get ACT after %dms, last status: %02x\n" , - timeout_ms, status); +drm_err (mgr->dev,"Failed to get ACT after %dms, last status: %02x\n" , + timeout_ms, status);return -EINVAL ; }else if (status <0 ) {/* * Failure here isn't unexpected - the hub may have * just been unplugged */ -DRM_DEBUG_KMS ("Failed to read payload table status: %d\n" , - status); +drm_dbg_kms (mgr->dev,"Failed to read payload table status: %d\n" , status);return status; }
@@ -5122,12 +5126,11 @@ drm_dp_mst_atomic_check_mstb_bw_limit(struct drm_dp_mst_branch *mstb,return 0 ;if (mstb->port_parent) -DRM_DEBUG_ATOMIC ("[MSTB:%p] [MST PORT:%p] Checking bandwidth limits on [MSTB:%p]\n" , - mstb->port_parent->parent, mstb->port_parent, - mstb); +drm_dbg_atomic (mstb->mgr->dev, +"[MSTB:%p] [MST PORT:%p] Checking bandwidth limits on [MSTB:%p]\n" , + mstb->port_parent->parent, mstb->port_parent, mstb);else -DRM_DEBUG_ATOMIC ("[MSTB:%p] Checking bandwidth limits\n" , - mstb); +drm_dbg_atomic (mstb->mgr->dev,"[MSTB:%p] Checking bandwidth limits\n" , mstb);list_for_each_entry (port, &mstb->ports, next) { ret =drm_dp_mst_atomic_check_port_bw_limit (port, state);
@@ -5185,14 +5188,14 @@ drm_dp_mst_atomic_check_port_bw_limit(struct drm_dp_mst_port *port, }if (pbn_used > port->full_pbn) { -DRM_DEBUG_ATOMIC ("[MSTB:%p] [MST PORT:%p] required PBN of %d exceeds port limit of %d\n" , - port->parent, port, pbn_used, - port->full_pbn); +drm_dbg_atomic (port->mgr->dev, +"[MSTB:%p] [MST PORT:%p] required PBN of %d exceeds port limit of %d\n" , + port->parent, port, pbn_used, port->full_pbn);return -ENOSPC ; } -DRM_DEBUG_ATOMIC ("[MSTB:%p] [MST PORT:%p] uses %d out of %d PBN\n" , - port->parent, port, pbn_used, port->full_pbn); +drm_dbg_atomic (port->mgr->dev,"[MSTB:%p] [MST PORT:%p] uses %d out of %d PBN\n" , + port->parent, port, pbn_used, port->full_pbn);return pbn_used; }
@@ -5207,31 +5210,31 @@ drm_dp_mst_atomic_check_vcpi_alloc_limit(struct drm_dp_mst_topology_mgr *mgr,list_for_each_entry (vcpi, &mst_state->vcpis, next) {/* Releasing VCPI is always OK-even if the port is gone */ if (!vcpi->vcpi) { -DRM_DEBUG_ATOMIC ("[MST PORT:%p] releases all VCPI slots\n" , - vcpi->port); +drm_dbg_atomic (mgr->dev,"[MST PORT:%p] releases all VCPI slots\n" , + vcpi->port);continue ; } -DRM_DEBUG_ATOMIC ("[MST PORT:%p] requires %d vcpi slots\n" , - vcpi->port, vcpi->vcpi); +drm_dbg_atomic (mgr->dev,"[MST PORT:%p] requires %d vcpi slots\n" , + vcpi->port, vcpi->vcpi); avail_slots -= vcpi->vcpi;if (avail_slots <0 ) { -DRM_DEBUG_ATOMIC ("[MST PORT:%p] not enough VCPI slots in mst state %p (avail=%d)\n" , - vcpi->port, mst_state, - avail_slots + vcpi->vcpi); +drm_dbg_atomic (mgr->dev, +"[MST PORT:%p] not enough VCPI slots in mst state %p (avail=%d)\n" , + vcpi->port, mst_state, avail_slots + vcpi->vcpi);return -ENOSPC ; }if (++payload_count > mgr->max_payloads) { -DRM_DEBUG_ATOMIC ("[MST MGR:%p] state %p has too many payloads (max=%d)\n" , - mgr, mst_state, mgr->max_payloads); +drm_dbg_atomic (mgr->dev, +"[MST MGR:%p] state %p has too many payloads (max=%d)\n" , + mgr, mst_state, mgr->max_payloads);return -EINVAL ; } } -DRM_DEBUG_ATOMIC ("[MST MGR:%p] mst state %p VCPI avail=%d used=%d\n" , - mgr, mst_state, avail_slots, -63 - avail_slots); +drm_dbg_atomic (mgr->dev,"[MST MGR:%p] mst state %p VCPI avail=%d used=%d\n" , + mgr, mst_state, avail_slots,63 - avail_slots);return 0 ; }
@@ -5288,8 +5291,8 @@ int drm_dp_mst_add_affected_dsc_crtcs(struct drm_atomic_state *state, struct drmif (IS_ERR (crtc_state))return PTR_ERR (crtc_state); -DRM_DEBUG_ATOMIC ("[MST MGR:%p] Setting mode_changed flag on CRTC %p\n" , - mgr, crtc); +drm_dbg_atomic (mgr->dev,"[MST MGR:%p] Setting mode_changed flag on CRTC %p\n" , + mgr, crtc); crtc_state->mode_changed = true; }
@@ -5334,21 +5337,24 @@ int drm_dp_mst_atomic_enable_dsc(struct drm_atomic_state *state, }if (!found) { -DRM_DEBUG_ATOMIC ("[MST PORT:%p] Couldn't find VCPI allocation in mst state %p\n" , - port, mst_state); +drm_dbg_atomic (state->dev, +"[MST PORT:%p] Couldn't find VCPI allocation in mst state %p\n" , + port, mst_state);return -EINVAL ; }if (pos->dsc_enabled == enable) { -DRM_DEBUG_ATOMIC ("[MST PORT:%p] DSC flag is already set to %d, returning %d VCPI slots\n" , - port, enable, pos->vcpi); +drm_dbg_atomic (state->dev, +"[MST PORT:%p] DSC flag is already set to %d, returning %d VCPI slots\n" , + port, enable, pos->vcpi); vcpi = pos->vcpi; }if (enable) { vcpi =drm_dp_atomic_find_vcpi_slots (state, port->mgr, port, pbn, pbn_div); -DRM_DEBUG_ATOMIC ("[MST PORT:%p] Enabling DSC flag, reallocating %d VCPI slots on the port\n" , - port, vcpi); +drm_dbg_atomic (state->dev, +"[MST PORT:%p] Enabling DSC flag, reallocating %d VCPI slots on the port\n" , + port, vcpi);if (vcpi <0 )return -EINVAL ; }
@@ -5695,7 +5701,7 @@ static int drm_dp_mst_i2c_xfer(struct i2c_adapter *adapter, }else if (remote_i2c_write_ok (msgs, num)) { ret =drm_dp_mst_i2c_write (mstb, port, msgs, num); }else { -DRM_DEBUG_KMS ("Unsupported I2C transaction for MST device\n" ); +drm_dbg_kms (mgr->dev,"Unsupported I2C transaction for MST device\n" ); ret = -EIO ; }
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
In reply to Lyude Paul== Series Details ==
== Series Details ==
Series: drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
URL : https://patchwork.freedesktop.org/series/87242/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip fffba1b63bf6 drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector() 996c7d026bb9 drm/dp: Add __no_check to drm_dp_aux_register() 6b4b8b73edda drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini -:49: WARNING:LINE_SPACING: Missing a blank line after declarations #49: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1968: + int ret = amdgpu_atombios_dp_aux_init(amdgpu_connector); + if (ret)
-:310: WARNING:STRLCPY: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
#310: FILE: drivers/gpu/drm/drm_dp_helper.c:1760:
+ strlcpy(aux->ddc.name, aux->name ?: dev_name(aux->dev), sizeof(aux->ddc.name));
total: 0 errors, 2 warnings, 0 checks, 440 lines checked0f2070c3486f drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace b05faee9e18d drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister 057f5073ee57 drm/dp: Add backpointer to drm_device in drm_dp_auxd52ff25d184a drm/dp: Clarify DP AUX registration time764073b4a508 drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay() a12a22656307 drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay() 33109c79827e drm/dp: Always print aux channel name in logs37dae984861b drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect() 8947ebf4721c drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output() 91c92d211983 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock() 70e25b343fb6 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output() c4f143e80afd drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode() ce547d2b0cb9 drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw() -:56: WARNING:LONG_LINE: line length of 102 exceeds 100 columns
#56: FILE: drivers/gpu/drm/i915/display/intel_dp_mst.c:74:
+ crtc_state->port_clock,
total: 0 errors, 1 warnings, 0 checks, 43 lines checkedfa4bf5cbb3bb drm/print: Handle potentially NULL drm_devices in drm_dbg_* 8529dfa260fc drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*() 2cdf118000c8 drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms() 4d85fbc4cd3f drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
In reply to Lyude Paul== Series Details ==
== Series Details ==
Series: drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
URL : https://patchwork.freedesktop.org/series/87242/
State : warning
== Summary ==
$ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. - +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:274:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1345:25: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1345:25: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1345:25: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1346:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1346:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1346:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1405:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1405:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1405:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:287:16: error: incompatible types in comparison expression (different type sizes): +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:287:16: unsigned long * +drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:287:16: unsigned long long * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:274:25: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:274:25: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:274:25: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:275:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:275:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:275:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:329:17: error: incompatible types in comparison expression (different address spaces): +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:329:17: struct dma_fence * +drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:329:17: struct dma_fence [noderef] __rcu * +drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h:90:56: error: marked inline, but without a definition +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" +drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:270:49: error: static assertion failed: "amd_sriov_msg_vf2pf_
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
In reply to Lyude Paul== Series Details ==
== Series Details ==
Series: drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
URL : https://patchwork.freedesktop.org/series/87242/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 ./drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:102: warning: Function parameter or member 'ww' not described in 'i915_gem_shrink' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser' ./drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
In reply to Lyude Paul== Series Details ==
== Series Details ==
Series: drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
URL : https://patchwork.freedesktop.org/series/87242/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9983 -> Patchwork_19953
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_19953 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_19953, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_19953:
### CI changes ###
#### Possible regressions ####
* boot:
- fi-apl-guc: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-apl-guc/boot.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-apl-guc/boot.html
- fi-kbl-8809g: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-kbl-8809g/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-kbl-8809g/boot.html
- fi-snb-2520m: [PASS][5] -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-snb-2520m/boot.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-snb-2520m/boot.html
- fi-bsw-nick: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-bsw-nick/boot.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-bsw-nick/boot.html
- fi-icl-u2: [PASS][9] -> [FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-icl-u2/boot.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-icl-u2/boot.html
- fi-cfl-8109u: [PASS][11] -> [FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-cfl-8109u/boot.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-cfl-8109u/boot.html
- fi-cfl-8700k: [PASS][13] -> [FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-cfl-8700k/boot.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-cfl-8700k/boot.html
- fi-bxt-dsi: [PASS][15] -> [FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-bxt-dsi/boot.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-bxt-dsi/boot.html
- fi-cml-u2: [PASS][17] -> [FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-cml-u2/boot.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-cml-u2/boot.html
- fi-ilk-650: [PASS][19] -> [FAIL][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-ilk-650/boot.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-ilk-650/boot.html
- fi-tgl-u2: [PASS][21] -> [FAIL][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-tgl-u2/boot.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-tgl-u2/boot.html
- fi-hsw-4770: [PASS][23] -> [FAIL][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-hsw-4770/boot.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-hsw-4770/boot.html
- fi-cfl-guc: [PASS][25] -> [FAIL][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-cfl-guc/boot.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-cfl-guc/boot.html
- fi-kbl-soraka: [PASS][27] -> [FAIL][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-kbl-soraka/boot.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-kbl-soraka/boot.html
- fi-cml-s: [PASS][29] -> [FAIL][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-cml-s/boot.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-cml-s/boot.html
- fi-elk-e7500: [PASS][31] -> [FAIL][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-elk-e7500/boot.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-elk-e7500/boot.html
- fi-glk-dsi: [PASS][33] -> [FAIL][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-glk-dsi/boot.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-glk-dsi/boot.html
- fi-snb-2600: [PASS][35] -> [FAIL][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-snb-2600/boot.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-snb-2600/boot.html
- fi-tgl-y: [PASS][37] -> [FAIL][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-tgl-y/boot.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-tgl-y/boot.html
- fi-kbl-guc: [PASS][39] -> [FAIL][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-kbl-guc/boot.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-kbl-guc/boot.html
- fi-kbl-x1275: [PASS][41] -> [FAIL][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-kbl-x1275/boot.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-kbl-x1275/boot.html
- fi-bdw-gvtdvm: [PASS][43] -> [FAIL][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-bdw-gvtdvm/boot.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-bdw-gvtdvm/boot.html
- fi-kbl-7500u: [PASS][45] -> [FAIL][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-kbl-7500u/boot.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-kbl-7500u/boot.html
- fi-bdw-5557u: [PASS][47] -> [FAIL][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-bdw-5557u/boot.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-bdw-5557u/boot.html
- fi-kbl-r: [PASS][49] -> [FAIL][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-kbl-r/boot.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-kbl-r/boot.html
- fi-kbl-7567u: [PASS][51] -> [FAIL][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-kbl-7567u/boot.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-kbl-7567u/boot.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* boot:
- {fi-tgl-dsi}: [PASS][53] -> [FAIL][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-tgl-dsi/boot.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-tgl-dsi/boot.html
- {fi-hsw-gt1}: [PASS][55] -> [FAIL][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-hsw-gt1/boot.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-hsw-gt1/boot.html
- {fi-jsl-1}: [PASS][57] -> [FAIL][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-jsl-1/boot.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-jsl-1/boot.html
- {fi-ehl-1}: [PASS][59] -> [FAIL][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-ehl-1/boot.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-ehl-1/boot.html
- {fi-rkl-11500t}: [PASS][61] -> [FAIL][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-rkl-11500t/boot.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-rkl-11500t/boot.html
- {fi-ehl-2}: [PASS][63] -> [FAIL][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-ehl-2/boot.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-ehl-2/boot.html
Known issues
------------
Here are the changes found in Patchwork_19953 that come from known issues:
### CI changes ###
#### Issues hit ####
* boot:
- fi-skl-6600u: [PASS][65] -> [FAIL][66] ([i915#3174])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-skl-6600u/boot.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-skl-6600u/boot.html
- fi-skl-6700k2: [PASS][67] -> [FAIL][68] ([i915#3174])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-skl-6700k2/boot.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-skl-6700k2/boot.html
- fi-skl-guc: [PASS][69] -> [FAIL][70] ([i915#3174])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9983/fi-skl-guc/boot.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/fi-skl-guc/boot.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#3174]: https://gitlab.freedesktop.org/drm/intel/issues/3174
Participating hosts (42 -> 38)
------------------------------
Missing (4): fi-icl-y fi-bsw-cyan fi-bsw-kefka fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9983 -> Patchwork_19953
CI-20190529: 20190529
CI_DRM_9983: 03ed13adf40fd6827c888186a9f356a537237c3f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6070: 907705f0c3f6b5ae6358a4822434dd6d7a070cff @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19953: 4d85fbc4cd3fcfecee0f4ea8d2cc5f7f3d29985c @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
4d85fbc4cd3f drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() 2cdf118000c8 drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms() 8529dfa260fc drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*() fa4bf5cbb3bb drm/print: Handle potentially NULL drm_devices in drm_dbg_* ce547d2b0cb9 drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw() c4f143e80afd drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode() 70e25b343fb6 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output() 91c92d211983 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock() 8947ebf4721c drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output() 37dae984861b drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect() 33109c79827e drm/dp: Always print aux channel name in logsa12a22656307 drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay() 764073b4a508 drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay() d52ff25d184a drm/dp: Clarify DP AUX registration time057f5073ee57 drm/dp: Add backpointer to drm_device in drm_dp_auxb05faee9e18d drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister 0f2070c3486f drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace 6b4b8b73edda drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini 996c7d026bb9 drm/dp: Add __no_check to drm_dp_aux_register()fffba1b63bf6 drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Lyude Paul
maintainerRe: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)
whoops, will definitely fix this and respin tomorrow
Quoted 75 lines · Patchwork
Patch Details
Series:drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers (rev6)URL:https://patchwork.freedesktop.org/series/87242/State:failure Details:https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19953/index.html
CI Bug Log - changes fromCI_DRM_9983->Patchwork_19953SummaryFAILURE
Serious unknown changes coming withPatchwork_19953absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced inPatchwork_19953, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-
tip/Patchwork_19953/index.html
Possible new issuesHere are the unknown changes that may have been introduced inPatchwork_19953:
CI changesPossible regressions * boot:fi-apl-guc: PASS -> FAILfi-kbl-8809g: PASS -> FAILfi-snb-2520m: PASS -Quoted 1 line
FAILfi-bsw-nick: PASS -> FAILfi-icl-u2: PASS -> FAILfi-cfl-8109u: PASS ->
FAILfi-cfl-8700k: PASS -> FAILfi-bxt-dsi: PASS -> FAILfi-cml-u2: PASS ->
FAILfi-ilk-650: PASS -> FAILfi-tgl-u2: PASS -> FAILfi-hsw-4770: PASS ->
FAILfi-cfl-guc: PASS -> FAILfi-kbl-soraka: PASS -> FAILfi-cml-s: PASS ->
FAILfi-elk-e7500: PASS -> FAILfi-glk-dsi: PASS -> FAILfi-snb-2600: PASS ->
FAILfi-tgl-y: PASS -> FAILfi-kbl-guc: PASS -> FAILfi-kbl-x1275: PASS ->
FAILfi-bdw-gvtdvm: PASS -> FAILfi-kbl-7500u: PASS -> FAILfi-bdw-5557u: PASS -> FAILfi-kbl-r: PASS -> FAILfi-kbl-7567u: PASS -> FAIL
SuppressedThe following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* boot:{fi-tgl-dsi}: PASS -> FAIL{fi-hsw-gt1}: PASS -> FAIL{fi-jsl-1}: PASS -Quoted 1 line
FAIL{fi-ehl-1}: PASS -> FAIL{fi-rkl-11500t}: PASS -> FAIL{fi-ehl-2}: PASS
-> FAIL
Known issuesHere are the changes found inPatchwork_19953that come from known issues:
CI changesIssues hit * boot:fi-skl-6600u: PASS -> FAIL (i915#3174)fi-skl-6700k2: PASS -> FAIL
(i915#3174)fi-skl-guc: PASS -> FAIL (i915#3174)
{name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE).
Participating hosts (42 -> 38)Missing (4): fi-icl-y fi-bsw-cyan fi-bsw-kefka fi-bdw-samus Build changes * Linux:CI_DRM_9983->Patchwork_19953
CI-20190529: 20190529CI_DRM_9983:03ed13adf40fd6827c888186a9f356a537237c3f@git://anongit.freedesktop.org/gfx-ci/linuxIGT_6070:907705f0c3f6b5ae6358a4822434dd6d7a070cff@git://anongit.freedesktop.org/xorg/app/intel-gpu-toolsPatchwork_19953:4d85fbc4cd3fcfecee0f4ea8d2cc5f7f3d29985c@git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==4d85fbc4cd3fdrm/dp_mst: Convertdrm_dp_mst_topology.cto
drm_err()/drm_dbg()2cdf118000c8drm/dp_dual_mode: Convertdrm_dp_dual_mode_helper.cto using drm_err/drm_dbg_kms()8529dfa260fcdrm/dp: Convertdrm_dp_helper.cto using drm_err/drm_dbg_()fa4bf5cbb3bbdrm/print: Handle potentially NULLdrm_devicesindrm_dbg_ce547d2b0cb9drm/dp_mst: Passdrm_dp_mst_topology_mgrtodrm_dp_get_vc_payload_bw()c4f143e80afddrm/dp_dual_mode: Passdrm_deviceto
drm_lspcon_(get|set)_mode()70e25b343fb6drm/dp_dual_mode: Passdrm_devicetodrm_dp_dual_mode_get_tmds_output()91c92d211983drm/dp_dual_mode: Passdrm_devicetodrm_dp_dual_mode_max_tmds_clock()8947ebf4721cdrm/dp_dual_mode: Passdrm_devicetodrm_dp_dual_mode_set_tmds_output()37dae984861bdrm/dp_dual_mode: Passdrm_devicetodrm_dp_dual_mode_detect()33109c79827edrm/dp: Always print aux channel name in logsa12a22656307drm/dp: Passdrm_dp_auxtodrm_dp_link_train_channel_eq_delay()764073b4a508drm/dp: Passdrm_dp_auxtodrm_dp_link_train_clock_recovery_delay()d52ff25d184adrm/dp: Clarify DP AUX registration time057f5073ee57drm/dp: Add backpointer todrm_deviceindrm_dp_auxb05faee9e18ddrm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister0f2070c3486fdrm/bridge/cdns-mhdp8546: Register DP aux channel with
userspace6b4b8b73eddadrm/dp: Move i2c init todrm_dp_aux_init, add__must_checkand fini996c7d026bb9drm/dp: Add__no_checktodrm_dp_aux_register()fffba1b63bf6drm/amdgpu: Add error handling toamdgpu_dm_initialize_dp_connector()
Signature · 3 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx