Dominique Martinet
0d4b950e03
drm/bridge: imx8mp-hdmi-tx: allow 0.5% margin with selected clock
...
This allows the hdmi driver to pick e.g. 64.8MHz instead of 65Mhz when we
cannot output the exact frequency, enabling the imx8mp HDMI output to
support more modes
Tested-by: Adam Ford <aford173@gmail.com > #imx8mp-beacon
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de >
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de >
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240907-hdmi-tolerance-v2-1-b9d7abd89f5c@codewreck.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240907-hdmi-tolerance-v2-1-b9d7abd89f5c@codewreck.org
2024-09-13 10:10:16 +02:00
Fabio Estevam
8fdd9cb4f8
drm/bridge: imx8qxp-ldb: Switch to RUNTIME_PM_OPS()
...
Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.
This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.
Signed-off-by: Fabio Estevam <festevam@denx.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626230704.708234-6-festevam@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626230704.708234-6-festevam@gmail.com
2024-09-13 10:10:16 +02:00
Fabio Estevam
46fe7763c6
drm/bridge: dw-hdmi-cec: Switch to SYSTEM_SLEEP_PM_OPS()
...
Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
alternative.
The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.
This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.
Signed-off-by: Fabio Estevam <festevam@denx.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626230704.708234-5-festevam@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626230704.708234-5-festevam@gmail.com
2024-09-13 10:10:16 +02:00
Fabio Estevam
5de3c40a1d
drm/bridge: samsung-dsim: Switch to RUNTIME_PM_OPS()
...
Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.
This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.
Signed-off-by: Fabio Estevam <festevam@denx.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626230704.708234-4-festevam@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626230704.708234-4-festevam@gmail.com
2024-09-13 10:10:16 +02:00
Fabio Estevam
be227772f7
drm/bridge: imx8qxp-pixel-combiner: Switch to RUNTIME_PM_OPS()
...
Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.
This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.
Signed-off-by: Fabio Estevam <festevam@denx.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626230704.708234-3-festevam@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626230704.708234-3-festevam@gmail.com
2024-09-13 10:10:16 +02:00
Fabio Estevam
02b16c5236
drm/bridge: imx8qm-ldb: Switch to RUNTIME_PM_OPS()
...
Replace SET_RUNTIME_PM_OPS with its modern RUNTIME_PM_OPS() alternative.
The combined usage of pm_ptr() and RUNTIME_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.
This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.
Signed-off-by: Fabio Estevam <festevam@denx.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626230704.708234-2-festevam@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626230704.708234-2-festevam@gmail.com
2024-09-13 10:10:16 +02:00
Fabio Estevam
0177033706
drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS()
...
Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS()
alternative.
The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()
allows the compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.
This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.
Signed-off-by: Fabio Estevam <festevam@denx.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626230704.708234-1-festevam@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626230704.708234-1-festevam@gmail.com
2024-09-13 10:10:16 +02:00
Alexander Stein
0d317e820d
drm/bridge: tc358767: Support write-only registers
...
Most registers are read-writable, but some are only RO or even WO.
regmap does not support using readable_reg and wr_table when outputting
in debugfs, so switch to writeable_reg.
First check for RO or WO registers and fallback tc_readable_reg() for the
leftover RW registers.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Link: https://lore.kernel.org/r/20240904120546.1845856-4-alexander.stein@ew.tq-group.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240904120546.1845856-4-alexander.stein@ew.tq-group.com
2024-09-13 10:10:16 +02:00
Alexander Stein
31735a97cb
drm/bridge: tc358767: Only print GPIO debug output if they actually occur
...
Currently the output the following output is printed upon each interrupt:
tc358767 1-000f: GPIO0:
This spams the kernel log while debugging an IRQ storm from the bridge.
Only print the debug output if the GPIO hotplug event actually happened.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Robert Foss <rfoss@kernel.org >
Link: https://lore.kernel.org/r/20240904120546.1845856-3-alexander.stein@ew.tq-group.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240904120546.1845856-3-alexander.stein@ew.tq-group.com
2024-09-13 10:10:16 +02:00
Alexander Stein
446967304b
drm/bridge: tc358767: Use dev_err_probe
...
The function calls preceding these returns can return -EPROBE_DEFER. So
use dev_err_probe to add some information to
/sys/kernel/debug/devices_deferred
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20240904120546.1845856-2-alexander.stein@ew.tq-group.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240904120546.1845856-2-alexander.stein@ew.tq-group.com
2024-09-13 10:10:16 +02:00
Yan Zhao
9388ccf699
drm/bochs: use devm_ioremap_wc() to map framebuffer
...
Opt for devm_ioremap_wc() over devm_ioremap() when mapping the framebuffer.
Using devm_ioremap() results in the VA being mapped with PAT=UC-, which
considerably slows down drm_fb_memcpy(). In contrast, devm_ioremap_wc()
maps the VA with PAT set to WC, leading to better performance on platforms
where access to UC memory is much slower than WC memory.
Here's the performance data measured in a guest on the physical machine
"Sapphire Rapids XCC".
With host KVM honors guest PAT memory types, the effective memory type
for this framebuffer range is
- WC when devm_ioremap_wc() is used
- UC- when devm_ioremap() is used.
The data presented is an average from 10 execution runs.
Cycles: Avg cycles of executed bochs_primary_plane_helper_atomic_update()
from VM boot to GDM show up
Cnt: Avg cnt of executed bochs_primary_plane_helper_atomic_update()
from VM boot to GDM show up
T: Avg time of each bochs_primary_plane_helper_atomic_update().
-------------------------------------------------
| | devm_ioremap() | devm_ioremap_wc() |
|------------|----------------|-------------------|
| Cycles | 211.545M | 0.157M |
|------------|----------------|-------------------|
| Cnt | 142 | 1917 |
|------------|----------------|-------------------|
| T | 0.1748s | 0.0004s |
-------------------------------------------------
Note:
Following the rebase to [3], the previously reported GDM failure on the
VGA device [1] can no longer be reproduced, thanks to the memory management
improvements made in [2]. Despite this, I have proceeded to submit this
patch because of the noticeable performance improvements it provides.
Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com >
Closes: https://lore.kernel.org/all/87jzfutmfc.fsf@redhat.com/#t
Cc: Sean Christopherson <seanjc@google.com >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Kevin Tian <kevin.tian@intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Yan Zhao <yan.y.zhao@intel.com >
Link: https://lore.kernel.org/all/87jzfutmfc.fsf@redhat.com/#t [1]
Link: https://patchwork.freedesktop.org/series/138086 [2]
Link: https://gitlab.freedesktop.org/drm/misc/kernel/-/tree/drm-misc-next [3]
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com >
Tested-by: Thomas Zimmermann <tzimmermann@suse.de >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240909131643.28915-1-yan.y.zhao@intel.com
2024-09-13 08:35:46 +02:00
Steven Price
9d443deb04
drm/panthor: Display FW version information
...
The version number output when loading the firmware is actually the
interface version not the version of the firmware itself. Update the
message to make this clearer.
However, the firmware binary has a git SHA embedded into it which can be
used to identify which firmware binary is being loaded. So output this
as a drm_info() so that it's obvious from a dmesg log which firmware
binary is being used.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com >
Signed-off-by: Steven Price <steven.price@arm.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240906094025.638173-1-steven.price@arm.com
2024-09-12 09:33:25 +02:00
Jani Nikula
868cd000c1
drm/bridge: ti-sn65dsi86: annotate ti_sn_pwm_pin_{request, release} with __maybe_unused
...
Building with clang, W=1, CONFIG_PM=n and CONFIG_OF_GPIO=n leads to
warning about unused ti_sn_pwm_pin_request() and
ti_sn_pwm_pin_release(). Fix by annotating them with __maybe_unused.
See also commit 6863f5643d ("kbuild: allow Clang to find unused static
inline functions for W=1 build").
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/136ecd978aedd7df39d1b1c37b70596027ff0a3e.1725962479.git.jani.nikula@intel.com
2024-09-11 13:01:56 -07:00
Tejas Vipin
32e5666b8a
drm/panel: himax-hx83112a: transition to mipi_dsi wrapped functions
...
Changes the himax-hx83112a panel to use multi style functions for
improved error handling.
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240904141521.554451-1-tejasvipin76@gmail.com
2024-09-11 12:59:31 -07:00
Carlos Eduardo Gallo Filho
d219425604
drm/tests: Add test for drm_framebuffer_free()
...
Add a single KUnit test case for the drm_framebuffer_free function.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-10-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:11 +02:00
Carlos Eduardo Gallo Filho
2735d5e406
drm/tests: Add test for drm_framebuffer_init()
...
Add three KUnit test cases for the drm_framebuffer_init function:
1. Test if expected values are being set after drm_framebuffer_init() call.
2. Try to init a framebuffer without setting its format.
3. Try calling drm_framebuffer_init() with mismatch of the drm_device
passed at the first argument and the one pointed by fb->dev.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-9-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:10 +02:00
Carlos Eduardo Gallo Filho
3b3732b0d3
drm/tests: Add test for drm_framebuffer_lookup()
...
Add two KUnit test cases for the drm_framebuffer_lookup function, one
for the base case, that tests if the lookup finds the correct framebuffer
object and another that tests the lookup for an inexistent framebuffer.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-8-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:10 +02:00
Carlos Eduardo Gallo Filho
1bb74f6cc3
drm/tests: Add test for drm_framebuffer_cleanup()
...
Add a single KUnit test case for the drm_framebuffer_cleanup function.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-7-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:09 +02:00
Carlos Eduardo Gallo Filho
49cdbcbad6
drm/tests: Add test for drm_framebuffer_check_src_coords()
...
Add a parametrized test for the drm_framebuffer_check_src_coords function.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-6-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:08 +02:00
Carlos Eduardo Gallo Filho
fa90bc4988
drm/tests: Add test case for drm_internal_framebuffer_create()
...
Introduce a test to cover the creation of framebuffer with
modifier on a device that doesn't support it.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-5-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:08 +02:00
Carlos Eduardo Gallo Filho
80f48b7d77
drm/tests: Replace strcpy to strscpy on drm_test_framebuffer_create test
...
Replace the use of strcpy to strscpy on the test_to_desc of the
drm_test_framebuffer_create test for better security and reliability.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-4-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:07 +02:00
Carlos Eduardo Gallo Filho
e2b5f1da5f
drm/tests: Add parameters to the drm_test_framebuffer_create test
...
Extend the existing test case to cover:
1. Invalid flag atribute in the struct drm_mode_fb_cmd2.
2. Pixel format which requires non-linear modifier with
DRM_FORMAT_MOD_LINEAR set.
3. Buffer offset for inexistent plane
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-3-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:17:07 +02:00
Carlos Eduardo Gallo Filho
96d068ea0d
drm/tests: Stop using deprecated dev_private member on drm_framebuffer tests
...
The dev_private member of drm_device is deprecated and its use should
be avoided. Stop using it by embedding the drm_device onto a mock struct.
The new mock struct allows to share variables and even further mocks
over the tests in a cleaner way than using dev_private void pointer.
Also start using drm_kunit_helper_alloc_drm_device() for allocating
the drm_device mock.
Signed-off-by: Carlos Eduardo Gallo Filho <gcarlos@disroot.org >
Acked-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-2-gcarlos@disroot.org
Signed-off-by: Maxime Ripard <mripard@kernel.org >
2024-09-11 14:16:59 +02:00
Thomas Zimmermann
970b867d5b
drm/ast: Remove TX-chip bitmask
...
The CRTC has only one output attached to it. Store the output's type
of TX chip in a single field and remove the related bitmask.
Turn the type-less output field in struct ast_device into a union, as
only one of its fields will be used at a time.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240903132601.91618-1-tzimmermann@suse.de
2024-09-11 12:49:00 +02:00
Thomas Zimmermann
61b86391fb
Merge drm/drm-next into drm-misc-next
...
Backmerging to get fixes from v6.12-rc7.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
2024-09-11 09:48:49 +02:00
Simona Vetter
b615b9c36c
Merge v6.11-rc7 into drm-next
...
Thomas needs 5a498d4d06 ("drm/fbdev-dma: Only install deferred I/O
if necessary") in drm-misc, so start the backmerge cascade.
Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch >
2024-09-11 09:18:15 +02:00
Dave Airlie
cd4ea49599
Merge tag 'drm-misc-next-fixes-2024-09-05' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
...
Short summary of fixes pull:
tegra:
- Fix uninitialized variable in EDID code
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20240905113836.GA292407@linux.fritz.box
2024-09-11 13:21:59 +10:00
Dave Airlie
a436c77ea2
Merge tag 'exynos-drm-next-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
...
Three cleanups
- Drop stale exynos file pattern from MAINTAINERS file
The old "exynos" directory is removed from MAINTAINERS as Samsung Exynos display bindings have been relocated. This resolves a warning from get_maintainers.pl about no files matching the outdated directory.
- Constify struct exynos_drm_ipp_funcs
By making struct exynos_drm_ipp_funcs constant, the patch enhances security by moving the structure to a read-only section of memory. This change results in a slight reduction in the data section size.
- Remove unnecessary code
The function exynos_atomic_commit is removed as it became redundant after a previous update. This cleans up the code and eliminates unused function declarations.
One fixup
- Fix wrong assignment in gsc_bind()
A double assignment in gsc_bind() was flagged by the cocci tool and corrected to fix an incorrect assignment, addressing a potential issue introduced in a prior commit.
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Inki Dae <inki.dae@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240909004641.406858-1-inki.dae@samsung.com
2024-09-11 13:21:22 +10:00
Dave Airlie
741d73f587
Merge tag 'amd-drm-next-6.12-2024-09-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
...
amd-drm-next-6.12-2024-09-06:
amdgpu:
- IPS updates
- Post divider fix
- DML2 updates
- Misc static checker fixes
- DCN 3.5 fixes
- Replay fixes
- DMCUB updates
- SWSMU fixes
- DP MST fixes
- Add debug flag for per queue resets
- devcoredump updates
- SR-IOV fixes
- MES fixes
- Always allocate cleared VRAM for GEM
- Pipe reset for GC 9.4.3
- ODM policy fixes
- Per queue reset support for GC 10
- Per queue reset support for GC 11
- Per queue reset support for GC 12
- Display flickering fixes
- MPO fixes
- Display sharpening updates
amdkfd:
- SVM fix for IH for APUs
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240906211008.3072097-1-alexander.deucher@amd.com
2024-09-11 11:22:47 +10:00
Dave Airlie
32bd3eb5fb
Merge tag 'drm-intel-gt-next-2024-09-06' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
...
Driver Changes:
- Expose fan speed via hwmon (Raag)
- Correction to Wa_14019159160 on ARL (John H)
- Whitelist COMMON_SLICE_CHICKEN1 for UMD access on DG2/MTL/ARL (Dnyaneshwar)
- Do not attempt to load the GSC multiple times to avoid hanging GSC HW (Daniele)
- Populate /sys/class/drm/cardX/engines/ even if one engine fails (Andi)
- Use kmemdup_array instead of kmemdup for multiple allocation (Yu)
- Remove extra unlikely() (Hongbo)
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/Ztrfr_Wuurfa-3Rv@jlahtine-mobl.ger.corp.intel.com
2024-09-11 09:11:54 +10:00
Tejas Vipin
f327bfdbf6
drm/panel: samsung-s6e3fa7: transition to mipi_dsi wrapped functions
...
Changes the samsung-s6e3fa7 panel to use multi style functions for
improved error handling.
Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240902071019.351158-1-tejasvipin76@gmail.com
2024-09-10 14:23:33 -07:00
Dave Airlie
2ef8d63da8
Merge tag 'drm-xe-next-2024-09-05' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
...
Cross-subsystem Changes:
- Split dma fence array creation into alloc and arm (Matthew Brost)
Driver Changes:
- Move kernel_lrc to execlist backend (Ilia)
- Fix type width for pcode coommand (Karthik)
- Make xe_drm.h include unambiguous (Jani)
- Fixes and debug improvements for GSC load (Daniele)
- Track resources and VF state by PF (Michal Wajdeczko)
- Fix memory leak on error path (Nirmoy)
- Cleanup header includes (Matt Roper)
- Move pcode logic to tile scope (Matt Roper)
- Move hwmon logic to device scope (Matt Roper)
- Fix media TLB invalidation (Matthew Brost)
- Threshold config fixes for PF (Michal Wajdeczko)
- Remove extra "[drm]" from logs (Michal Wajdeczko)
- Add missing runtime ref (Rodrigo Vivi)
- Fix circular locking on runtime suspend (Rodrigo Vivi)
- Fix rpm in TTM swapout path (Thomas)
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/eirx5vdvoflbbqlrzi5cip6bpu3zjojm2pxseufu3rlq4pp6xv@eytjvhizfyu6
2024-09-10 13:18:00 +10:00
Dave Stevenson
7ab6512e79
drm/vc4: hvs: Correct logic on stopping an HVS channel
...
When factoring out __vc4_hvs_stop_channel, the logic got inverted from
if (condition)
// stop channel
to
if (condition)
goto out
//stop channel
out:
and also changed the exact register writes used to stop the channel.
Correct the logic so that the channel is actually stopped, and revert
to the original register writes.
Fixes: 6d01a106b4 ("drm/vc4: crtc: Move HVS init and close to a function")
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-32-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:54 +01:00
Tim Gover
886a79237e
drm/vc4: hvs: Enable SCALER_CONTROL early in HVS init
...
Always enable SCALER_CONTROL before attempting other HVS
operations. It's safe to write to some parts of the HVS but
in general it's dangerous to do this because it can cause bus
lockups.
Signed-off-by: Tim Gover <tim.gover@raspberrypi.com >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-31-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:54 +01:00
Dave Stevenson
8e7eb0c54a
drm/vc4: plane: Move the buffer offset out of the vc4_plane_state
...
The offset fields in vc4_plane_state are described as being
the offset for each buffer in the bo, however it is used to
store the complete DMA address that is then written into the
register.
The DMA address including the fb ofset can be retrieved
using drm_fb_dma_get_gem_addr, and the offset adjustment due to
clipping is local to vc4_plane_mode_set.
Drop the offset field from the state, and compute the complete
DMA address in vc4_plane_mode_set.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-30-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:54 +01:00
Maxime Ripard
7621db4d40
drm/vc4: hvs: Change prototype of __vc4_hvs_alloc to pass registers
...
The BCM2712 HVS has registers to report the size of the various SRAM the
driver uses, and their size actually differ depending on the stepping.
The initialisation of the memory pools happen in the __vc4_hvs_alloc()
function that also allocates the main HVS structure, that will then hold
the pointer to the memory mapping of the registers.
This creates some kind of circular dependency that we can break by
passing the mapping pointer as an argument for __vc4_hvs_alloc() to use
to query to get the SRAM sizes and initialise the memory pools
accordingly.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-29-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:54 +01:00
Maxime Ripard
74c3b7c63b
drm/vc4: hvs: Rework LBM alignment
...
With the introduction of the support for BCM2712, the check of whether
we're running on vc5 or not to compute the LBM alignment requirement
doesn't work anymore.
Moreover, the LBM size will need to be computed in words for the
BCM2712, while we've had sizes in bytes so far.
Aligning on either 64 or 32 words is thus fairly harmful on BCM2712, so
let's just explicitly align the size when needed, and then call
drm_mm_insert_node_generic() with an alignment of 1.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-28-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:54 +01:00
Maxime Ripard
efbc7b9c21
drm/vc4: plane: Change ptr0_offset to an array
...
The BCM2712 will have a fairly different dlist, that will feature one
Pointer 0 word for each plane.
Let's prepare by changing the ptr0_offset variable that holds the offset
in a dlist of the pointer 0 word to an array.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-27-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:54 +01:00
Maxime Ripard
295fbb059f
drm/vc4: hvs: Rename hvs_regs list
...
The HVS register set has been heavily modified in the BCM2712, and we'll
thus need a separate debugfs_reg32 array for it.
The name hvs_regs is thus a bit too generic, so let's rename it to
something more specific.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-26-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Maxime Ripard
808f4055a1
drm/vc4: hvs: Create cob_init function
...
Just like the HVS itself, the COB parameters will be fairly different in
the BCM2712.
Let's move the COB parameters computation and its initialisation to a
separate function that will be easier to extend in the future.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-25-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Maxime Ripard
2fa4ef5fb9
drm/vc4: hvs: Create hw_init function
...
Since the BCM2712 will feature a significantly different HVS, let's move
the hardware initialisation part of our bind function into a separate
function.
That way, it will be easier to extend in the future.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-24-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Maxime Ripard
c157ff40a4
drm/vc4: hvs: Use switch statement to simplify vc4_hvs_get_fifo_from_output
...
Since we'll support BCM2712 soon, let's move the logic behind
vc4_hvs_get_fifo_from_output() to a switch to extend it more easily.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-23-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Maxime Ripard
dbe8ef676f
drm/vc4: Make v3d paths unavailable on any generation newer than vc4
...
The V3D IP has been separate since BCM2711, so let's make sure we issue
a WARN if we're running not only on BCM2711, but also anything newer.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-22-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Maxime Ripard
24c5ed3ddf
drm/vc4: Introduce generation number enum
...
With the introduction of the BCM2712 support, we will get yet another
generation of display engine to support.
The binary check of whether it's VC5 or not thus doesn't work anymore,
especially since some parts of the driver will have changed with BCM2711,
and some others with BCM2712.
Let's introduce an enum to store the generation the driver is running
on, which should provide more flexibility.
Signed-off-by: Maxime Ripard <mripard@kernel.org >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-21-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Dom Cobley
1330d28d75
drm/vc4: hvs: Remove ABORT_ON_EMPTY flag
...
ABORT_ON_EMPTY chooses whether the HVS abandons the current frame
when it experiences an underflow, or attempts to continue.
In theory the frame should be black from the point of underflow,
compared to a shift of sebsequent pixels to the left.
Unfortunately it seems to put the HVS is a bad state where it is not
possible to recover simply. This typically requires a reboot
following the 'flip done timed out message'.
Discussion with Broadcom has suggested we don't use this flag.
All their testing is done with it disabled.
Additionally setting BLANK_INSERT_EN causes the HDMI to output
blank pixels on an underflow which avoids it losing sync.
After this change a 'flip done timed out' due to sdram bandwidth
starvation or too low a clock is recoverable once the situation improves.
Signed-off-by: Dom Cobley <popcornmix@gmail.com >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-20-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Dave Stevenson
d285bb622e
drm/vc4: hvs: Remove incorrect limit from hvs_dlist debugfs function
...
The debugfs function to dump dlists aborted at 256 bytes,
when actually the dlist memory is generally significantly
larger but varies based on SoC.
We already have the correct limit in __vc4_hvs_alloc, so
store it for use in the debugfs dlist function.
Fixes: c6dac00340 ("drm/vc4: hvs: Add debugfs node that dumps the current display lists")
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-19-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Dave Stevenson
6d5f76e054
drm/vc4: hvs: Fix dlist debug not resetting the next entry pointer
...
The debug function to display the dlists didn't reset next_entry_start
when starting each display, so resulting in not stopping the
list at the correct place.
Fixes: c6dac00340 ("drm/vc4: hvs: Add debugfs node that dumps the current display lists")
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-18-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Dom Cobley
223ee2567a
drm/vc4: hdmi: Avoid hang with debug registers when suspended
...
Trying to read /sys/kernel/debug/dri/1/hdmi1_regs
when the hdmi is disconnected results in a fatal system hang.
This is due to the pm suspend code disabling the dvp clock.
That is just a gate of the 108MHz clock in DVP_HT_RPI_MISC_CONFIG,
which results in accesses hanging AXI bus.
Protect against this.
Fixes: 25eb441d55 ("drm/vc4: hdmi: Add all the vc5 HDMI registers into the debugfs dumps")
Signed-off-by: Dom Cobley <popcornmix@gmail.com >
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-17-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Dave Stevenson
542962190e
drm/vc4: plane: YUV planes require vertical scaling to always be enabled
...
It has been observed that a YUV422 unity scaled plane isn't displayed.
Enabling vertical scaling on the UV planes solves this. There is
already a similar clause to always enable horizontal scaling on the
UV planes.
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-16-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00
Dave Stevenson
52efe364d1
drm/vc4: hvs: Don't write gamma luts on 2711
...
The gamma block has changed in 2711, therefore writing the lut
in vc4_hvs_lut_load is incorrect.
Whilst the gamma property isn't created for 2711, it is called
from vc4_hvs_init_channel, so abort if attempted.
Fixes: c54619b0bf ("drm/vc4: Add support for the BCM2711 HVS5")
Reviewed-by: Maxime Ripard <mripard@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-15-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-09-09 13:02:53 +01:00