]> Git Repo - linux.git/log
linux.git
4 months agodrm/sched: Document purpose of drm_sched_{start,stop}
Philipp Stanner [Tue, 29 Oct 2024 13:38:20 +0000 (14:38 +0100)]
drm/sched: Document purpose of drm_sched_{start,stop}

drm_sched_start()'s and drm_sched_stop()'s names suggest that those
functions might be intended for actively starting and stopping the
scheduler on initialization and teardown.

They are, however, only used on timeout handling (reset recovery). The
docstrings should reflect that to prevent confusion.

Document those functions' purpose.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/panel: leadtek-ltk050h3146w: transition to mipi_dsi wrapped functions
Tejas Vipin [Sat, 26 Oct 2024 03:59:28 +0000 (09:29 +0530)]
drm/panel: leadtek-ltk050h3146w: transition to mipi_dsi wrapped functions

Changes the leadtek-ltk050h3146w panel to use multi style functions for
improved error handling.

Signed-off-by: Tejas Vipin <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/panel: samsung-s6e88a0-ams427ap24: Add flip option
Jakob Hauser [Sun, 27 Oct 2024 23:42:06 +0000 (00:42 +0100)]
drm/panel: samsung-s6e88a0-ams427ap24: Add flip option

The way of implementing a flip option follows the existing
panel-samsung-s6e8aa0.c [1][2][3].

The value to flip the screen is taken from a downstream kernel file of
a similar but older panel [4]. The mipi clock [5] for the new panel
samsung-s6e88a0-ams427ap24 matches 461 MHz and a hardware read-out of the
0xcb values corresponds to revision R01 of that older panel [6]. Although
for samsung-s6e88a0-ams427ap24 that's in non-flipped state while in this
older driver it seems to be the other way around. Further up there is a
hint [7] basically saying for revision R01 to change the first word of the
0xcb command from 0x06 to 0x0e, which is actually setting BIT(3) of that
word. This causes a horizontal flip.

[1] https://github.com/torvalds/linux/blob/v6.11/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c#L103
[2] https://github.com/torvalds/linux/blob/v6.11/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c#L207-L211
[3] https://github.com/torvalds/linux/blob/v6.11/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c#L954-L974
[4] https://github.com/LineageOS/android_kernel_samsung_msm8930-common/blob/lineage-15.1/drivers/video/msm/mipi_samsung_oled_video_qhd_pt-8930.c
[5] https://github.com/LineageOS/android_kernel_samsung_msm8930-common/blob/lineage-15.1/drivers/video/msm/mipi_samsung_oled_video_qhd_pt-8930.c#L2027-L2028
[6] https://github.com/LineageOS/android_kernel_samsung_msm8930-common/blob/lineage-15.1/drivers/video/msm/mipi_samsung_oled_video_qhd_pt-8930.c#L137-L151
[7] https://github.com/LineageOS/android_kernel_samsung_msm8930-common/blob/lineage-15.1/drivers/video/msm/mipi_samsung_oled_video_qhd_pt-8930.c#L66-L74

Signed-off-by: Jakob Hauser <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/1491f275e9956b2da1f1e2580abd54f4e459c7d2.1730070570.git.jahau@rocketmail.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/1491f275e9956b2da1f1e2580abd54f4e459c7d2.1730070570.git.jahau@rocketmail.com
4 months agodrm/panel: samsung-s6e88a0-ams427ap24: Add brightness control
Jakob Hauser [Sun, 27 Oct 2024 23:42:05 +0000 (00:42 +0100)]
drm/panel: samsung-s6e88a0-ams427ap24: Add brightness control

The tables for brightness to candela, aid and elvss were taken from downstream
kernel file "dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi" [1][2][3].

The gamma table gets generated in "ss_dsi_smart_dimming_S6E88A0_AMS427AP24.c" [4]
with hard-coded starting values. The function smart_dimming_init() [5] goes
through the v{*}_adjustments, generate_gray_scale and gamma_init procedure.
Instead of calculating it manually, it's easier to compile a custom downstream
kernel with SMART_DIMMING_DEBUG enabled and read out dmesg early at boot.

Selection of the values for aid and elvss are again according to downstream
file "dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi" [6][7].

The set of write commands is guided by downstream file "ss_dsi_panel_common.c" [8]
followed by "ss_dsi_panel_S6E88A0_AMS427AP24.c" [9].

The dsi mode flag MIPI_DSI_MODE_VIDEO_NO_HFP prevents screen flickering while
changing the brightness.

[1] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi#L341-L397
[2] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi#L214-L254
[3] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi#L301-L320
[4] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/ss_dsi_smart_dimming_S6E88A0_AMS427AP24.c
[5] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/ss_dsi_smart_dimming_S6E88A0_AMS427AP24.c#L1816-L1900
[6] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi#L256-L268
[7] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi#L322-L334
[8] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/ss_dsi_panel_common.c#L1389-L1517
[9] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/ss_dsi_panel_S6E88A0_AMS427AP24.c#L666-L678

Signed-off-by: Jakob Hauser <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/30c154954a4e0f75d90f6ef6f393a5ba8b3ffea9.1730070570.git.jahau@rocketmail.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/30c154954a4e0f75d90f6ef6f393a5ba8b3ffea9.1730070570.git.jahau@rocketmail.com
4 months agodrm/panel: samsung-s6e88a0-ams427ap24: Add initial driver
Jakob Hauser [Sun, 27 Oct 2024 23:42:04 +0000 (00:42 +0100)]
drm/panel: samsung-s6e88a0-ams427ap24: Add initial driver

This initial part of the panel driver was mostly generated by the
"linux-mdss-dsi-panel-driver-generator" tool [1], reading downstream
Android kernel file "dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi" [2].

On top of the generic output of the tool, there were a couple of changes
applied:
- Added mipi_dsi_dcs_set_display_on() to function s6e88a0_ams427ap24_on(),
  otherwise the display does not show up.
- In functions s6e88a0_ams427ap24_on() and s6e88a0_ams427ap24_off()
  changed DSI commands to multi context and used "accum_err" returns.
- In functions s6e88a0_ams427ap24_on() and s6e88a0_ams427ap24_off() replaced
  msleep() by mipi_dsi_msleep().
- The function s6e88a0_ams427ap24_get_modes() was changed to make use of
  drm_connector_helper_get_modes_fixed(). This also required to include
  drm/drm_probe_helper.h.
- In function s6e88a0_ams427ap24_probe() registring the regulators was changed
  to devm_regulator_bulk_get_const(). This required to change supplies in struct
  s6e88a0_ams427ap24 to a pointer.
- Removed bool "prepared" from struct s6e88a0_ams427ap24 and according parts in
  functions s6e88a0_ams427ap24_prepare() and s6e88a0_ams427ap24_unprepare().
- Removed include <linux/of.h>, it's not needed.
- Added comments to the mipi_dsi_dcs_write_seq_multi() lines in function
  s6e88a0_ams427ap24_on().

[1] https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator
[2] https://github.com/msm8916-mainline/linux-downstream/blob/GT-I9195I/drivers/video/msm/mdss/samsung/S6E88A0_AMS427AP24/dsi_panel_S6E88A0_AMS427AP24_qhd_octa_video.dtsi

Signed-off-by: Jakob Hauser <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/d92ef0036b66520bb6d1ec908165e776cf30c303.1730070570.git.jahau@rocketmail.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/d92ef0036b66520bb6d1ec908165e776cf30c303.1730070570.git.jahau@rocketmail.com
4 months agodt-bindings: display: panel: Add Samsung S6E88A0-AMS427AP24
Jakob Hauser [Sun, 27 Oct 2024 23:42:03 +0000 (00:42 +0100)]
dt-bindings: display: panel: Add Samsung S6E88A0-AMS427AP24

