aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge
Commit message (Collapse)AuthorAgeFilesLines
* drm/bridge: anx7625: change the gpiod_set_value APIAyushi Makhija2025-05-051-4/+4
| | | | | | | | | | | | | | | | | | | | Use gpiod_set_value_cansleep() instead of gpiod_set_value() to fix the below call trace in the boot log: [ 5.690534] Call trace: [ 5.690536] gpiod_set_value+0x40/0xa4 [ 5.690540] anx7625_runtime_pm_resume+0xa0/0x324 [anx7625] [ 5.690545] __rpm_callback+0x48/0x1d8 [ 5.690549] rpm_callback+0x6c/0x78 Certain GPIO controllers require access via message-based buses such as I2C or SPI, which may cause the GPIOs to enter a sleep state. Therefore, use the gpiod_set_value_cansleep(). Signed-off-by: Ayushi Makhija <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: anx7625: fix anx7625_sink_detect() to return correct hpd statusAyushi Makhija2025-05-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | In the anx7625_sink_detect(), the device is checked to see if it is a panel bridge, and it always sends a "connected" status to the connector. When adding the DP port on port 1 of the anx7625, it incorrectly treats it as a panel bridge and sends an always "connected" status. Instead of checking the status on the panel bridge, it's better to check the hpd_status for connectors that supports hot-plugging. This way, it verifies the hpd_status variable before sending the status to the connector. In case of eDP, anx7625_bridge_detect() will not get called because the bridge->ops condition in anx7625_link_bridge() will not be satisfied. Since anx7625_sink_detect() is called from anx7625_bridge_detect(), this results in the sink_detect logic not being executed for eDP. Signed-off-by: Ayushi Makhija <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: anx7625: fix drm_bridge ops flags to support hot-pluggingAyushi Makhija2025-05-051-3/+2
| | | | | | | | | | | | | | | | | | The anx7625_link_bridge() checks if a device is not a panel bridge and add DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT flags to the drm_bridge->ops. However, on port 1 of the anx7625 bridge, any device added is always treated as a panel bridge, preventing connector_detect() from being called. To resolve this, instead of just checking if it is a panel bridge, verify the type of device based on aux whether it is a DisplayPort or eDP panel. If the device is not of the eDP type, add DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT flags to the to the drm_bridge->ops. Signed-off-by: Ayushi Makhija <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: anx7625: enable HPD interruptsAyushi Makhija2025-05-051-0/+18
| | | | | | | | | | | | When the device enters the suspend state, it prevents HPD interrupts from occurring. To address this, implement .hpd_enable() and .hpd_disable() callbacks functions of the drm_bridge. Signed-off-by: Ayushi Makhija <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-294-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | This is the new API for allocating DRM bridges. These two drivers are tangled together by the ldb_add_bridge_helper(), so they are converted at once. They also have a similar design, each embedding an array of channels in their main struct, and each channel embeds a drm_bridge. This prevents dynamic, refcount-based deallocation of the bridges. To make the new, dynamic bridge allocation possible: * change the array of channels into an array of channel pointers * allocate each channel using devm_drm_bridge_alloc() * adapt ldb_add_bridge_helper() to not set the funcs pointer (now done by devm_drm_bridge_alloc()) * adapt the code wherever using the channels Signed-off-by: Luca Ceresoli <[email protected]> Acked-by: Liu Ying <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-31-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-291-4/+3
| | | | | | | | | | | This is the new API for allocating DRM bridges. Reviewed-by: Herve Codina <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Tested-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-13-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* drm/bridge: tda998x: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-291-4/+3
| | | | | | | | | This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-12-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-291-4/+3
| | | | | | | | | This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli <[email protected]> Reviewed-by: Cristian Ciocaltea <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-11-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* drm/bridge: lt9611uxc: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-291-4/+3
| | | | | | | | | This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-7-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* drm/bridge: display-connector: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-291-4/+4
| | | | | | | | | This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-6-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() APILuca Ceresoli2025-04-291-4/+4
| | | | | | | | | This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli <[email protected]> Reviewed-by: Andy Yan <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20250424-drm-bridge-convert-to-alloc-api-v2-3-8f91a404d86b@bootlin.com Signed-off-by: Louis Chauvet <[email protected]>
* drm/bridge: lt9611uxc: Fix an error handling path in lt9611uxc_probe()Christophe JAILLET2025-04-221-1/+5
| | | | | | | | | | | | | If lt9611uxc_audio_init() fails, some resources still need to be released before returning the error code. Use the existing error handling path. Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/f167608e392c6b4d7d7f6e45e3c21878feb60cbd.1744958833.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: ignore return values of drm_panel_* callsDmitry Baryshkov2025-04-221-33/+6
| | | | | | | | | | | Follow the example of other drivers and ignore return values of the drm_panel_prepare() / unprepare() / enable() / disable() calls. There is no possible error recovery, so the driver just logs a message. Tested-by: Damon Ding <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: inline analogix_dp_prepare_panel()Dmitry Baryshkov2025-04-221-33/+10
| | | | | | | | | | The analogix_dp_prepare_panel() is now only calling a corresponding drm_panel function. Inline it to simplify the code. Tested-by: Damon Ding <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogic_dp: drop panel_lockDmitry Baryshkov2025-04-222-7/+0
| | | | | | | | | | | The analogix_dp_prepare_panel() function is called from bridge's atomic_pre_enable() and atomic_post_disable() callbacks, which can not happen simultaneously. Drop the useless mutex. Tested-by: Damon Ding <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogic_dp: drop panel_is_modesetDmitry Baryshkov2025-04-222-11/+1
| | | | | | | | | The dp->panel_is_modeset is now a write-only field. Drop it completely. Tested-by: Damon Ding <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: drop unused argument to analogix_dp_prepare_panel()Dmitry Baryshkov2025-04-221-14/+5
| | | | | | | | | | | After previous cleanup all calling sites pass true as is_modeset_prepare argument to analogix_dp_prepare_panel(). Drop dead code depending on that argument being false. Tested-by: Damon Ding <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: drop extra calls to analogix_dp_prepare_panel()Dmitry Baryshkov2025-04-221-21/+1
| | | | | | | | | | | The analogix_dp_prepare_panel() returns immediately if there is no attached panel. Drop several calls to this function which are performed when dp->plat_data->panel is NULL. Tested-by: Damon Ding <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: Add support for RK3588Damon Ding2025-04-201-0/+4
| | | | | | | | | | Expand enum analogix_dp_devtype with RK3588_EDP, and add max_link_rate and max_lane_count configs for it. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Damon Ding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: Add support for &drm_dp_aux.wait_hpd_asserted()Damon Ding2025-04-201-0/+21
| | | | | | | | | | | Add analogix_dpaux_wait_hpd_asserted() to help confirm the HPD state before doing AUX transfers. Signed-off-by: Damon Ding <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: Add support to get panel from the DP AUX busDamon Ding2025-04-201-9/+11
| | | | | | | | | | | | | The main modification is moving the DP AUX initialization from function analogix_dp_bind() to analogix_dp_probe(). In order to get the EDID of eDP panel during probing, it is also needed to advance PM operations to ensure that eDP controller and phy are prepared for AUX transmission. Signed-off-by: Damon Ding <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: Support to get &analogix_dp_device.plat_data and ↵Damon Ding2025-04-201-0/+14
| | | | | | | | | | | | | | &analogix_dp_device.aux Add two new functions: one to find &analogix_dp_device.plat_data via &drm_dp_aux, and the other to get &analogix_dp_device.aux. Both of them serve for the function of getting panel from DP AUX bus, which is why they are included in a single commit. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Damon Ding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: Add support for phy configuration.Damon Ding2025-04-202-0/+53
| | | | | | | | | | | Add support to configurate link rate, lane count, voltage swing and pre-emphasis with phy_configure(). It is helpful in application scenarios where analogix controller is mixed with the phy of other vendors. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Damon Ding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: Remove CONFIG_PM related check in ↵Damon Ding2025-04-201-24/+6
| | | | | | | | | | | | | | | | analogix_dp_bind()/analogix_dp_unbind() Remove the check related to CONFIG_PM in order to make the code more concise, as the CONFIG_PM should be a required option for many drivers. In addition, it is preferable to use devm_pm_runtime_enable() instead of manually invoking pm_runtime_enable() followed by pm_runtime_disable(). Suggested-by: Douglas Anderson <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Damon Ding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: analogix_dp: Add irq flag IRQF_NO_AUTOEN instead of calling ↵Damon Ding2025-04-201-3/+2
| | | | | | | | | | | | | | | | disable_irq() The IRQF_NO_AUTOEN can be used for the drivers that don't want interrupts to be enabled automatically via devm_request_threaded_irq(). Using this flag can provide be more robust compared to the way of calling disable_irq() after devm_request_threaded_irq() without the IRQF_NO_AUTOEN flag. Suggested-by: Douglas Anderson <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Damon Ding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: dw-hdmi: Avoid including uapi headersAndy Yan2025-04-161-2/+2
| | | | | | | | | | | It is not recommended for drivers to include UAPI header directly. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: select DRM_KMS_HELPER for AUX_BRIDGEDmitry Baryshkov2025-04-161-0/+1
| | | | | | | | | | | The aux bridge uses devm_drm_of_get_bridge() from the panel bridge (and correctly selects DRM_PANEL_BRIDGE). However panel bridge is not a separate module, it is compiled into the drm_kms_helper.o. Select DRM_KMS_HELPER too to express this dependency. Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* drm/bridge: anx7625: Use devm_pm_runtime_enable()Chen-Yu Tsai2025-04-151-8/+1
| | | | | | | | | | The anx7625 driver is open coding what devm_pm_runtime_enable() does. Switch to the common helper instead. Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Chen-Yu Tsai <[email protected]>
* drm/bridge: split HDMI Audio from DRM_BRIDGE_OP_HDMIDmitry Baryshkov2025-04-072-1/+2
| | | | | | | | | | | As pointed out by Laurent, OP bits are supposed to describe operations. Split DRM_BRIDGE_OP_HDMI_AUDIO from DRM_BRIDGE_OP_HDMI instead of overloading DRM_BRIDGE_OP_HDMI. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* Merge drm/drm-next into drm-misc-nextThomas Zimmermann2025-04-072-7/+8
|\ | | | | | | | | | | | | Backmerging to get v6.15-rc1 into drm-misc-next. Also fixes a build issue when enabling CONFIG_DRM_SCHED_KUNIT_TEST. Signed-off-by: Thomas Zimmermann <[email protected]>
| * Merge tag 'timers-cleanups-2025-04-06' of ↵Linus Torvalds2025-04-061-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer cleanups from Thomas Gleixner: "A set of final cleanups for the timer subsystem: - Convert all del_timer[_sync]() instances over to the new timer_delete[_sync]() API and remove the legacy wrappers. Conversion was done with coccinelle plus some manual fixups as coccinelle chokes on scoped_guard(). - The final cleanup of the hrtimer_init() to hrtimer_setup() conversion. This has been delayed to the end of the merge window, so that all patches which have been merged through other trees are in mainline and all new users are catched. Doing this right before rc1 ensures that new code which is merged post rc1 is not introducing new instances of the original functionality" * tag 'timers-cleanups-2025-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tracing/timers: Rename the hrtimer_init event to hrtimer_setup hrtimers: Rename debug_init_on_stack() to debug_setup_on_stack() hrtimers: Rename debug_init() to debug_setup() hrtimers: Rename __hrtimer_init_sleeper() to __hrtimer_setup_sleeper() hrtimers: Remove unnecessary NULL check in hrtimer_start_range_ns() hrtimers: Make callback function pointer private hrtimers: Merge __hrtimer_init() into __hrtimer_setup() hrtimers: Switch to use __htimer_setup() hrtimers: Delete hrtimer_init() treewide: Convert new and leftover hrtimer_init() users treewide: Switch/rename to timer_delete[_sync]()
| | * treewide: Switch/rename to timer_delete[_sync]()Thomas Gleixner2025-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree over and remove the historical wrapper inlines. Conversion was done with coccinelle plus manual fixups where necessary. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
| * | drm/i2c: tda998x: select CONFIG_DRM_KMS_HELPERArnd Bergmann2025-03-301-6/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fails to build without the KMS helper functions: x86_64-linux-ld: drivers/gpu/drm/bridge/tda998x_drv.o: in function `tda998x_detect_work': tda998x_drv.c:(.text+0x4e6): undefined reference to `drm_kms_helper_hotplug_event' x86_64-linux-ld: drivers/gpu/drm/bridge/tda998x_drv.o: in function `tda998x_bind': tda998x_drv.c:(.text.unlikely+0x33): undefined reference to `drm_simple_encoder_init' x86_64-linux-ld: drivers/gpu/drm/bridge/tda998x_drv.o:(.rodata+0x584): undefined reference to `drm_atomic_helper_connector_reset' x86_64-linux-ld: drivers/gpu/drm/bridge/tda998x_drv.o:(.rodata+0x590): undefined reference to `drm_helper_probe_single_connector_modes' x86_64-linux-ld: drivers/gpu/drm/bridge/tda998x_drv.o:(.rodata+0x5a4): undefined reference to `drm_atomic_helper_connector_duplicate_state' x86_64-linux-ld: drivers/gpu/drm/bridge/tda998x_drv.o:(.rodata+0x5a8): undefined reference to `drm_atomic_helper_connector_destroy_state' Select the missing symbol and fix up the broken whitespace. Fixes: 325ba852d148 ("drm/i2c: move TDA998x driver under drivers/gpu/drm/bridge") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: samsung-dsim: use dynamic lifetime managementLuca Ceresoli2025-04-071-4/+3
| | | | | | | | | | | | | | | | | | | | | | Allow this bridge to be removable without dangling pointers and use-after-free, together with proper use of drm_bridge_get() and _put() by consumers. Reviewed-by: Maxime Ripard <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Louis Chauvet <[email protected]>
* | drm/bridge: ti-sn65dsi83: use dynamic lifetime managementLuca Ceresoli2025-04-071-4/+3
| | | | | | | | | | | | | | | | | | | | | | Allow this bridge to be removable without dangling pointers and use-after-free, together with proper use of drm_bridge_get() and _put() by consumers. Reviewed-by: Maxime Ripard <[email protected]> Signed-off-by: Luca Ceresoli <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Louis Chauvet <[email protected]>
* | drm/bridge: it6505: Switch to common helpers to power up/down dp linkAndy Yan2025-04-021-42/+4
| | | | | | | | | | | | | | | | | | Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: anx78xx: Switch to common helpers to power up/down dp linkAndy Yan2025-04-021-29/+1
| | | | | | | | | | | | | | | | | | Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: anx6345: Switch to common helpers to power up/down dp linkAndy Yan2025-04-021-29/+1
| | | | | | | | | | | | | | | | | | Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-mhdp8546: Switch to common helpers to power up/down dp linkAndy Yan2025-04-021-72/+2
| | | | | | | | | | | | | | | | | | Use the common dp link power up/down helpers to avoid duplicating code. Signed-off-by: Andy Yan <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: sii902x: Set bridge typeAlexander Stein2025-03-301-0/+1
| | | | | | | | | | | | | | | | | | This is a RGB to HDMI bridge, so set the bridge type accordingly. Signed-off-by: Alexander Stein <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Move DSI mode check to _atomic_check()Aradhya Bhatia2025-03-301-5/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present, the DSI mode configuration check happens during the _atomic_enable() phase, which is not really the best place for this. Moreover, if the mode is not valid, the driver gives a warning and continues the hardware configuration. Move the DSI mode configuration check to _atomic_check() instead, which can properly report back any invalid mode, before the _enable phase even begins. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Add input format negotiationAradhya Bhatia2025-03-301-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the input format negotiation hook, that uses the helper drm_mipi_dsi_get_input_bus_fmt() for dsi hosts, to figure out the required input format. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Move to devm_drm_of_get_bridge()Aradhya Bhatia2025-03-302-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manually finding the next bridge/panel, and maintaining the panel-bridge (in-case the next entity is a panel), switch to using the automatically managing devm_drm_of_get_bridge() API. Drop the drm_panel support completely from the driver while at it. Reviewed-by: Tomi Valkeinen <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Wait for Clk and Data Lanes to be readyAradhya Bhatia2025-03-301-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once the DSI Link and DSI Phy are initialized, the code needs to wait for Clk and Data Lanes to be ready, before continuing configuration. This is in accordance with the DSI Start-up procedure, found in the Technical Reference Manual of Texas Instrument's J721E SoC[0] which houses this DSI TX controller. If the previous bridge (or crtc/encoder) are configured pre-maturely, the input signal FIFO gets corrupt. This introduces a color-shift on the display. Allow the driver to wait for the clk and data lanes to get ready during DSI enable. [0]: See section 12.6.5.7.3 "Start-up Procedure" in J721E SoC TRM TRM Link: http://www.ti.com/lit/pdf/spruil1 Fixes: e19233955d9e ("drm/bridge: Add Cadence DSI driver") Cc: [email protected] Tested-by: Dominik Haller <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Check return value when getting default PHY configAradhya Bhatia2025-03-301-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the return value of the phy_mipi_dphy_get_default_config() call, and in case of an error, return back the same. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: [email protected] Reviewed-by: Tomi Valkeinen <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Fix the clock variable for mode_valid()Aradhya Bhatia2025-03-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crtc_* mode parameters do not get generated (duplicated in this case) from the regular parameters before the mode validation phase begins. The rest of the code conditionally uses the crtc_* parameters only during the bridge enable phase, but sticks to the regular parameters for mode validation. In this singular instance, however, the driver tries to use the crtc_clock parameter even during the mode validation, causing the validation to fail. Allow the D-Phy config checks to use mode->clock instead of mode->crtc_clock during mode_valid checks, like everywhere else in the driver. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: [email protected] Reviewed-by: Tomi Valkeinen <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Fix phy de-init and flag it soAradhya Bhatia2025-03-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver code doesn't have a Phy de-initialization path as yet, and so it does not clear the phy_initialized flag while suspending. This is a problem because after resume the driver looks at this flag to determine if a Phy re-initialization is required or not. It is in fact required because the hardware is resuming from a suspend, but the driver does not carry out any re-initialization causing the D-Phy to not work at all. Call the counterparts of phy_init() and phy_power_on(), that are phy_exit() and phy_power_off(), from _bridge_post_disable(), and clear the flags so that the Phy can be initialized again when required. Fixes: fced5a364dee ("drm/bridge: cdns: Convert to phy framework") Cc: [email protected] Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: cdns-dsi: Fix connecting to next bridgeAradhya Bhatia2025-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the OF node pointer passed to the of_drm_find_bridge() call to find the next bridge in the display chain. The code to find the next panel (and create its panel-bridge) works fine, but to find the next (non-panel) bridge does not. To find the next bridge in the pipeline, we need to pass "np" - the OF node pointer of the next entity in the devicetree chain. Passing "of_node" to of_drm_find_bridge (which is what the code does currently) will fetch the bridge for the cdns-dsi which is not what's required. Fix that. Fixes: e19233955d9e ("drm/bridge: Add Cadence DSI driver") Cc: [email protected] Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
* | drm/bridge: anx7625: Remove redundant 'flush_workqueue()' callsChen Ni2025-03-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Signed-off-by: Chen Ni <[email protected]> Reviewed-by: Robert Foss <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* | drm/display: dp: change drm_dp_dpcd_read_link_status() return valueDmitry Baryshkov2025-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm_dp_dpcd_read_link_status() follows the "return error code or number of bytes read" protocol, with the code returning less bytes than requested in case of some errors. However most of the drivers interpreted that as "return error code in case of any error". Switch drm_dp_dpcd_read_link_status() to drm_dp_dpcd_read_data() and make it follow that protocol too. Acked-by: Jani Nikula <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/20250324-drm-rework-dpcd-access-v4-2-e80ff89593df@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <[email protected]>