d69ded4b | 19-Dec-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: link DSPP_2/_3 blocks on SM8550
[ Upstream commit e21f9d85b05361bc343b11ecf84ac12c9cccbc3e ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour trans
drm/msm/dpu: link DSPP_2/_3 blocks on SM8550
[ Upstream commit e21f9d85b05361bc343b11ecf84ac12c9cccbc3e ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time.
Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629961/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-6-38fa961ea992@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
d44b7452 | 19-Dec-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: link DSPP_2/_3 blocks on SM8350
[ Upstream commit 42323d3c9e04c725d27606c31663b80a7cc30218 ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour trans
drm/msm/dpu: link DSPP_2/_3 blocks on SM8350
[ Upstream commit 42323d3c9e04c725d27606c31663b80a7cc30218 ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time.
Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629959/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-5-38fa961ea992@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
ab3077fe | 19-Dec-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: link DSPP_2/_3 blocks on SM8250
[ Upstream commit 8252028092f86d413b3a83e5e76a9615073a0c7f ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour trans
drm/msm/dpu: link DSPP_2/_3 blocks on SM8250
[ Upstream commit 8252028092f86d413b3a83e5e76a9615073a0c7f ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time.
Fixes: 05ae91d960fd ("drm/msm/dpu: enable DSPP support on SM8[12]50") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629956/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-4-38fa961ea992@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
4ec5e149 | 19-Dec-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: link DSPP_2/_3 blocks on SC8180X
[ Upstream commit 0986163245df6bece47113e506143a7e87b0097d ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour tran
drm/msm/dpu: link DSPP_2/_3 blocks on SC8180X
[ Upstream commit 0986163245df6bece47113e506143a7e87b0097d ]
Link DSPP_2 to the LM_2 and DSPP_3 to the LM_3 mixer blocks. This allows using colour transformation matrix (aka night mode) with more outputs at the same time.
Fixes: f5abecfe339e ("drm/msm/dpu: enable DSPP and DSC on sc8180x") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/629954/ Link: https://lore.kernel.org/r/20241220-dpu-fix-catalog-v2-3-38fa961ea992@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
b32f915f | 29-Oct-2024 |
Zichen Xie <zichenxie0106@gmail.com> |
drm/msm/dpu: cast crtc_clk calculation to u64 in _dpu_core_perf_calc_clk()
[ Upstream commit 20c7b42d9dbd048019bfe0af39229e3014007a98 ]
There may be a potential integer overflow issue in _dpu_core_
drm/msm/dpu: cast crtc_clk calculation to u64 in _dpu_core_perf_calc_clk()
[ Upstream commit 20c7b42d9dbd048019bfe0af39229e3014007a98 ]
There may be a potential integer overflow issue in _dpu_core_perf_calc_clk(). crtc_clk is defined as u64, while mode->vtotal, mode->hdisplay, and drm_mode_vrefresh(mode) are defined as a smaller data type. The result of the calculation will be limited to "int" in this case without correct casting. In screen with high resolution and high refresh rate, integer overflow may happen. So, we recommend adding an extra cast to prevent potential integer overflow.
Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display") Signed-off-by: Zichen Xie <zichenxie0106@gmail.com> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/622206/ Link: https://lore.kernel.org/r/20241029194209.23684-1-zichenxie0106@gmail.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
bfbd0b09 | 04-Sep-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: drop LM_3 / LM_4 on MSM8998
[ Upstream commit c59afe50773d5c972f6684f9bbd9a2ddb2fb92fa ]
On the MSM8998 platform ther are no LM_3 and LM_4 blocks. Drop them from the MSM8998 catalog.
drm/msm/dpu: drop LM_3 / LM_4 on MSM8998
[ Upstream commit c59afe50773d5c972f6684f9bbd9a2ddb2fb92fa ]
On the MSM8998 platform ther are no LM_3 and LM_4 blocks. Drop them from the MSM8998 catalog.
Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Reported-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/612585/ Link: https://lore.kernel.org/r/20240905-dpu-fix-sdm845-catalog-v1-3-3363d03998bd@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
29fa82ad | 04-Sep-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: drop LM_3 / LM_4 on SDM845
[ Upstream commit d39271061d67c6fcbe8f361c532b493069232cf8 ]
On the SDM845 platform ther are no LM_3 and LM_4 blocks. Drop them from the SDM845 catalog.
Fix
drm/msm/dpu: drop LM_3 / LM_4 on SDM845
[ Upstream commit d39271061d67c6fcbe8f361c532b493069232cf8 ]
On the SDM845 platform ther are no LM_3 and LM_4 blocks. Drop them from the SDM845 catalog.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/612586/ Link: https://lore.kernel.org/r/20240905-dpu-fix-sdm845-catalog-v1-2-3363d03998bd@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
dd58a5f8 | 02-Sep-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: check for overflow in _dpu_crtc_setup_lm_bounds()
[ Upstream commit 3a0851b442d1f63ba42ecfa2506d3176cfabf9d4 ]
Make _dpu_crtc_setup_lm_bounds() check that CRTC width is not overflowing
drm/msm/dpu: check for overflow in _dpu_crtc_setup_lm_bounds()
[ Upstream commit 3a0851b442d1f63ba42ecfa2506d3176cfabf9d4 ]
Make _dpu_crtc_setup_lm_bounds() check that CRTC width is not overflowing LM requirements. Rename the function accordingly.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/612237/ Link: https://lore.kernel.org/r/20240903-dpu-mode-config-width-v6-3-617e1ecc4b7a@linaro.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
8b93b3e1 | 26-Jun-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: take plane rotation into account for wide planes
[ Upstream commit d3a785e4f983f523380e023d8a05fb6d04402957 ]
Take into account the plane rotation and flipping when calculating src pos
drm/msm/dpu: take plane rotation into account for wide planes
[ Upstream commit d3a785e4f983f523380e023d8a05fb6d04402957 ]
Take into account the plane rotation and flipping when calculating src positions for the wide plane parts.
This is not an issue yet, because rotation is only supported for the UBWC planes and wide UBWC planes are rejected anyway because in parallel multirect case only the half of the usual width is supported for tiled formats. However it's better to fix this now rather than stumbling upon it later.
Fixes: 80e8ae3b38ab ("drm/msm/dpu: add support for wide planes") Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/601059/ Link: https://lore.kernel.org/r/20240627-dpu-virtual-wide-v5-3-5efb90cbb8be@linaro.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
1af8f3db | 11-Sep-2023 |
Abhinav Kumar <quic_abhinavk@quicinc.com> |
drm/msm/dpu: try multirect based on mdp clock limits
[ Upstream commit e6c0de5f445091d250b75dabc4c60dd2643b8c98 ]
It's certainly possible that for large resolutions a single DPU SSPP cannot process
drm/msm/dpu: try multirect based on mdp clock limits
[ Upstream commit e6c0de5f445091d250b75dabc4c60dd2643b8c98 ]
It's certainly possible that for large resolutions a single DPU SSPP cannot process the image without exceeding the MDP clock limits but it can still process it in multirect mode because the source rectangles will get divided and can fall within the MDP clock limits.
If the SSPP cannot process the image even in multirect mode, then it will be rejected in dpu_plane_atomic_check_pipe().
Hence try using multirect for resolutions which cannot be processed by a single SSPP without exceeding the MDP clock limits.
changes in v2: - use crtc_state's adjusted_mode instead of mode - fix the UBWC condition to check maxlinewidth
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/556817/ Link: https://lore.kernel.org/r/20230911221627.9569-2-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Stable-dep-of: d3a785e4f983 ("drm/msm/dpu: take plane rotation into account for wide planes") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
a3c5815b | 24-Jun-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: cleanup FB if dpu_format_populate_layout fails
[ Upstream commit bfa1a6283be390947d3649c482e5167186a37016 ]
If the dpu_format_populate_layout() fails, then FB is prepared, but not clea
drm/msm/dpu: cleanup FB if dpu_format_populate_layout fails
[ Upstream commit bfa1a6283be390947d3649c482e5167186a37016 ]
If the dpu_format_populate_layout() fails, then FB is prepared, but not cleaned up. This ends up leaking the pin_count on the GEM object and causes a splat during DRM file closure:
msm_obj->pin_count WARNING: CPU: 2 PID: 569 at drivers/gpu/drm/msm/msm_gem.c:121 update_lru_locked+0xc4/0xcc [...] Call trace: update_lru_locked+0xc4/0xcc put_pages+0xac/0x100 msm_gem_free_object+0x138/0x180 drm_gem_object_free+0x1c/0x30 drm_gem_object_handle_put_unlocked+0x108/0x10c drm_gem_object_release_handle+0x58/0x70 idr_for_each+0x68/0xec drm_gem_release+0x28/0x40 drm_file_free+0x174/0x234 drm_release+0xb0/0x160 __fput+0xc0/0x2c8 __fput_sync+0x50/0x5c __arm64_sys_close+0x38/0x7c invoke_syscall+0x48/0x118 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x4c/0x120 el0t_64_sync_handler+0x100/0x12c el0t_64_sync+0x190/0x194 irq event stamp: 129818 hardirqs last enabled at (129817): [<ffffa5f6d953fcc0>] console_unlock+0x118/0x124 hardirqs last disabled at (129818): [<ffffa5f6da7dcf04>] el1_dbg+0x24/0x8c softirqs last enabled at (129808): [<ffffa5f6d94afc18>] handle_softirqs+0x4c8/0x4e8 softirqs last disabled at (129785): [<ffffa5f6d94105e4>] __do_softirq+0x14/0x20
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/600714/ Link: https://lore.kernel.org/r/20240625-dpu-mode-config-width-v5-1-501d984d634f@linaro.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
3fb61718 | 31-Jul-2024 |
Abhinav Kumar <quic_abhinavk@quicinc.com> |
drm/msm/dpu: move dpu_encoder's connector assignment to atomic_enable()
[ Upstream commit aedf02e46eb549dac8db4821a6b9f0c6bf6e3990 ]
For cases where the crtc's connectors_changed was set without en
drm/msm/dpu: move dpu_encoder's connector assignment to atomic_enable()
[ Upstream commit aedf02e46eb549dac8db4821a6b9f0c6bf6e3990 ]
For cases where the crtc's connectors_changed was set without enable/active getting toggled , there is an atomic_enable() call followed by an atomic_disable() but without an atomic_mode_set().
This results in a NULL ptr access for the dpu_encoder_get_drm_fmt() call in the atomic_enable() as the dpu_encoder's connector was cleared in the atomic_disable() but not re-assigned as there was no atomic_mode_set() call.
Fix the NULL ptr access by moving the assignment for atomic_enable() and also use drm_atomic_get_new_connector_for_encoder() to get the connector from the atomic_state.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/59 Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # SM8350-HDK Patchwork: https://patchwork.freedesktop.org/patch/606729/ Link: https://lore.kernel.org/r/20240731191723.3050932-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
8e7ef27e | 25-Feb-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: capture snapshot on the first commit_done timeout
[ Upstream commit 4be445f5b6b6810baf397b2d159bd07c3573fd75 ]
In order to debug commit_done timeouts, capture the devcoredump state whe
drm/msm/dpu: capture snapshot on the first commit_done timeout
[ Upstream commit 4be445f5b6b6810baf397b2d159bd07c3573fd75 ]
In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/579850/ Link: https://lore.kernel.org/r/20240226-fd-dpu-debug-timeout-v4-3-51eec83dde23@linaro.org Stable-dep-of: aedf02e46eb5 ("drm/msm/dpu: move dpu_encoder's connector assignment to atomic_enable()") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
801f49c8 | 25-Feb-2024 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: split dpu_encoder_wait_for_event into two functions
[ Upstream commit d72a3d35b7ef5a3c0260462f130fa3dd7576aa2f ]
Stop multiplexing several events via the dpu_encoder_wait_for_event() f
drm/msm/dpu: split dpu_encoder_wait_for_event into two functions
[ Upstream commit d72a3d35b7ef5a3c0260462f130fa3dd7576aa2f ]
Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling of those events.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/579848/ Link: https://lore.kernel.org/r/20240226-fd-dpu-debug-timeout-v4-2-51eec83dde23@linaro.org Stable-dep-of: aedf02e46eb5 ("drm/msm/dpu: move dpu_encoder's connector assignment to atomic_enable()") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
da7243e5 | 03-Oct-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: drop MSM_ENC_VBLANK support
[ Upstream commit a08935fc859b22884dcb6b5126d3a986467101ce ]
There are no in-kernel users of MSM_ENC_VBLANK wait type. Drop it together with the correspondi
drm/msm/dpu: drop MSM_ENC_VBLANK support
[ Upstream commit a08935fc859b22884dcb6b5126d3a986467101ce ]
There are no in-kernel users of MSM_ENC_VBLANK wait type. Drop it together with the corresponding wait_for_vblank callback.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/560701/ Link: https://lore.kernel.org/r/20231004031903.518223-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Stable-dep-of: aedf02e46eb5 ("drm/msm/dpu: move dpu_encoder's connector assignment to atomic_enable()") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
e86721b0 | 01-Dec-2023 |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> |
drm/msm/dpu: use drmm-managed allocation for dpu_encoder_phys
[ Upstream commit 73169b45e1ed296b4357a694f5fa586ac0643ac1 ]
Change struct allocation of encoder's phys backend data to use drmm_kzallo
drm/msm/dpu: use drmm-managed allocation for dpu_encoder_phys
[ Upstream commit 73169b45e1ed296b4357a694f5fa586ac0643ac1 ]
Change struct allocation of encoder's phys backend data to use drmm_kzalloc(). This removes the need to perform any actions on encoder destruction.
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/570051/ Link: https://lore.kernel.org/r/20231201211845.1026967-12-dmitry.baryshkov@linaro.org Stable-dep-of: aedf02e46eb5 ("drm/msm/dpu: move dpu_encoder's connector assignment to atomic_enable()") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
873f6769 | 08-Apr-2024 |
Aleksandr Mishin <amishin@t-argos.ru> |
drm/msm/dpu: Add callback function pointer check before its call
[ Upstream commit 530f272053a5e72243a9cb07bb1296af6c346002 ]
In dpu_core_irq_callback_handler() callback function pointer is compare
drm/msm/dpu: Add callback function pointer check before its call
[ Upstream commit 530f272053a5e72243a9cb07bb1296af6c346002 ]
In dpu_core_irq_callback_handler() callback function pointer is compared to NULL, but then callback function is unconditionally called by this pointer. Fix this bug by adding conditional return.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: c929ac60b3ed ("drm/msm/dpu: allow just single IRQ callback") Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/588237/ Link: https://lore.kernel.org/r/20240408085523.12231-1-amishin@t-argos.ru Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|