Add bindings for Samsung AMS427AP24 panel with S6E88A0 controller.

Signed-off-by: Jakob Hauser <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/d60428e7dad57efd42948adfd34b81335dabcd1f.1730070570.git.jahau@rocketmail.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/d60428e7dad57efd42948adfd34b81335dabcd1f.1730070570.git.jahau@rocketmail.com
4 months agodt-bindings: display: panel: Move flip properties to panel-common
Jakob Hauser [Sun, 27 Oct 2024 23:42:02 +0000 (00:42 +0100)]
dt-bindings: display: panel: Move flip properties to panel-common

The flip properties were used by "samsung,s6e8aa0.yaml" only so far. By
introducing "samsung,s6e88a0-ams427ap24.yaml" they become more common.

Signed-off-by: Jakob Hauser <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/e4edd8fc07b89006207f5f8962a816ff7f8f4601.1730070570.git.jahau@rocketmail.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/e4edd8fc07b89006207f5f8962a816ff7f8f4601.1730070570.git.jahau@rocketmail.com
4 months agoDocumentation/gpu: Fix Panthor documentation build warnings
Adrián Larumbe [Wed, 9 Oct 2024 21:43:30 +0000 (22:43 +0100)]
Documentation/gpu: Fix Panthor documentation build warnings

Fix Panthor documentation build errors uncovered by the makedocs target
when building with extra warnings enabled.

Signed-off-by: Adrián Larumbe <[email protected]>
Fixes: 6a797bdfde77 ("drm/panthor: add sysfs knob for enabling job profiling")
Reported-by: Stephen Rothwell <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/v3d: Drop allocation of object without mountpoint
Matthias Brugger [Tue, 29 Oct 2024 11:24:29 +0000 (12:24 +0100)]
drm/v3d: Drop allocation of object without mountpoint

Function drm_gem_shmem_create_with_mnt() creates an object
without using the mountpoint if gemfs is NULL.

Drop the else branch calling drm_gem_shmem_create().

Signed-off-by: Matthias Brugger <[email protected]>
Signed-off-by: Maíra Canal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: xlnx: zynqmp_dpsub: fix hotplug detection
Steffen Dirkwinkel [Mon, 28 Oct 2024 13:42:17 +0000 (14:42 +0100)]
drm: xlnx: zynqmp_dpsub: fix hotplug detection

drm_kms_helper_poll_init needs to be called after zynqmp_dpsub_kms_init.
zynqmp_dpsub_kms_init creates the connector and without it we don't
enable hotplug detection.

Fixes: eb2d64bfcc17 ("drm: xlnx: zynqmp_dpsub: Report HPD through the bridge")
Cc: [email protected]
Signed-off-by: Steffen Dirkwinkel <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: xlnx: zynqmp_disp: layer may be null while releasing
Steffen Dirkwinkel [Mon, 28 Oct 2024 13:39:40 +0000 (14:39 +0100)]
drm: xlnx: zynqmp_disp: layer may be null while releasing

layer->info can be null if we have an error on the first layer in
zynqmp_disp_create_layers

Fixes: 1836fd5ed98d ("drm: xlnx: zynqmp_dpsub: Minimize usage of global flag")
Signed-off-by: Steffen Dirkwinkel <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_dp: Add debugfs interface for compliance testing
Sean Anderson [Fri, 9 Aug 2024 19:36:00 +0000 (15:36 -0400)]
drm: zynqmp_dp: Add debugfs interface for compliance testing

Add a debugfs interface for exercising the various test modes supported
by the DisplayPort controller. This allows performing compliance
testing, or performing signal integrity measurements on a failing link.
At the moment, we do not support sink-driven link quality testing,
although such support would be fairly easy to add.

Additionally, add some debugfs files for ignoring AUX errors and HPD
events, as this can allow testing with equipment that cannot emulate a
DPRX.

Signed-off-by: Sean Anderson <[email protected]>
[Tomi: fixed a few minor formatting issues]
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_dp: Take dp->lock in zynqmp_dp_hpd_work_func
Sean Anderson [Fri, 9 Aug 2024 19:35:59 +0000 (15:35 -0400)]
drm: zynqmp_dp: Take dp->lock in zynqmp_dp_hpd_work_func

Add a non-locking version of zynqmp_dp_bridge_detect and use it in
zynqmp_dp_hpd_work_func so we can take the lock explicitly. This will
make it easier to check for hpd_ignore when we add debugfs support.

Signed-off-by: Sean Anderson <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_dp: Split off several helper functions
Sean Anderson [Fri, 9 Aug 2024 19:35:58 +0000 (15:35 -0400)]
drm: zynqmp_dp: Split off several helper functions

In preparation for supporting compliance testing, split off several
helper functions. No functional change intended.

Signed-off-by: Sean Anderson <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_dp: Use AUX IRQs instead of polling
Sean Anderson [Fri, 9 Aug 2024 19:35:57 +0000 (15:35 -0400)]
drm: zynqmp_dp: Use AUX IRQs instead of polling

Instead of polling the status register for the AUX status, just enable
the IRQs and signal a completion.

Signed-off-by: Sean Anderson <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_dp: Convert to a hard IRQ
Sean Anderson [Fri, 9 Aug 2024 19:35:56 +0000 (15:35 -0400)]
drm: zynqmp_dp: Convert to a hard IRQ

Now that all of the sleeping work is done outside of the IRQ, we can
convert it to a hard IRQ. Shared IRQs may be triggered even after
calling disable_irq, so use free_irq instead which removes our callback
altogether.

Signed-off-by: Sean Anderson <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_dp: Don't retrain the link in our IRQ
Sean Anderson [Fri, 9 Aug 2024 19:35:55 +0000 (15:35 -0400)]
drm: zynqmp_dp: Don't retrain the link in our IRQ

Retraining the link can take a while, and might involve waiting for
DPCD reads/writes to complete. In preparation for unthreading the IRQ
handler, move this into its own work function.

Signed-off-by: Sean Anderson <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_dp: Add locking
Sean Anderson [Fri, 9 Aug 2024 19:35:54 +0000 (15:35 -0400)]
drm: zynqmp_dp: Add locking

Add some locking to prevent the IRQ/workers/bridge API calls from stepping
on each other's toes. This lock protects:

