c6ad6096 | 03-May-2024 |
Sean Anderson <sean.anderson@linux.dev> |
drm: zynqmp_kms: Fix AUX bus not getting unregistered
[ Upstream commit 0743dafefd3f2b92116213f2225ea355001b7948 ]
drm_encoder_cleanup is responsible for calling drm_bridge_detach for each bridge a
drm: zynqmp_kms: Fix AUX bus not getting unregistered
[ Upstream commit 0743dafefd3f2b92116213f2225ea355001b7948 ]
drm_encoder_cleanup is responsible for calling drm_bridge_detach for each bridge attached to the encoder. zynqmp_dp_bridge_detach is in turn responsible for unregistering the AUX bus. However, we never ended up calling drm_encoder_cleanup in the remove or error paths, so the AUX bus would stick around after the rest of the driver had been removed.
I don't really understand why drm_mode_config_cleanup doesn't call drm_encoder_cleanup for us. It will call destroy (which for simple_encoder is drm_encoder_cleanup) on encoders in the mode_config's encoder_list.
Should drm_encoder_cleanup get called before or after drm_atomic_helper_shutdown?
Fixes: 2dfd045c8435 ("drm: xlnx: zynqmp_dpsub: Register AUX bus at bridge attach time") Signed-off-by: Sean Anderson <sean.anderson@linux.dev> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240503192922.2172314-2-sean.anderson@linux.dev Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
9bde3bfe | 01-Aug-2023 |
Li Zetao <lizetao1@huawei.com> |
drm: xlnx: zynqmp_dpsub: Use devm_platform_ioremap_resource_byname()
Convert platform_get_resource_byname() + devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as
drm: xlnx: zynqmp_dpsub: Use devm_platform_ioremap_resource_byname()
Convert platform_get_resource_byname() + devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does.
Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
55354ee7 | 26-Jul-2023 |
Wang Ming <machel@vivo.com> |
drm: xlnx: zynqmp_dpsub: Use dev_err_probe instead of dev_err
It is possible that dma_request_chan() returns EPROBE_DEFER, in which case the driver defers probing without printing any message. Use d
drm: xlnx: zynqmp_dpsub: Use dev_err_probe instead of dev_err
It is possible that dma_request_chan() returns EPROBE_DEFER, in which case the driver defers probing without printing any message. Use dev_err_probe() to record the probe deferral cause and ease debugging.
Signed-off-by: Wang Ming <machel@vivo.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
1832fba7 | 06-Jun-2023 |
Jiasheng Jiang <jiasheng@iscas.ac.cn> |
drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Add check for dma_set_mask() and return the error if it fails.
Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayP
drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Add check for dma_set_mask() and return the error if it fails.
Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
56167161 | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Add support for live video input
Add partial live video support, with a single video input that bypasses blending. Skip registration of the DRM device in that case, but regi
drm: xlnx: zynqmp_dpsub: Add support for live video input
Add partial live video support, with a single video input that bypasses blending. Skip registration of the DRM device in that case, but register the DRM bridge instead. The DRM device will be created by the driver for the display controller in the PL.
Full live video mode with concurrent usage of the video and gfx inputs, and blending in the DPSUB video pipeline, is currently unsupported.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
51ae3bd4 | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Support operation without DMA engine
To prepare for usage of the DPSUB as a DisplayPort bridge without creating a DRM device, make initialization and usage of the DMA engine
drm: xlnx: zynqmp_dpsub: Support operation without DMA engine
To prepare for usage of the DPSUB as a DisplayPort bridge without creating a DRM device, make initialization and usage of the DMA engine optional. The flag that controls this feature is currently hardcoded to operating with the DMA engine, this will be made dynamic based on the device tree configuration in a subsequent change.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
3662bbfc | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Allow configuration of layer mode
Add a mode parameter to the zynqmp_disp_layer_enable() to set the layer mode, to prepare for live mode support.
Signed-off-by: Laurent Pin
drm: xlnx: zynqmp_dpsub: Allow configuration of layer mode
Add a mode parameter to the zynqmp_disp_layer_enable() to set the layer mode, to prepare for live mode support.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
52c2cf14 | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Parse DT to find connected ports
To prepare for live video input support, parse the device tree to find the connected ports. Warn about unsupported configurations, and error
drm: xlnx: zynqmp_dpsub: Parse DT to find connected ports
To prepare for live video input support, parse the device tree to find the connected ports. Warn about unsupported configurations, and error out when invalid.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
4ce6ecd4 | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Rename zynqmp_dpsub_handle_vblank with DRM prefix
The better convey its purpose, rename the zynqmp_dpsub_handle_vblank() function that belongs to the DRM layer to zynqmp_dps
drm: xlnx: zynqmp_dpsub: Rename zynqmp_dpsub_handle_vblank with DRM prefix
The better convey its purpose, rename the zynqmp_dpsub_handle_vblank() function that belongs to the DRM layer to zynqmp_dpsub_drm_handle_vblank().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
d189835f | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Decouple DRM device from zynqmp_dpsub
To complete the decoupling of the DRM device from the zynqmp_dpsub, group all DRM-related structures in a zynqmp_dpsub_drm structure an
drm: xlnx: zynqmp_dpsub: Decouple DRM device from zynqmp_dpsub
To complete the decoupling of the DRM device from the zynqmp_dpsub, group all DRM-related structures in a zynqmp_dpsub_drm structure and allocate it separately from the zynqmp_dpsub. The DRM managed allocation of the drm_device now doesn't cover the zynqmp_dpsub anymore, so we need to register a cleanup action to release the zynqmp_dpsub when the drm_device is released.
The will allow usage of the DisplayPort encoder as a standalone bridge, without registering a DRM device in this driver.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
074ef0ce | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Move all DRM init and cleanup to zynqmp_kms.c
Continue the isolation of DRM/KMS code by moving all DRM init and cleanup from zynqmp_dpsub.c to zynqmp_kms.c.
Signed-off-by:
drm: xlnx: zynqmp_dpsub: Move all DRM init and cleanup to zynqmp_kms.c
Continue the isolation of DRM/KMS code by moving all DRM init and cleanup from zynqmp_dpsub.c to zynqmp_kms.c.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
6ca91bb4 | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Manage DP and DISP allocations manually
The zynqmp_disp and zynqmp_dp structures are allocated with drmm_kzalloc(). While this simplifies management of memory, it requires a
drm: xlnx: zynqmp_dpsub: Manage DP and DISP allocations manually
The zynqmp_disp and zynqmp_dp structures are allocated with drmm_kzalloc(). While this simplifies management of memory, it requires a DRM device, which will not be available at probe time when the DP bridge will be used standalone, with a DRM device in the PL. To prepare for this, switch to manual allocation for zynqmp_disp and zynqmp_dp. The cleanup still uses the DRM managed infrastructure, but one level up, at the top level. This will be addressed separately.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
5889ee59 | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Move DP bridge init to zynqmp_dp_probe()
There's no need to delay bridge initialization, move it to zynqmp_dp_probe() and drop the zynqmp_dp_drm_init() function.
Signed-off
drm: xlnx: zynqmp_dpsub: Move DP bridge init to zynqmp_dp_probe()
There's no need to delay bridge initialization, move it to zynqmp_dp_probe() and drop the zynqmp_dp_drm_init() function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
2dfd045c | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Register AUX bus at bridge attach time
To prepare for operating as a standalone DP bridge with the DRM device implemented in the PL, move registration of the AUX bus to brid
drm: xlnx: zynqmp_dpsub: Register AUX bus at bridge attach time
To prepare for operating as a standalone DP bridge with the DRM device implemented in the PL, move registration of the AUX bus to bridge attach time, as that's the earliest point when a DRM device is available.
The DRM device pointer stored in zynqmp_dp isn't used anymore, drop it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|
ee1229b3 | 06-Aug-2021 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm: xlnx: zynqmp_dpsub: Move planes handling to zynqmp_kms.c
Decouple the planes handling from the display controller programming by moving the corresponding code from zynqmp_disp.c to zynqmp_kms.c
drm: xlnx: zynqmp_dpsub: Move planes handling to zynqmp_kms.c
Decouple the planes handling from the display controller programming by moving the corresponding code from zynqmp_disp.c to zynqmp_kms.c. This prepares for using the DPSUB with a live video input, without creating DRM planes in the DPSUB driver.
While at it, fix a typo in a comment.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
show more ...
|