mirror_ubuntu-kernels/drivers/gpu/drm
Abhinav Kumar 9a0cdcd664
drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge
adv7533 bridge tries to dynamically switch lanes based on the
mode by detaching and attaching the mipi dsi device.

This approach is incorrect because this method of dynamic switch of
detaching and attaching the mipi dsi device also results in removing
and adding the component which is not necessary.

This approach is also prone to deadlocks. So for example, on the
db410c whenever this path is executed with lockdep enabled,
this results in a deadlock due to below ordering of locks.

-> #1 (crtc_ww_class_acquire){+.+.}-{0:0}:
        lock_acquire+0x6c/0x90
        drm_modeset_acquire_init+0xf4/0x150
        drmm_mode_config_init+0x220/0x770
        msm_drm_bind+0x13c/0x654
        try_to_bring_up_aggregate_device+0x164/0x1d0
        __component_add+0xa8/0x174
        component_add+0x18/0x2c
        dsi_dev_attach+0x24/0x30
        dsi_host_attach+0x98/0x14c
        devm_mipi_dsi_attach+0x38/0xb0
        adv7533_attach_dsi+0x8c/0x110
        adv7511_probe+0x5a0/0x930
        i2c_device_probe+0x30c/0x350
        really_probe.part.0+0x9c/0x2b0
        __driver_probe_device+0x98/0x144
        driver_probe_device+0xac/0x14c
        __device_attach_driver+0xbc/0x124
        bus_for_each_drv+0x78/0xd0
        __device_attach+0xa8/0x1c0
        device_initial_probe+0x18/0x24
        bus_probe_device+0xa0/0xac
        deferred_probe_work_func+0x90/0xd0
        process_one_work+0x28c/0x6b0
        worker_thread+0x240/0x444
        kthread+0x110/0x114
        ret_from_fork+0x10/0x20

-> #0 (component_mutex){+.+.}-{3:3}:
        __lock_acquire+0x1280/0x20ac
        lock_acquire.part.0+0xe0/0x230
        lock_acquire+0x6c/0x90
        __mutex_lock+0x84/0x400
        mutex_lock_nested+0x3c/0x70
        component_del+0x34/0x170
        dsi_dev_detach+0x24/0x30
        dsi_host_detach+0x20/0x64
        mipi_dsi_detach+0x2c/0x40
        adv7533_mode_set+0x64/0x90
        adv7511_bridge_mode_set+0x210/0x214
        drm_bridge_chain_mode_set+0x5c/0x84
        crtc_set_mode+0x18c/0x1dc
        drm_atomic_helper_commit_modeset_disables+0x40/0x50
        msm_atomic_commit_tail+0x1d0/0x6e0
        commit_tail+0xa4/0x180
        drm_atomic_helper_commit+0x178/0x3b0
        drm_atomic_commit+0xa4/0xe0
        drm_client_modeset_commit_atomic+0x228/0x284
        drm_client_modeset_commit_locked+0x64/0x1d0
        drm_client_modeset_commit+0x34/0x60
        drm_fb_helper_lastclose+0x74/0xcc
        drm_lastclose+0x3c/0x80
        drm_release+0xfc/0x114
        __fput+0x70/0x224
        ____fput+0x14/0x20
        task_work_run+0x88/0x1a0
        do_exit+0x350/0xa50
        do_group_exit+0x38/0xa4
        __wake_up_parent+0x0/0x34
        invoke_syscall+0x48/0x114
        el0_svc_common.constprop.0+0x60/0x11c
        do_el0_svc+0x30/0xc0
        el0_svc+0x58/0x100
        el0t_64_sync_handler+0x1b0/0x1bc
        el0t_64_sync+0x18c/0x190

Due to above reasons, remove the dynamic lane switching
code from adv7533 bridge chip and filter out the modes
which would need different number of lanes as compared
to the initialization time using the mode_valid callback.

This can be potentially re-introduced by using the pre_enable()
callback but this needs to be evaluated first whether such an
approach will work so this will be done with a separate change.

changes since RFC:
	- Fix commit text and add TODO comment

