1267333 Commits

Author SHA1 Message Date
Dave Airlie
2236a61bd4 Mediatek DRM Next for Linux 6.10
1. Use devm_platform_get_and_ioremap_resource() in mtk_hdmi_ddc_probe()
 2. Add GAMMA 12-bit LUT support for MT8188
 3. Add 0 size check to mtk_drm_gem_obj
 4. Init `ddp_comp` with devm_kcalloc()
 5. Rename mtk_drm_* to mtk_*
 6. Drop driver owner initialization
 7. Fix mtk_dp_aux_transfer return value
 8. Correct calculation formula of PHY Timing
 -----BEGIN PGP SIGNATURE-----
 
 iQJMBAABCgA2FiEEACwLKSDmq+9RDv5P4cpzo8lZTiQFAmYpBEsYHGNodW5rdWFu
 Zy5odUBrZXJuZWwub3JnAAoJEOHKc6PJWU4k1JwQAI+lCPYR3bG4Lhe8RQxpAqef
 Z8R1wI1LwJiExsuxO7Ct86Kb8dcP1GeA6qke71HpS2VACw7EUSzgheluF0zaw0BD
 9Vo3vj5G6LDSaeYGbJYOnpjYqxm+jLCuV2YwNxLpftx3A6eiVcGjiwxUQpKguDub
 4nl0oAjldTsWFrNnDRa71bYCQ7iq0e7k5q0l9EVSAsxMqLAZnHhPodLJdAwmFxzy
 Pn5WAfw+np5K9ImD1LXRDLG6OrEWLdGdFHpamxYfifhRlrbLU3ED5CWnQKEDJL2s
 zBI00P4SQY+kuj+RbhkVTMicm4aDuK3oebIFhFX23XP99MMz8Jk8rFZj2T8AaTKp
 JWkfHql4q/grKR3qFTdyeTAWLu5ycYQP1MjEmvcChQeuKkLH+h4Q3BXslfk7ffHf
 yRL2PkJW9nEJ5bOmkpENJ6MuHh3JDltNOuE/47lVBzDh1sKzy55i6v38C2KmeUAX
 TKERTgb4RgsZikqw1KmmDvzKq8cbhKgqgftgtVSeYVh1klyDPEpueDTswAYIqphY
 ChKtvAqYbUVjP8wZCswOpZ8UTnHSxqqL+jtiIy90OkXySdTceucy/oVlF92lGu7P
 gDL5feCULSaW9hLuwQOSXDrwKS8dhcXeuK8FaTK9EwtfMn4xpOWuxSW6mtaQKm/I
 tb7tEObRuL7I8TyqHyHL
 =xhbG
 -----END PGP SIGNATURE-----

Merge tag 'mediatek-drm-next-6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next

Mediatek DRM Next for Linux 6.10

1. Use devm_platform_get_and_ioremap_resource() in mtk_hdmi_ddc_probe()
2. Add GAMMA 12-bit LUT support for MT8188
3. Add 0 size check to mtk_drm_gem_obj
4. Init `ddp_comp` with devm_kcalloc()
5. Rename mtk_drm_* to mtk_*
6. Drop driver owner initialization
7. Fix mtk_dp_aux_transfer return value
8. Correct calculation formula of PHY Timing

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240425153859.3579-1-chunkuang.hu@kernel.org
2024-04-26 14:32:09 +10:00
Dave Airlie
9aa99bb197 drm/loongson: fix build after debugfs include change
This failed to build here after the header rework.

Fixes: 33d5ae6cacf4 ("drm/print: drop include debugfs.h and include where needed")
Signed-off-by: Dave Airlie <airlied@redhat.com>
2024-04-26 14:30:36 +10:00
Dave Airlie
ca31018b2f drm/omap: add missing seq_file include
This fails to build with missing seq declerations.

Fixes: 9e2b84fb6cd7 ("drm/print: drop include seq_file.h")
Signed-off-by: Dave Airlie <airlied@redhat.com>
2024-04-26 14:17:44 +10:00
Dave Airlie
14869d1e5b drm/komeda: fix missing seq_file includes
This fails to build with missing seq declerations.

