Karol Wachowski
5eaa497411
accel/ivpu: Prevent recovery invocation during probe and resume
...
Refactor IPC send and receive functions to allow correct
handling of operations that should not trigger a recovery process.
Expose ivpu_send_receive_internal(), which is now utilized by the D0i3
entry, DCT initialization, and HWS initialization functions.
These functions have been modified to return error codes gracefully,
rather than initiating recovery.
The updated functions are invoked within ivpu_probe() and ivpu_resume(),
ensuring that any errors encountered during these stages result in a proper
teardown or shutdown sequence. The previous approach of triggering recovery
within these functions could lead to a race condition, potentially causing
undefined behavior and kernel crashes due to null pointer dereferences.
Fixes: 45e45362e0 ("accel/ivpu: Introduce ivpu_ipc_send_receive_active()")
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-23-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:39 +02:00
Andrzej Kacprowski
541a137254
accel/ivpu: Fix reset_engine debugfs file logic
...
The current reset_engine implementation unconditionally resets
all engines. Improve implementation to reset only the engine
requested by the user space to allow more granular testing.
Also use DEFINE_DEBUGFS_ATTRIBUTE() to simplify implementation.
Same changes applied to resume_engine debugfs file for consistency.
Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-22-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:39 +02:00
Karol Wachowski
8c3c5f8437
accel/ivpu: Remove skip of clock own resource ack on Simics
...
With recent Simics model update CLOCK_RESOURCE_OWN_ACK signal
was implemented as part of VPU STATUS register and workaround
is no longer needed.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-21-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:39 +02:00
Andrzej Kacprowski
7459211aa6
accel/ivpu: Add test_mode bit to force turbo
...
Add new test_mode BIT(9) that forces firmware to
enable turbo burst mode.
Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-20-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:39 +02:00
Tomasz Rusinowicz
c3b0ec0fe0
accel/ivpu: Make DB_ID and JOB_ID allocations incremental
...
Save last used ID and use it to limit the possible values
for the ID. This should decrease the rate at which the IDs
are reused, which will make debugging easier.
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-19-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:39 +02:00
Karol Wachowski
3886f9440a
accel/ivpu: Print JSM message result in case of error
...
Change debug message to error level in case of receiving
non-successful result of JSM message.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-18-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:39 +02:00
Jacek Lawrynowicz
436b67d693
accel/ivpu: Add auto selection logic for job scheduler
...
Add ivpu_fw_sched_mode_select() function that can select scheduling mode
based on HW and FW versions. This prepares for a switch to HWS on
selected platforms.
Reviewed-by: Karol Wachowski <karol.wachowski@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-17-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Karol Wachowski
707542dd1a
accel/ivpu: Add one jiffy to bo_wait_ioctl timeout value
...
Add one jiffy to ensure wait function never times out before
intended timeout value, which could happen if absolute timeout value
is less than (1s / CONFIG_HZ) in the future.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-16-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Andrzej Kacprowski
9f3814e822
accel/ivpu: Allow reading dvfs_mode debugfs file
...
Make the dvfs_mode read-write to allow checking current mode.
Simplify the dvfs_mode implementation with the DEFINE_DEBUGFS_ATTRIBUTE.
Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-15-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Karol Wachowski
378ed3b64d
accel/ivpu: Remove 1-tile power up Simics workaround
...
Previously Simics was not providing workpoint for configurations
with 0 tiles enabled, that had to be worked around in the KMD.
This got fixed in Simics and workaround is no longer needed.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-14-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Jacek Lawrynowicz
e38501cee5
accel/ivpu: Stop using hardcoded DRIVER_DATE
...
Hardcoded driver date is useless, so use kernel version as a driver date
to make identifying .ko file easier. Also allow to pass DRIVER_DATE
on build time to allow versioning the driver in case it is built out
of the tree.
Reviewed-by: Karol Wachowski <karol.wachowski@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-13-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Karol Wachowski
2baf2143dd
accel/ivpu: Add FW version debugfs entry
...
Add debugfs that prints current firmware version string on read.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-12-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Karol Wachowski
03b3b6657d
accel/ivpu: Turn on autosuspend on Simics
...
With recent Simics update DVFS flows using cdyn were fixed
and it is possible to enable D0i3/D3 entry flows on autosuspend.
Set autosuspend timeout to 100 ms by default on Simics.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-11-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Karol Wachowski
525a3858aa
accel/ivpu: Set 500 ns delay between power island TRICKLE and ENABLE
...
Follow HW documentation recommendation of 500 ns delay between setting
AON_PWR_ISLAND_TRICKLE_EN and AON_PWR_ISLAND_EN registers during power
island enabling. Previously this was only done correctly for VPU 4+.
VPU 3.7 had the delay added after power island disable where it is not
needed.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-10-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Tomasz Rusinowicz
5e162f872d
accel/ivpu: Add FW state dump on TDR
...
Send JSM state dump message at the beginning of TDR handler. This allows
FW to collect debug info in the FW log before the state of the NPU is
lost allowing to analyze the cause of a TDR.
Wait a predefined timeout (10 ms) so the FW has a chance to write debug
logs. We cannot wait for JSM response at this point because IRQs are
already disabled before TDR handler is invoked.
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-9-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Karol Wachowski
bade034052
accel/ivpu: Add coredump support
...
Use coredump (if available) to collect FW logs in case of a FW crash.
This makes dmesg more readable and allows to collect more log data.
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-8-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:38 +02:00
Jacek Lawrynowicz
990b1e3d15
accel/ivpu: Limit FW version string length
...
Limit FW version string, when parsing FW binary, to 256 bytes and
always add NULL-terminate it.
Reviewed-by: Karol Wachowski <karol.wachowski@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-7-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:44:05 +02:00
Jacek Lawrynowicz
4bc988b470
accel/ivpu: Fix fw log printing
...
- Fix empty log detection that couldn't work without read_wrap_count
- Start printing wrapped log from correct position (log_start)
- Properly handle logs that are wrapped multiple times in reference
to reader position
- Don't add a newline when log buffer is wrapped
- Always add a newline after printing a log buffer in case log does
not end with one
Reviewed-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-6-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:43:49 +02:00
Jacek Lawrynowicz
1fc1251149
accel/ivpu: Refactor functions in ivpu_fw_log.c
...
Make function names more consistent and (arguably) readable in
fw log code. Add fw_log_print_all_in_bo() that remove duplicated code in
ivpu_fw_log_print().
Reviewed-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-5-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:35:58 +02:00
Tomasz Rusinowicz
4b4d9e394b
accel/ivpu: Reset fw log on cold boot
...
Add ivpu_fw_log_reset() that resets the read_index of all FW logs
on cold boot so logs are properly read.
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-4-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:35:58 +02:00
Jacek Lawrynowicz
3a3fb8110c
accel/ivpu: Rename ivpu_log_level to fw_log_level
...
Rename module param ivpu_log_level to fw_log_level, so it is clear
what log level is actually changed.
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com >
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-3-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:35:58 +02:00
Andrzej Kacprowski
a4293cc753
accel/ivpu: Update VPU FW API headers
...
This commit bumps:
- Boot API from 3.24.0 to 3.26.3
- JSM API from 3.16.0 to 3.25.0
Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com >
Co-developed-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com >
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-2-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com >
2024-10-11 12:35:55 +02:00
Dzmitry Sankouski
33c2553126
drm/mipi-dsi: fix kernel doc on mipi_dsi_compression_mode_multi
...
Replace dsi parameter on ctx in kernel doc of
mipi_dsi_compression_mode_multi function.
Fixes: 975bdea8c4 ("drm/mipi-dsi: add mipi_dsi_compression_mode_multi")
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202410092245.tfsuUllL-lkp@intel.com/
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20241010-starqltechn_integration_upstream_drm_fix-v1-1-cf3cb1d1ce77@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241010-starqltechn_integration_upstream_drm_fix-v1-1-cf3cb1d1ce77@gmail.com
2024-10-10 14:22:43 +02:00
Brahmajit Das
a500f3751d
drm/display: Fix building with GCC 15
...
GCC 15 enables -Werror=unterminated-string-initialization by default.
This results in the following build error
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c: In function ‘is_hdmi_adaptor’:
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c:164:17: error: initializer-string for array of
‘char’ is too long [-Werror=unterminated-string-initialization]
164 | "DP-HDMI ADAPTOR\x04";
| ^~~~~~~~~~~~~~~~~~~~~
After discussion with Ville, the fix was to increase the size of
dp_dual_mode_hdmi_id array by one, so that it can accommodate the NULL
line character. This should let us build the kernel with GCC 15.
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241002092311.942822-1-brahmajit.xyz@gmail.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-10-10 14:56:46 +03:00
Thomas Zimmermann
2d6d8b138f
drm/bochs: Return error from correct pointer
...
In probe, return the error code from the variable bochs, not dev. The
variable dev has not been initialized at this point. In the case of an
allocation error, the returned value would have been undefined.
Reported-by: Kees Bakker <kees@ijzerbout.nl >
Closes: https://lore.kernel.org/dri-devel/8c5bfc12-cbcc-4102-9826-494060df4179@ijzerbout.nl/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Fixes: 04826f5886 ("drm/bochs: Allocate DRM device in struct bochs_device")
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: virtualization@lists.linux.dev
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241004075404.41743-1-tzimmermann@suse.de
2024-10-10 09:03:21 +02:00
Aleksandrs Vinarskis
6b3815c681
drm/edp-panel: Add panels used by Dell XPS 13 9345
...
Introduce low-res IPS and OLED panels for mentioned device.
SHP panel's timings were picked experimentally, without this patch or with
`delay_200_500_e50` panel sometimes fails to boot/stays black on startup.
LGD panel's timings were copied from other LGD panels and tested to be
working.
Particular laptop also comes in high-res IPS variant, which unfortunately
I do not have access to verify.
The raw edid for SHP panel is:
00 ff ff ff ff ff ff 00 4d 10 93 15 00 00 00 00
2c 21 01 04 a5 1d 12 78 07 ee 95 a3 54 4c 99 26
0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 f0 7b 80 90 70 b0 52 45 30 20
36 00 20 b4 10 00 00 18 00 00 00 fd 00 1e 78 9a
9a 20 01 0a 20 20 20 20 20 20 00 00 00 fe 00 4b
4a 46 47 52 80 4c 51 31 33 34 4e 31 00 00 00 00
00 02 41 0c 32 00 01 00 00 0b 41 0a 20 20 01 ef
70 20 79 02 00 20 00 13 8c 52 19 93 15 00 00 00
00 2c 17 07 4c 51 31 33 34 4e 31 21 00 1d 40 0b
08 07 80 07 b0 04 88 3d 8a 54 cd a4 99 66 62 0f
02 45 54 d0 5f d0 5f 00 34 12 78 26 00 09 02 00
00 00 00 00 01 00 00 22 00 14 5e d7 04 05 7f 07
8f 00 2f 00 1f 00 af 04 50 00 02 00 05 00 25 01
09 5e d7 04 5e d7 04 1e 78 80 81 00 0b e3 05 80
00 e6 06 01 01 6a 6a 39 00 00 00 00 00 00 ce 90
The raw edid for LGD panel is:
00 ff ff ff ff ff ff 00 30 e4 78 07 00 00 00 00
00 22 01 04 b5 1d 12 78 06 96 65 b0 4f 3c b9 23
0b 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 ef 83 40 a0 b0 08 34 70 30 20
36 00 20 b4 10 00 00 1a 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 fe 00 44
48 39 50 57 80 31 33 34 57 54 31 0a 00 00 00 00
00 04 04 03 28 00 01 00 00 2b 01 0a 20 20 01 d4
70 20 79 02 00 20 00 13 3c e6 24 78 07 00 00 00
00 00 18 07 31 33 34 57 54 31 0a 21 00 1d 41 0b
08 07 40 0b 08 07 88 06 6b 4f c3 a3 b9 35 82 0b
02 45 54 40 5e 1a 60 18 10 23 78 26 00 09 04 00
00 00 00 00 41 00 00 22 00 14 55 27 05 85 3f 0b
9f 00 2f 80 1f 00 07 07 33 00 02 00 05 00 25 01
09 55 27 05 55 27 05 3c 3c 00 81 00 0b e3 05 80
00 e6 06 05 01 6d 60 02 00 00 00 00 00 00 31 90
Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com >
Tested-by: Peter de Kraker <peterdekraker@umito.nl >
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241008073014.16411-1-alex.vinarskis@gmail.com
2024-10-09 12:20:35 -07:00
R Sundar
4c93ede2b0
drm: Fix for kernel doc warning
...
Added colon in kernel-doc comment to fix the warning.
./include/drm/drm_drv.h:372: warning: Incorrect use of kernel-doc format: * @fbdev_probe
./include/drm/drm_drv.h:435: warning: Function parameter or struct member 'fbdev_probe' not described in 'drm_driver'
Signed-off-by: R Sundar <prosunofficial@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241003023806.17537-1-prosunofficial@gmail.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-10-09 18:31:38 +03:00
Jani Nikula
3639fadc7e
drm/imx: add forward declarations for types
...
The imx.h header does not forward declare the types it uses, and the
header is not self-contained. Fix it.
Fixes: cc3e8a216d ("drm/imx: add internal bridge handling display-timings DT node")
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241009140452.1981175-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-10-09 17:39:49 +03:00
Jani Nikula
c3e91446a3
drm/file: fix client_name_lock kernel-doc warning
...
It's client_name_lock, not name_lock. Also unify style while at it.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Closes: https://lore.kernel.org/r/20241009172650.29169e6f@canb.auug.org.au
Fixes: 56c594d8df ("drm: add DRM_SET_CLIENT_NAME ioctl")
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241009140300.1980746-1-jani.nikula@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2024-10-09 16:30:37 +02:00
Christian König
02c50fa60c
drm/writeback: remove pointless enable_signaling implementation
...
Just returning true here is a no-op, remove the optional callback.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911085903.1496-4-christian.koenig@amd.com
2024-10-09 14:23:37 +02:00
Christian König
4dc1aacc44
dma-buf/sw_sync: remove pointless enable_signaling implementation
...
Just returning true here is a no-op, remove the optional callback.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911085903.1496-3-christian.koenig@amd.com
2024-10-09 14:23:17 +02:00
Christian König
967d226eaa
dma-buf: add WARN_ON() illegal dma-fence signaling
...
Calling the signaling a NULL fence is obviously a coding error in a
driver. Those functions unfortunately just returned silently without
raising a warning.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911085903.1496-2-christian.koenig@amd.com
2024-10-09 14:22:49 +02:00
Thomas Hellström
4cce1373c1
drm/ttm: Move pinned objects off LRU lists when pinning
...
The ttm_bo_pin() and ttm_bo_unpin() functions weren't moving their
resources off the LRU list to the unevictable list.
Make sure that happens so that pinned objects don't accidently linger
on the LRU lists, and also make sure to move them back once they
are unpinned.
v2:
- Removing from a bulk move must be done with the pin-count still zero.
v3:
- ttm_resource_move_to_lru_tail must be done after pinning with a non-
NULL resource (Intel CI).
v6:
- Use a TAB instead of space (checkpatch.pl error).
Cc: Christian König <christian.koenig@amd.com >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: <dri-devel@lists.freedesktop.org >
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911121859.85387-3-thomas.hellstrom@linux.intel.com
2024-10-09 13:41:30 +02:00
Thomas Hellström
fc5d96670e
drm/ttm: Move swapped objects off the manager's LRU list
...
Resources of swapped objects remains on the TTM_PL_SYSTEM manager's
LRU list, which is bad for the LRU walk efficiency.
Rename the device-wide "pinned" list to "unevictable" and move
also resources of swapped-out objects to that list.
An alternative would be to create an "UNEVICTABLE" priority to
be able to keep the pinned- and swapped objects on their
respective manager's LRU without affecting the LRU walk efficiency.
v2:
- Remove a bogus WARN_ON (Christian König)
- Update ttm_resource_[add|del] bulk move (Christian König)
- Fix TTM KUNIT tests (Intel CI)
v3:
- Check for non-NULL bo->resource in ttm_bo_populate().
v4:
- Don't move to LRU tail during swapout until the resource
is properly swapped or there was a swapout failure.
(Intel Ci)
- Add a newline after checkpatch check.
v5:
- Introduce ttm_resource_is_swapped() to avoid a corner-case where
a newly created resource was considered swapped. (Intel CI)
v6:
- Move an assert.
Cc: Christian König <christian.koenig@amd.com >
Cc: Matthew Brost <matthew.brost@intel.com >
Cc: <dri-devel@lists.freedesktop.org >
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240911121859.85387-2-thomas.hellstrom@linux.intel.com
2024-10-09 13:41:30 +02:00
Dave Stevenson
42aa18d1c3
drm/vc4: Correct generation check in vc4_hvs_lut_load
...
Commit 24c5ed3ddf ("drm/vc4: Introduce generation number enum")
incorrectly swapped a check of hvs->vc4->is_vc5 to
hvs->vc4->gen == VC4_GEN_4 in vc4_hvs_lut_load, hence breaking
loading the gamma look up table on Pi0-3.
Correct that conditional.
Fixes: 24c5ed3ddf ("drm/vc4: Introduce generation number enum")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com >
Closes: https://lore.kernel.org/dri-devel/37051126-3921-4afe-a936-5f828bff5752@samsung.com/
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241008-drm-vc4-fixes-v1-3-9d0396ca9f42@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-10-09 12:11:03 +01:00
Dave Stevenson
6b0bd1b02e
drm/vc4: Match drm_dev_enter and exit calls in vc4_hvs_atomic_flush
...
Commit 92c17d1647 ("drm/vc4: hvs: Ignore atomic_flush if we're disabled")
added a path which returned early without having called drm_dev_exit.
Ensure all paths call drm_dev_exit.
Fixes: 92c17d1647 ("drm/vc4: hvs: Ignore atomic_flush if we're disabled")
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241008-drm-vc4-fixes-v1-2-9d0396ca9f42@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-10-09 12:10:19 +01:00
Dave Stevenson
cf1c87d978
drm/vc4: Match drm_dev_enter and exit calls in vc4_hvs_lut_load
...
Commit 52efe364d1 ("drm/vc4: hvs: Don't write gamma luts on 2711")
added a return path to vc4_hvs_lut_load that had called
drm_dev_enter, but not drm_dev_exit.
Ensure we call drm_dev_exit.
Fixes: 52efe364d1 ("drm/vc4: hvs: Don't write gamma luts on 2711")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com >
Closes: https://lore.kernel.org/dri-devel/37051126-3921-4afe-a936-5f828bff5752@samsung.com/
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com >
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241008-drm-vc4-fixes-v1-1-9d0396ca9f42@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-10-09 12:10:19 +01:00
Dave Stevenson
01c29dbf9d
drm/vc4: Run default client setup for all variants.
...
Commit 45903624e9 ("drm/vc4: Run DRM default client setup")
only added DRM_FBDEV_DMA_DRIVER_OPS for the vc4 (Pi0-3) driver
definition, which caused an issue on vc5 (Pi4) as there was no
fbdev_probe function defined.
Fixes: 45903624e9 ("drm/vc4: Run DRM default client setup")
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241002-vc4_fbdev_fix-v1-1-8737bd11b147@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
2024-10-09 12:04:43 +01:00
Danila Tikhonov
bd07dbb929
drm/panel: Add Samsung AMS639RQ08 panel driver
...
Add the driver for Samsung AMS639RQ08 FHD Plus CMD mode panel support
found in:
- Xiaomi Mi 9 Lite / CC9 (sdm710-xiaomi-pyxis)
- Xiaomi Mi 9T / Redmi K20 (sm7150-xiaomi-davinci)
- Xiaomi Mi 9T Pro / Redmi K20 Pro (sm8150-xiaomi-raphael)
Tested-by: Degdag Mohamed <degdagmohamed@gmail.com > # xiaomi-raphael
Tested-by: Jens Reidel <adrian@travitia.xyz > # xiaomi-davinci
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240930202448.188051-3-danila@jiaxyga.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930202448.188051-3-danila@jiaxyga.com
2024-10-09 09:51:29 +02:00
Danila Tikhonov
a62528aa53
dt-bindings: display: panel: Add Samsung AMS639RQ08
...
The Samsung AMS639RQ08 is a 6.39 inch 1080x2340 MIPI-DSI CMD mode
AMOLED panel used in:
- Xiaomi Mi 9 Lite / CC9 (sdm710-xiaomi-pyxis)
- Xiaomi Mi 9T / Redmi K20 (sm7150-xiaomi-davinci)
- Xiaomi Mi 9T Pro / Redmi K20 Pro (sm8150-xiaomi-raphael)
Add a dt-binding for it.
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20240930202448.188051-2-danila@jiaxyga.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930202448.188051-2-danila@jiaxyga.com
2024-10-09 09:51:29 +02:00
Hugo Villeneuve
66ae275365
drm: panel: jd9365da-h3: Remove unused num_init_cmds structure member
...
Now that the driver has been converted to use wrapped MIPI DCS functions,
the num_init_cmds structure member is no longer needed, so remove it.
Fixes: 35583e1299 ("drm/panel: panel-jadard-jd9365da-h3: use wrapped MIPI DCS functions")
Cc: stable@vger.kernel.org
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com >
Link: https://lore.kernel.org/r/20240930170503.1324560-1-hugo@hugovil.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240930170503.1324560-1-hugo@hugovil.com
2024-10-09 09:51:06 +02:00
Dzmitry Sankouski
779679d3c1
drm/panel: Add support for S6E3HA8 panel driver
...
Add support for MIPI-DSI based S6E3HA8 AMOLED panel
driver. This panel has 1440x2960 resolution, 5.8-inch physical
size, and can be found in starqltechn device.
Brightness regulation is not yet supported.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com >
Link: https://lore.kernel.org/r/20241006-starqltechn_integration_upstream-v6-3-8336b9cd6c34@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241006-starqltechn_integration_upstream-v6-3-8336b9cd6c34@gmail.com
2024-10-09 09:49:46 +02:00
Dzmitry Sankouski
d891e79861
dt-bindings: panel: add Samsung s6e3ha8
...
Add binding for the Samsung s6e3ha8 panel found in the Samsung S9.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com >
Link: https://lore.kernel.org/r/20241006-starqltechn_integration_upstream-v6-2-8336b9cd6c34@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241006-starqltechn_integration_upstream-v6-2-8336b9cd6c34@gmail.com
2024-10-09 09:49:45 +02:00
Dzmitry Sankouski
975bdea8c4
drm/mipi-dsi: add mipi_dsi_compression_mode_multi
...
mipi_dsi_compression_mode_multi can help with
error handling.
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20241006-starqltechn_integration_upstream-v6-1-8336b9cd6c34@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20241006-starqltechn_integration_upstream-v6-1-8336b9cd6c34@gmail.com
2024-10-09 09:49:44 +02:00
Philipp Zabel
655b92ca60
drm/panel: ilitek-ili9881c: Report subpixel order according to rotation
...
Assume a default RGB subpixel order and flip it around if 180° rotation
is configured via address mode. Report subpixel order to userspace.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626-drm-panel-ili9881c-rotation-v1-2-e0ff54173e32@pengutronix.de
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626-drm-panel-ili9881c-rotation-v1-2-e0ff54173e32@pengutronix.de
2024-10-09 09:48:45 +02:00
Philipp Zabel
b64e7d59ba
drm/panel: ilitek-ili9881c: Explicitly set address mode, allow 180° rotation
...
We can use horizontal and vertical flipping via the MIPI DCS address
mode to rotate the display by 180° using the device tree "rotation"
property. Since the tl050hdv35 panel has been defined as rotated,
we have to invert the bits there.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20240626-drm-panel-ili9881c-rotation-v1-1-e0ff54173e32@pengutronix.de
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240626-drm-panel-ili9881c-rotation-v1-1-e0ff54173e32@pengutronix.de
2024-10-09 09:48:45 +02:00
Frieder Schrempf
15bda06bc9
dt-bindings: display: panel-lvds: Add compatible for Jenson BL-JT60050-01A
...
The Jenson BL-JT60050-01A is a 7" 1024x600 LVDS display.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://lore.kernel.org/r/20240828074753.25401-3-frieder@fris.de
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240828074753.25401-3-frieder@fris.de
2024-10-09 09:47:03 +02:00
Frieder Schrempf
763dc2cdeb
dt-bindings: vendor-prefixes: Add Jenson Display
...
Add vendor prefix for manufacturer Jenson Display (http://jensondisplay.com ).
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20240828074753.25401-2-frieder@fris.de
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20240828074753.25401-2-frieder@fris.de
2024-10-09 09:47:03 +02:00
Pierre-Eric Pelloux-Prayer
2c34a54640
drm: use drm_file client_name in fdinfo
...
Add an optional drm-client-name field to drm fdinfo's output.
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241003124506.470931-3-pierre-eric.pelloux-prayer@amd.com
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
2024-10-08 10:02:24 +02:00
Pierre-Eric Pelloux-Prayer
56c594d8df
drm: add DRM_SET_CLIENT_NAME ioctl
...
Giving the opportunity to userspace to associate a free-form
name with a drm_file struct is helpful for tracking and debugging.
This is similar to the existing DMA_BUF_SET_NAME ioctl.
Access to client_name is protected by a mutex, and the 'clients' debugfs
file has been updated to print it.
Userspace MR to use this ioctl:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1428
If the string passed by userspace contains chars that would mess up output
when it's going to be printed (in dmesg, fdinfo, etc), -EINVAL is returned.
A 0-length string is a valid use, and clears the existing name.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com >
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241003124506.470931-2-pierre-eric.pelloux-prayer@amd.com
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
2024-10-08 10:00:30 +02:00