- Non-atomic registers configuring the link. That is, everything but the
  IRQ registers (since these are accessed in an atomic fashion), and the DP
  AUX registers (since these don't affect the link). We also access AUX
  while holding this lock, so it would be very tricky to support.
- Link configuration. This is effectively everything in zynqmp_dp which
  isn't read-only after probe time. So from next_bridge onward.

This lock is designed to protect configuration changes so we don't have to
do anything tricky. Configuration should never be in the hot path, so I'm
not worried about performance.

Signed-off-by: Sean Anderson <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: zynqmp_kms: Unplug DRM device before removal
Sean Anderson [Fri, 9 Aug 2024 19:35:53 +0000 (15:35 -0400)]
drm: zynqmp_kms: Unplug DRM device before removal

Prevent userspace accesses to the DRM device from causing
use-after-frees by unplugging the device before we remove it. This
causes any further userspace accesses to result in an error without
further calls into this driver's internals.

Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
Closes: https://lore.kernel.org/dri-devel/[email protected]/
Signed-off-by: Sean Anderson <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Move secondary preemption buffer allocation to DMA range
Karol Wachowski [Thu, 17 Oct 2024 14:58:17 +0000 (16:58 +0200)]
accel/ivpu: Move secondary preemption buffer allocation to DMA range

Secondary preemption buffer is accessible by NPU's DMA and can be
allocated with addresses above 4 GB. Move secondary preemption buffer
allocation from SHAVE range which is much smaller (2GB) to DMA range.
This allows to allocate more command queues with corresponding
preemption buffers without running out of address range.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Increase DMA address range
Karol Wachowski [Thu, 17 Oct 2024 14:58:16 +0000 (16:58 +0200)]
accel/ivpu: Increase DMA address range

Increase DMA address range to:
 * 128 GB on 37xx (due to MMU limitations)
 * 256 GB on other generations
Merge User and DMA ranges on 40xx and above as it is possible
to access whole 256 GBs from both FW and DMA.

Increase User range on 37xx from 255MB to 511MB
to allow loading very large models.

Do not set global_alias_pio_base/size on other generations than 37xx
as it's only used on 37xx anyway.

Signed-off-by: Karol Wachowski <[email protected]>
Signed-off-by: Andrzej Kacprowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Add debug Kconfig option
Maciej Falkowski [Thu, 17 Oct 2024 14:58:15 +0000 (16:58 +0200)]
accel/ivpu: Add debug Kconfig option

Add CONFIG_DRM_ACCEL_IVPU_DEBUG option that:
 - Adds -DDEBUG that enables printk regardless of the kernel config
 - Enables unsafe module params (that are now disabled by default)

Signed-off-by: Maciej Falkowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Don't allocate preemption buffers when MIP is disabled
Karol Wachowski [Thu, 17 Oct 2024 14:58:14 +0000 (16:58 +0200)]
accel/ivpu: Don't allocate preemption buffers when MIP is disabled

Do not allocate preemption buffers when Mid Inference Preemption (MIP)
is disabled through test mode.

Rename IVPU_TEST_MODE_PREEMPTION_DISABLE to IVPU_TEST_MODE_MIP_DISABLE
to better describe that this test mode only disables MIP - job level
preemption will still occur.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Make command queue ID allocated on XArray
Karol Wachowski [Thu, 17 Oct 2024 14:58:13 +0000 (16:58 +0200)]
accel/ivpu: Make command queue ID allocated on XArray

Use XArray for dynamic command queue ID allocations instead of fixed
ones. This is required by upcoming changes to UAPI that will allow to
manage command queues by user space instead of having predefined number
of queues in a context.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Use xa_alloc_cyclic() instead of custom function
Karol Wachowski [Thu, 17 Oct 2024 14:58:12 +0000 (16:58 +0200)]
accel/ivpu: Use xa_alloc_cyclic() instead of custom function

Remove custom ivpu_id_alloc() wrapper used for ID allocations
and replace it with standard xa_alloc_cyclic() API.

The idea behind ivpu_id_alloc() was to have monotonic IDs, so the driver
is easier to debug because same IDs are not reused all over. The same
can be achieved just by using appropriate Linux API.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Unmap partially mapped BOs in case of errors
Karol Wachowski [Thu, 17 Oct 2024 14:58:11 +0000 (16:58 +0200)]
accel/ivpu: Unmap partially mapped BOs in case of errors

Ensure that all buffers that were created only partially through
allocated scatter-gather table are unmapped from MMU600 in case of errors.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Clear CDTAB entry in case of failure
Karol Wachowski [Thu, 17 Oct 2024 14:58:10 +0000 (16:58 +0200)]
accel/ivpu: Clear CDTAB entry in case of failure

Don't leave a context descriptor in case CFGI_ALL flush fails.
Mark it as invalid (by clearing valid bit) so nothing is left in
partially-initialized state.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Remove copy engine support
Andrzej Kacprowski [Thu, 17 Oct 2024 14:58:09 +0000 (16:58 +0200)]
accel/ivpu: Remove copy engine support

Copy engine was deprecated by the FW and is no longer supported.
Compute engine includes all copy engine functionality and should be used
instead.

This change does not affect user space as the copy engine was never
used outside of a couple of tests.

Signed-off-by: Andrzej Kacprowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Defer MMU root page table allocation
Karol Wachowski [Thu, 17 Oct 2024 14:58:08 +0000 (16:58 +0200)]
accel/ivpu: Defer MMU root page table allocation

Defer root page table allocation and unify context init/fini functions.
Move allocation of the root page table from the file_priv_open function to
perform a lazy allocation approach during ivpu_bo_pin().

By doing so, we avoid the overhead of allocating page tables for simple
operations like GET_PARAM that do not require them.
Additionally, the MMU context descriptor table initialization has been
moved to the ivpu_mmu_context_map_page function.

This change streamlines the process and ensures that the descriptor table
is only initialized when it is actually needed.
Refactor init/fini functions to remove redundant code and make the context
management more straightforward.

Overall, these changes lead to a reduction in the time taken by the file
descriptor open operation, as the costly root page table allocation is now
avoided for operations that do not require it.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/ivpu: Do not fail when more than 1 tile is fused
Karol Wachowski [Thu, 17 Oct 2024 14:58:07 +0000 (16:58 +0200)]
accel/ivpu: Do not fail when more than 1 tile is fused

Allow TILE_FUSE register to disable more than 1 tile.
The driver should not prevent such configurations from being functional.

Signed-off-by: Karol Wachowski <[email protected]>
Reviewed-by: Jacek Lawrynowicz <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jacek Lawrynowicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/nouveau/gr/gf100: Fix missing unlock in gf100_gr_chan_new()
Li Huafei [Sat, 26 Oct 2024 17:38:44 +0000 (01:38 +0800)]
drm/nouveau/gr/gf100: Fix missing unlock in gf100_gr_chan_new()

When the call to gf100_grctx_generate() fails, unlock gr->fecs.mutex
before returning the error.

Fixes smatch warning:

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:480 gf100_gr_chan_new() warn: inconsistent returns '&gr->fecs.mutex'.

Fixes: ca081fff6ecc ("drm/nouveau/gr/gf100-: generate golden context during first object alloc")
Signed-off-by: Li Huafei <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Signed-off-by: Lyude Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/ci: add sm8350-hdk
Vignesh Raman [Tue, 22 Oct 2024 09:45:05 +0000 (15:15 +0530)]
drm/ci: add sm8350-hdk

Add job that executes the IGT test suite for sm8350-hdk.

Reviewed-by: Abhinav Kumar <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Vignesh Raman <[email protected]>
Acked-by: Helen Koike <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/ci: add dedede
Vignesh Raman [Tue, 22 Oct 2024 09:45:04 +0000 (15:15 +0530)]
drm/ci: add dedede

Add job that executes the IGT test suite for acer-cb317-1h-c3z6-dedede.
dedede boards use 64 bit Intel Jasper Lake processors.

Signed-off-by: Vignesh Raman <[email protected]>
Acked-by: Helen Koike <[email protected]>
Signed-off-by: Helen Koike <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/bridge: tc358767: Fix use of unadjusted mode in the driver
Marek Vasut [Sat, 26 Oct 2024 04:10:42 +0000 (06:10 +0200)]
drm/bridge: tc358767: Fix use of unadjusted mode in the driver

The driver configures mostly Pixel PLL from the clock cached in
local copy of the mode. Make sure the driver uses adjusted mode
which contains the updated Pixel PLL settings negotiated in
tc_dpi_atomic_check()/tc_edp_atomic_check().

Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/omap: Clean up deadcode functions
Dr. David Alan Gilbert [Sat, 26 Oct 2024 22:00:10 +0000 (23:00 +0100)]
drm/omap: Clean up deadcode functions

dispc_enable_fifomerge() last use was removed by 2012's
commit 85099f11bd03 ("Revert "OMAPDSS: APPLY: add fifo merge support
funcs"")

dispc_has_writeback(), dispc_wb_get_framedone_irq(), dispc_wb_go(),
dispc_wb_go_busy() and dispc_wb_setup() were changed from statics
to public symbols and unwired from a structure by 2020's
commit dac62bcafeaa ("drm/omap: remove dispc_ops")
but didn't have any users.

dispc_mgr_get_clock_div() got renamed from dispc_get_clock_div()
and it's last use was removed in 2011 by commit
42c9dee82129 ("OMAP: DSS2: Remove FB_OMAP_BOOTLOADER_INIT support")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agoaccel/qaic: Add crashdump to Sahara
Jeffrey Hugo [Mon, 21 Oct 2024 20:03:55 +0000 (14:03 -0600)]
accel/qaic: Add crashdump to Sahara

The Sahara protocol has a crashdump functionality. In the hello
exchange, the device can advertise it has a memory dump available for
the host to collect. Instead of the device making requests of the host,
the host requests data from the device which can be later analyzed.

Implement this functionality and utilize the devcoredump framework for
handing the dump over to userspace.

Similar to how firmware loading in Sahara involves multiple files,
crashdump can consist of multiple files for different parts of the dump.
Structure these into a single buffer that userspace can parse and
extract the original files from.

Reviewed-by: Carl Vanderlip <[email protected]>
Signed-off-by: Jeffrey Hugo <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/sched: warn about drm_sched_job_init()'s partial init
Philipp Stanner [Wed, 23 Oct 2024 14:15:31 +0000 (16:15 +0200)]
drm/sched: warn about drm_sched_job_init()'s partial init

drm_sched_job_init()'s name suggests that after the function succeeded,
parameter "job" will be fully initialized. This is not the case; some
members are only later set, notably drm_sched_job.sched by
drm_sched_job_arm().

Document that drm_sched_job_init() does not set all struct members.

Document the lifetime of drm_sched_job.sched.

Reviewed-by: Matthew Brost <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/panfrost: Remove unused id_mask from struct panfrost_model
Steven Price [Fri, 25 Oct 2024 14:00:07 +0000 (15:00 +0100)]
drm/panfrost: Remove unused id_mask from struct panfrost_model

The id_mask field of struct panfrost_model has never been used.

Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: Steven Price <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/meson: Allow build with COMPILE_TEST=y
Ville Syrjälä [Thu, 3 Oct 2024 11:18:51 +0000 (14:18 +0300)]
drm/meson: Allow build with COMPILE_TEST=y

Allow meson to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.

Cc: Neil Armstrong <[email protected]>
Cc: [email protected]
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Neil Armstrong <[email protected]>
4 months agodrm/mediatek: Allow build with COMPILE_TEST=y
Ville Syrjälä [Thu, 3 Oct 2024 11:18:50 +0000 (14:18 +0300)]
drm/mediatek: Allow build with COMPILE_TEST=y

Allow mediatek to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.

Cc: Chun-Kuang Hu <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: [email protected]
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: CK Hu <[email protected]>
4 months agodrm/imx/dcss: Allow build with COMPILE_TEST=y
Ville Syrjälä [Thu, 3 Oct 2024 11:18:48 +0000 (14:18 +0300)]
drm/imx/dcss: Allow build with COMPILE_TEST=y

Allow imx/dcss to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.

Cc: Laurentiu Palcu <[email protected]>
Cc: Lucas Stach <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Laurentiu Palcu <[email protected]>
4 months agodrm/imx/dcss: Fix 64bit divisions
Ville Syrjälä [Thu, 3 Oct 2024 11:18:47 +0000 (14:18 +0300)]
drm/imx/dcss: Fix 64bit divisions

Use the appropriate 64bit division helpers to make the code
build on 32bit architectures.

Cc: Laurentiu Palcu <[email protected]>
Cc: Lucas Stach <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Laurentiu Palcu <[email protected]>
4 months agodrm/bridge: dw-hdmi: set bridge's ycbcr_420_allowed flag
Dmitry Baryshkov [Fri, 18 Oct 2024 21:49:17 +0000 (00:49 +0300)]
drm/bridge: dw-hdmi: set bridge's ycbcr_420_allowed flag

Set the drm_bridge's ycbcr_420_allowed flag if the YCbCr 420 output is
supported by the hardware.

Cc: Alexander Stein <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/msm/dp: migrate the ycbcr_420_allowed to drm_bridge
Dmitry Baryshkov [Fri, 18 Oct 2024 21:49:16 +0000 (00:49 +0300)]
drm/msm/dp: migrate the ycbcr_420_allowed to drm_bridge

Instead of forcing the ycbcr_420_allowed flag to be set on the created
drm_connector, set it on the drm_bridge instance and allow
drm_bridge_connecgtor to propagate it to the drm_connector.

Reviewed-by: Neil Armstrong <[email protected]>
Acked-by: Abhinav Kumar <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/bridge: aux: allow interlaced and YCbCr 420 output
Dmitry Baryshkov [Fri, 18 Oct 2024 21:49:15 +0000 (00:49 +0300)]
drm/bridge: aux: allow interlaced and YCbCr 420 output

As both aux bridges are merely passthrough bridges, mark them as
supporting interlaced and YCbCr 420 data. Other bridges in the chain
still might limit interlaced and YCbCr 420 data support on the
corresponding connector.

Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/bridge: display-connector: allow YCbCr 420 for HDMI and DP
Dmitry Baryshkov [Fri, 18 Oct 2024 21:49:14 +0000 (00:49 +0300)]
drm/bridge: display-connector: allow YCbCr 420 for HDMI and DP

Allow YCbCr 420 output for HDMI and DisplayPort connectors. Other
bridges in the chain still might limit YCbCr 420 support on the
corresponding connector.

Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/atomic: add interlaced and ycbcr_420 flags to connector's state dump
Dmitry Baryshkov [Fri, 18 Oct 2024 21:49:13 +0000 (00:49 +0300)]
drm/atomic: add interlaced and ycbcr_420 flags to connector's state dump

Although the interlace_allowed and ycbcr_420_allowed flags are a part of
the struct drm_connector rather than struct drm_connector_state, still
include them into state dump in order to ease debugging of the setup
issues.

Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/display: bridge_connector: handle ycbcr_420_allowed
Dmitry Baryshkov [Fri, 18 Oct 2024 21:49:12 +0000 (00:49 +0300)]
drm/display: bridge_connector: handle ycbcr_420_allowed

Follow the interlace_allowed example and calculate drm_connector's
ycbcr_420_allowed flag as AND of all drm_bridge's ycbcr_420_allowed
flags in a chain. This is one of the gaps between several
bridge-specific connector implementations and drm_bridge_connector.

Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/panel: s6e3ha8: add static modifier to supply list
Dzmitry Sankouski [Mon, 21 Oct 2024 13:52:36 +0000 (16:52 +0300)]
drm/panel: s6e3ha8: add static modifier to supply list

Add 'static' modifier to panel supply list.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: 779679d3c164 ("drm/panel: Add support for S6E3HA8 panel driver")
Signed-off-by: Dzmitry Sankouski <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/20241021-starqltechn_upstream_integration_panel_fix-v1-1-81776e89052a@gmail.com
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20241021-starqltechn_upstream_integration_panel_fix-v1-1-81776e89052a@gmail.com
4 months agodrm/sched: memset() 'job' in drm_sched_job_init()
Philipp Stanner [Mon, 21 Oct 2024 10:50:28 +0000 (12:50 +0200)]
drm/sched: memset() 'job' in drm_sched_job_init()

drm_sched_job_init() has no control over how users allocate struct
drm_sched_job. Unfortunately, the function can also not set some struct
members such as job->sched.

This could theoretically lead to UB by users dereferencing the struct's
pointer members too early.

It is easier to debug such issues if these pointers are initialized to
NULL, so dereferencing them causes a NULL pointer exception.
Accordingly, drm_sched_entity_init() does precisely that and initializes
its struct with memset().

Initialize parameter "job" to 0 in drm_sched_job_init().

Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Christian König <[email protected]>
4 months agodrm/imx: legacy-bridge: add MODULE_DESCRIPTION
Arnd Bergmann [Tue, 15 Oct 2024 07:29:58 +0000 (07:29 +0000)]
drm/imx: legacy-bridge: add MODULE_DESCRIPTION

Every module should have a description, without this we get a
build time warning.

Fixes: cc3e8a216d6b ("drm/imx: add internal bridge handling display-timings DT node")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/imx: parallel-display: add legacy bridge Kconfig dependency
Arnd Bergmann [Tue, 15 Oct 2024 07:29:57 +0000 (07:29 +0000)]
drm/imx: parallel-display: add legacy bridge Kconfig dependency

The driver now uses the legacy bridge helper code but can be configured
to get built without it:

ERROR: modpost: "devm_imx_drm_legacy_bridge" [drivers/gpu/drm/imx/ipuv3/parallel-display.ko] undefined!

Add the required dependency, same as in the ldb driver.

Fixes: f94b9707a1c9 ("drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connector")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/fbdev: fix drm_fb_helper_deferred_io() build failure
Dmitry Baryshkov [Mon, 21 Oct 2024 13:37:46 +0000 (16:37 +0300)]
drm/fbdev: fix drm_fb_helper_deferred_io() build failure

The drm_fb_helper_deferred_io() uses struct fb_deferred_io_pageref,
which isn't available without CONFIG_FB_DEFERRED_IO. Put the function
under corresponding #ifdef to fix build failure if deferred I/O isn't
enabled.

Fixes: 8058944f5226 ("drm/fbdev: Select fbdev I/O helpers from modules that require them")
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/bridge: sii902x: Set input bus format based on bus-width
Wadim Egorov [Thu, 17 Oct 2024 08:55:56 +0000 (10:55 +0200)]
drm/bridge: sii902x: Set input bus format based on bus-width

Introduce a bus-width property to define the number of parallel RGB
input pins connected to the transmitter. The input bus formats are updated
accordingly. If the property is not specified, default to 24-bit bus-width.

Signed-off-by: Wadim Egorov <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodt-bindings: display: bridge: sil,sii9022: Add bus-width
Wadim Egorov [Thu, 17 Oct 2024 08:55:55 +0000 (10:55 +0200)]
dt-bindings: display: bridge: sil,sii9022: Add bus-width

The SI9022 HDMI transmitter can be configured with a bus-width of 16,
18, or 24 bits. Introduce a bus-width property to the input endpoint,
specifying the number of parallel RGB input bits connected to the
transmitter.

Signed-off-by: Wadim Egorov <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/bridge: ite-it66121: Drop hdmi_avi_infoframe_init() function call
Liu Ying [Thu, 10 Oct 2024 09:26:43 +0000 (17:26 +0800)]
drm/bridge: ite-it66121: Drop hdmi_avi_infoframe_init() function call

drm_hdmi_avi_infoframe_from_display_mode() called from
it66121_bridge_mode_set() already calls hdmi_avi_infoframe_init() to
initialize an HDMI AVI infoframe.  So, drop the redundant
hdmi_avi_infoframe_init() function call from it66121_bridge_mode_set().

Signed-off-by: Liu Ying <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/bridge: tc358768: switch to bus-width
Krzysztof Kozlowski [Thu, 3 Oct 2024 13:39:04 +0000 (15:39 +0200)]
drm/bridge: tc358768: switch to bus-width

"data-lines" property is way too similar to "data-lanes".  It is also
duplicating "bus-width" from video-interfaces.yaml schema.  "data-lines"
was deprecated in the bindings and "bus-width" is preferred, so parse it
instead while keeping things backwards compatible.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodt-bindings: display: bridge: tc358768: switch to bus-width
Krzysztof Kozlowski [Thu, 3 Oct 2024 13:39:03 +0000 (15:39 +0200)]
dt-bindings: display: bridge: tc358768: switch to bus-width

"data-lines" property is way too similar to "data-lanes".  It is also
duplicating "bus-width" from video-interfaces.yaml schema.  Deprecate
"data-lines" and use the common property.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Rob Herring (Arm) <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/meson: drop unused static dw_hdmi_dwc_write_bits
Krzysztof Kozlowski [Sun, 8 Sep 2024 14:21:31 +0000 (16:21 +0200)]
drm/meson: drop unused static dw_hdmi_dwc_write_bits

static inline dw_hdmi_dwc_write_bits() function is not used at all:

  drivers/gpu/drm/meson/meson_dw_hdmi.c:276:20: error: unused function 'dw_hdmi_dwc_write_bits' [-Werror,-Wunused-function]

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[narmstrong: s/staitc/static/]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm/fbdev-dma: remove obsolete kernel-doc references
Randy Dunlap [Thu, 17 Oct 2024 02:48:13 +0000 (19:48 -0700)]
drm/fbdev-dma: remove obsolete kernel-doc references

The kernel-doc comments in these 3 files was removed so remove the
references to these files to prevent kernel-doc warnings.

drivers/gpu/drm/drm_fbdev_dma.c:1: warning: no structured comments found
drivers/gpu/drm/drm_fbdev_shmem.c:1: warning: no structured comments found
drivers/gpu/drm/drm_fbdev_ttm.c:1: warning: no structured comments found

Fixes: 731fddf4302e ("drm/fbdev-dma: Remove obsolete setup function")
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Cc: David Airlie <[email protected]>
Cc: Simona Vetter <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: [email protected]
Reviewed-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
4 months agodrm: panel: nv3052c: correct spi_device_id for RG35XX panel
Ryan Walklin [Sun, 20 Oct 2024 08:37:41 +0000 (21:37 +1300)]
drm: panel: nv3052c: correct spi_device_id for RG35XX panel

The Anbernic RG35XX devices use an SPI LCD panel from an unknown OEM,
with an NV3052C driver chip.

As discussed previously, the integrating vendor and device name are
preferred instead of the OEM serial. A previous patch corrected the
device tree binding and of_device_id in the NV3052C driver, however the
spi_device_id also needs correction.

Correct the spi_device_id for the RG35XX panel.

Signed-off-by: Ryan Walklin <[email protected]>
Fixes: 76dce2a96c0f ("drm: panel: nv3052c: Correct WL-355608-A8 panel compatible")
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
[DB: corrected the Fixes tag]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/fsl-dcu: Remove redundant dev_err()
Chen Ni [Wed, 18 Sep 2024 07:48:41 +0000 (15:48 +0800)]
drm/fsl-dcu: Remove redundant dev_err()

There is no need to call the dev_err() function directly to print a
custom message when handling an error from platform_get_irq() function
as it is going to display an appropriate error message in case of a
failure.

Signed-off-by: Chen Ni <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Acked-by: Alison Wang <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/panel: simple: Add Microchip AC69T88A LVDS Display panel
Manikandan Muralidharan [Thu, 19 Sep 2024 09:15:48 +0000 (14:45 +0530)]
drm/panel: simple: Add Microchip AC69T88A LVDS Display panel

Add support for Microchip AC69T88A 5 inch TFT LCD 800x480
Display module with LVDS interface.The panel uses the Sitronix
ST7262 800x480 Display driver

Signed-off-by: Manikandan Muralidharan <[email protected]>
Signed-off-by: Dharma Balasubiramani <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodt-bindings: display: panel-simple: Document support for Microchip AC69T88A
Manikandan Muralidharan [Thu, 19 Sep 2024 09:15:47 +0000 (14:45 +0530)]
dt-bindings: display: panel-simple: Document support for Microchip AC69T88A

Add Microchip AC69T88A 5" LVDS interface (800x480) TFT LCD panel
compatible string

Signed-off-by: Manikandan Muralidharan <[email protected]>
Acked-by: Rob Herring (Arm) <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm: fsl-dcu: enable PIXCLK on LS1021A
Matthias Schiffer [Thu, 26 Sep 2024 05:55:51 +0000 (07:55 +0200)]
drm: fsl-dcu: enable PIXCLK on LS1021A

The PIXCLK needs to be enabled in SCFG before accessing certain DCU
registers, or the access will hang. For simplicity, the PIXCLK is enabled
unconditionally, resulting in increased power consumption.

Signed-off-by: Matthias Schiffer <[email protected]>
Signed-off-by: Alexander Stein <[email protected]>
Fixes: 109eee2f2a18 ("drm/layerscape: Add Freescale DCU DRM driver")
Acked-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm: fsl-dcu: Use dev_err_probe
Alexander Stein [Thu, 26 Sep 2024 05:55:50 +0000 (07:55 +0200)]
drm: fsl-dcu: Use dev_err_probe

fsl_dcu_drm_modeset_init can return -EPROBE_DEFER, so use dev_err_probe
to remove an invalid error message and add it to deferral description.

Signed-off-by: Alexander Stein <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/sprd: Constify struct regmap_bus
Javier Carrasco [Wed, 25 Sep 2024 15:42:45 +0000 (17:42 +0200)]
drm/sprd: Constify struct regmap_bus

`regmap_txt_io` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/panel: ili9322: Constify struct regmap_bus
Javier Carrasco [Wed, 25 Sep 2024 15:42:44 +0000 (17:42 +0200)]
drm/panel: ili9322: Constify struct regmap_bus

`ili9322_regmap_bus` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/meson: Constify struct regmap_config
Javier Carrasco [Wed, 25 Sep 2024 15:42:43 +0000 (17:42 +0200)]
drm/meson: Constify struct regmap_config

`meson_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/mediatek: dp: Constify struct regmap_config
Javier Carrasco [Wed, 25 Sep 2024 15:42:42 +0000 (17:42 +0200)]
drm/mediatek: dp: Constify struct regmap_config

`mtk_dp_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/fsl-dcu: Constify struct regmap_config
Javier Carrasco [Wed, 25 Sep 2024 15:42:41 +0000 (17:42 +0200)]
drm/fsl-dcu: Constify struct regmap_config

`fsl_tcon_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/bridge: dpc3433: Constify struct regmap_config
Javier Carrasco [Wed, 25 Sep 2024 15:42:40 +0000 (17:42 +0200)]
drm/bridge: dpc3433: Constify struct regmap_config

`dlpc_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodrm/tiny: Add driver for Sharp Memory LCD
Alex Lanzano [Tue, 15 Oct 2024 23:05:44 +0000 (19:05 -0400)]
drm/tiny: Add driver for Sharp Memory LCD

Add support for the monochrome Sharp Memory LCDs.

Co-developed-by: Mehdi Djait <[email protected]>
Signed-off-by: Mehdi Djait <[email protected]>
Signed-off-by: Alex Lanzano <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agodt-bindings: display: Add Sharp Memory LCD bindings
Alex Lanzano [Tue, 15 Oct 2024 23:05:43 +0000 (19:05 -0400)]
dt-bindings: display: Add Sharp Memory LCD bindings

Add device tree bindings for the monochrome Sharp Memory LCD

Co-developed-by: Mehdi Djait <[email protected]>
Signed-off-by: Mehdi Djait <[email protected]>
Signed-off-by: Alex Lanzano <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
4 months agoaccel/qaic: Pass string literal as format argument of alloc_workqueue()
Simon Horman [Fri, 11 Oct 2024 09:57:12 +0000 (10:57 +0100)]
accel/qaic: Pass string literal as format argument of alloc_workqueue()

Recently I noticed that both gcc-14 and clang-18 report that passing
a non-string literal as the format argument of alloc_workqueue()
is potentially insecure.

E.g. clang-18 says:

.../qaic_drv.c:61:23: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
   61 |         wq = alloc_workqueue(fmt, WQ_UNBOUND, 0);
      |                              ^~~
.../qaic_drv.c:61:23: note: treat the string as an argument to avoid this
   61 |         wq = alloc_workqueue(fmt, WQ_UNBOUND, 0);
      |                              ^
      |                              "%s",

It is always the case where the contents of fmt is safe to pass as the
format argument. That is, in my understanding, it never contains any
format escape sequences.

But, it seems better to be safe than sorry. And, as a bonus, compiler
output becomes less verbose by addressing this issue as suggested by
clang-18.

Also, change the name of the parameter of qaicm_wq_init from
fmt to name to better reflect it's purpose.

Compile tested only.

Signed-off-by: Simon Horman <[email protected]>
Reviewed-by: Jeffrey Hugo <[email protected]>
Tested-by: Jeffrey Hugo <[email protected]>
Signed-off-by: Jeffrey Hugo <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/display: Drop obsolete dependency on COMPILE_TEST
Jean Delvare [Tue, 15 Oct 2024 11:46:06 +0000 (13:46 +0200)]
drm/display: Drop obsolete dependency on COMPILE_TEST

Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it
is possible to test-build any driver which depends on OF on any
architecture by explicitly selecting OF. Therefore depending on
COMPILE_TEST as an alternative is no longer needed.

To avoid reintroducing the randconfig bug originally fixed by commit
876271118aa4 ("drm/display: Fix build error without CONFIG_OF"),
DRM_MSM which selects DRM_DISPLAY_DP_HELPER must explicitly depend
on OF. This is consistent with what all other DRM drivers are doing.

Signed-off-by: Jean Delvare <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Acked-by: Douglas Anderson <[email protected]>
Acked-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
5 months agodrm/client: Add client-lib module
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:26 +0000 (10:55 +0200)]
drm/client: Add client-lib module

