[TRIVIAL] drm/amd/display: fix typo: liason -> liaison

2021-03-27 Thread Diego Viola
Signed-off-by: Diego Viola --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 573cf17262da..1b4b4f508662 100644 --- a

Re: [PATCH v4 2/3] drm/encoder: Add macro drmm_plain_encoder_alloc()

2021-03-27 Thread Laurent Pinchart
Hi Paul, Thank you for the patch. On Sat, Mar 27, 2021 at 11:57:41AM +, Paul Cercueil wrote: > This performs the same operation as drmm_encoder_alloc(), but > only allocates and returns a struct drm_encoder instance. > > v4: Rename macro drmm_plain_encoder_alloc() and move to > . Since i

[Bug 212259] Entire graphics stack locks up when running SteamVR and sometimes Sway; is sometimes unrecoverable

2021-03-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=212259 happysmas...@protonmail.com changed: What|Removed |Added Attachment #295961|application/octet-stream|text/plain mime ty

[Bug 212259] Entire graphics stack locks up when running SteamVR and sometimes Sway; is sometimes unrecoverable

2021-03-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=212259 happysmas...@protonmail.com changed: What|Removed |Added Attachment #296093|application/octet-stream|text/plain mime ty

[Bug 212259] Entire graphics stack locks up when running SteamVR and sometimes Sway; is sometimes unrecoverable

2021-03-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=212259 --- Comment #3 from happysmas...@protonmail.com --- Created attachment 296093 --> https://bugzilla.kernel.org/attachment.cgi?id=296093&action=edit Full dmesg 2021-03-27 It has happened again today. Attaching another log. -- You may reply to t

Re: [RFC PATCH 01/11] dt-bindings: drm/bridge: ti-sn65dsi8: Make enable GPIO optional

2021-03-27 Thread Rob Herring
On Mon, 22 Mar 2021 05:01:18 +0200, Laurent Pinchart wrote: > The SN65DSI86 EN pin can be hardwired to a high level, or connected to a > global reset signal, not controllable by the kernel. Make it optional in > those cases. > > Signed-off-by: Laurent Pinchart > --- > .../devicetree/bindings/dis

[PATCH v4 2/3] drm/encoder: Add macro drmm_plain_encoder_alloc()

2021-03-27 Thread Paul Cercueil
This performs the same operation as drmm_encoder_alloc(), but only allocates and returns a struct drm_encoder instance. v4: Rename macro drmm_plain_encoder_alloc() and move to . Since it's not "simple" anymore it will now take funcs/name arguments as well. Signed-off-by: Paul Cercueil --

[PATCH v4 3/3] drm/ingenic: Register devm action to cleanup encoders

2021-03-27 Thread Paul Cercueil
Since the encoders have been devm-allocated, they will be freed way before drm_mode_config_cleanup() is called. To avoid use-after-free conditions, we then must ensure that drm_encoder_cleanup() is called before the encoders are freed. v2: Use the new __drmm_simple_encoder_alloc() function v3: Us

[PATCH v4 1/3] drm: bridge/panel: Cleanup connector on bridge detach

2021-03-27 Thread Paul Cercueil
If we don't call drm_connector_cleanup() manually in panel_bridge_detach(), the connector will be cleaned up with the other DRM objects in the call to drm_mode_config_cleanup(). However, since our drm_connector is devm-allocated, by the time drm_mode_config_cleanup() will be called, our connector w

[PATCH v4 0/3] Fixes to bridge/panel and ingenic-drm

2021-03-27 Thread Paul Cercueil
Hi, This is the V4 of my patchset that attempts to fix use-after-free errors in bridge/panel.c and in the ingenic-drm driver. Changes from v3: - [1/3]: the code now checks (connector->dev) instead of (!!panel_bridge->connector.dev) - [2/3]: the macro is now called drmm_plain_encoder_alloc(), an

Re: [PATCH] drm: DON'T require each CRTC to have a unique primary plane

