aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_io_utils.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <[email protected]>2022-08-05 11:56:30 +0000
committerRob Clark <[email protected]>2022-09-18 16:38:02 +0000
commit5ccdcecaf8f732f593e359ebfb65de96b11bae66 (patch)
tree57102ab1d77f4fe87f497356eb5bac3dcf00845b /drivers/gpu/drm/msm/msm_io_utils.c
parentdt-bindings: display/msm: dpu-sdm845: add missing DPU opp-table (diff)
downloadkernel-5ccdcecaf8f732f593e359ebfb65de96b11bae66.tar.gz
kernel-5ccdcecaf8f732f593e359ebfb65de96b11bae66.zip
drm/msm: lookup the ICC paths in both mdp5/dpu and mdss devices
The commit 6874f48bb8b0 ("drm/msm: make mdp5/dpu devices master components") changed the MDP5 driver to look for the interconnect paths in the MDSS device rather than in the MDP5 device itself. This was left unnoticed since on my testing devices the interconnects probably didn't reach the sync state. Rather than just using the MDP5 device for ICC path lookups for the MDP5 devices, introduce an additional helper to check both MDP5/DPU and MDSS nodes. This will be helpful for the MDP5->DPU conversion, since the driver will have to check both nodes. Fixes: 6874f48bb8b0 ("drm/msm: make mdp5/dpu devices master components") Reported-by: Marijn Suijten <[email protected]> Reported-by: Yassine Oudjana <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Tested-by: Marijn Suijten <[email protected]> # On sdm630 Tested-by: Yassine Oudjana <[email protected]> # msm8996 Patchwork: https://patchwork.freedesktop.org/patch/496488/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_io_utils.c')
-rw-r--r--drivers/gpu/drm/msm/msm_io_utils.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c
index 7b504617833a..d02cd29ce829 100644
--- a/drivers/gpu/drm/msm/msm_io_utils.c
+++ b/drivers/gpu/drm/msm/msm_io_utils.c
@@ -5,6 +5,8 @@
* Author: Rob Clark <[email protected]>
*/
+#include <linux/interconnect.h>
+
#include "msm_drv.h"
/*
@@ -124,3 +126,23 @@ void msm_hrtimer_work_init(struct msm_hrtimer_work *work,
work->worker = worker;
kthread_init_work(&work->work, fn);
}
+
+struct icc_path *msm_icc_get(struct device *dev, const char *name)
+{
+ struct device *mdss_dev = dev->parent;
+ struct icc_path *path;
+
+ path = of_icc_get(dev, name);
+ if (path)
+ return path;
+
+ /*
+ * If there are no interconnects attached to the corresponding device
+ * node, of_icc_get() will return NULL.
+ *
+ * If the MDP5/DPU device node doesn't have interconnects, lookup the
+ * path in the parent (MDSS) device.
+ */
+ return of_icc_get(mdss_dev, name);
+
+}