Add drm_client_lib.ko to contain DRM's built-in client. Move the
existing client for fbdev emulation into the new module. Protect the
new module behind CONFIG_DRM_CLIENT_LIB.

The Kconfig rules separate the DRM drivers from the DRM clients. A
driver can opt into the default clients, but the user configures
each client individually. To do so, DRM drivers still select
DRM_CLIENT_SELECTION. The option is now a tristate that further
selects all dependencies of the enabled DRM clients. There's
a menu option for each client. Enabling at least one client also
selects DRM_CLIENT_SETUP, so that drivers call drm_client_setup().
New DRM clients should depend on DRM_CLIENT_SELECTION.

There are existing kernel options in drm_fb_helper.o, so leave this
file in the KMS-helper module for now.

v5:
- leave fbdev helpers in drm_kms_helper.ko for now
v3:
- fix commit changelog
v2:
- keep client code in core
- protect lib with DRM_CLIENT_LIB
- remove duplicate line from Makefile (Jocelyn)

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/client: Make client support optional
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:25 +0000 (10:55 +0200)]
drm/client: Make client support optional

Only build client code if DRM_CLIENT has been selected. Automatially
do so if one of the default clients has been enabled. If client support
has been disabled, the helpers for client-related events are empty and
the regular client functions are not present.