2021-03-27 Thread Paul Cercueil
It has two mutually exclusive background planes (same Z level) + one overlay plane. -Paul Le sam. 27 mars 2021 à 11:24, Simon Ser a écrit : On Saturday, March 27th, 2021 at 12:22 PM, Paul Cercueil wrote: The ingenic-drm driver has two mutually exclusive primary planes already; so the

Re: [PATCH] drm: DON'T require each CRTC to have a unique primary plane

2021-03-27 Thread Simon Ser
On Saturday, March 27th, 2021 at 12:22 PM, Paul Cercueil wrote: > The ingenic-drm driver has two mutually exclusive primary planes > already; so the fact that a CRTC must have one and only one primary > plane is an invalid assumption. Why does this driver expose two primary planes, if it only h

[PATCH] drm: DON'T require each CRTC to have a unique primary plane

2021-03-27 Thread Paul Cercueil
The ingenic-drm driver has two mutually exclusive primary planes already; so the fact that a CRTC must have one and only one primary plane is an invalid assumption. Fixes: 96962e3de725 ("drm: require each CRTC to have a unique primary plane") Cc: # 5.11 Signed-off-by: Paul Cercueil --- drivers/

[PATCH v3 22/25] drm/msm/dsi: remove duplicate fields from dsi_pll_Nnm instances

2021-03-27 Thread Dmitry Baryshkov
Drop duplicate fields pdev and id from dsi_pll_Nnm instances. Reuse those fields from the provided msm_dsi_phy. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c| 72 +-- drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c| 54 +++--- drivers/g

[PATCH v3 25/25] drm/msm/dsi: stop passing src_pll_id to the phy_enable call

2021-03-27 Thread Dmitry Baryshkov
Phy driver already knows the source PLL id basing on the set usecase and the current PLL id. Stop passing it to the phy_enable call. As a reminder, dsi manager will always use DSI 0 as a clock master in a slave mode, so PLL 0 is always a clocksource for DSI 0 and it is always a clocksource for DSI

[PATCH v3 12/25] drm/msm/dsi: use devm_clk_*register to registe DSI PHY clocks

2021-03-27 Thread Dmitry Baryshkov
Use devres-enabled version of clock registration functions. This lets us remove dsi_pll destroy callbacks completely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.h | 4 - drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 - drivers/gpu/drm/msm/dsi/phy/dsi_ph

[PATCH v3 17/25] drm/msi/dsi: inline msm_dsi_pll_helper_clk_prepare/unprepare

2021-03-27 Thread Dmitry Baryshkov
10nm and 7nm already do not use these helpers, as they handle setting slave DSI clocks after enabling VCO. Modify the rest of PHY drivers to remove unnecessary indirection and drop enable_seq/disable_seq PLL callbacks. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h

[PATCH v3 19/25] drm/msm/dsi: drop msm_dsi_pll abstracton

2021-03-27 Thread Dmitry Baryshkov
Drop the struct msm_dsi_pll abstraction, by including vco's clk_hw directly into struct msm_dsi_phy. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Kconfig | 8 -- drivers/gpu/drm/msm/Makefile | 2 - drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 36

[PATCH v3 20/25] drm/msm/dsi: drop PLL accessor functions

2021-03-27 Thread Dmitry Baryshkov
Replace PLL accessor functions (pll_read/pll_write*) with the DSI PHY accessors, reducing duplication. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 24 +-- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c| 124 drivers/gpu/drm/msm/dsi/phy/ds

[PATCH v3 24/25] drm/msm/dsi: inline msm_dsi_phy_set_src_pll

2021-03-27 Thread Dmitry Baryshkov
The src_truthtable config is not used for some of phys, which use other means of configuring the master/slave usecases. Inline this function with the goal of removing src_pll_id argument in the next commit. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 17

[PATCH v3 07/25] drm/msm/dsi: move all PLL callbacks into PHY config struct

