Hi Nicolas,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210420]
[cannot apply to robh/for-next linux/master linus/master v5.12-rc8 v5.12-rc7 v5.12-rc6
v5.12-rc8]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Nicolas-Boichat/drm-panfrost-Add...
base: 593ef1658ecf61d3619885bdbbcfffa3d1417891
config: powerpc-randconfig-m031-20210421 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/0b928d8134d2744f01ed4b1ba3fd5c045...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Nicolas-Boichat/drm-panfrost-Add-support-for-mt8183-GPU/20210421-095604
git checkout 0b928d8134d2744f01ed4b1ba3fd5c0457d56a1c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/panfrost/panfrost_devfreq.c: In function
'panfrost_devfreq_init':
> drivers/gpu/drm/panfrost/panfrost_devfreq.c:104:2: error:
'opp_table' undeclared (first use in this function)
104 | opp_table =
dev_pm_opp_set_regulators(dev, pfdev->comp->supply_names,
| ^~~~~~~~~
drivers/gpu/drm/panfrost/panfrost_devfreq.c:104:2: note: each undeclared identifier is
reported only once for each function it appears in
vim +/opp_table +104 drivers/gpu/drm/panfrost/panfrost_devfreq.c
84
85 int panfrost_devfreq_init(struct panfrost_device *pfdev)
86 {
87 int ret;
88 struct dev_pm_opp *opp;
89 unsigned long cur_freq;
90 struct device *dev = &pfdev->pdev->dev;
91 struct devfreq *devfreq;
92 struct thermal_cooling_device *cooling;
93 struct panfrost_devfreq *pfdevfreq = &pfdev->pfdevfreq;
94
95 if (pfdev->comp->num_supplies > 1) {
96 /*
97 * GPUs with more than 1 supply require platform-specific handling:
98 * continue without devfreq
99 */
100 DRM_DEV_INFO(dev, "More than 1 supply is not supported yet\n");
101 return 0;
102 }
103
104 opp_table = dev_pm_opp_set_regulators(dev,
pfdev->comp->supply_names,
105
pfdev->comp->num_supplies);
106 if (IS_ERR(opp_table)) {
107 ret = PTR_ERR(opp_table);
108 /* Continue if the optional regulator is missing */
109 if (ret != -ENODEV) {
110 DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
111 return ret;
112 }
113 }
114
115 ret = devm_pm_opp_of_add_table(dev);
116 if (ret) {
117 /* Optional, continue without devfreq */
118 if (ret == -ENODEV)
119 ret = 0;
120 return ret;
121 }
122 pfdevfreq->opp_of_table_added = true;
123
124 spin_lock_init(&pfdevfreq->lock);
125
126 panfrost_devfreq_reset(pfdevfreq);
127
128 cur_freq = clk_get_rate(pfdev->clock);
129
130 opp = devfreq_recommended_opp(dev, &cur_freq, 0);
131 if (IS_ERR(opp))
132 return PTR_ERR(opp);
133
134 panfrost_devfreq_profile.initial_freq = cur_freq;
135 dev_pm_opp_put(opp);
136
137 /*
138 * Setup default thresholds for the simple_ondemand governor.
139 * The values are chosen based on experiments.
140 */
141 pfdevfreq->gov_data.upthreshold = 45;
142 pfdevfreq->gov_data.downdifferential = 5;
143
144 devfreq = devm_devfreq_add_device(dev, &panfrost_devfreq_profile,
145 DEVFREQ_GOV_SIMPLE_ONDEMAND,
146 &pfdevfreq->gov_data);
147 if (IS_ERR(devfreq)) {
148 DRM_DEV_ERROR(dev, "Couldn't initialize GPU devfreq\n");
149 return PTR_ERR(devfreq);
150 }
151 pfdevfreq->devfreq = devfreq;
152
153 cooling = devfreq_cooling_em_register(devfreq, NULL);
154 if (IS_ERR(cooling))
155 DRM_DEV_INFO(dev, "Failed to register cooling device\n");
156 else
157 pfdevfreq->cooling = cooling;
158
159 return 0;
160 }
161
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org