Amdgpu has an internal DRM client, so it has to select DRM_CLIENT by
itself unconditionally.

v3:
- provide empty drm_client_debugfs_init() if DRM_CLIENT=n (kernel
  test robot)

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Xinhui Pan <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/radeon: Suspend and resume clients with client helpers
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:24 +0000 (10:55 +0200)]
drm/radeon: Suspend and resume clients with client helpers

Replace calls to radeon_fbdev_set_suspend() with calls to the client
functions drm_client_dev_suspend() and drm_client_dev_resume(). Any
registered in-kernel client will now receive suspend and resume events.

v4:
- refer to radeon_fbdev_set_suspend() in commit description (Jonathan)

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Xinhui Pan <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/nouveau: Suspend and resume clients with client helpers
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:23 +0000 (10:55 +0200)]
drm/nouveau: Suspend and resume clients with client helpers

Replace calls to drm_fb_helper_set_suspend_unlocked() with calls
to the client functions drm_client_dev_suspend() and
drm_client_dev_resume(). Any registered in-kernel client will now
receive suspend and resume events.

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Karol Herbst <[email protected]>
Cc: Lyude Paul <[email protected]>
Cc: Danilo Krummrich <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/amdgpu: Suspend and resume internal clients with client helpers
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:22 +0000 (10:55 +0200)]
drm/amdgpu: Suspend and resume internal clients with client helpers

Replace calls to drm_fb_helper_set_suspend_unlocked() with calls
to the client functions drm_client_dev_suspend() and
drm_client_dev_resume(). Any registered in-kernel client will now
receive suspend and resume events.

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Xinhui Pan <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/client: Move suspend/resume into DRM client callbacks
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:21 +0000 (10:55 +0200)]
drm/client: Move suspend/resume into DRM client callbacks

Suspend and resume is still tied to fbdev emulation. Modeset helpers
and several drivers call drm_fb_helper_set_suspend_unlocked() to inform
the fbdev client about suspend/resume events.

To make it work with arbitrary clients, add per-client callback
functions for suspend and resume. Implement them for fbdev emulation
with the existing drm_fb_helper_set_suspend_unlocked(). Then update
DRM's modeset helpers to call the new interface.

Clients that are not fbdev can now implement suspend/resume to their
requirements.

The callback parameter holds_console_lock is a workaround for i915,
radeon and xe, which possibly call the interface while having the
console lock acquired. Even though the commit doesn't modify these
drivers, it already adds the flag to avoid churn later on. New code
should not hold the console lock.

v4:
- clarify holds_console_lock in commit description (Jonathan)

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/client: Move client event handlers to drm_client_event.c
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:20 +0000 (10:55 +0200)]
drm/client: Move client event handlers to drm_client_event.c

