aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/msm/msm_io_utils.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-10-20 09:09:00 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-10-20 09:09:00 +0200
commit1aca5ce036e3499336d1a2ace3070f908381c055 (patch)
tree32b53fca3cff8c6c084d9c1d94d1761c3618e739 /drivers/gpu/drm/msm/msm_io_utils.c
parentdrm/amdgpu: use DRM_SCHED_FENCE_DONT_PIPELINE for VM updates (diff)
parentLinux 6.1-rc1 (diff)
downloadwireguard-linux-1aca5ce036e3499336d1a2ace3070f908381c055.tar.xz
wireguard-linux-1aca5ce036e3499336d1a2ace3070f908381c055.zip
Merge drm/drm-fixes into drm-misc-fixes
Backmerging to get v6.1-rc1. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
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 <robdclark@gmail.com>
*/
+#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);
+
+}