Re: [Freedreno] [PATCH v3 2/3] drm/msm/dpu: simplify clocks handling

2022-01-19 Thread Jessica Zhang
On 1/19/2022 2:16 PM, Dmitry Baryshkov wrote: DPU driver contains code to parse clock items from device tree into special data struct and then enable/disable/set rate for the clocks using that data struct. However the DPU driver itself uses only parsing and enabling/disabling part (the rate se

Re: [Freedreno] [PATCH v3 1/3] drm/msm: move utility functions from msm_drv.c

2022-01-19 Thread Jessica Zhang
On 1/19/2022 2:16 PM, Dmitry Baryshkov wrote: Move clock/IO/hrtimer utility functions from msm_drv.c to new msm_io_utils.c file. Signed-off-by: Dmitry Baryshkov Tested on: Qualcomm RB3 (debian, sdm845), Qualcomm RB5 (debian, qrb5165) Reviewed-by: Jessica Zhang --- drivers/gpu/drm/msm

Re: [Freedreno] [PATCH] drm/msm/hdmi: Fix missing put_device() call in msm_hdmi_get_phy

2022-01-19 Thread Dmitry Baryshkov
On 07/01/2022 11:50, Miaoqian Lin wrote: The reference taken by 'of_find_device_by_node()' must be released when not needed anymore. Add the corresponding 'put_device()' in the error handling path. Fixes: e00012b256d4 ("drm/msm/hdmi: Make HDMI core get its PHY") Signed-off-by: Miaoqian Lin Re

Re: [Freedreno] [PATCH] drm/msm/dsi: Fix missing put_device() call in dsi_get_phy

2022-01-19 Thread Dmitry Baryshkov
On 30/12/2021 10:09, Miaoqian Lin wrote: If of_find_device_by_node() succeeds, dsi_get_phy() doesn't a corresponding put_device(). Thus add put_device() to fix the exception handling. Fixes: ec31abf ("drm/msm/dsi: Separate PHY to another platform device") Signed-off-by: Miaoqian Lin Reviewed-

Re: [Freedreno] [PATCH] drm/msm/dp: Add DisplayPort controller for SM8350

2022-01-19 Thread Dmitry Baryshkov
On 28/12/2021 07:59, Bjorn Andersson wrote: The Qualcomm SM8350 platform comes with a single DisplayPort controller, add support for this in the DisplayPort driver. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov --- .../devicetree/bindings/display/msm/dp-controller.yaml

Re: [Freedreno] [PATCH] drm/msm/dpu: Bind pingpong block to intf on active ctls in cmd encoder

2022-01-19 Thread Dmitry Baryshkov
On 22/12/2021 13:55, Marijn Suijten wrote: As per the specification of DPU_CTL_ACTIVE_CFG the configuration of active blocks should be proactively specified, and the pingpong block is no different. The downstream display driver [1] confirms this by also calling bind_pingpong_blk on CTL_ACTIVE_CF

Re: [Freedreno] [PATCH -next] drm/msm: remove variable set but not used

2022-01-19 Thread Dmitry Baryshkov
On 16/12/2021 06:11, Yang Li wrote: The code that uses variable mdss has been removed, So the declaration and assignment of the variable can be removed. Eliminate the following clang warning: drivers/gpu/drm/msm/msm_drv.c:513:19: warning: variable 'mdss' set but not used [-Wunused-but-set-variab

[Freedreno] [PATCH v2 4/4] drm/msm: stop using device's match data pointer

2022-01-19 Thread Dmitry Baryshkov
Let's make the match's data pointer a (sub-)driver's private data. The only user currently is the msm_drm_init() function, using this data to select kms_init callback. Pass this callback through the driver's private data instead. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/

[Freedreno] [PATCH v2 2/4] drm/msm: remove extra indirection for msm_mdss

2022-01-19 Thread Dmitry Baryshkov
Since now there is just one mdss subdriver, drop all the indirection, make msm_mdss struct completely opaque (and defined inside msm_mdss.c) and call mdss functions directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 44 drivers/gpu/drm/msm/msm_kms.h |

[Freedreno] [PATCH v2 1/4] drm/msm: unify MDSS drivers

2022-01-19 Thread Dmitry Baryshkov
MDP5 and DPU1 both provide the driver handling the MDSS region, which handles the irq domain and (incase of DPU1) adds some init for the UBWC controller. Unify those two pieces of code into a common driver. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 3 +

[Freedreno] [PATCH v2 3/4] drm/msm: split the main platform driver

2022-01-19 Thread Dmitry Baryshkov
Currently the msm platform driver is a multiplex handling several cases: - headless GPU-only driver, - MDP4 with flat device nodes, - MDP5/DPU MDSS with all the nodes being children of MDSS node. This results in not-so-perfect code, checking the hardware version (MDP4/MDP5/DPU) in several places,

[Freedreno] [PATCH v2 0/4] drm/msm: rework MDSS drivers

2022-01-19 Thread Dmitry Baryshkov
These patches coninue work started by AngeloGioacchino Del Regno in the previous cycle by further decoupling and dissecting MDSS and MDP drivers probe/binding paths. This removes code duplication between MDP5 and DPU1 MDSS drivers, by merging them and moving to the top level. This patchset depend

[Freedreno] [PATCH v3 3/3] drm/msm/dp: rewrite dss_module_power to use bulk clock functions

2022-01-19 Thread Dmitry Baryshkov
In order to simplify DP code, drop hand-coded loops over clock arrays, replacing them with clk_bulk_* functions. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/dp/dp_clk_util.c | 120 --- drivers/gpu/drm/msm/dp/dp_clk

[Freedreno] [PATCH v3 2/3] drm/msm/dpu: simplify clocks handling

2022-01-19 Thread Dmitry Baryshkov
DPU driver contains code to parse clock items from device tree into special data struct and then enable/disable/set rate for the clocks using that data struct. However the DPU driver itself uses only parsing and enabling/disabling part (the rate setting is used by DP driver). Move this implementat

[Freedreno] [PATCH v3 0/3] drm/msm: rework clock handling

2022-01-19 Thread Dmitry Baryshkov
msm_dss_clk_*() functions significantly duplicate clk_bulk_* family of functions. Drop custom code and use bulk clocks directly. This also removes dependency of DP driver on the DPU driver internals. Prerequisites: [1] Changes since v2: - Retain conditional code/prints in DP code to ease debuggi

[Freedreno] [PATCH v3 1/3] drm/msm: move utility functions from msm_drv.c

2022-01-19 Thread Dmitry Baryshkov
Move clock/IO/hrtimer utility functions from msm_drv.c to new msm_io_utils.c file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/msm_drv.c | 118 --- drivers/gpu/drm/msm/msm_io_utils.c | 126 ++

Re: [Freedreno] [PATCH v2 1/2] drm/msm/dpu: simplify clocks handling

2022-01-19 Thread Dmitry Baryshkov
On 19/01/2022 05:32, Jessica Zhang wrote: On 11/25/2021 6:35 PM, Dmitry Baryshkov wrote: DPU driver contains code to parse clock items from device tree into special data struct and then enable/disable/set rate for the clocks using that data struct. However the DPU driver itself uses only parsing

[Freedreno] [PATCH v2 4/4] drm/msm/adreno: Update the name of 7c3 gpu

2022-01-19 Thread Akhil P Oommen
Update the name in the gpulist for 7c3 gpu as per the latest recommendation. Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/driv

[Freedreno] [PATCH v2 3/4] drm/msm/adreno: Expose speedbin to userspace

2022-01-19 Thread Akhil P Oommen
Expose speedbin through MSM_PARAM_CHIP_ID parameter to help userspace identify the sku. Signed-off-by: Akhil P Oommen --- Changes in v2: - Use SKU in chipid PARAM only in new targets (Rob) drivers/gpu/drm/msm/adreno/adreno_gpu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

[Freedreno] [PATCH v2 2/4] arm64: dts: qcom: sc7280: Support gpu speedbin

2022-01-19 Thread Akhil P Oommen
Add the speedbin fuse and the required opps to support gpu sku. Signed-off-by: Akhil P Oommen --- (no changes since v1) arch/arm64/boot/dts/qcom/sc7280.dtsi | 46 1 file changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/ar

[Freedreno] [PATCH v2 1/4] drm/msm/adreno: Add support for Adreno 8c Gen 3

2022-01-19 Thread Akhil P Oommen
Add support for "Adreno 8c Gen 3" gpu along with the necessary speedbin support. Signed-off-by: Akhil P Oommen --- Changes in v2: - Fix a bug in adreno_cmp_rev() drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 21 ++ drivers/gpu/drm/msm/adreno/adreno_device.c | 34