A number of DRM-client functions serve as entry points from device
operations to client code. Moving them info a separate file will later
allow for a more fine-grained kernel configuration. For most of the
users it is sufficient to include <drm/drm_client_event.h> instead of
the full driver-side interface in <drm/drm_client.h>

v2:
- rename new files to drm_client_event.{c,h}

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Karol Herbst <[email protected]>
Cc: Lyude Paul <[email protected]>
Cc: Danilo Krummrich <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/fbdev: Select fbdev I/O helpers from modules that require them
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:18 +0000 (10:55 +0200)]
drm/fbdev: Select fbdev I/O helpers from modules that require them

Fbdev emulation for SHMEM and TTM requires helpers from the fbdev
subsystem. Select them from the modules that use them instead of the
core DRM module.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/fbdev-dma: Select FB_DEFERRED_IO
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:17 +0000 (10:55 +0200)]
drm/fbdev-dma: Select FB_DEFERRED_IO

Commit 808a40b69468 ("drm/fbdev-dma: Implement damage handling and
deferred I/O") added deferred I/O for fbdev-dma. Also select the
Kconfig symbol FB_DEFERRED_IO (via FB_DMAMEM_HELPERS_DEFERRED). Fixes
build errors about missing fbdefio, such as

drivers/gpu/drm/drm_fbdev_dma.c:218:26: error: 'struct drm_fb_helper' has no member named 'fbdefio'
  218 |                 fb_helper->fbdefio.delay = HZ / 20;
      |                          ^~
drivers/gpu/drm/drm_fbdev_dma.c:219:26: error: 'struct drm_fb_helper' has no member named 'fbdefio'
  219 |                 fb_helper->fbdefio.deferred_io = drm_fb_helper_deferred_io;
      |                          ^~
drivers/gpu/drm/drm_fbdev_dma.c:221:21: error: 'struct fb_info' has no member named 'fbdefio'
  221 |                 info->fbdefio = &fb_helper->fbdefio;
      |                     ^~
drivers/gpu/drm/drm_fbdev_dma.c:221:43: error: 'struct drm_fb_helper' has no member named 'fbdefio'
  221 |                 info->fbdefio = &fb_helper->fbdefio;
      |                                           ^~

Signed-off-by: Thomas Zimmermann <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: 808a40b69468 ("drm/fbdev-dma: Implement damage handling and deferred I/O")
Cc: Thomas Zimmermann <[email protected]>
Cc: Javier Martinez Canillas <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: <[email protected]> # v6.11+
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/xe: Select DRM_CLIENT_SELECTION
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:16 +0000 (10:55 +0200)]
drm/xe: Select DRM_CLIENT_SELECTION

The Kconfig token DRM_CLIENT_SELECTION will make DRM clients
available to drivers. Select it from xe.

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: "Thomas Hellström" <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/i915: Select DRM_CLIENT_SELECTION
Thomas Zimmermann [Mon, 14 Oct 2024 08:55:15 +0000 (10:55 +0200)]
drm/i915: Select DRM_CLIENT_SELECTION

The Kconfig token DRM_CLIENT_SELECTION will make DRM clients
available to drivers. Select it from i915.

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Reviewed-by: Jonathan Cavitt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/rockchip: Add basic RK3588 HDMI output support
Cristian Ciocaltea [Wed, 16 Oct 2024 20:06:53 +0000 (23:06 +0300)]
drm/rockchip: Add basic RK3588 HDMI output support

The RK3588 SoC family integrates the newer Synopsys DesignWare HDMI 2.1
Quad-Pixel (QP) TX controller IP and a HDMI/eDP TX Combo PHY based on a
Samsung IP block.

Add just the basic support for now, i.e. RGB output up to 4K@60Hz,
without audio, CEC or any of the HDMI 2.1 specific features.

Co-developed-by: Algea Cao <[email protected]>
Signed-off-by: Algea Cao <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Signed-off-by: Cristian Ciocaltea <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20241016-b4-rk3588-bridge-upstream-v10-3-87ef92a6d14e@collabora.com
Signed-off-by: Maxime Ripard <[email protected]>
5 months agodt-bindings: display: rockchip: Add schema for RK3588 HDMI TX Controller
Cristian Ciocaltea [Wed, 16 Oct 2024 20:06:52 +0000 (23:06 +0300)]
dt-bindings: display: rockchip: Add schema for RK3588 HDMI TX Controller

Rockchip RK3588 SoC integrates the Synopsys DesignWare HDMI 2.1
Quad-Pixel (QP) TX controller IP.

Since this is a new IP block, quite different from those used in the
previous generations of Rockchip SoCs, add a dedicated binding file.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Cristian Ciocaltea <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20241016-b4-rk3588-bridge-upstream-v10-2-87ef92a6d14e@collabora.com
Signed-off-by: Maxime Ripard <[email protected]>
5 months agodrm/bridge: synopsys: Add DW HDMI QP TX Controller support library
Cristian Ciocaltea [Wed, 16 Oct 2024 20:06:51 +0000 (23:06 +0300)]
drm/bridge: synopsys: Add DW HDMI QP TX Controller support library

The Synopsys DesignWare HDMI 2.1 Quad-Pixel (QP) TX Controller IP
supports the following features, among others:

* Fixed Rate Link (FRL)
* Display Stream Compression (DSC)
* 4K@120Hz and 8K@60Hz video modes
* Variable Refresh Rate (VRR) including Quick Media Switching (QMS), aka
  Cinema VRR
* Fast Vactive (FVA), aka Quick Frame Transport (QFT)
* SCDC I2C DDC access
* TMDS Scrambler enabling 2160p@60Hz with RGB/YCbCr4:4:4
* YCbCr4:2:0 enabling 2160p@60Hz at lower HDMI link speeds
* Multi-stream audio
* Enhanced Audio Return Channel (EARC)

Add library containing common helpers to enable basic support, i.e. RGB
output up to 4K@30Hz, without audio, CEC or any HDMI 2.1 specific
features.

