drm: add dp helper to initialize remote aux channel.
Subsystems (2)
PATCH 1/2 drm: add dp helper to initialize remote aux channel.
[why]
We need to minimally initialize the remote aux channel, e.g. the crc work struct of remote aux to dump the sink's DPRX CRCs in MST setup.
[how]
Add helper that only initializes the crc work struct of the remote aux, hooke crc work queue to 'drm_dp_aux_crc_work'. Then call this helper in DP MST port initialization.
--- drivers/gpu/drm/drm_dp_helper.c | 13 +++++++++++++ drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ include/drm/drm_dp_helper.h | 1 + 3 files changed, 17 insertions(+)
drivers/gpu/drm/drm_dp_helper.c +13 -0
@@ -1091,6 +1091,19 @@ static void drm_dp_aux_crc_work(struct work_struct *work) } } +/** +* drm_dp_remote_aux_init() - minimally initialise a remote aux channel +* @aux: DisplayPort AUX channel +* +* Used for remote aux channel in general. Merely initialize the crc work +* struct. +*/ +void drm_dp_remote_aux_init (struct drm_dp_aux *aux) +{ +INIT_WORK (&aux->crc_work, drm_dp_aux_crc_work); +} +EXPORT_SYMBOL (drm_dp_remote_aux_init); +/** * drm_dp_aux_init() - minimally initialise an aux channel * @aux: DisplayPort AUX channel
drivers/gpu/drm/drm_dp_mst_topology.c +3 -0
@@ -1642,6 +1642,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb, port->aux.dev = dev->dev; port->aux.is_remote = true; +/* initialize the MST downstream port's AUX crc work queue */ +drm_dp_remote_aux_init (&port->aux); +/* * Make sure the memory allocation for our parent branch stays * around until our own memory allocation is released
include/drm/drm_dp_helper.h +1 -0
@@ -1403,6 +1403,7 @@ int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]);void drm_dp_downstream_debug (struct seq_file *m,const u8 dpcd[DP_RECEIVER_CAP_SIZE ],const u8 port_cap[4 ],struct drm_dp_aux *aux); +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);void drm_dp_aux_unregister (struct drm_dp_aux *aux);
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
drivers/gpu/drm/drm_dp_mst_topology.c static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
Quoted 49 lines · David (Dingchen) Zhang
[why]
We need to minimally initialize the remote aux channel, e.g. the crc work struct of remote aux to dump the sink's DPRX CRCs in MST setup.[how]
Add helper that only initializes the crc work struct of the remote aux, hooke crc work queue to 'drm_dp_aux_crc_work'. Then call this helper in DP MST port initialization.Cc Leo Li <[email protected]>Cc Harry Wentland <[email protected]>Signed-off-by David (Dingchen) Zhang <[email protected]>--- drivers/gpu/drm/drm_dp_helper.c | 13 +++++++++++++ drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ include/drm/drm_dp_helper.h | 1 + 3 files changed, 17 insertions(+)drivers/gpu/drm/drm_dp_helper.c +13
-0@@ -1091,6 +1091,19 @@ static void drm_dp_aux_crc_work(struct work_struct *work) } } +/** +* drm_dp_remote_aux_init() - minimally initialise a remote aux channel +* @aux: DisplayPort AUX channel +* +* Used for remote aux channel in general. Merely initialize the crc work +* struct. +*/ +void drm_dp_remote_aux_init (struct drm_dp_aux *aux) +{ +INIT_WORK (&aux->crc_work, drm_dp_aux_crc_work); +} +EXPORT_SYMBOL (drm_dp_remote_aux_init); +/** * drm_dp_aux_init() - minimally initialise an aux channel * @aux: DisplayPort AUX channel drivers/gpu/drm/drm_dp_mst_topology.c +0
-0@@ -1642,6 +1642,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
This function is gone in amd-staging-drm-next.
Please send a v2 of this patch based on amd-staging-drm-next of agd5f's repo from https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next
Harry
Quoted 15 lines
drivers/gpu/drm/drm_dp_mst_topology.c +3
-0port->aux.dev = dev->dev; port->aux.is_remote = true; +/* initialize the MST downstream port's AUX crc work queue */ +drm_dp_remote_aux_init (&port->aux); +/* * Make sure the memory allocation for our parent branch stays * around until our own memory allocation is released include/drm/drm_dp_helper.h +0
-0
include/drm/drm_dp_helper.h int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]); · line 1409
Quoted 7 lines
include/drm/drm_dp_helper.h +1
-0@@ -1403,6 +1403,7 @@ int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]);void drm_dp_downstream_debug (struct seq_file *m,const u8 dpcd[DP_RECEIVER_CAP_SIZE ],const u8 port_cap[4 ],struct drm_dp_aux *aux); +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);void drm_dp_aux_unregister (struct drm_dp_aux *aux);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 53 lines · Harry Wentland
drivers/gpu/drm/drm_dp_mst_topology.c static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
Quoted 49 lines · David (Dingchen) Zhang
[why]
We need to minimally initialize the remote aux channel, e.g. the crc work struct of remote aux to dump the sink's DPRX CRCs in MST setup.[how]
Add helper that only initializes the crc work struct of the remote aux, hooke crc work queue to 'drm_dp_aux_crc_work'. Then call this helper in DP MST port initialization.Cc Leo Li <[email protected]>Cc Harry Wentland <[email protected]>Signed-off-by David (Dingchen) Zhang <[email protected]>--- drivers/gpu/drm/drm_dp_helper.c | 13 +++++++++++++ drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ include/drm/drm_dp_helper.h | 1 + 3 files changed, 17 insertions(+)drivers/gpu/drm/drm_dp_helper.c +13
-0@@ -1091,6 +1091,19 @@ static void drm_dp_aux_crc_work(struct work_struct *work) } } +/** +* drm_dp_remote_aux_init() - minimally initialise a remote aux channel +* @aux: DisplayPort AUX channel +* +* Used for remote aux channel in general. Merely initialize the crc work +* struct. +*/ +void drm_dp_remote_aux_init (struct drm_dp_aux *aux) +{ +INIT_WORK (&aux->crc_work, drm_dp_aux_crc_work); +} +EXPORT_SYMBOL (drm_dp_remote_aux_init); +/** * drm_dp_aux_init() - minimally initialise an aux channel * @aux: DisplayPort AUX channel drivers/gpu/drm/drm_dp_mst_topology.c +0
-0@@ -1642,6 +1642,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,This function is gone in amd-staging-drm-next.
Quoted 3 lines
Please send a v2 of this patch based on amd-staging-drm-next of agd5f's repo from https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next
My bad. This should be the drm-misc-next branch on
https://cgit.freedesktop.org/drm/drm-misc
Harry
Quoted 19 lines
Harry
Quoted 17 lines
drivers/gpu/drm/drm_dp_mst_topology.c +3
-0port->aux.dev = dev->dev; port->aux.is_remote = true; +/* initialize the MST downstream port's AUX crc work queue */ +drm_dp_remote_aux_init (&port->aux); +/* * Make sure the memory allocation for our parent branch stays * around until our own memory allocation is released include/drm/drm_dp_helper.h +0
-0@@ -1403,6 +1403,7 @@ int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]);void drm_dp_downstream_debug (struct seq_file *m,const u8 dpcd[DP_RECEIVER_CAP_SIZE ],const u8 port_cap[4 ],struct drm_dp_aux *aux);
Quoted 5 lines
include/drm/drm_dp_helper.h int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]); · line 1409
Quoted 5 lines
include/drm/drm_dp_helper.h +1
-0+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);void drm_dp_aux_unregister (struct drm_dp_aux *aux);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel