]> Git Repo - linux.git/log
linux.git
15 months agodrm/msm/dpu: drop unused dpu_plane::lock
Dmitry Baryshkov [Fri, 1 Dec 2023 21:18:39 +0000 (00:18 +0300)]
drm/msm/dpu: drop unused dpu_plane::lock

The field dpu_plane::lock was never used for protecting any kind of
data. Drop it now.

Reviewed-by: Jessica Zhang <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570043/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: use devres-managed allocation for HW blocks
Dmitry Baryshkov [Fri, 1 Dec 2023 21:18:38 +0000 (00:18 +0300)]
drm/msm/dpu: use devres-managed allocation for HW blocks

Use devm_kzalloc to create HW block structure. This allows us to remove
corresponding kfree and drop all dpu_hw_*_destroy() functions as well as
dpu_rm_destroy(), which becomes empty afterwards.

Reviewed-by: Jessica Zhang <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570041/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: use devres-managed allocation for MDP TOP
Dmitry Baryshkov [Fri, 1 Dec 2023 21:18:37 +0000 (00:18 +0300)]
drm/msm/dpu: use devres-managed allocation for MDP TOP

Use devm_kzalloc to create MDP TOP structure. This allows us to remove
corresponding kfree and drop dpu_hw_mdp_destroy() function.

Reviewed-by: Jessica Zhang <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570047/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: use devres-managed allocation for VBIF data
Dmitry Baryshkov [Fri, 1 Dec 2023 21:18:36 +0000 (00:18 +0300)]
drm/msm/dpu: use devres-managed allocation for VBIF data

Use devm_kzalloc to create VBIF data structure. This allows us to
remove corresponding kfree and drop dpu_hw_vbif_destroy() function.

Reviewed-by: Jessica Zhang <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570040/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: use devres-managed allocation for interrupts data
Dmitry Baryshkov [Fri, 1 Dec 2023 21:18:35 +0000 (00:18 +0300)]
drm/msm/dpu: use devres-managed allocation for interrupts data

Use devm_kzalloc to create interrupts data structure. This allows us to
remove corresponding kfree and drop dpu_hw_intr_destroy() function.

Reviewed-by: Jessica Zhang <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570038/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: remove IS_ERR_OR_NULL for dpu_hw_intr_init() error handling
Dmitry Baryshkov [Fri, 1 Dec 2023 21:18:34 +0000 (00:18 +0300)]
drm/msm/dpu: remove IS_ERR_OR_NULL for dpu_hw_intr_init() error handling

Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If
the value is NULL, then the function will return 0 instead of a proper
return code. Replace IS_ERR_OR_NULL() with IS_ERR() in the
dpu_hw_intr_init() error check.

Reviewed-by: Jessica Zhang <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570036/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: cleanup dpu_kms_hw_init error path
Dmitry Baryshkov [Fri, 1 Dec 2023 21:18:33 +0000 (00:18 +0300)]
drm/msm/dpu: cleanup dpu_kms_hw_init error path

It was noticed that dpu_kms_hw_init()'s error path contains several
labels which point to the same code path. Replace all of them with a
single label.

Suggested-by: Konrad Dybcio <[email protected]>
Reviewed-by: Jessica Zhang <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570035/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/edp-panel: Sort the panel entries
Pin-yen Lin [Tue, 5 Dec 2023 12:35:35 +0000 (20:35 +0800)]
drm/edp-panel: Sort the panel entries

Move the order of CMN 0x14e5 to make the list sorted.

Signed-off-by: Pin-yen Lin <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/panel-edp: Add SDC ATNA45AF01
Abel Vesa [Mon, 4 Dec 2023 08:54:25 +0000 (10:54 +0200)]
drm/panel-edp: Add SDC ATNA45AF01

Add support for the SDC ATNA45AF01 panel.

Signed-off-by: Abel Vesa <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/atomic: add private obj state to state dump
Dmitry Baryshkov [Sun, 3 Dec 2023 00:05:28 +0000 (03:05 +0300)]
drm/atomic: add private obj state to state dump

The drm_atomic_print_new_state() already prints private object state via
drm_atomic_private_obj_print_state(). Add private object state dumping
to __drm_state_dump(), so that it is also included into drm_state_dump()
output and into debugfs/dri/N/state file.

Reviewed-by: Rob Clark <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/gpuvm: Let drm_gpuvm_bo_put() report when the vm_bo object is destroyed
Boris Brezillon [Mon, 4 Dec 2023 15:14:06 +0000 (16:14 +0100)]
drm/gpuvm: Let drm_gpuvm_bo_put() report when the vm_bo object is destroyed

Some users need to release resources attached to the vm_bo object when
it's destroyed. In Panthor's case, we need to release the pin ref so
BO pages can be returned to the system when all GPU mappings are gone.

This could be done through a custom drm_gpuvm::vm_bo_free() hook, but
this has all sort of locking implications that would force us to expose
a drm_gem_shmem_unpin_locked() helper, not to mention the fact that
having a ::vm_bo_free() implementation without a ::vm_bo_alloc() one
seems odd. So let's keep things simple, and extend drm_gpuvm_bo_put()
to report when the object is destroyed.

Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/panfrost: Synchronize and disable interrupts before powering off
AngeloGioacchino Del Regno [Mon, 4 Dec 2023 11:42:15 +0000 (12:42 +0100)]
drm/panfrost: Synchronize and disable interrupts before powering off

To make sure that we don't unintentionally perform any unclocked and/or
unpowered R/W operation on GPU registers, before turning off clocks and
regulators we must make sure that no GPU, JOB or MMU ISR execution is
pending: doing that requires to add a mechanism to synchronize the
interrupts on suspend.

Add functions panfrost_{gpu,job,mmu}_suspend_irq() which will perform
interrupts masking and ISR execution synchronization, and then call
those in the panfrost_device_runtime_suspend() handler in the exact
sequence of job (may require mmu!) -> mmu -> gpu.

As a side note, JOB and MMU suspend_irq functions needed some special
treatment: as their interrupt handlers will unmask interrupts, it was
necessary to add an `is_suspended` bitmap which is used to address the
possible corner case of unintentional IRQ unmasking because of ISR
execution after a call to synchronize_irq().

At resume, clear each is_suspended bit in the reset path of JOB/MMU
to allow unmasking the interrupts.

Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device
AngeloGioacchino Del Regno [Mon, 4 Dec 2023 11:42:14 +0000 (12:42 +0100)]
drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device

In preparation for adding a IRQ synchronization mechanism for PM suspend,
add gpu_irq and mmu_irq variables to struct panfrost_device and change
functions panfrost_gpu_init() and panfrost_mmu_init() to use those.

Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq
AngeloGioacchino Del Regno [Mon, 4 Dec 2023 11:42:13 +0000 (12:42 +0100)]
drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq

Some SoCs may be equipped with a GPU containing two core groups
and this is exactly the case of Samsung's Exynos 5422 featuring
an ARM Mali-T628 MP6 GPU: the support for this GPU in Panfrost
is partial, as this driver currently supports using only one
core group and that's reflected on all parts of it, including
the power on (and power off, previously to this patch) function.

The issue with this is that even though executing the soft reset
operation should power off all cores unconditionally, on at least
one platform we're seeing a crash that seems to be happening due
to an interrupt firing which may be because we are calling power
transition only on the first core group, leaving the second one
unchanged, or because ISR execution was pending before entering
the panfrost_gpu_power_off() function and executed after powering
off the GPU cores, or all of the above.

Finally, solve this by:
 - Avoid to enable the power transition interrupt on reset; and
 - Ignoring the core_mask and ask the GPU to poweroff both core groups

Fixes: 22aa1a209018 ("drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()")
Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/panel-simple: add Evervision VGG644804 panel entry
Michael Walle [Thu, 23 Nov 2023 10:24:04 +0000 (11:24 +0100)]
drm/panel-simple: add Evervision VGG644804 panel entry

Timings taken from the datasheet, although sometimes there are just
typical values and it's not clear if they are no min and max values or
if you must use the typical value exactly. To make things worse, there
is no back porch but only a combined sync and back porch length.

Unfortunately, there is not public datasheet. Therefore, here are the
relevant timings:
                 | min |  typ   | max |
-----------------+-----+--------+-----+
CLK frequency    |  -  | 25.175 |  -  |
HS period        |  -  |   800  |  -  |
HS pulse width   |  5  |    30  |  -  |
HS-DEN time      | 112 |   144  | 175 |
DEN pulse width  |  -  |   640  |  -  |
VS pulse width   |  1  |     3  |  5  |
VS-DEN time      |  -  |    35  |  -  |
VS period        |  -  |   525  |  -  |

Signed-off-by: Michael Walle <[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]
15 months agodt-bindings: display: simple: add Evervision VGG644804 panel
Michael Walle [Thu, 23 Nov 2023 10:24:03 +0000 (11:24 +0100)]
dt-bindings: display: simple: add Evervision VGG644804 panel

Add Evervision VGG644804 5.7" 640x480 LVDS panel compatible string.

Signed-off-by: Michael Walle <[email protected]>
Acked-by: Conor Dooley <[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]
15 months agodrm/panel: ilitek-ili9881c: Add Ampire AM8001280G LCD panel
Philipp Zabel [Thu, 23 Nov 2023 17:08:06 +0000 (18:08 +0100)]
drm/panel: ilitek-ili9881c: Add Ampire AM8001280G LCD panel

Add support for Ampire AM8001280G LCD panels.

Signed-off-by: Philipp Zabel <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/20231123-drm-panel-ili9881c-am8001280g-v1-3-fdf4d624c211@pengutronix.de
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20231123-drm-panel-ili9881c-am8001280g-v1-3-fdf4d624c211@pengutronix.de
15 months agodt-bindings: ili9881c: Add Ampire AM8001280G LCD panel
Philipp Zabel [Thu, 23 Nov 2023 17:08:05 +0000 (18:08 +0100)]
dt-bindings: ili9881c: Add Ampire AM8001280G LCD panel

Document the compatible value for Ampire AM8001280G LCD panels.

Signed-off-by: Philipp Zabel <[email protected]>
Acked-by: Conor Dooley <[email protected]>
Link: https://lore.kernel.org/r/20231123-drm-panel-ili9881c-am8001280g-v1-2-fdf4d624c211@pengutronix.de
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20231123-drm-panel-ili9881c-am8001280g-v1-2-fdf4d624c211@pengutronix.de
15 months agodrm/panel: ilitek-ili9881c: make use of prepare_prev_first
Marco Felsch [Thu, 23 Nov 2023 17:08:04 +0000 (18:08 +0100)]
drm/panel: ilitek-ili9881c: make use of prepare_prev_first

The panel.prepare() call requires an initialized MIPI-DSI host, so set
the prepare_prev_first flag to indicate that the host must be
initialized first.

Signed-off-by: Marco Felsch <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/20231123-drm-panel-ili9881c-am8001280g-v1-1-fdf4d624c211@pengutronix.de
Signed-off-by: Neil Armstrong <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20231123-drm-panel-ili9881c-am8001280g-v1-1-fdf4d624c211@pengutronix.de
15 months agodrm/panel: himax-hx8394: Add Support for Powkiddy X55 panel
Chris Morgan [Mon, 4 Dec 2023 18:57:15 +0000 (12:57 -0600)]
drm/panel: himax-hx8394: Add Support for Powkiddy X55 panel

Add support for the Powkiddy X55 panel as used on the Powkiddy X55
handheld gaming console. This panel uses a Himax HX8394 display
controller and requires a vendor provided init sequence. The display
resolution is 720x1280 and is 67mm by 121mm as measured with calipers.

Signed-off-by: Chris Morgan <[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]
15 months agodt-bindings: display: himax-hx8394: Add Powkiddy X55 panel
Chris Morgan [Mon, 4 Dec 2023 18:57:14 +0000 (12:57 -0600)]
dt-bindings: display: himax-hx8394: Add Powkiddy X55 panel

Add compatible string for the Powkiddy X55 panel.

Signed-off-by: Chris Morgan <[email protected]>
Acked-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]
15 months agodrm/panel: himax-hx8394: Add Panel Rotation Support
Chris Morgan [Mon, 4 Dec 2023 18:57:13 +0000 (12:57 -0600)]
drm/panel: himax-hx8394: Add Panel Rotation Support

Add support for setting the rotation property for the Himax HX8394
panel.

Signed-off-by: Chris Morgan <[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]
15 months agodt-bindings: display: Document Himax HX8394 panel rotation
Chris Morgan [Mon, 4 Dec 2023 18:57:12 +0000 (12:57 -0600)]
dt-bindings: display: Document Himax HX8394 panel rotation

Document panel rotation for Himax HX8394 display panel.

Signed-off-by: Chris Morgan <[email protected]>
Acked-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]
15 months agodrm/panel: himax-hx8394: Drop shutdown logic
Chris Morgan [Mon, 4 Dec 2023 18:57:11 +0000 (12:57 -0600)]
drm/panel: himax-hx8394: Drop shutdown logic

The driver shutdown is duplicate as it calls drm_unprepare and
drm_disable which are called anyway when associated drivers are
shutdown/removed.

Signed-off-by: Chris Morgan <[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]
15 months agodrm/panel: himax-hx8394: Drop prepare/unprepare tracking
Chris Morgan [Mon, 4 Dec 2023 18:57:10 +0000 (12:57 -0600)]
drm/panel: himax-hx8394: Drop prepare/unprepare tracking

Drop the panel specific prepare/unprepare logic. This is now tracked
by the DRM stack [1].

[1] commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in
drm_panel")

Signed-off-by: Chris Morgan <[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]
15 months agodrm/panel: simple: Add BOE BP101WX1-100 panel
Tony Lindgren [Mon, 27 Nov 2023 05:15:44 +0000 (07:15 +0200)]
drm/panel: simple: Add BOE BP101WX1-100 panel

This panel is found on Motorola mapphone tablets from mz615 to mz617.

Signed-off-by: Tony Lindgren <[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]
15 months agodt-bindings: display: simple: Add boe,bp101wx1-100 panel
Tony Lindgren [Mon, 27 Nov 2023 05:15:43 +0000 (07:15 +0200)]
dt-bindings: display: simple: Add boe,bp101wx1-100 panel

This panel is found on Motorola mapphone tablets mz615 to mz617.

Signed-off-by: Tony Lindgren <[email protected]>
Acked-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]
15 months agodrm/imagination: vm: make use of GPUVM's drm_exec helper
Danilo Krummrich [Wed, 29 Nov 2023 22:08:01 +0000 (23:08 +0100)]
drm/imagination: vm: make use of GPUVM's drm_exec helper

Make use of GPUVM's drm_exec helper functions preventing direct access
to GPUVM internal data structures, such as the external object list.

This is especially important to ensure following the locking rules
around the GPUVM external object list.

Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code")
Reviewed-by: Donald Robson <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/gpuvm: fall back to drm_exec_lock_obj()
Danilo Krummrich [Wed, 29 Nov 2023 22:08:00 +0000 (23:08 +0100)]
drm/gpuvm: fall back to drm_exec_lock_obj()

Fall back to drm_exec_lock_obj() if num_fences is zero for the
drm_gpuvm_prepare_* function family.

Otherwise dma_resv_reserve_fences() would actually allocate slots even
though num_fences is zero.

Cc: Christian König <[email protected]>
Acked-by: Donald Robson <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/msm/mdss: Handle the reg bus ICC path
Dmitry Baryshkov [Sat, 2 Dec 2023 22:42:47 +0000 (01:42 +0300)]
drm/msm/mdss: Handle the reg bus ICC path

Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's
another path that needs to be handled to ensure MDSS functions properly,
namely the "reg bus", a.k.a the CPU-MDSS interconnect.

Gating that path may have a variety of effects, from none to otherwise
inexplicable DSI timeouts.

Provide a way for MDSS driver to vote on this bus.

A note regarding vote values. Newer platforms have corresponding
bandwidth values in the vendor DT files. For the older platforms there
was a static vote in the mdss_mdp and rotator drivers. I choose to be
conservative here and choose this value as a default.

Co-developed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Konrad Dybcio <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570164/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/mdss: inline msm_mdss_icc_request_bw()
Dmitry Baryshkov [Sat, 2 Dec 2023 22:42:46 +0000 (01:42 +0300)]
drm/msm/mdss: inline msm_mdss_icc_request_bw()

There are just two places where we set the bandwidth: in the resume and
in the suspend paths. Drop the wrapping function
msm_mdss_icc_request_bw() and call icc_set_bw() directly.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570168/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/mdss: Rename path references to mdp_path
Konrad Dybcio [Sat, 2 Dec 2023 22:42:45 +0000 (01:42 +0300)]
drm/msm/mdss: Rename path references to mdp_path

The DPU1 driver needs to handle all MDPn<->DDR paths, as well as
CPU<->SLAVE_DISPLAY_CFG. The former ones share how their values are
calculated, but the latter one has static predefines spanning all SoCs.

In preparation for supporting the CPU<->SLAVE_DISPLAY_CFG path, rename
the path-related struct members to include "mdp_".

Signed-off-by: Konrad Dybcio <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570163/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/mdss: switch mdss to use devm_of_icc_get()
Dmitry Baryshkov [Sat, 2 Dec 2023 22:42:44 +0000 (01:42 +0300)]
drm/msm/mdss: switch mdss to use devm_of_icc_get()

Stop using hand-written reset function for ICC release, use
devm_of_icc_get() instead.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570161/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm: dsi: add support for DSI 2.8.0
Neil Armstrong [Mon, 30 Oct 2023 10:36:30 +0000 (11:36 +0100)]
drm/msm: dsi: add support for DSI 2.8.0

Add DSI Controller version 2.8.0 support for the SM8650 platform.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564977/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm: dsi: add support for DSI-PHY on SM8650
Neil Armstrong [Mon, 30 Oct 2023 10:36:29 +0000 (11:36 +0100)]
drm/msm: dsi: add support for DSI-PHY on SM8650

Add DSI PHY support for the SM8650 platform.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564976/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm: mdss: add support for SM8650
Neil Armstrong [Mon, 30 Oct 2023 10:36:28 +0000 (11:36 +0100)]
drm/msm: mdss: add support for SM8650

Add Mobile Display Subsystem (MDSS) support for the SM8650 platform.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564980/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dpu: add support for SM8650 DPU
Neil Armstrong [Mon, 30 Oct 2023 10:36:27 +0000 (11:36 +0100)]
drm/msm/dpu: add support for SM8650 DPU

Add DPU version 10.0 support for the SM8650 platform.

Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564975/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodt-bindings: display: msm: document the SM8650 Mobile Display Subsystem
Neil Armstrong [Mon, 30 Oct 2023 10:36:26 +0000 (11:36 +0100)]
dt-bindings: display: msm: document the SM8650 Mobile Display Subsystem

Document the Mobile Display Subsystem (MDSS) on the SM8650 Platform.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564982/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodt-bindings: display: msm: document the SM8650 DPU
Neil Armstrong [Mon, 30 Oct 2023 10:36:25 +0000 (11:36 +0100)]
dt-bindings: display: msm: document the SM8650 DPU

Document the DPU Display Controller on the SM8650 Platform.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564974/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodt-bindings: display: msm-dsi-controller-main: document the SM8650 DSI Controller
Neil Armstrong [Mon, 30 Oct 2023 10:36:24 +0000 (11:36 +0100)]
dt-bindings: display: msm-dsi-controller-main: document the SM8650 DSI Controller

Document the DSI Controller on the SM8650 Platform.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564972/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodt-bindings: display: msm-dsi-phy-7nm: document the SM8650 DSI PHY
Neil Armstrong [Mon, 30 Oct 2023 10:36:23 +0000 (11:36 +0100)]
dt-bindings: display: msm-dsi-phy-7nm: document the SM8650 DSI PHY

Document the DSI PHY on the SM8650 Platform.

Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/564970/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dpu: Add hw revision 4.1 (SDM670)
Richard Acayan [Tue, 17 Oct 2023 02:18:12 +0000 (22:18 -0400)]
drm/msm/dpu: Add hw revision 4.1 (SDM670)

The Snapdragon 670 uses similar clocks (with one frequency added) to the
Snapdragon 845 but reports DPU revision 4.1. Add support for this DPU
with configuration from the Pixel 3a downstream kernel.

Since revision 4.0 is SDM845, reuse some configuration from its catalog
entry.

Link: https://android.googlesource.com/kernel/msm/+/368478b0ae76566927a2769a2bf24dfe7f38bb78/arch/arm64/boot/dts/qcom/sdm670-sde.dtsi
Signed-off-by: Richard Acayan <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/562965/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm: mdss: add support for SDM670
Richard Acayan [Tue, 17 Oct 2023 02:18:11 +0000 (22:18 -0400)]
drm/msm: mdss: add support for SDM670

Add support for the MDSS block on the SDM670 platform.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Richard Acayan <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/562963/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodt-bindings: display: msm: Add SDM670 MDSS
Richard Acayan [Tue, 17 Oct 2023 02:18:10 +0000 (22:18 -0400)]
dt-bindings: display: msm: Add SDM670 MDSS

Add documentation for the SDM670 display subsystem, adapted from the
SDM845 and SM6125 documentation.

Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Richard Acayan <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/562961/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodt-bindings: display/msm: sdm845-dpu: Describe SDM670
Richard Acayan [Tue, 17 Oct 2023 02:18:09 +0000 (22:18 -0400)]
dt-bindings: display/msm: sdm845-dpu: Describe SDM670

The SDM670 display controller has the same requirements as the SDM845
display controller, despite having distinct properties as described in
the catalog. Add the compatible for SDM670 to the SDM845 controller.

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Richard Acayan <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/562959/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodt-bindings: display/msm: dsi-controller-main: add SDM670 compatible
Richard Acayan [Tue, 17 Oct 2023 02:18:08 +0000 (22:18 -0400)]
dt-bindings: display/msm: dsi-controller-main: add SDM670 compatible

The SDM670 has DSI ports. Add the compatible for the controller.

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Richard Acayan <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/562958/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/gpu: drop duplicating VIG feature masks
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:34 +0000 (01:40 +0200)]
drm/msm/gpu: drop duplicating VIG feature masks

After folding QSEED3LITE and QSEED4 feature bits into QSEED3_COMPATIBLE
several VIG feature masks became equal. Drop these duplicates.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570107/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:33 +0000 (01:40 +0200)]
drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4
are all related to different versions of the same HW scaling block.
Corresponding driver parts use scaler_blk.version to identify the
correct way to program the hardware. In order to simplify the driver
codepath, merge these three feature bits into QSEED3_COMPATIBLE bin.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570114/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: rewrite scaler and CSC presense checks
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:32 +0000 (01:40 +0200)]
drm/msm/dpu: rewrite scaler and CSC presense checks

In order to check whether the SSPP block has scaler and CSC subblocks
the funcion dpu_plane_atomic_check_pipe() uses macros which enumerate
all possible scaler and CSC features. Replace those checks with the
scaler and CSC subblock length checks in order to be able to drop those
two macros.

Suggested-by: Abhinav Kumar <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570113/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: drop DPU_HW_SUBBLK_INFO macro
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:31 +0000 (01:40 +0200)]
drm/msm/dpu: drop DPU_HW_SUBBLK_INFO macro

As the subblock info is now mostly gone, inline and drop the macro
DPU_HW_SUBBLK_INFO.

Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570106/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: deduplicate some (most) of SSPP sub-blocks
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:30 +0000 (01:40 +0200)]
drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks

As we have dropped the variadic parts of SSPP sub-blocks declarations,
deduplicate them now, reducing memory cruft.

Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570112/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: drop the `smart_dma_priority' field from struct dpu_sspp_sub_blks
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:29 +0000 (01:40 +0200)]
drm/msm/dpu: drop the `smart_dma_priority' field from struct dpu_sspp_sub_blks

In preparation to deduplicating SSPP subblocks, drop the (unused)
`smart_dma_priority' field from struct dpu_sspp_sub_blks. If it is
needed later (e.g. for SmartDMA v1), it should be added to the SSPP
declarations themselves.

Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570103/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: drop the `id' field from DPU_HW_SUBBLK_INFO
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:28 +0000 (01:40 +0200)]
drm/msm/dpu: drop the `id' field from DPU_HW_SUBBLK_INFO

The field `id' is not used for subblocks. The handling code usually
knows, which sub-block it is now looking at. Drop the field completely.

Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570100/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: Drop unused qseed_type from catalog dpu_caps
Marijn Suijten [Fri, 1 Dec 2023 23:40:27 +0000 (01:40 +0200)]
drm/msm/dpu: Drop unused qseed_type from catalog dpu_caps

The SSPP scaler subblk is responsible for reporting its version (via the
.id field, feature bits on the parent SSPP block, and since recently
also from reading a register to supersede a read-but-unset version field
in the catalog), leaving this global qseed_type field logically unused.
Remove this dead code to lighten the catalog and bringup-overhead.

Signed-off-by: Marijn Suijten <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570109/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: Drop unused get_scaler_ver callback from SSPP
Marijn Suijten [Fri, 1 Dec 2023 23:40:26 +0000 (01:40 +0200)]
drm/msm/dpu: Drop unused get_scaler_ver callback from SSPP

This pointer callback is never used and should be removed.

Signed-off-by: Marijn Suijten <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
[DB: dropped the helpers completely, which are unused now]
Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570096/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/msm/dpu: populate SSPP scaler block version
Dmitry Baryshkov [Fri, 1 Dec 2023 23:40:25 +0000 (01:40 +0200)]
drm/msm/dpu: populate SSPP scaler block version

The function _dpu_hw_sspp_setup_scaler3() passes and
dpu_hw_setup_scaler3() uses scaler_blk.version to determine in which way
the scaler (QSEED3) block should be programmed. However up to now we
were not setting this field. Set it now, splitting the vig_sblk data
which has different version fields.

Reported-by: Marijn Suijten <[email protected]>
Fixes: 9b6f4fedaac2 ("drm/msm/dpu: Add SM6125 support")
Fixes: 27f0df03f3ff ("drm/msm/dpu: Add SM6375 support")
Fixes: 3186acba5cdc ("drm/msm/dpu: Add SM6350 support")
Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550")
Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP")
Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog")
Fixes: 100d7ef6995d ("drm/msm/dpu: add support for SM8450")
Fixes: 3581b7062cec ("drm/msm/disp/dpu1: add support for display on SM6115")
Fixes: dabfdd89eaa9 ("drm/msm/disp/dpu1: add inline rotation support for sc7280")
Fixes: f3af2d6ee9ab ("drm/msm/dpu: Add SC8180x to hw catalog")
Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog")
Fixes: af776a3e1c30 ("drm/msm/dpu: add SM8250 to hw catalog")
Fixes: 386fced3f76f ("drm/msm/dpu: add SM8150 to hw catalog")
Fixes: b75ab05a3479 ("msm:disp:dpu1: add scaler support on SC7180 display")
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570098/
Link: https://lore.kernel.org/r/[email protected]
15 months agodrm/v3d: Fix missing error code in v3d_submit_cpu_ioctl()
Harshit Mogalapalli [Mon, 4 Dec 2023 12:21:01 +0000 (04:21 -0800)]
drm/v3d: Fix missing error code in v3d_submit_cpu_ioctl()

Smatch warns:
drivers/gpu/drm/v3d/v3d_submit.c:1222 v3d_submit_cpu_ioctl()
warn: missing error code 'ret'

When there is no job type or job is submitted with wrong number of BOs
it is an error path, ret is zero at this point which is incorrect
return.

Fix this by changing it to -EINVAL.

Fixes: aafc1a2bea67 ("drm/v3d: Add a CPU job submission")
Signed-off-by: Harshit Mogalapalli <[email protected]>
Reviewed-by: Melissa Wen <[email protected]>
Signed-off-by: Melissa Wen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/msm/dp: add a missing unlock in dp_hpd_plug_handle()
Harshit Mogalapalli [Mon, 4 Dec 2023 17:13:14 +0000 (09:13 -0800)]
drm/msm/dp: add a missing unlock in dp_hpd_plug_handle()

When pm_runtime_resume_and_get() fails, unlock before returning.

Fixes: 5814b8bf086a ("drm/msm/dp: incorporate pm_runtime framework into DP driver")
Signed-off-by: Harshit Mogalapalli <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570395/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agoRevert "drm: Introduce pixel_source DRM plane property"
Dmitry Baryshkov [Mon, 4 Dec 2023 13:13:54 +0000 (15:13 +0200)]
Revert "drm: Introduce pixel_source DRM plane property"

This reverts commit e50e5fed41c7eed2db4119645bf3480ec43fec11.

Although the Solid Fill planes patchset got all reviews and
acknowledgements, it doesn't fulfill requirements for the new uABI. It
has neither corresponding open-source userspace implementation nor the
IGT tests coverage. Reverting this patchset until userspace obligations
are fulfilled.

Acked-by: Simon Ser <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agoRevert "drm: Introduce solid fill DRM plane property"
Dmitry Baryshkov [Mon, 4 Dec 2023 13:13:53 +0000 (15:13 +0200)]
Revert "drm: Introduce solid fill DRM plane property"

This reverts commit 85863a4e16e77079ee14865905ddc3ef9483a640.

Although the Solid Fill planes patchset got all reviews and
acknowledgements, it doesn't fulfill requirements for the new uABI. It
has neither corresponding open-source userspace implementation nor the
IGT tests coverage. Reverting this patchset until userspace obligations
are fulfilled.

Acked-by: Simon Ser <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agoRevert "drm: Add solid fill pixel source"
Dmitry Baryshkov [Mon, 4 Dec 2023 13:13:52 +0000 (15:13 +0200)]
Revert "drm: Add solid fill pixel source"

This reverts commit 4b64167042927531f4cfaf035b8f88c2f7a05f06.

Although the Solid Fill planes patchset got all reviews and
acknowledgements, it doesn't fulfill requirements for the new uABI. It
has neither corresponding open-source userspace implementation nor the
IGT tests coverage. Reverting this patchset until userspace obligations
are fulfilled.

Acked-by: Simon Ser <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agoRevert "drm/atomic: Add pixel source to plane state dump"
Dmitry Baryshkov [Mon, 4 Dec 2023 13:13:51 +0000 (15:13 +0200)]
Revert "drm/atomic: Add pixel source to plane state dump"

This reverts commit 8283ac7871a959848e09fc6593b8c12b8febfee6.

Although the Solid Fill planes patchset got all reviews and
acknowledgements, it doesn't fulfill requirements for the new uABI. It
has neither corresponding open-source userspace implementation nor the
IGT tests coverage. Reverting this patchset until userspace obligations
are fulfilled.

Acked-by: Simon Ser <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agoRevert "drm/atomic: Add solid fill data to plane state dump"
Dmitry Baryshkov [Mon, 4 Dec 2023 13:13:50 +0000 (15:13 +0200)]
Revert "drm/atomic: Add solid fill data to plane state dump"

This reverts commit e86413f5442ee094e66b3e75f2d3419ed0df9520.

Although the Solid Fill planes patchset got all reviews and
acknowledgements, it doesn't fulfill requirements for the new uABI. It
has neither corresponding open-source userspace implementation nor the
IGT tests coverage. Reverting this patchset until userspace obligations
are fulfilled.

Acked-by: Simon Ser <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agoRevert "drm/atomic: Move framebuffer checks to helper"
Dmitry Baryshkov [Mon, 4 Dec 2023 13:13:49 +0000 (15:13 +0200)]
Revert "drm/atomic: Move framebuffer checks to helper"

This reverts commit 4ba6b7a646321e740c7f2d80c90505019c4e8fce.

Although the Solid Fill planes patchset got all reviews and
acknowledgements, it doesn't fulfill requirements for the new uABI. It
has neither corresponding open-source userspace implementation nor the
IGT tests coverage. Reverting this patchset until userspace obligations
are fulfilled.

Acked-by: Simon Ser <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agoRevert "drm/atomic: Loosen FB atomic checks"
Dmitry Baryshkov [Mon, 4 Dec 2023 13:13:48 +0000 (15:13 +0200)]
Revert "drm/atomic: Loosen FB atomic checks"

This reverts commit f1e75da5364e780905d9cd6043f9c74cdcf84073.

Although the Solid Fill planes patchset got all reviews and
acknowledgements, it doesn't fulfill requirements for the new uABI. It
has neither corresponding open-source userspace implementation nor the
IGT tests coverage. Reverting this patchset until userspace obligations
are fulfilled.

Acked-by: Simon Ser <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/bridge: migrate bridge_chains to per-encoder file
Dmitry Baryshkov [Sun, 3 Dec 2023 11:53:14 +0000 (14:53 +0300)]
drm/bridge: migrate bridge_chains to per-encoder file

Instead of having a single file with all bridge chains, list bridges
under a corresponding per-encoder debugfs directory.

While we are at it, also slightly improve the formatting of the bridge
data: split a single line entry into multiple lines, include the symbol
name of the bridge funcs and add the textual representation of the
bridge ops.

Example of the listing:

$ cat /sys/kernel/debug/dri/0/encoder-0/bridges
bridge[0]: dsi_mgr_bridge_funcs
type: [0] Unknown
ops: [0]
bridge[1]: lt9611uxc_bridge_funcs
type: [11] HDMI-A
OF: /soc@0/geniqup@9c0000/i2c@994000/hdmi-bridge@2b:lontium,lt9611uxc
ops: [7] detect edid hpd

Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/encoder: register per-encoder debugfs dir
Dmitry Baryshkov [Sun, 3 Dec 2023 11:53:13 +0000 (14:53 +0300)]
drm/encoder: register per-encoder debugfs dir

Each of connectors and CRTCs used by the DRM device provides debugfs
directory, which is used by several standard debugfs files and can
further be extended by the driver. Add such generic debugfs directories
for encoder.

Reviewed-by: Neil Armstrong <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agousb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE
Dmitry Baryshkov [Sun, 3 Dec 2023 11:43:33 +0000 (14:43 +0300)]
usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE

Use the freshly defined DRM_AUX_HPD_BRIDGE instead of open-coding the
same functionality for the DRM bridge chain termination.

Acked-by: Bryan O'Donoghue <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agosoc: qcom: pmic-glink: switch to DRM_AUX_HPD_BRIDGE
Dmitry Baryshkov [Sun, 3 Dec 2023 11:43:32 +0000 (14:43 +0300)]
soc: qcom: pmic-glink: switch to DRM_AUX_HPD_BRIDGE

Use the freshly defined DRM_AUX_HPD_BRIDGE instead of open-coding the
same functionality for the DRM bridge chain termination.

Reviewed-by: Bjorn Andersson <[email protected]>
Acked-by: Bjorn Andersson <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/bridge: implement generic DP HPD bridge
Dmitry Baryshkov [Sun, 3 Dec 2023 11:43:31 +0000 (14:43 +0300)]
drm/bridge: implement generic DP HPD bridge

Several USB-C controllers implement a pretty simple DRM bridge which
implements just the HPD notification operations. Add special helper
for creating such simple bridges.

Acked-by: Neil Armstrong <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agousb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE
Dmitry Baryshkov [Sun, 3 Dec 2023 11:43:30 +0000 (14:43 +0300)]
usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE

Switch to using the new DRM_AUX_BRIDGE helper to create the
transparent DRM bridge device instead of handcoding corresponding
functionality.

Reviewed-by: Heikki Krogerus <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agophy: qcom: qmp-combo: switch to DRM_AUX_BRIDGE
Dmitry Baryshkov [Sun, 3 Dec 2023 11:43:29 +0000 (14:43 +0300)]
phy: qcom: qmp-combo: switch to DRM_AUX_BRIDGE

Switch to using the new DRM_AUX_BRIDGE helper to create the
transparent DRM bridge device instead of handcoding corresponding
functionality.

Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/bridge: add transparent bridge helper
Dmitry Baryshkov [Sun, 3 Dec 2023 11:43:28 +0000 (14:43 +0300)]
drm/bridge: add transparent bridge helper

Define a helper for creating simple transparent bridges which serve the
only purpose of linking devices into the bridge chain up to the last
bridge representing the connector. This is especially useful for
DP/USB-C bridge chains, which can span across several devices, but do
not require any additional functionality from the intermediate bridges.

Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agoMAINTAINERS: Document Imagination PowerVR driver patches go via drm-misc
Frank Binns [Mon, 4 Dec 2023 13:28:47 +0000 (13:28 +0000)]
MAINTAINERS: Document Imagination PowerVR driver patches go via drm-misc

This is the tree used by nearly all other DRM drivers, so use it for the
PowerVR driver as well.

Signed-off-by: Frank Binns <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/bridge: nxp-ptn3460: fix i2c_master_send() error checking
Dan Carpenter [Mon, 4 Dec 2023 12:29:00 +0000 (15:29 +0300)]
drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

The i2c_master_send/recv() functions return negative error codes or the
number of bytes that were able to be sent/received.  This code has
two problems.  1)  Instead of checking if all the bytes were sent or
received, it checks that at least one byte was sent or received.
2) If there was a partial send/receive then we should return a negative
error code but this code returns success.

Fixes: a9fe713d7d45 ("drm/bridge: Add PTN3460 bridge driver")
Cc: [email protected]
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/bridge: lt8912b: Add power supplies
Stefan Eichenberger [Wed, 15 Nov 2023 12:13:38 +0000 (13:13 +0100)]
drm/bridge: lt8912b: Add power supplies

Add supplies to the driver that can be used to turn the Lontium lt8912b
on and off. It can have up to 7 independent supplies, we add them all
and enable/disable them with bulk_enable/disable.

Signed-off-by: Stefan Eichenberger <[email protected]>
Signed-off-by: Francesco Dolcini <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodt-bindings: display: bridge: lt8912b: Add power supplies
Stefan Eichenberger [Wed, 15 Nov 2023 12:13:37 +0000 (13:13 +0100)]
dt-bindings: display: bridge: lt8912b: Add power supplies

Add Lontium lt8912b power supplies.

Signed-off-by: Stefan Eichenberger <[email protected]>
Signed-off-by: Francesco Dolcini <[email protected]>
Acked-by: Conor Dooley <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/bridge: lt8912b: Add suspend/resume support
Stefan Eichenberger [Wed, 15 Nov 2023 12:13:36 +0000 (13:13 +0100)]
drm/bridge: lt8912b: Add suspend/resume support

Add support for suspend and resume. The lt8912b will power off when
going into suspend and power on when resuming.

Signed-off-by: Stefan Eichenberger <[email protected]>
Signed-off-by: Francesco Dolcini <[email protected]>
Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/display/dp: Add the remaining Square PHY patterns DPCD register definitions
Khaled Almahallawy [Thu, 30 Nov 2023 23:15:10 +0000 (15:15 -0800)]
drm/display/dp: Add the remaining Square PHY patterns DPCD register definitions

DP2.1 Specs added new DPCDs definitions for square pattern configs[1]
These new definitions are used for UHBR Source Transmitter
Equalizations tests[2]. Add the 3 new values for square pattern.

v2: rebase

[1]: DP2.1 Specs - 2.12.3.6.5 Square Pattern
[2]: DP2.1 PHY CTS specs - 4.3 UHBR Source Transmitter Equalization

Cc: Jani Nikula <[email protected]>
Cc: Imre Deak <[email protected]>
Cc: Lee Shawn C <[email protected]>
Signed-off-by: Khaled Almahallawy <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/qxl: remove unused declaration
heminhong [Fri, 10 Nov 2023 05:50:31 +0000 (13:50 +0800)]
drm/qxl: remove unused declaration

Some functions are never used by the driver,
removing the functions declaration, it can be reducing program size,
and improving code readability and maintainability.

Signed-off-by: heminhong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Maxime Ripard <[email protected]>
15 months agodrm/drv: propagate errors from drm_modeset_register_all()
Dmitry Baryshkov [Sat, 2 Dec 2023 22:55:52 +0000 (01:55 +0300)]
drm/drv: propagate errors from drm_modeset_register_all()

In case the drm_modeset_register_all() function fails, its error code
will be ignored. Instead make the drm_dev_register() bail out in case of
such an error.

Fixes: 79190ea2658a ("drm: Add callbacks for late registering")
Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/imagination: Removed unused function to_pvr_vm_gpuva()
Donald Robson [Thu, 30 Nov 2023 16:00:17 +0000 (16:00 +0000)]
drm/imagination: Removed unused function to_pvr_vm_gpuva()

This function is now unused, hence it causes a compiler warning.

   drivers/gpu/drm/imagination/pvr_vm.c:112:22: warning: unused function 'to_pvr_vm_gpuva' [-Wunused-function]
     112 | struct pvr_vm_gpuva *to_pvr_vm_gpuva(struct drm_gpuva *gpuva)
         |                      ^

Remove the function for now.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code")
Signed-off-by: Donald Robson <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/imagination: pvr_gpuvm_free() now static
Donald Robson [Thu, 30 Nov 2023 16:00:16 +0000 (16:00 +0000)]
drm/imagination: pvr_gpuvm_free() now static

The function below is used only within this source file, but is not static.

drivers/gpu/drm/imagination/pvr_vm.c:542:6: error: no previous prototype for 'pvr_gpuvm_free' [-Werror=missing-prototypes]
  542 | void pvr_gpuvm_free(struct drm_gpuvm *gpuvm)

Make it static.

Reported-by: Arnd Bergmann <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code")
Signed-off-by: Donald Robson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Maxime Ripard <[email protected]>
15 months agodrm/imagination: pvr_device_process_active_queues now static
Donald Robson [Thu, 30 Nov 2023 16:00:15 +0000 (16:00 +0000)]
drm/imagination: pvr_device_process_active_queues now static

The function below is used only within this source file, but is not static.

>> drivers/gpu/drm/imagination/pvr_device.c:129:6: warning: no previous prototype for function 'pvr_device_process_active_queues' [-Wmissing-prototypes]
     129 | void pvr_device_process_active_queues(struct pvr_device *pvr_dev)
         |      ^
   drivers/gpu/drm/imagination/pvr_device.c:129:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     129 | void pvr_device_process_active_queues(struct pvr_device *pvr_dev)
         | ^
         | static
   1 warning generated.

Make it static.

Reported-by: Arnd Bergmann <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling")
Signed-off-by: Donald Robson <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/imagination: Fixed missing header in pvr_fw_meta
Donald Robson [Thu, 30 Nov 2023 16:00:14 +0000 (16:00 +0000)]
drm/imagination: Fixed missing header in pvr_fw_meta

A missing header causes the compiler to warn that the function below is not
forward declared.

>> drivers/gpu/drm/imagination/pvr_fw_meta.c:33:1: warning: no previous prototype for function 'pvr_meta_cr_read32' [-Wmissing-prototypes]
      33 | pvr_meta_cr_read32(struct pvr_device *pvr_dev, u32 reg_addr, u32 *reg_value_out)
         | ^
   drivers/gpu/drm/imagination/pvr_fw_meta.c:32:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      32 | int
         | ^
         | static
   1 warning generated.

Include the correct header.

Reported-by: Arnd Bergmann <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support")
Signed-off-by: Donald Robson <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/imagination: Fixed warning due to implicit cast to bool
Donald Robson [Thu, 30 Nov 2023 16:00:13 +0000 (16:00 +0000)]
drm/imagination: Fixed warning due to implicit cast to bool

This line appears to confuse the compiler and had been noticed previously in
clang-tidy output. There isn't anything fundamentally wrong that I can see.
I suspect that it just looks like a mistake - hence the first note.  By making
the second operand an actual bool result, const correctness can be preserved
while silencing the warning.

>> drivers/gpu/drm/imagination/pvr_device_info.c:230:47: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
     230 |         } else if (features_size == mapping_max_size && (mapping_max & 63)) {
         |                                                      ^  ~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: use '&' for a bitwise operation
     230 |         } else if (features_size == mapping_max_size && (mapping_max & 63)) {
         |                                                      ^~
         |                                                      &
   drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: remove constant to silence this warning
     230 |         } else if (features_size == mapping_max_size && (mapping_max & 63)) {
         |                                                     ~^~~~~~~~~~~~~~~~~~~~~
   1 warning generated.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: f99f5f3ea7ef ("drm/imagination: Add GPU ID parsing and firmware loading")
Signed-off-by: Donald Robson <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/test: add a test suite for GEM objects backed by shmem
Marco Pagani [Thu, 30 Nov 2023 17:14:16 +0000 (18:14 +0100)]
drm/test: add a test suite for GEM objects backed by shmem

This patch introduces an initial KUnit test suite for GEM objects
backed by shmem buffers.

Suggested-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Marco Pagani <[email protected]>
v5:
- using __drm_kunit_helper_alloc_drm_device() to avoid local struct
v4:
- Add missing MMU dependency for DRM_GEM_SHMEM_HELPER (kernel test robot)
v3:
- Explicitly cast pointers in the helpers
- Removed unused pointer to parent dev in struct fake_dev
- Test entries reordering in Kconfig and Makefile sent as a separate patch
v2:
- Improved description of test cases
- Cleaner error handling using KUnit actions
- Alphabetical order in Kconfig and Makefile

Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm: remove drm_bridge_hpd_disable() from drm_bridge_connector_destroy()
Abhinav Kumar [Tue, 19 Sep 2023 17:48:12 +0000 (10:48 -0700)]
drm: remove drm_bridge_hpd_disable() from drm_bridge_connector_destroy()

drm_bridge_hpd_enable()/drm_bridge_hpd_disable() callbacks call into
the respective driver's hpd_enable()/hpd_disable() ops. These ops control
the HPD enable/disable logic which in some cases like MSM can be a
dedicate hardware block to control the HPD.

During probe_defer cases, a connector can be initialized and then later
destroyed till the probe is retried. During connector destroy in these
cases, the hpd_disable() callback gets called without a corresponding
hpd_enable() leading to an unbalanced state potentially causing even
a crash.

This can be avoided by the respective drivers maintaining their own
state logic to ensure that a hpd_disable() without a corresponding
hpd_enable() just returns without doing anything.

However, to have a generic fix it would be better to avoid the
hpd_disable() callback from the connector destroy path and let
the hpd_enable() / hpd_disable() balance be maintained by the
corresponding drm_bridge_connector_enable_hpd() /
drm_bridge_connector_disable_hpd() APIs which should get called by
drm_kms_helper_disable_hpd().

changes in v2:
- minor change in commit text (Dmitry)

Signed-off-by: Abhinav Kumar <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm: improve the documentation of connector hpd ops
Abhinav Kumar [Wed, 20 Sep 2023 20:13:58 +0000 (13:13 -0700)]
drm: improve the documentation of connector hpd ops

While making the changes in [1], it was noted that the documentation
of the enable_hpd() and disable_hpd() does not make it clear that
these ops should not try to do hpd state maintenance and should only
enable/disable hpd related hardware for the connector.

The state management of these calls to make sure these calls are
balanced is handled by the DRM core and we should keep it that way
to minimize the overhead in the drivers which implement these ops.

[1]: https://patchwork.freedesktop.org/patch/558387/

Signed-off-by: Abhinav Kumar <[email protected]>
Suggested-by: Laurent Pinchart <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
15 months agodrm/msm/dsi: Enable runtime PM
Konrad Dybcio [Tue, 20 Jun 2023 11:43:21 +0000 (13:43 +0200)]
drm/msm/dsi: Enable runtime PM

Some devices power the DSI PHY/PLL through a power rail that we model
as a GENPD. Enable runtime PM to make it suspendable.

Signed-off-by: Konrad Dybcio <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/543352/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks
Konrad Dybcio [Tue, 20 Jun 2023 11:43:20 +0000 (13:43 +0200)]
drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks

This helper has been introduced to avoid programmer errors (missing
_put calls leading to dangling refcnt) when using pm_runtime_get, use it.

While at it, start checking the return value.

Signed-off-by: Konrad Dybcio <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Fixes: 5c8290284402 ("drm/msm/dsi: Split PHY drivers to separate files")
Patchwork: https://patchwork.freedesktop.org/patch/543350/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog
Bjorn Andersson [Fri, 1 Dec 2023 00:35:01 +0000 (16:35 -0800)]
drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog

Similar to SC8280XP, the misconfigured SAFE logic causes rather
significant delays in __arm_smmu_tlb_sync(), resulting in poor
performance for things such as USB.

Introduce appropriate SAFE values for SC8180X to correct this.

Fixes: f3af2d6ee9ab ("drm/msm/dpu: Add SC8180x to hw catalog")
Signed-off-by: Bjorn Andersson <[email protected]>
Reported-by: Anton Bambura <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/569840/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dpu: Capture dpu snapshot when frame_done_timer timeouts
Paloma Arellano [Thu, 30 Nov 2023 22:47:37 +0000 (14:47 -0800)]
drm/msm/dpu: Capture dpu snapshot when frame_done_timer timeouts

Trigger a devcoredump to dump dpu registers and capture the drm atomic
state when the frame_done_timer timeouts.

v2: Optimize the format in which frame_done_timeout_cnt is incremented
v3: Describe parameter frame_done_timeout_cnt in dpu_encoder_virt

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Paloma Arellano <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/569834/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dpu: Correct UBWC settings for sc8280xp
Rob Clark [Thu, 30 Nov 2023 19:21:18 +0000 (11:21 -0800)]
drm/msm/dpu: Correct UBWC settings for sc8280xp

The UBWC settings need to match between the display and GPU.  When we
updated the GPU settings, we forgot to make the corresponding update on
the display side.

Reported-by: Steev Klimaszewski <[email protected]>
Fixes: 07e6de738aa6 ("drm/msm/a690: Fix reg values for a690")
Signed-off-by: Rob Clark <[email protected]>
Tested-by: Steev Klimaszewski <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/569817/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()
Kuogee Hsieh [Fri, 1 Dec 2023 23:19:49 +0000 (15:19 -0800)]
drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()

Currently eDP population is done at msm_dp_modeset_init() which happen
at binding time. Move eDP population to be done at display probe time
so that probe deferral cases can be handled effectively.
wait_for_hpd_asserted callback is added during drm_dp_aux_init()
to ensure eDP's HPD is up before proceeding eDP population.

Changes in v5:
-- inline dp_display_auxbus_population() and delete it

Changes in v4:
-- delete duplicate initialize code to dp_aux before drm_dp_aux_register()
-- delete of_get_child_by_name(dev->of_node, "aux-bus") and inline the
   function
-- not initialize rc = 0

Changes in v3:
-- add done_probing callback into devm_of_dp_aux_populate_bus()

Signed-off-by: Kuogee Hsieh <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570074/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dp: delete EV_HPD_INIT_SETUP
Kuogee Hsieh [Fri, 1 Dec 2023 23:19:48 +0000 (15:19 -0800)]
drm/msm/dp: delete EV_HPD_INIT_SETUP

EV_HPD_INIT_SETUP flag is used to trigger the initialization of external
DP host controller. Since external DP host controller initialization had
been incorporated into pm_runtime_resume(), this flag became obsolete.
msm_dp_irq_postinstall() which triggers EV_HPD_INIT_SETUP event is
obsoleted accordingly.

Changes in v4:
-- reworded commit text
-- drop EV_HPD_INIT_SETUP
-- drop msm_dp_irq_postinstall()

Changes in v3:
-- drop EV_HPD_INIT_SETUP and msm_dp_irq_postinstall()

Signed-off-by: Kuogee Hsieh <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570075/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dp: incorporate pm_runtime framework into DP driver
Kuogee Hsieh [Fri, 1 Dec 2023 23:19:47 +0000 (15:19 -0800)]
drm/msm/dp: incorporate pm_runtime framework into DP driver

Currently DP driver is executed independent of PM runtime framework.
This leads msm eDP panel can not being detected by edp_panel driver
during generic_edp_panel_probe() due to AUX DPCD read failed at
edp panel driver. Incorporate PM runtime framework into DP driver so
that host controller's power and clocks are enable/disable through
PM runtime mechanism.  Once PM runtime framework is incorporated into
DP driver, waking up device from power up path is not necessary. Hence
remove it.

After incorporating pm_runtime framework into eDP/DP driver,
dp_pm_suspend() to handle power off both DP phy and controller during
suspend and dp_pm_resume() to handle power on both DP phy and controller
during resume are not necessary. Therefore both dp_pm_suspend() and
dp_pm_resume() are dropped and replace with dp_pm_runtime_suspend() and
dp_pm_runtime_resume() respectively.

Changes in v9:
-- silent compiler warning message at dp_power_init() and dp_power_deinit()
   with W1 flag

Changes in v7:
-- add comments to dp_pm_runtime_resume()
-- add comments to dp_bridge_hpd_enable()
-- delete dp->hpd_state = ST_DISCONNECTED from dp_bridge_hpd_notify()

Changes in v6:
-- delete dp_power_client_deinit(dp->power);
-- remove if (!dp->dp_display.is_edp) condition checkout at plug_handle()
-- remove if (!dp->dp_display.is_edp) condition checkout at unplug_handle()
-- add IRQF_NO_AUTOEN to devm_request_irq()
-- add enable_irq() and disable_irq() to pm_runtime_resume()/suspend()
-- del dp->hpd_state = ST_DISCONNECTED from dp_bridge_hpd_disable()

Changes in v5:
-- remove pm_runtime_put_autosuspend feature, use pm_runtime_put_sync()
-- squash add pm_runtime_force_suspend()/resume() patch into this patch

Changes in v4:
-- reworded commit text to explain why pm_framework is required for
   edp panel
-- reworded commit text to explain autosuspend is choiced
-- delete EV_POWER_PM_GET and PM_EV_POWER_PUT from changes #3
-- delete dp_display_pm_get() and dp_display_pm_Put() from changes #3
-- return value from pm_runtime_resume_and_get() directly
-- check return value of devm_pm_runtime_enable()
-- delete pm_runtime_xxx from dp_display_remove()
-- drop dp_display_host_init() from EV_HPD_INIT_SETUP
-- drop both dp_pm_prepare() and dp_pm_compete() from this change
-- delete ST_SUSPENDED state
-- rewording commit text to add more details regrading the purpose
   of this change

Changes in v3:
-- incorporate removing pm_runtime_xx() from dp_pwer.c to this patch
-- use pm_runtime_resume_and_get() instead of pm_runtime_get()
-- error checking pm_runtime_resume_and_get() return value
-- add EV_POWER_PM_GET and PM_EV_POWER_PUT to handle HPD_GPIO case
-- replace dp_pm_suspend() with pm_runtime_force_suspend()
-- replace dp_pm_resume() with pm_runtime_force_resume()

Signed-off-by: Kuogee Hsieh <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570073/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dp: move parser->parse() and dp_power_client_init() to probe
Kuogee Hsieh [Fri, 1 Dec 2023 23:19:46 +0000 (15:19 -0800)]
drm/msm/dp: move parser->parse() and dp_power_client_init() to probe

Original both parser->parse() and dp_power_client_init() are done at
dp_display_bind() since eDP population is done at binding time.
In the preparation of having eDP population done at probe() time,
move both function from dp_display_bind() to dp_display_probe().

Changes in v6:
-- move dp_power_client_deinit() to remove()

Changes in v5:
-- explain why parser->parse() and dp_power_client_init() are moved to
   probe time
-- tear down sub modules if failed

Changes in v4:
-- split this patch out of "incorporate pm_runtime framework into DP
   driver" patch

Signed-off-by: Kuogee Hsieh <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570065/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes
Kuogee Hsieh [Fri, 1 Dec 2023 23:19:45 +0000 (15:19 -0800)]
drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes

Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge
framework, to report HPD status changes to user space frame work.
Replace it with drm_bridge_hpd_notify() since DP driver is part of drm
bridge.

Signed-off-by: Kuogee Hsieh <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570067/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
15 months agodrm/msm/dp: rename is_connected with link_ready
Kuogee Hsieh [Fri, 1 Dec 2023 23:19:44 +0000 (15:19 -0800)]
drm/msm/dp: rename is_connected with link_ready

The is_connected flag is set to true after DP mainlink successfully
finishes link training to enter into ST_MAINLINK_READY state rather
than being set after the DP dongle is connected. Rename the
is_connected flag with link_ready flag to match the state of DP
driver's state machine.

Changes in v5:
-- reworded commit text according to review comments from change #4

Changes in v4:
-- reworded commit text

Signed-off-by: Kuogee Hsieh <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/570063/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
This page took 0.11351 seconds and 4 git commands to generate.