Co-developed-by: Algea Cao <[email protected]>
Signed-off-by: Algea Cao <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Signed-off-by: Cristian Ciocaltea <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20241016-b4-rk3588-bridge-upstream-v10-1-87ef92a6d14e@collabora.com
Signed-off-by: Maxime Ripard <[email protected]>
5 months agodrm/sched: Further optimise drm_sched_entity_push_job
Tvrtko Ursulin [Wed, 16 Oct 2024 12:20:13 +0000 (13:20 +0100)]
drm/sched: Further optimise drm_sched_entity_push_job

Having removed one re-lock cycle on the entity->lock in a patch titled
"drm/sched: Optimise drm_sched_entity_push_job", with only a tiny bit
larger refactoring we can do the same optimisation on the rq->lock.
(Currently both drm_sched_rq_add_entity() and
drm_sched_rq_update_fifo_locked() take and release the same lock.)

To achieve this we make drm_sched_rq_update_fifo_locked() and
drm_sched_rq_add_entity() expect the rq->lock to be held.

We also align drm_sched_rq_update_fifo_locked(),
drm_sched_rq_add_entity() and
drm_sched_rq_remove_fifo_locked() function signatures, by adding rq as a
parameter to the latter.

v2:
 * Fix after rebase of the series.
 * Avoid naming inconsistency between drm_sched_rq_add/remove. (Christian)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Luben Tuikov <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Philipp Stanner <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Philipp Stanner <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/sched: Re-group and rename the entity run-queue lock
Tvrtko Ursulin [Wed, 16 Oct 2024 12:20:12 +0000 (13:20 +0100)]
drm/sched: Re-group and rename the entity run-queue lock

When writing to a drm_sched_entity's run-queue, writers are protected
through the lock drm_sched_entity.rq_lock. This naming, however,
frequently collides with the separate internal lock of struct
drm_sched_rq, resulting in uses like this:

spin_lock(&entity->rq_lock);
spin_lock(&entity->rq->lock);

Rename drm_sched_entity.rq_lock to improve readability. While at it,
re-order that struct's members to make it more obvious what the lock
protects.

v2:
 * Rename some rq_lock straddlers in kerneldoc, improve commit text. (Philipp)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Suggested-by: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Luben Tuikov <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Philipp Stanner <[email protected]>
Reviewed-by: Christian König <[email protected]>
[pstanner: Fix typo in docstring]
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/sched: Re-order struct drm_sched_rq members for clarity
Tvrtko Ursulin [Wed, 16 Oct 2024 12:20:11 +0000 (13:20 +0100)]
drm/sched: Re-order struct drm_sched_rq members for clarity

Current kerneldoc for struct drm_sched_rq incompletely documents what
fields are protected by the lock.

This is not good because it is misleading.

Lets fix it by listing all the elements which are protected by the lock.

While at it, lets also re-order the members so all protected by the lock
are in a single group.

v2:
 * Refer variables by kerneldoc syntax, more verbose commit text. (Philipp)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Luben Tuikov <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Philipp Stanner <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Philipp Stanner <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/sched: Stop setting current entity in FIFO mode
Tvrtko Ursulin [Wed, 16 Oct 2024 12:20:10 +0000 (13:20 +0100)]
drm/sched: Stop setting current entity in FIFO mode

It does not seem there is a need to set the current entity in FIFO mode
since ot only serves as being a "cursor" in round-robin mode. Even if
scheduling mode is changed at runtime the change in behaviour is simply
to restart from the first entity, instead of continuing in RR mode from
where FIFO left it, and that sounds completely fine.

Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Luben Tuikov <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Philipp Stanner <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Philipp Stanner <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/sched: Optimise drm_sched_entity_push_job
Tvrtko Ursulin [Wed, 16 Oct 2024 12:20:09 +0000 (13:20 +0100)]
drm/sched: Optimise drm_sched_entity_push_job

In FIFO mode (which is the default), both drm_sched_entity_push_job() and
drm_sched_rq_update_fifo(), where the latter calls the former, are
currently taking and releasing the same entity->rq_lock.

We can avoid that design inelegance, and also have a miniscule
efficiency improvement on the submit from idle path, by introducing a new
drm_sched_rq_update_fifo_locked() helper and pulling up the lock taking to
its callers.

v2:
 * Remove drm_sched_rq_update_fifo() altogether. (Christian)

v3:
 * Improved commit message. (Philipp)

Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Luben Tuikov <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Philipp Stanner <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/panel: s6e3ha8: select CONFIG_DRM_DISPLAY_DSC_HELPER
Arnd Bergmann [Tue, 15 Oct 2024 15:34:38 +0000 (15:34 +0000)]
drm/panel: s6e3ha8: select CONFIG_DRM_DISPLAY_DSC_HELPER

The new driver needs the dsc helper code to be available:

x86_64-linux-ld: vmlinux.o: in function `s6e3ha8_amb577px01_wqhd_prepare':
panel-samsung-s6e3ha8.c:(.text+0x16b1e65): undefined reference to `drm_dsc_pps_payload_pack'

Select it from Kconfig as we do for other similar drivers.

Fixes: 779679d3c164 ("drm/panel: Add support for S6E3HA8 panel driver")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Jessica Zhang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodrm/panel: Add Samsung AMS581VF01 panel driver
Danila Tikhonov [Sun, 13 Oct 2024 21:24:02 +0000 (00:24 +0300)]
drm/panel: Add Samsung AMS581VF01 panel driver

Add the driver for Samsung AMS581VF01 SOFEF01-based 5.81" FHD Plus CMD
mode OLED panel support found in Google Pixel 4a (sm7150-google-sunfish)

Signed-off-by: Danila Tikhonov <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodt-bindings: display: panel: Add Samsung AMS581VF01
Danila Tikhonov [Sun, 13 Oct 2024 21:24:01 +0000 (00:24 +0300)]
dt-bindings: display: panel: Add Samsung AMS581VF01

The Samsung AMS581VF01 is a 5.81 inch 1080x2340 MIPI-DSI CMD mode
OLED panel used in Google Pixel 4a (sm7150-google-sunfish)

Add a dt-binding for it.

Signed-off-by: Danila Tikhonov <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodma-buf: Use atomic64_inc_return() in dma_buf_getfile()
Uros Bizjak [Mon, 7 Oct 2024 08:37:52 +0000 (10:37 +0200)]
dma-buf: Use atomic64_inc_return() in dma_buf_getfile()

Use atomic64_inc_return(&ref) instead of atomic64_add_return(1, &ref)
to use optimized implementation and ease register pressure around
the primitive for targets that implement optimized variant.

Signed-off-by: Uros Bizjak <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: "Christian König" <[email protected]>
Signed-off-by: Sumit Semwal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
5 months agodma-buf/heaps: replace kmap_atomic with kmap_local_page
Pintu Kumar [Tue, 1 Oct 2024 17:50:57 +0000 (23:20 +0530)]
dma-buf/heaps: replace kmap_atomic with kmap_local_page

Use of kmap_atomic/kunmap_atomic is deprecated, use
kmap_local_page/kunmap_local instead.

This is reported by checkpatch.
Also fix repeated word issue.

WARNING: Deprecated use of 'kmap_atomic', prefer 'kmap_local_page' instead
+                       void *vaddr = kmap_atomic(page);

WARNING: Deprecated use of 'kunmap_atomic', prefer 'kunmap_local' instead
+                       kunmap_atomic(vaddr);

WARNING: Possible repeated word: 'by'
+                        * has been killed by by SIGKILL

total: 0 errors, 3 warnings, 405 lines checked

Signed-off-by: Pintu Kumar <[email protected]>
Reviewed-by: T.J. Mercier <[email protected]>
Signed-off-by: Sumit Semwal <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This page took 0.114808 seconds and 4 git commands to generate.