2021-03-27 Thread Dmitry Baryshkov
Move all PLL-related callbacks into struct msm_dsi_phy_cfg. This limits the amount of data in the struct msm_dsi_pll. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/dsi.h | 6 -- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 14 ++-- dr

[PATCH v3 11/25] drm/msm/dsi: push provided clocks handling into a generic code

2021-03-27 Thread Dmitry Baryshkov
All MSM DSI PHYs provide two clocks: byte and pixel ones. Register/unregister provided clocks from the generic place, removing boilerplate code from all MSM DSI PHY drivers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.h | 11 +--- drivers/gpu/drm/msm/dsi/dsi_h

[PATCH v3 21/25] drm/msm/dsi: move ioremaps to dsi_phy_driver_probe

2021-03-27 Thread Dmitry Baryshkov
All PHY drivers would map dsi_pll area. Some PHY drivers would also map dsi_phy area again (a leftover from old PHY/PLL separation). Move all ioremaps to the common dsi_phy driver code and drop individual ioremapped areas from PHY drivers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/

[PATCH v3 18/25] drm/msm/dsi: make save_state/restore_state callbacks accept msm_dsi_phy

2021-03-27 Thread Dmitry Baryshkov
Make save_state/restore callbacks accept struct msm_dsi_phy rather than struct msm_dsi_pll. This moves them to struct msm_dsi_phy_ops, allowing us to drop struct msm_dsi_pll_ops. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 12 +++ drivers/gpu/drm/msm/d

[PATCH v3 08/25] drm/msm/dsi: drop global msm_dsi_phy_type enumaration

2021-03-27 Thread Dmitry Baryshkov
With the current upstream driver the msm_dsi_phy_type enum does not make much sense: all DSI PHYs are probed using the dt bindings, the phy type is not passed between drivers. Use quirks in phy individual PHY drivers to differentiate minor harware differences and drop the enum. Signed-off-by: Dmit

[PATCH v3 14/25] drm/msm/dsi: make save/restore_state phy-level functions

2021-03-27 Thread Dmitry Baryshkov
Morph msm_dsi_pll_save/restore_state() into msm_dsi_phy_save/restore_state(), thus removing last bits of knowledge about msm_dsi_pll from dsi_manager. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.h | 18 ++- drivers/gpu/drm/msm/dsi/dsi_manager.c | 6

[PATCH v3 23/25] drm/msm/dsi: remove temp data from global pll structure

2021-03-27 Thread Dmitry Baryshkov
The 7nm, 10nm and 14nm drivers would store interim data used during VCO/PLL rate setting in the global dsi_pll_Nnm structure. Move this data structures to the onstack storage. While we are at it, drop unused/static 'config' data, unused config fields, etc. Signed-off-by: Dmitry Baryshkov --- dri

[PATCH v3 13/25] drm/msm/dsi: use devm_of_clk_add_hw_provider

2021-03-27 Thread Dmitry Baryshkov
Use devm_of_clk_add_hw_provider() to register provided clocks. This allows dropping the remove function alltogether. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/gpu/dr

[PATCH v3 06/25] drm/msm/dsi: drop multiple pll enable_seq support

2021-03-27 Thread Dmitry Baryshkov
The only PLL using multiple enable sequences is the 28nm PLL, which just does the single step in the loop. Push that support back into the PLL code. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c| 3 +- drivers/gpu/drm/msm/dsi/phy/

[PATCH v3 10/25] drm/msm/dsi: remove msm_dsi_pll_set_usecase

2021-03-27 Thread Dmitry Baryshkov
msm_dsi_pll_set_usecase() function is not used outside of individual DSI PHY drivers, so drop it in favour of calling the the respective set_usecase functions directly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/dsi.h | 7 --- drivers

[PATCH v3 15/25] drm/msm/dsi: drop vco_delay setting from 7nm, 10nm, 14nm drivers