Fixes: 9e2b84fb6cd7 ("drm/print: drop include seq_file.h")
Signed-off-by: Dave Airlie <airlied@redhat.com>
2024-04-26 13:55:49 +10:00
Dave Airlie
7fa043eafd drm/i915: fix build with missing debugfs includes
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:213:9: error: call to undeclared function 'debugfs_create_file_unsafe'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        return debugfs_create_file_unsafe(name, mode, parent, value,
               ^
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:213:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct dentry *' [-Wint-conversion]
        return debugfs_create_file_unsafe(name, mode, parent, value,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:222:9: error: call to undeclared function 'debugfs_create_file_unsafe'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        return debugfs_create_file_unsafe(name, mode, parent, value,
               ^
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/i915_debugfs_params.c:222:9: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct dentry *' [-Wint-conversion]
        return debugfs_create_file_unsafe(name, mode, parent, value,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Building with clang gave me a bunch of similiar fails to the above.

Fixes: 33d5ae6cacf4 ("drm/print: drop include debugfs.h and include where needed")
Signed-off-by: Dave Airlie <airlied@redhat.com>
2024-04-26 13:54:37 +10:00
Dave Airlie
90153b3666 Merge tag 'drm-misc-next-2024-04-25' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for v6.10-rc1:

UAPI Changes:

Cross-subsystem Changes:
- Devicetree updates for rockchip (#sound-dai-cells)
- Add dt bindings for new panels.
- Change bridge/tc358775 dt bindings.

Core Changes:
- Fix SIZE_HINTS cursor property doc.
- Parse topology blocks for all DispID < 2.0.
- Implement support for tracking cleared free memory, use it in amdgpu.
- Drop seq_file.h from drm_print.h, and include debugfs.h explicitly
  where needed (drivers).

Driver Changes:
- Small fixes to rockchip, panthor, v3d, bridge chaining, xlx.
- Add Khadas TS050 V2, EDO RM69380 OLED, CSOT MNB601LS1-1 panels,
- Add SAM9X7 SoC's LVDS controller.
- More driver conversions to struct drm_edid.
- Support tc358765 in tc358775 bridge.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1ab99848-8fb8-41a6-8967-c4ce6f3634fd@linux.intel.com
2024-04-26 13:29:04 +10:00
Dave Airlie
bbecb57e28 Two cleanups
- Drop .owner from platform_driver declaration of each exynos drm module.
 - Drop the cleanup code to device_node object in exynos_hdmi.c using
   the scope-based resource management feature[1].
 
 [1] https://lwn.net/Articles/934679/?ref=upstract.com
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEoxi+6c5pRPV/gdXcxWAb7Og/+bYFAmYptDkACgkQxWAb7Og/
 +bZl4gwAlYq5mvV0ywcMEqpZL+X0aJ6p2wUaBfYLlMGegEPf/q+jR/KDUipJfTfr
 YbP3JyT5XaY/ZDRzhLsajwziY8/i7FPdiwYmIqAt7gLu2Oblya8BbuTzCW6dZ6Fs
 cx1/xm0yrV8OPDWea2/XBVvu9Z0tPj7BJvMBtpjqm/ee/SRp5XwLnhe4m+lwJrhk
 PZyGkItFaoXwFx+pY6vIv+CUAvJQotKfab56asf4NDhvHyrD5TdV1IwMyyuyUiNp
 9bCgiJVXRVGBwR/Hr70lJZNbrP/MauafmWvwC8H+H+J+WYgNT1Y+0jbNNYtUyd7F
 kYKjuF3qIMnF8VnCNKaPX8iMnye+gHb85diEL1FF28HUUTh1pwps6Wvto+nlc7SF
 HmOBOZDZm6tzVyjLJFxUgbO9d7/2EHUu6Fr4WI+SJtD5eKdMHMDYLvOr1pX+Az/z
 jUIG3L30OTWop1/VJS7A6oJXJOe28wuW6mjJveBNk5a145Nhr992vJmAWsWRJsTB
 aKqeBNo4
 =k39J
 -----END PGP SIGNATURE-----

Merge tag 'exynos-drm-next-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

Two cleanups
- Drop .owner from platform_driver declaration of each exynos drm module.
- Drop the cleanup code to device_node object in exynos_hdmi.c using
  the scope-based resource management feature[1].

[1] https://lwn.net/Articles/934679/?ref=upstract.com

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Inki Dae <inki.dae@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240425034325.33507-1-inki.dae@samsung.com
2024-04-26 13:02:17 +10:00
Dave Airlie
bfed5b0257 Core Changes:
- Some DP/DP_MST DRM helpers (Imre)
 
 Driver Changes (i915 Display):
 - PLL refactoring (Ville)
 - Limit eDP MSO pipe only for display version 20 (Luca)
 - More display refactor towards independence from i915 dev_priv (Jani)
 - QGV/SAGV related refactor (Stanislav)
 - Few MTL/DSC and a UHBR monitor fix (Imre)
 - BXT/GLK per-lane vswing and PHY reg cleanup (Ville)
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAmYpM+8ACgkQ+mJfZA7r
 E8o/Wwf/SY+kzDhOfr+gsyOWxDKOjMO7rE4KIK0+XVKR1JkmuFA7ZiR9UFXnZfqc
 IvMzWs1Rc9fNL7JbC9tgFXW+G/uMjXvcTaLmmK0+DImwc5dkl2Nm1QhLdnkjoXPW
 Nm4XLZjbU22dYUZ5g5HZoFyWmBJueKm9vw1Lznr2ojuY9R8KZNssbjFLTVBgL/Ew
 OA8WjuCc6idPS697NeOtH1r8t3KvOBCeBIIYdOa8seBDAk2fyMfwgInCqGeJxQp8
 U1stBD4MwVWNrEXflgR/tSNQQwR304tSBwQ3TaSswV2Sh+4O3wdF6uQKOyQ/Cq+a
 80JPV0Tndw+OM11kYHO64yQ93MVBEw==
 =l8/D
 -----END PGP SIGNATURE-----

Merge tag 'drm-intel-next-2024-04-24' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-next

Core Changes:
- Some DP/DP_MST DRM helpers (Imre)

Driver Changes (i915 Display):
- PLL refactoring (Ville)
- Limit eDP MSO pipe only for display version 20 (Luca)
- More display refactor towards independence from i915 dev_priv (Jani)
- QGV/SAGV related refactor (Stanislav)
- Few MTL/DSC and a UHBR monitor fix (Imre)
- BXT/GLK per-lane vswing and PHY reg cleanup (Ville)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Zik0LKEtN1PwXXGb@intel.com
2024-04-26 09:07:28 +10:00
Jani Nikula
9e2b84fb6c drm/print: drop include seq_file.h
Never include where a forward declaration will suffice.

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240410141434.157908-2-jani.nikula@intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20240422121011.4133236-2-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2024-04-25 17:05:48 +03:00
Jani Nikula
33d5ae6cac drm/print: drop include debugfs.h and include where needed
Surprisingly many places depend on debugfs.h to be included via
drm_print.h. Fix them.

v3: Also fix armada, ite-it6505, imagination, msm, sti, vc4, and xe

v2: Also fix ivpu and vmwgfx

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240410141434.157908-1-jani.nikula@intel.com
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # drm/msm
Acked-by: Matt Coster <matt.coster@imgtec.com> # drm/imagination
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Robert Foss <rfoss@kernel.org> #drm/bridge
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240422121011.4133236-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2024-04-25 17:05:48 +03:00
Adam Ford
cbdbd9ca71
drm/bridge: imx: Fix unmet depenency for PHY_FSL_SAMSUNG_HDMI_PHY
When enabling i.MX8MP DWC HDMI driver, it automatically selects
PHY_FSL_SAMSUNG_HDMI_PHY, since it wont' work without the phy.
This may cause some Kconfig warnings during various build tests.
Fix this by implying the phy instead of selecting the phy.

To prevent this from happening with the DRM_IMX8MP_HDMI_PVI, also
imply it instead of selecting it.

Fixes: 1f36d634670d ("drm/bridge: imx: add bridge wrapper driver for i.MX8MP DWC HDMI")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404190103.lLm8LtuP-lkp@intel.com/
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240422103352.8886-1-aford173@gmail.com
2024-04-25 13:38:51 +02:00
Shivani Gupta
d65bfb9546
gpu: drm: exynos: hdmi: eliminate uses of of_node_put()
Utilize the __free() cleanup handler within the hdmi_get_phy_io function
to automatically release the device node when it is out of scope.
This eliminates the manual invocation of of_node_put(), reducing the
potential for memory leaks.

The modification requires initializing the device node at the beginning
of the function, ensuring that the automatic cleanup is safely executed.

Consequently, this removes the need for error cleanup paths that utilize
goto statements and the jump to out is no longer necessary.

Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Shivani Gupta <shivani07g@gmail.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:37:12 +09:00
Krzysztof Kozlowski
edb8e86711
drm/exynos: mixer: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:58 +09:00
Krzysztof Kozlowski
d6e733f2fb
drm/exynos: hdmi: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:58 +09:00
Krzysztof Kozlowski
c3147c08a2
drm/exynos: vidi: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:57 +09:00
Krzysztof Kozlowski
f57aa8addf
drm/exynos: scaler: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:57 +09:00
Krzysztof Kozlowski
2287ca5afb
drm/exynos: rotator: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:56 +09:00
Krzysztof Kozlowski
15b05e672b
drm/exynos: mic: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:56 +09:00
Krzysztof Kozlowski
1179513db8
drm/exynos: gsc: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:55 +09:00
Krzysztof Kozlowski
7d50e63b9a
drm/exynos: g2d: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:55 +09:00
Krzysztof Kozlowski
22cc6eb598
drm/exynos: dsi: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:54 +09:00
Krzysztof Kozlowski
272e6fe1f0
drm/exynos: fimd: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:54 +09:00
Krzysztof Kozlowski
4a34de85b3
drm/exynos: fimc: drop driver owner initialization
Core in platform_driver_register() already sets the .owner, so driver
does not need to.  Whatever is set here will be anyway overwritten by
main driver calling platform_driver_register().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2024-04-25 09:27:54 +09:00
Anatoliy Klymenko
1b5151bd3a drm: xlnx: zynqmp_dpsub: Set input live format
Program live video input format according to selected media bus format.

In the bridge mode of operation, DPSUB is connected to FPGA CRTC which
almost certainly supports a single media bus format as its output. Expect
this to be delivered via the new bridge atomic state. Program DPSUB
registers accordingly.

Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416-dp-live-fmt-v4-6-c7f379b7168e@amd.com
2024-04-24 17:51:19 +03:00
Anatoliy Klymenko
1836fd5ed9 drm: xlnx: zynqmp_dpsub: Minimize usage of global flag
Avoid usage of global zynqmp_dpsub.dma_enabled flag in DPSUB layer
context. This flag signals whether the driver runs in DRM CRTC or DRM
bridge mode, assuming that all display layers share the same live or
non-live mode of operation. Using per-layer mode instead of global flag
will simplify future support of the hybrid scenario.

Remove redundant checks in DMA request/release contexts as
zynqmp_disp_layer.info is well-defined for all layer types, including the
correct number of DMA channels required for each particular layer.

Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Tomi Valkeinen <tomi.valkainen@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416-dp-live-fmt-v4-5-c7f379b7168e@amd.com
2024-04-24 17:51:19 +03:00
Anatoliy Klymenko
b0f0469ab6 drm: xlnx: zynqmp_dpsub: Anounce supported input formats
DPSUB in bridge mode supports multiple input media bus formats.

Announce the list of supported input media bus formats via
drm_bridge.atomic_get_input_bus_fmts callback. Introduce a set of live
input formats supported by DPSUB. Add safeguards to format list functions
to prevent their misuse in the different layer modes contexts.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416-dp-live-fmt-v4-4-c7f379b7168e@amd.com
2024-04-24 17:51:18 +03:00
Anatoliy Klymenko
2e03666cbd drm: xlnx: zynqmp_dpsub: Add connected live layer helper
Add a helper function capturing the first connected live display layer
discovery logic.

Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Tomi Valkeinen <tomi.valkainen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416-dp-live-fmt-v4-3-c7f379b7168e@amd.com
2024-04-24 17:51:18 +03:00
Anatoliy Klymenko
8628274101 drm: xlnx: zynqmp_dpsub: Update live format defines
Update live format defines to match DPSUB AV_BUF_LIVE_VID_CONFIG register
layout. These defines were never referenced before, so no other changes
required.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416-dp-live-fmt-v4-2-c7f379b7168e@amd.com
2024-04-24 17:51:17 +03:00
Anatoliy Klymenko
67be30daa3 drm: xlnx: zynqmp_dpsub: Set layer mode during creation
Set layer mode of operation (live or dma-based) during layer creation.

Each DPSUB layer mode of operation is defined by corresponding DT node port
connection, so it is possible to assign it during layer object creation.
Previously it was set in layer enable functions, although it is too late
as setting layer format depends on layer mode, and should be done before
given layer enabled.

Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkainen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416-dp-live-fmt-v4-1-c7f379b7168e@amd.com
2024-04-24 17:51:16 +03:00
Krzysztof Kozlowski
5b5eab7173 drm/bridge: tc358764: drop driver owner assignment
Core in mipi_dsi_driver_register() already sets the .owner, so driver
does not need to.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240330202741.83867-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-04-24 12:42:45 +03:00
Krzysztof Kozlowski
d83d015bd4 drm/bridge: chipone-icn6211: drop driver owner assignment
Core in mipi_dsi_driver_register() already sets the .owner, so driver
does not need to.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240330202741.83867-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-04-24 12:42:45 +03:00
Barnabás Czémán
4edd73d174 drm/panel: jdi-fhd-r63452: make use of prepare_prev_first
The DSI host must be enabled for the panel to be initialized in
prepare(). Set the prepare_prev_first flag to guarantee this.

Signed-off-by: Barnabás Czémán <trabarni@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240423-jdi-fix-v1-1-808970662b40@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240423-jdi-fix-v1-1-808970662b40@gmail.com
2024-04-24 08:56:10 +02:00
Dmitry Baryshkov
14b3cdbd0e drm/bridge: adv7511: make it honour next bridge in DT
DT bindings for adv7511 and adv7533 bridges specify HDMI output to be
present at the port@1. This allows board DT to add e.g. HDMI connector
nodes or any other next chained bridge. Make adv7511 driver discover
that bridge and attach it to the chain.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240331-adv7511-next-bridge-v2-1-7356d61dc7b2@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240331-adv7511-next-bridge-v2-1-7356d61dc7b2@linaro.org
2024-04-24 08:55:44 +02:00
Dmitry Baryshkov
251e3c1fe1 drm/panel: visionox-rm69299: stop calling regulator_set_load manually
Use .init_load_uA part of the bulk regulator API instead of calling
register_set_load() manually.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240404-drop-panel-unregister-v1-6-9f56953c5fb9@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404-drop-panel-unregister-v1-6-9f56953c5fb9@linaro.org
2024-04-24 08:55:26 +02:00
Dmitry Baryshkov
a8ee5f50a9 drm/panel: novatek-nt36672a: stop calling regulator_set_load manually
Use .init_load_uA part of the bulk regulator API instead of calling
register_set_load() manually.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240404-drop-panel-unregister-v1-5-9f56953c5fb9@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404-drop-panel-unregister-v1-5-9f56953c5fb9@linaro.org
2024-04-24 08:55:26 +02:00
Dmitry Baryshkov
9dab1af1e7 drm/panel: novatek-nt36672e: stop calling regulator_set_load manually
Use .init_load_uA part of the bulk regulator API instead of calling
register_set_load() manually.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Link: https://lore.kernel.org/r/20240404-drop-panel-unregister-v1-4-9f56953c5fb9@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404-drop-panel-unregister-v1-4-9f56953c5fb9@linaro.org
2024-04-24 08:55:23 +02:00
Dmitry Baryshkov
302aeb9467 drm/panel: novatek-nt36672e: stop setting register load before disable
It is pointless to set register load before disabling the register. This
vote is going to be dropped as soon as the register is disabled. Drop
these register_set_load calls.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240404-drop-panel-unregister-v1-3-9f56953c5fb9@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404-drop-panel-unregister-v1-3-9f56953c5fb9@linaro.org
2024-04-24 08:55:22 +02:00
Dave Airlie
83221064c2 UAPI Changes:
- Remove unused flags (Francois Dugast)
 - Extend uAPI to query HuC micro-controler firmware version (Francois Dugast)
 - drm/xe/uapi: Define topology types as indexes rather than masks
   (Francois Dugast)
 - drm/xe/uapi: Restore flags VM_BIND_FLAG_READONLY and VM_BIND_FLAG_IMMEDIATE
   (Francois Dugast)
 - devcoredump updates. Some touching the output format.
   (José Roberto de Souza, Matthew Brost)
 - drm/xe/hwmon: Add infra to support card power and energy attributes
 - Improve LRC, HWSP and HWCTX error capture. (Maarten Lankhorst)
 - drm/xe/uapi: Add IP version and stepping to GT list query (Matt roper)
 - Invalidate userptr VMA on page pin fault (Matthew Brost)
 - Improve xe_bo_move tracepoint (Priyanka Danamudi)
 - Align fence output format in ftrace log
 
 Cross-driver Changes:
 - drm/i915/hwmon: Get rid of devm (Ashutosh Dixit)
   (Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>)
 - drm/i915/display: convert inner wakeref get towards get_if_in_use
   (SOB Rodrigo Vivi)
 - drm/i915: Convert intel_runtime_pm_get_noresume towards raw wakeref
   (Committer, SOB Jani Nikula)
 
 Driver Changes:
 - Fix for unneeded CCS metadata allocation (Akshata Jahagirdar)
 - Fix for fix multicast support for Xe_LP platforms (Andrzej Hajda)
 - A couple of build fixes (Arnd Bergmann)
 - Fix register definition (Ashutosh Dixit)
 - Add BMG mocs table (Balasubramani Vivekanandan)
 - Replace sprintf() across driver (Bommu Krishnaiah)
 - Add an xe2 workaround (Bommu Krishnaiah)
 - Makefile fix (Dafna Hirschfeld)
 - force_wake_get error value check (Daniele Ceraolo Spurio)
 - Handle GSCCS ER interrupt (Daniele Ceraolo Spurio)
 - GSC Workaround (Daniele Ceraolo Spurio)
 - Build error fix (Dawei Li)
 - drm/xe/gt: Add L3 bank mask to GT topology (Francois Dugast)
 - Implement xe2- and GuC workarounds (Gustavo Sousa, Haridhar Kalvala,
   Himal rasad Ghimiray, John Harrison, Matt Roper, Radhakrishna Sripada,
   Vinay Belgaumkar, Badal Nilawar)
 - xe2hpg compression (Himal Ghimiray Prasad)
 - Error code cleanups and fixes (Himal Prasad Ghimiray)
 - struct xe_device cleanup (Jani Nikula)
 - Avoid validating bos when only requesting an exec dma-fence
   (José Roberto de Souza)
 - Remove debug message from migrate_clear (José Roberto de Souza)
 - Nuke EXEC_QUEUE_FLAG_PERSISTENT leftover internal flag (José Roberto de Souza)
 - Mark dpt and related vma as uncached (Juha-Pekka Heikkila)
 - Hwmon updates (Karthik Poosa)
 - KConfig fix when ACPI_WMI selcted (Lu Yao)
 - Update intel_uncore_read*() return types (Luca Coelho)
 - Mocs updates (Lucas De Marchi, Matt Roper)
 - Drop dynamic load-balancing workaround (Lucas De Marchi)
 - Fix a PVC workaround (Lucas De Marchi)
 - Group live kunit tests into a single module (Lucas De Marchi)
 - Various code cleanups (Lucas De Marchi)
 - Fix a ggtt init error patch and move ggtt invalidate out of ggtt lock
   (Maarten Lankhorst)
 - Fix a bo leak (Marten Lankhorst)
 - Add LRC parsing for more GPU instructions (Matt Roper)
 - Add various definitions for hardware and IP (Matt Roper)
 - Define all possible engines in media IP descriptors (Matt Roper)
 - Various cleanups, asserts and code fixes (Matthew Auld)
 - Various cleanups and code fixes (Matthew Brost)
 - Increase VM_BIND number of per-ioctl Ops (Matthew Brost, Paulo Zanoni)
 - Don't support execlists in xe_gt_tlb_invalidation layer (Matthew Brost)
 - Handle timing out of already signaled jobs gracefully (Matthew Brost)
 - Pipeline evict / restore of pinned BOs during suspend / resume (Matthew Brost)
 - Do not grab forcewakes when issuing GGTT TLB invalidation via GuC
   (Matthew Brost)
 - Drop ggtt invalidate from display code (Matthew Brost)
 - drm/xe: Add XE_BO_GGTT_INVALIDATE flag (Matthew Brost)
 - Add debug messages for MMU notifier and VMA invalidate (Matthew Brost)
 - Use ordered wq for preempt fence waiting (Matthew Brost)
 - Initial development for SR-IOV support including some refactoring
   (Michal Wajdeczko)
 - Various GuC- and GT- related cleanups and fixes (Michal Wajdeczko)
 - Move userptr over to start using hmm_range_fault (Oak Zeng)
 - Add new PCI IDs to DG2 platform (Ravi Kumar Vodapalli)
 - Pcode - and VRAM initialization check update (Riana Tauro)
 - Large PM update including i915 display patches, and a fix for one of those.
   (Rodrigo Vivi)
 - Introduce performance tuning changes for Xe2_HPG (Shekhar Chauhan)
 - GSC / HDCP updates (Suraj Kandpal)
 - Minor code cleanup (Tejas Upadhyay)
 - Rework / fix rebind TLB flushing and move rebind into the drm_exec locking loop
   (Thomas Hellström)
 - Backmerge (Thomas Hellström)
 - GuC updates and fixes (Vinay Belgaumkar, Zhanjun Dong)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZiestQAKCRC4FpNVCsYG
 v8dLAQCDFUR7R5rwSdfqzNy+Djg+9ZgmtzVEfHZ+rI2lTReaCwEAhWeK7UooIMV0
 vGsSdsqGsJQm4VLRzE6H1yemCCQOBgM=
 =HouD
 -----END PGP SIGNATURE-----

Merge tag 'drm-xe-next-2024-04-23' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

UAPI Changes:
- Remove unused flags (Francois Dugast)
- Extend uAPI to query HuC micro-controler firmware version (Francois Dugast)
- drm/xe/uapi: Define topology types as indexes rather than masks
  (Francois Dugast)
- drm/xe/uapi: Restore flags VM_BIND_FLAG_READONLY and VM_BIND_FLAG_IMMEDIATE
  (Francois Dugast)
- devcoredump updates. Some touching the output format.
  (José Roberto de Souza, Matthew Brost)
- drm/xe/hwmon: Add infra to support card power and energy attributes
- Improve LRC, HWSP and HWCTX error capture. (Maarten Lankhorst)
- drm/xe/uapi: Add IP version and stepping to GT list query (Matt roper)
- Invalidate userptr VMA on page pin fault (Matthew Brost)
- Improve xe_bo_move tracepoint (Priyanka Danamudi)
- Align fence output format in ftrace log

Cross-driver Changes:
- drm/i915/hwmon: Get rid of devm (Ashutosh Dixit)
  (Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>)
- drm/i915/display: convert inner wakeref get towards get_if_in_use
  (SOB Rodrigo Vivi)
- drm/i915: Convert intel_runtime_pm_get_noresume towards raw wakeref
  (Committer, SOB Jani Nikula)

Driver Changes:
- Fix for unneeded CCS metadata allocation (Akshata Jahagirdar)
- Fix for fix multicast support for Xe_LP platforms (Andrzej Hajda)
- A couple of build fixes (Arnd Bergmann)
- Fix register definition (Ashutosh Dixit)
- Add BMG mocs table (Balasubramani Vivekanandan)
- Replace sprintf() across driver (Bommu Krishnaiah)
- Add an xe2 workaround (Bommu Krishnaiah)
- Makefile fix (Dafna Hirschfeld)
- force_wake_get error value check (Daniele Ceraolo Spurio)
- Handle GSCCS ER interrupt (Daniele Ceraolo Spurio)
- GSC Workaround (Daniele Ceraolo Spurio)
- Build error fix (Dawei Li)
- drm/xe/gt: Add L3 bank mask to GT topology (Francois Dugast)
- Implement xe2- and GuC workarounds (Gustavo Sousa, Haridhar Kalvala,
  Himal rasad Ghimiray, John Harrison, Matt Roper, Radhakrishna Sripada,
  Vinay Belgaumkar, Badal Nilawar)
- xe2hpg compression (Himal Ghimiray Prasad)
- Error code cleanups and fixes (Himal Prasad Ghimiray)
- struct xe_device cleanup (Jani Nikula)
- Avoid validating bos when only requesting an exec dma-fence
  (José Roberto de Souza)
- Remove debug message from migrate_clear (José Roberto de Souza)
- Nuke EXEC_QUEUE_FLAG_PERSISTENT leftover internal flag (José Roberto de Souza)
- Mark dpt and related vma as uncached (Juha-Pekka Heikkila)
- Hwmon updates (Karthik Poosa)
- KConfig fix when ACPI_WMI selcted (Lu Yao)
- Update intel_uncore_read*() return types (Luca Coelho)
- Mocs updates (Lucas De Marchi, Matt Roper)
- Drop dynamic load-balancing workaround (Lucas De Marchi)
- Fix a PVC workaround (Lucas De Marchi)
- Group live kunit tests into a single module (Lucas De Marchi)
- Various code cleanups (Lucas De Marchi)
- Fix a ggtt init error patch and move ggtt invalidate out of ggtt lock
  (Maarten Lankhorst)
- Fix a bo leak (Marten Lankhorst)
- Add LRC parsing for more GPU instructions (Matt Roper)
- Add various definitions for hardware and IP (Matt Roper)
- Define all possible engines in media IP descriptors (Matt Roper)
- Various cleanups, asserts and code fixes (Matthew Auld)
- Various cleanups and code fixes (Matthew Brost)
- Increase VM_BIND number of per-ioctl Ops (Matthew Brost, Paulo Zanoni)
- Don't support execlists in xe_gt_tlb_invalidation layer (Matthew Brost)
- Handle timing out of already signaled jobs gracefully (Matthew Brost)
- Pipeline evict / restore of pinned BOs during suspend / resume (Matthew Brost)
- Do not grab forcewakes when issuing GGTT TLB invalidation via GuC
  (Matthew Brost)
- Drop ggtt invalidate from display code (Matthew Brost)
- drm/xe: Add XE_BO_GGTT_INVALIDATE flag (Matthew Brost)
- Add debug messages for MMU notifier and VMA invalidate (Matthew Brost)
- Use ordered wq for preempt fence waiting (Matthew Brost)
- Initial development for SR-IOV support including some refactoring
  (Michal Wajdeczko)
- Various GuC- and GT- related cleanups and fixes (Michal Wajdeczko)
- Move userptr over to start using hmm_range_fault (Oak Zeng)
- Add new PCI IDs to DG2 platform (Ravi Kumar Vodapalli)
- Pcode - and VRAM initialization check update (Riana Tauro)
- Large PM update including i915 display patches, and a fix for one of those.
  (Rodrigo Vivi)
- Introduce performance tuning changes for Xe2_HPG (Shekhar Chauhan)
- GSC / HDCP updates (Suraj Kandpal)
- Minor code cleanup (Tejas Upadhyay)
- Rework / fix rebind TLB flushing and move rebind into the drm_exec locking loop
  (Thomas Hellström)
- Backmerge (Thomas Hellström)
- GuC updates and fixes (Vinay Belgaumkar, Zhanjun Dong)

Signed-off-by: Dave Airlie <airlied@redhat.com>

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZiestQAKCRC4FpNVCsYG
# v8dLAQCDFUR7R5rwSdfqzNy+Djg+9ZgmtzVEfHZ+rI2lTReaCwEAhWeK7UooIMV0
# vGsSdsqGsJQm4VLRzE6H1yemCCQOBgM=
# =HouD
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 23 Apr 2024 22:42:29 AEST
# gpg:                using EDDSA key 6C91433BC35A06E6BC762193B81693550AC606BF
# gpg: Can't check signature: No public key

# Conflicts:
#	drivers/gpu/drm/xe/xe_device_types.h
#	drivers/gpu/drm/xe/xe_vm.c
#	drivers/gpu/drm/xe/xe_vm_types.h
From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Zievlb1wvqDg1ovi@fedora
2024-04-24 10:51:29 +10:00
Maíra Canal
6abe93b621
drm/v3d: Fix race-condition between sysfs/fdinfo and interrupt handler
In V3D, the conclusion of a job is indicated by a IRQ. When a job
finishes, then we update the local and the global GPU stats of that
queue. But, while the GPU stats are being updated, a user might be
reading the stats from sysfs or fdinfo.

For example, on `gpu_stats_show()`, we could think about a scenario where
`v3d->queue[queue].start_ns != 0`, then an interrupt happens, we update
the value of `v3d->queue[queue].start_ns` to 0, we come back to
`gpu_stats_show()` to calculate `active_runtime` and now,
`active_runtime = timestamp`.

In this simple example, the user would see a spike in the queue usage,
that didn't match reality.

In order to address this issue properly, use a seqcount to protect read
and write sections of the code.

Fixes: 09a93cc4f7d1 ("drm/v3d: Implement show_fdinfo() callback for GPU usage stats")
Reported-by: Tvrtko Ursulin <tursulin@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240420213632.339941-7-mcanal@igalia.com
2024-04-23 19:32:49 -03:00
Maíra Canal
12d1624ce3
drm/v3d: Decouple stats calculation from printing
Create a function to decouple the stats calculation from the printing.
This will be useful in the next step when we add a seqcount to protect
the stats.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240420213632.339941-6-mcanal@igalia.com
2024-04-23 19:32:48 -03:00
Maíra Canal
da483d079b
drm/v3d: Create function to update a set of GPU stats
Given a set of GPU stats, that is, a `struct v3d_stats` related to a
queue in a given context, create a function that can update this set
of GPU stats.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240420213632.339941-5-mcanal@igalia.com
2024-04-23 19:32:47 -03:00
Maíra Canal
b136b1953f
drm/v3d: Create a struct to store the GPU stats
This will make it easier to instantiate the GPU stats variables and it
will create a structure where we can store all the variables that refer
to GPU stats.

Note that, when we created the struct `v3d_stats`, we renamed
`jobs_sent` to `jobs_completed`. This better express the semantics of
the variable, as we are only accounting jobs that have been completed.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240420213632.339941-4-mcanal@igalia.com
2024-04-23 19:32:46 -03:00
Maíra Canal
52ce97765c
drm/v3d: Create two functions to update all GPU stats variables
Currently, we manually perform all operations to update the GPU stats
variables. Apart from the code repetition, this is very prone to errors,
as we can see on commit 35f4f8c9fc97 ("drm/v3d: Don't increment
`enabled_ns` twice").

Therefore, create two functions to manage updating all GPU stats
variables. Now, the jobs only need to call for `v3d_job_update_stats()`
when the job is done and `v3d_job_start_stats()` when starting the job.

Co-developed-by: Tvrtko Ursulin <tursulin@igalia.com>
Signed-off-by: Tvrtko Ursulin <tursulin@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240420213632.339941-3-mcanal@igalia.com
2024-04-23 19:32:45 -03:00
Xuxin Xiong
a6325ad47b drm/panel-edp: Add panel CSOT MNB601LS1-1
Add support for the following panel:
CSOT MNB601LS1-1

Signed-off-by: Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240422060811.670693-1-xuxinxiong@huaqin.corp-partner.google.com
2024-04-23 09:44:30 -07:00
Tony Lindgren
ec710af54a
drm/bridge: tc358775: Configure hs_rate and lp_rate
The hs_rate and lp_rate may be used by the dsi host for timing
calculations. The tc358775 has a maximum bit rate of 1 Gbps/lane,
tc358765 has maximurate of 800 Mbps per lane.

Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-11-tony@atomide.com
2024-04-23 17:33:23 +02:00
Tony Lindgren
ce2196dbba
drm/bridge: tc358775: Add support for tc358765
The tc358775 bridge is pin compatible with earlier tc358765 according to
the tc358774xbg_datasheet_en_20190118.pdf documentation. Compared to the
tc358765, the tc358775 supports a STBY GPIO and higher data rates.

The tc358765 has a register bit for video event mode vs video pulse mode.
We must set it to video event mode for the LCD output to work, and on the
tc358775, this bit no longer exists.

Looks like the registers seem to match otherwise based on a quick glance
comparing the defines to the earlier Android kernel tc358765 driver.

Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-10-tony@atomide.com
2024-04-23 17:33:19 +02:00
Tony Lindgren
e2ee8e82cf
drm/bridge: tc358775: Enable pre_enable_prev_first flag
Set pre_enable_prev_first to ensure the previous bridge is enabled
first.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Tested-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-9-tony@atomide.com
2024-04-23 17:33:14 +02:00
Tony Lindgren
a4ed72e85c
drm/bridge: tc358775: Add burst and low-power modes
Burst and low-power modes are supported both for tc358765 and tc358775.

Reviewed-by: Michael Walle <mwalle@kernel.org>
Tested-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-8-tony@atomide.com
2024-04-23 17:33:03 +02:00
Tony Lindgren
005102727d
drm/bridge: tc358775: Get bridge data lanes instead of the DSI host lanes
The current code assumes the data-lanes property is configured on the
DSI host side instead of the bridge side, and assumes DSI host endpoint 1.

Let's standardize on what the other bridge drivers are doing and parse the
data-lanes property for the bridge. Only if data-lanes property is not found,
let's be nice and also check the DSI host for old dtb in use and warn.

And as Dmitry pointed out, the lanes for the host and the bridge may be
different because the lanes may be swapped on the host side.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-7-tony@atomide.com
2024-04-23 17:32:58 +02:00
Michael Walle
733daaebe2
drm/bridge: tc358775: make standby GPIO optional
The stby pin is optional. It is only needed for power-up and down
sequencing. It is not needed, if the power rails cannot by dynamically
enabled.

Because the GPIO is now optional, remove the error message.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-6-tony@atomide.com
2024-04-23 17:32:53 +02:00