changes in v2:
	- Fix checkpatch formatting errors

Fixes: 62b2f026cd ("drm/bridge: adv7533: Change number of DSI lanes dynamically")
Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/16
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Link: https://lore.kernel.org/r/1661797363-7564-1-git-send-email-quic_abhinavk@quicinc.com
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1665522649-3423-1-git-send-email-quic_abhinavk@quicinc.com
2022-10-13 10:38:09 +02:00
..
amd drm/amdgpu: Fix VRAM eviction issue 2022-09-22 19:53:06 +02:00
arm drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
armada drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
aspeed drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
ast drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state() 2022-10-08 15:26:55 +02:00
atmel-hlcdc drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
bridge drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge 2022-10-13 10:38:09 +02:00
display drm: split build lists one per line and sort 2022-10-12 17:00:05 +03:00
etnaviv Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next 2022-05-17 12:20:04 +10:00
exynos drm-misc-next for v6.1: 2022-09-06 10:56:04 +02:00
fsl-dcu drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
gma500 drm/gma500: Call acpi_video_register_backlight() 2022-09-18 21:03:21 +02:00
gud drm/atomic-helper: Rename drm_atomic_helper_connector_tv_reset to avoid ambiguity 2022-10-10 13:55:47 +02:00
hisilicon drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
hyperv drm/format-helper: Merge drm_fb_memcpy() and drm_fb_memcpy_toio() 2022-08-10 09:15:51 +02:00
i2c sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
i810
i915 Immutable backlight-detect-refactor branch between acpi, drm-* and pdx86 2022-09-14 12:27:10 +01:00
imx drm-misc-next for v6.1: 2022-09-06 10:56:04 +02:00
ingenic drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
kmb drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
lib
lima drm/lima: Migrate to dev_pm_opp_set_config() 2022-07-08 11:27:33 +05:30
logicvc drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
mcde drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
mediatek drm/mediatek: dp: change mtk_dp_driver to static 2022-09-19 12:33:54 +03:00
meson drm/meson: remove drm bridges at aggregate driver unbind time 2022-09-23 09:45:49 +00:00
mga
mgag200 drm/mgag200: Do not call drm_atomic_add_affected_planes() 2022-10-13 09:17:03 +02:00
msm Merge tag 'drm-misc-next-2022-09-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2022-09-11 22:03:07 +10:00
mxsfb drm/lcdif: switch to devm_drm_of_get_bridge 2022-08-22 16:53:31 +02:00
nouveau drm/nouveau/disp: fix cast removes address space of expression warnings 2022-10-12 18:54:42 -04:00
omapdrm drm/omap: dmm_tiler:Remove the print function dev_err() 2022-09-09 16:23:21 +03:00
panel drm/panel: ws2401: Silent no spi_device_id warning 2022-10-03 21:50:53 +02:00
panfrost Merge tag 'drm-misc-next-2022-09-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2022-09-11 22:03:07 +10:00
pl111 drm:pl111: Add of_node_put() when breaking out of for_each_available_child_of_node() 2022-08-11 18:13:31 +02:00
qxl drm/qxl: drop set_prod_notify parameter from qxl_ring_create 2022-09-23 13:16:37 +02:00
r128 drm/r128: Fix undefined behavior due to shift overflowing the constant 2022-05-21 18:02:47 +02:00
radeon Immutable backlight-detect-refactor branch between acpi, drm-* and pdx86 2022-09-14 12:27:10 +01:00
rcar-du drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
rockchip drm/rockchip: remove vop_writel from vop1 driver 2022-09-15 15:35:43 +02:00
savage
scheduler drm/sched: add missing NULL check in drm_sched_get_cleanup_job v2 2022-10-05 12:38:00 +02:00
shmobile drm/plane: Remove drm_plane_init() 2022-09-20 09:37:12 +02:00
sis drm/sis: use idr_init_base() to initialize dev_priv->object_idr 2022-07-28 15:35:56 +01:00
solomon drm/crtc-helper: Add a drm_crtc_helper_atomic_check() helper 2022-10-13 09:17:05 +02:00
sprd drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
sti drm-misc-next for v6.1: 2022-09-06 10:56:04 +02:00
stm drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
sun4i Merge tag 'drm-misc-next-2022-09-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2022-09-11 22:03:07 +10:00
tdfx
tegra drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
tests drm/tests: Order Kunit tests in Makefile 2022-10-10 13:54:54 +02:00
tidss drm/tidss: fix repeated words in comments 2022-09-09 16:23:26 +03:00
tilcdc drm/plane: Remove drm_plane_init() 2022-09-20 09:37:12 +02:00
tiny drm/crtc-helper: Add a drm_crtc_helper_atomic_check() helper 2022-10-13 09:17:05 +02:00
ttm drm/ttm: add dma_resv_assert_held() calls to vmap/vunmap 2022-09-26 12:07:01 +02:00
tve200 drm/tve200: Fix smatch warning 2022-08-26 14:22:59 +02:00
udl drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state() 2022-10-08 15:26:55 +02:00
v3d drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vboxvideo drm/vboxvideo: fix repeated words in comments 2022-09-17 15:01:24 +02:00
vc4 drm/vc4: vec: Fix definition of PAL-M mode 2022-10-10 13:59:52 +02:00
vgem dma-buf: specify usage while adding fences to dma_resv obj v7 2022-04-07 12:53:53 +02:00
via drm/via: Add new condition to via_dma_cleanup() 2022-09-07 07:01:16 +02:00
virtio virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create() 2022-09-23 13:16:37 +02:00
vkms Merge drm/drm-next into drm-misc-next 2022-09-14 12:22:18 +01:00
vmwgfx drm/vmwgfx: Fix memory leak in vmw_mksstat_add_ioctl() 2022-09-21 12:15:15 -04:00
xen Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
xlnx drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
drm_agpsupport.c
drm_aperture.c drm/aperture: Fix some kerneldoc comments 2022-09-12 09:34:07 +02:00
drm_atomic_helper.c drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state() 2022-10-08 15:26:55 +02:00
drm_atomic_state_helper.c drm/atomic-helper: Rename drm_atomic_helper_connector_tv_reset to avoid ambiguity 2022-10-10 13:55:47 +02:00
drm_atomic_uapi.c drm/atomic: Add TV subconnector property to get/set_property 2022-10-10 13:56:42 +02:00
drm_atomic.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_auth.c drm: use idr_init_base() to initialize master->lessee_idr 2022-07-28 15:35:55 +01:00
drm_blend.c drm/doc: Fix comment typo 2022-06-28 07:56:32 +02:00
drm_bridge_connector.c drm: Config orientation property if panel provides it 2022-06-21 08:52:59 -07:00
drm_bridge.c drm/bridge: Avoid uninitialized variable warning 2022-07-08 13:41:28 +02:00
drm_buddy.c drm: add a check to verify the size alignment 2022-04-11 15:35:47 +02:00
drm_bufs.c
drm_cache.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
drm_client_modeset.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_client.c drm/client: Use actual bpp when allocating frame buffers 2022-07-09 15:00:52 +02:00
drm_color_mgmt.c drm: fix whitespace in drm_plane_create_color_properties() 2022-08-04 15:24:46 +02:00
drm_connector.c drm/connector: Introduce drmm_connector_init 2022-07-13 10:46:06 +02:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c drm/crtc-helper: Add a drm_crtc_helper_atomic_check() helper 2022-10-13 09:17:05 +02:00
drm_crtc_internal.h drm/edid: abstract debugfs override EDID set/reset 2022-06-30 10:50:59 +03:00
drm_crtc.c drm/crtc: Introduce drmm_crtc_init_with_planes 2022-07-13 10:46:05 +02:00
drm_damage_helper.c drm: Use original src rect while initializing damage iterator 2022-09-13 14:38:33 +03:00
drm_debugfs_crc.c
drm_debugfs.c drm/edid: abstract debugfs override EDID set/reset 2022-06-30 10:50:59 +03:00
drm_displayid.c drm/displayid: convert to drm_edid 2022-05-13 18:55:13 +03:00
drm_dma.c
drm_drv.c
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: Make version checks less convoluted 2022-10-05 01:18:11 +03:00
drm_encoder_slave.c
drm_encoder.c drm/encoder: Introduce drmm_encoder_init 2022-07-13 10:46:05 +02:00
drm_fb_dma_helper.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
drm_fb_helper.c drm/fb-helper: Add support for DRM_FORMAT_C[124] 2022-07-09 15:07:09 +02:00
drm_file.c drm-misc-next for v6.1: 2022-09-06 10:56:04 +02:00
drm_flip_work.c
drm_format_helper.c drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010() 2022-09-27 19:41:51 +02:00
drm_fourcc.c drm/fourcc: Add DRM_FORMAT_D[1248] 2022-07-09 15:36:07 +02:00
drm_framebuffer.c drm/framebuffer: convert to drm_dbg_kms() 2022-09-28 10:43:30 +02:00
drm_gem_atomic_helper.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_gem_dma_helper.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
drm_gem_framebuffer_helper.c drm/gem-fb-helper: Use actual bpp for size calculations 2022-07-09 15:08:16 +02:00
drm_gem_shmem_helper.c drm-misc-next for v6.1: 2022-09-06 10:56:04 +02:00
drm_gem_ttm_helper.c drm/ttm: fix locking in vmap/vunmap TTM GEM helpers 2022-07-18 09:18:53 +02:00
drm_gem_vram_helper.c drm/ttm: rename and cleanup ttm_bo_init 2022-07-11 10:53:13 +02:00
drm_gem.c drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error 2022-08-09 18:43:28 +02:00
drm_hashtab.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c drm: Prevent drm_copy_field() to attempt copying a NULL pointer 2022-07-15 10:25:36 +02:00
drm_irq.c
drm_kms_helper_common.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_lease.c
drm_legacy_misc.c
drm_legacy.h
drm_lock.c
drm_managed.c drm: Add DRM-managed mutex_init() 2022-05-05 09:04:10 +02:00
drm_memory.c
drm_mipi_dbi.c drm/probe-helper: Add drm_crtc_helper_mode_valid_fixed() 2022-09-12 09:14:26 +02:00
drm_mipi_dsi.c drm/mipi-dsi: Detach devices when removing the host 2022-07-13 10:46:05 +02:00
drm_mm.c
drm_mode_config.c drm: hide unregistered connectors from GETCONNECTOR IOCTL 2022-09-05 12:59:53 +02:00
drm_mode_object.c
drm_modes.c drm/modes: parse_cmdline: Add support for named modes containing dashes 2022-10-10 13:59:04 +02:00
drm_modeset_helper.c drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro 2022-09-20 09:42:31 +02:00
drm_modeset_lock.c
drm_nomodeset.c
drm_of.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for Aya Neo Air 2022-09-17 19:58:32 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm/crtc-helper: Add a drm_crtc_helper_atomic_check() helper 2022-10-13 09:17:05 +02:00
drm_plane.c drm/plane: Allocate planes with drm_universal_plane_alloc() 2022-09-20 09:41:06 +02:00
drm_prime.c drm/prime: drop unexpected word "the" in the comments 2022-06-22 09:22:05 +02:00
drm_print.c
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c drm/probe-helper: Add drm_crtc_helper_mode_valid_fixed() 2022-09-12 09:14:26 +02:00
drm_property.c
drm_rect.c
drm_scatter.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state() 2022-10-08 15:26:55 +02:00
drm_syncobj.c drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline() 2022-06-13 08:54:16 +02:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank_work.c
drm_vblank.c drm: Use drm_mode_copy() 2022-04-12 09:27:20 +03:00
drm_vm.c LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
drm_vma_manager.c
drm_writeback.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
Kconfig Immutable backlight-detect-refactor branch between acpi, drm-* and pdx86 2022-09-14 12:27:10 +01:00
Makefile drm: split build lists one per line and sort 2022-10-12 17:00:05 +03:00