2021-03-27 Thread Dmitry Baryshkov
These drivers do not use vco_delay variable, so drop it from all of them. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 3 --- drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 4 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 3 --- 3 files changed, 10 deletions

[PATCH v3 16/25] drm/msm/dpu: simplify vco_delay handling in dsi_phy_28nm driver

2021-03-27 Thread Dmitry Baryshkov
Instead of setting the variable and then using it just in the one place, determine vco_delay directly at the PLL configuration time. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dri

[PATCH v3 09/25] drm/msm/dsi: move min/max PLL rate to phy config

2021-03-27 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 3 +++ drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 6 -- drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 6 -- drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 8

[PATCH v3 04/25] drm/msm/dsi: replace PHY's init callback with configurable data

2021-03-27 Thread Dmitry Baryshkov
DSI PHY init callback would either map dsi_phy_regulator or dsi_phy_lane depending on the PHY type. Replace those callbacks with configuration options governing mapping those regions. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c |

[PATCH v3 03/25] clk: divider: add devm_clk_hw_register_divider

2021-03-27 Thread Dmitry Baryshkov
Add devm_clk_hw_register_divider() - devres version of clk_hw_register_divider(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- include/linux/clk-provider.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/linux/clk-provider.h b/include/linux/clk-p

[PATCH v3 02/25] clk: mux: provide devm_clk_hw_register_mux()

2021-03-27 Thread Dmitry Baryshkov
Add devm_clk_hw_register_mux() - devres-managed version of clk_hw_register_mux(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/clk/clk-mux.c| 35 +++ include/linux/clk-provider.h | 13 + 2 files changed, 48 insertions

[PATCH v3 01/25] clk: fixed: add devm helper for clk_hw_register_fixed_factor()

2021-03-27 Thread Dmitry Baryshkov
From: Daniel Palmer Add a devm helper for clk_hw_register_fixed_factor() so that drivers that internally register fixed factor clocks for things like dividers don't need to manually unregister them on remove or if probe fails. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20210

[PATCH v3 00/25] drm/msm/dsi: refactor MSM DSI PHY/PLL drivers

2021-03-27 Thread Dmitry Baryshkov
Restructure MSM DSI PHY drivers. What started as an attempt to grok the overcomplicated PHY drivers, has lead up to the idea of merging PHY and PLL code, reducing abstractions, code duplication, dropping dead code, etc. The patches were mainly tested on RB5 (sm8250, 7nm) and DB410c (apq8016, 28nm-

[Bug 203905] amdgpu:actual_brightness has unreal/wrong value

2021-03-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203905 --- Comment #28 from Antony J.R (antonyjr...@gmail.com) --- (In reply to Paulo Nascimento from comment #26) > laptop: Lenovo Legion 5, amd ryzen 5 4600h > Graphics: Device-1: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: > nouveau >

[PATCH 1/1] drm/nouveau/nvenc: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file "priv.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/nven

[PATCH 1/1] drm/nouveau/dmem: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 92987daa5e17d02..f5cc05

[PATCH 1/1] drm/amd/display: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file "dce110/dce110_resource.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/

[PATCH 1/1] drm/amd/display: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file is included in the following common section and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/

[PATCH] drm: tegra: hub: struct tegra_dc is declared twice

2021-03-27 Thread Wan Jiabing
struct tegra_dc has been declared at 13rd line. Remove the duplicate. Move struct tegra_plane declaration forward. Signed-off-by: Wan Jiabing --- drivers/gpu/drm/tegra/hub.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/hub.h b/drivers/gpu/drm/tegra

[PATCH] amd: display: dc: struct dc_state is declared twice

2021-03-27 Thread Wan Jiabing
struct dc_state has been declared at 273rd line. Remove the duplicate. Delete duplicate blank lines. Signed-off-by: Wan Jiabing --- drivers/gpu/drm/amd/display/dc/dc.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/displa