From: kernel test robot <lkp@intel.com>
To: Rajeev Nandan <rajeevny@codeaurora.org>,
y@qualcomm.com, dri-devel@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
devicetree@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
Rajeev Nandan <rajeevny@codeaurora.org>,
linux-kernel@vger.kernel.org, thierry.reding@gmail.com,
sam@ravnborg.org, robdclark@gmail.com
Subject: Re: [v4 1/4] drm/panel-simple: Add basic DPCD backlight support
Date: Tue, 25 May 2021 19:41:08 +0800 [thread overview]
Message-ID: <202105251933.Avf4dMlY-lkp@intel.com> (raw)
In-Reply-To: <1621927831-29471-2-git-send-email-rajeevny@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 11483 bytes --]
Hi Rajeev,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
[also build test ERROR on next-20210525]
[cannot apply to robh/for-next drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.13-rc3]
[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/Rajeev-Nandan/drm-Support-basic-DPCD-backlight-in-panel-simple-and-add-a-new-panel-ATNA33XC20/20210525-153326
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: arm-randconfig-r025-20210525 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/24e7ccb98951b0b4c7ae8a367273f8e73c074804
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rajeev-Nandan/drm-Support-basic-DPCD-backlight-in-panel-simple-and-add-a-new-panel-ATNA33XC20/20210525-153326
git checkout 24e7ccb98951b0b4c7ae8a367273f8e73c074804
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/panel/panel-simple.c:185:32: error: field has incomplete type 'struct drm_edp_backlight_info'
struct drm_edp_backlight_info info;
^
drivers/gpu/drm/panel/panel-simple.c:185:9: note: forward declaration of 'struct drm_edp_backlight_info'
struct drm_edp_backlight_info info;
^
>> drivers/gpu/drm/panel/panel-simple.c:352:3: error: implicit declaration of function 'drm_edp_backlight_disable' [-Werror,-Wimplicit-function-declaration]
drm_edp_backlight_disable(p->aux, &bl->info);
^
drivers/gpu/drm/panel/panel-simple.c:352:3: note: did you mean 'backlight_disable'?
include/linux/backlight.h:379:19: note: 'backlight_disable' declared here
static inline int backlight_disable(struct backlight_device *bd)
^
>> drivers/gpu/drm/panel/panel-simple.c:352:32: error: no member named 'aux' in 'struct panel_simple'
drm_edp_backlight_disable(p->aux, &bl->info);
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:527:3: error: implicit declaration of function 'drm_edp_backlight_enable' [-Werror,-Wimplicit-function-declaration]
drm_edp_backlight_enable(p->aux, &bl->info,
^
drivers/gpu/drm/panel/panel-simple.c:527:3: note: did you mean 'backlight_enable'?
include/linux/backlight.h:363:19: note: 'backlight_enable' declared here
static inline int backlight_enable(struct backlight_device *bd)
^
drivers/gpu/drm/panel/panel-simple.c:527:31: error: no member named 'aux' in 'struct panel_simple'
drm_edp_backlight_enable(p->aux, &bl->info,
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:598:9: error: implicit declaration of function 'drm_edp_backlight_set_level' [-Werror,-Wimplicit-function-declaration]
return drm_edp_backlight_set_level(p->aux, &bl->info, bd->props.brightness);
^
drivers/gpu/drm/panel/panel-simple.c:598:40: error: no member named 'aux' in 'struct panel_simple'
return drm_edp_backlight_set_level(p->aux, &bl->info, bd->props.brightness);
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:611:14: error: use of undeclared identifier 'EDP_DISPLAY_CTL_CAP_SIZE'
u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE];
^
>> drivers/gpu/drm/panel/panel-simple.c:618:8: error: implicit declaration of function 'drm_dp_dpcd_read' [-Werror,-Wimplicit-function-declaration]
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:618:32: error: no member named 'aux' in 'struct panel_simple'
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
~~~~~ ^
>> drivers/gpu/drm/panel/panel-simple.c:618:37: error: use of undeclared identifier 'DP_EDP_DPCD_REV'
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:619:11: error: use of undeclared identifier 'EDP_DISPLAY_CTL_CAP_SIZE'
EDP_DISPLAY_CTL_CAP_SIZE);
^
>> drivers/gpu/drm/panel/panel-simple.c:623:8: error: implicit declaration of function 'drm_edp_backlight_init' [-Werror,-Wimplicit-function-declaration]
ret = drm_edp_backlight_init(panel->aux, &bl->info, 0, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:623:38: error: no member named 'aux' in 'struct panel_simple'
ret = drm_edp_backlight_init(panel->aux, &bl->info, 0, edp_dpcd,
~~~~~ ^
drivers/gpu/drm/panel/panel-simple.c:871:15: error: no member named 'aux' in 'struct panel_simple'
if (!panel->aux) {
~~~~~ ^
15 errors generated.
vim +185 drivers/gpu/drm/panel/panel-simple.c
182
183 struct edp_backlight {
184 struct backlight_device *dev;
> 185 struct drm_edp_backlight_info info;
186 };
187
188 struct panel_simple {
189 struct drm_panel base;
190 bool enabled;
191 bool no_hpd;
192
193 bool prepared;
194
195 ktime_t prepared_time;
196 ktime_t unprepared_time;
197
198 const struct panel_desc *desc;
199
200 struct regulator *supply;
201 struct i2c_adapter *ddc;
202
203 struct gpio_desc *enable_gpio;
204 struct gpio_desc *hpd_gpio;
205
206 struct edid *edid;
207
208 struct edp_backlight *edp_bl;
209
210 struct drm_display_mode override_mode;
211
212 enum drm_panel_orientation orientation;
213 };
214
215 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
216 {
217 return container_of(panel, struct panel_simple, base);
218 }
219
220 static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
221 struct drm_connector *connector)
222 {
223 struct drm_display_mode *mode;
224 unsigned int i, num = 0;
225
226 for (i = 0; i < panel->desc->num_timings; i++) {
227 const struct display_timing *dt = &panel->desc->timings[i];
228 struct videomode vm;
229
230 videomode_from_timing(dt, &vm);
231 mode = drm_mode_create(connector->dev);
232 if (!mode) {
233 dev_err(panel->base.dev, "failed to add mode %ux%u\n",
234 dt->hactive.typ, dt->vactive.typ);
235 continue;
236 }
237
238 drm_display_mode_from_videomode(&vm, mode);
239
240 mode->type |= DRM_MODE_TYPE_DRIVER;
241
242 if (panel->desc->num_timings == 1)
243 mode->type |= DRM_MODE_TYPE_PREFERRED;
244
245 drm_mode_probed_add(connector, mode);
246 num++;
247 }
248
249 return num;
250 }
251
252 static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
253 struct drm_connector *connector)
254 {
255 struct drm_display_mode *mode;
256 unsigned int i, num = 0;
257
258 for (i = 0; i < panel->desc->num_modes; i++) {
259 const struct drm_display_mode *m = &panel->desc->modes[i];
260
261 mode = drm_mode_duplicate(connector->dev, m);
262 if (!mode) {
263 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n",
264 m->hdisplay, m->vdisplay,
265 drm_mode_vrefresh(m));
266 continue;
267 }
268
269 mode->type |= DRM_MODE_TYPE_DRIVER;
270
271 if (panel->desc->num_modes == 1)
272 mode->type |= DRM_MODE_TYPE_PREFERRED;
273
274 drm_mode_set_name(mode);
275
276 drm_mode_probed_add(connector, mode);
277 num++;
278 }
279
280 return num;
281 }
282
283 static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
284 struct drm_connector *connector)
285 {
286 struct drm_display_mode *mode;
287 bool has_override = panel->override_mode.type;
288 unsigned int num = 0;
289
290 if (!panel->desc)
291 return 0;
292
293 if (has_override) {
294 mode = drm_mode_duplicate(connector->dev,
295 &panel->override_mode);
296 if (mode) {
297 drm_mode_probed_add(connector, mode);
298 num = 1;
299 } else {
300 dev_err(panel->base.dev, "failed to add override mode\n");
301 }
302 }
303
304 /* Only add timings if override was not there or failed to validate */
305 if (num == 0 && panel->desc->num_timings)
306 num = panel_simple_get_timings_modes(panel, connector);
307
308 /*
309 * Only add fixed modes if timings/override added no mode.
310 *
311 * We should only ever have either the display timings specified
312 * or a fixed mode. Anything else is rather bogus.
313 */
314 WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
315 if (num == 0)
316 num = panel_simple_get_display_modes(panel, connector);
317
318 connector->display_info.bpc = panel->desc->bpc;
319 connector->display_info.width_mm = panel->desc->size.width;
320 connector->display_info.height_mm = panel->desc->size.height;
321 if (panel->desc->bus_format)
322 drm_display_info_set_bus_formats(&connector->display_info,
323 &panel->desc->bus_format, 1);
324 connector->display_info.bus_flags = panel->desc->bus_flags;
325
326 return num;
327 }
328
329 static void panel_simple_wait(ktime_t start_ktime, unsigned int min_ms)
330 {
331 ktime_t now_ktime, min_ktime;
332
333 if (!min_ms)
334 return;
335
336 min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms));
337 now_ktime = ktime_get();
338
339 if (ktime_before(now_ktime, min_ktime))
340 msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1);
341 }
342
343 static int panel_simple_disable(struct drm_panel *panel)
344 {
345 struct panel_simple *p = to_panel_simple(panel);
346 struct edp_backlight *bl = p->edp_bl;
347
348 if (!p->enabled)
349 return 0;
350
351 if (p->desc->uses_dpcd_backlight && bl)
> 352 drm_edp_backlight_disable(p->aux, &bl->info);
353
354 if (p->desc->delay.disable)
355 msleep(p->desc->delay.disable);
356
357 p->enabled = false;
358
359 return 0;
360 }
361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37707 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Rajeev Nandan <rajeevny@codeaurora.org>,
y@qualcomm.com, dri-devel@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
devicetree@vger.kernel.org
Cc: kbuild-all@lists.01.org, Rajeev Nandan <rajeevny@codeaurora.org>,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com,
thierry.reding@gmail.com, sam@ravnborg.org
Subject: Re: [v4 1/4] drm/panel-simple: Add basic DPCD backlight support
Date: Tue, 25 May 2021 19:41:08 +0800 [thread overview]
Message-ID: <202105251933.Avf4dMlY-lkp@intel.com> (raw)
In-Reply-To: <1621927831-29471-2-git-send-email-rajeevny@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 11483 bytes --]
Hi Rajeev,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
[also build test ERROR on next-20210525]
[cannot apply to robh/for-next drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.13-rc3]
[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/Rajeev-Nandan/drm-Support-basic-DPCD-backlight-in-panel-simple-and-add-a-new-panel-ATNA33XC20/20210525-153326
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: arm-randconfig-r025-20210525 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/24e7ccb98951b0b4c7ae8a367273f8e73c074804
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rajeev-Nandan/drm-Support-basic-DPCD-backlight-in-panel-simple-and-add-a-new-panel-ATNA33XC20/20210525-153326
git checkout 24e7ccb98951b0b4c7ae8a367273f8e73c074804
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/panel/panel-simple.c:185:32: error: field has incomplete type 'struct drm_edp_backlight_info'
struct drm_edp_backlight_info info;
^
drivers/gpu/drm/panel/panel-simple.c:185:9: note: forward declaration of 'struct drm_edp_backlight_info'
struct drm_edp_backlight_info info;
^
>> drivers/gpu/drm/panel/panel-simple.c:352:3: error: implicit declaration of function 'drm_edp_backlight_disable' [-Werror,-Wimplicit-function-declaration]
drm_edp_backlight_disable(p->aux, &bl->info);
^
drivers/gpu/drm/panel/panel-simple.c:352:3: note: did you mean 'backlight_disable'?
include/linux/backlight.h:379:19: note: 'backlight_disable' declared here
static inline int backlight_disable(struct backlight_device *bd)
^
>> drivers/gpu/drm/panel/panel-simple.c:352:32: error: no member named 'aux' in 'struct panel_simple'
drm_edp_backlight_disable(p->aux, &bl->info);
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:527:3: error: implicit declaration of function 'drm_edp_backlight_enable' [-Werror,-Wimplicit-function-declaration]
drm_edp_backlight_enable(p->aux, &bl->info,
^
drivers/gpu/drm/panel/panel-simple.c:527:3: note: did you mean 'backlight_enable'?
include/linux/backlight.h:363:19: note: 'backlight_enable' declared here
static inline int backlight_enable(struct backlight_device *bd)
^
drivers/gpu/drm/panel/panel-simple.c:527:31: error: no member named 'aux' in 'struct panel_simple'
drm_edp_backlight_enable(p->aux, &bl->info,
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:598:9: error: implicit declaration of function 'drm_edp_backlight_set_level' [-Werror,-Wimplicit-function-declaration]
return drm_edp_backlight_set_level(p->aux, &bl->info, bd->props.brightness);
^
drivers/gpu/drm/panel/panel-simple.c:598:40: error: no member named 'aux' in 'struct panel_simple'
return drm_edp_backlight_set_level(p->aux, &bl->info, bd->props.brightness);
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:611:14: error: use of undeclared identifier 'EDP_DISPLAY_CTL_CAP_SIZE'
u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE];
^
>> drivers/gpu/drm/panel/panel-simple.c:618:8: error: implicit declaration of function 'drm_dp_dpcd_read' [-Werror,-Wimplicit-function-declaration]
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:618:32: error: no member named 'aux' in 'struct panel_simple'
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
~~~~~ ^
>> drivers/gpu/drm/panel/panel-simple.c:618:37: error: use of undeclared identifier 'DP_EDP_DPCD_REV'
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:619:11: error: use of undeclared identifier 'EDP_DISPLAY_CTL_CAP_SIZE'
EDP_DISPLAY_CTL_CAP_SIZE);
^
>> drivers/gpu/drm/panel/panel-simple.c:623:8: error: implicit declaration of function 'drm_edp_backlight_init' [-Werror,-Wimplicit-function-declaration]
ret = drm_edp_backlight_init(panel->aux, &bl->info, 0, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:623:38: error: no member named 'aux' in 'struct panel_simple'
ret = drm_edp_backlight_init(panel->aux, &bl->info, 0, edp_dpcd,
~~~~~ ^
drivers/gpu/drm/panel/panel-simple.c:871:15: error: no member named 'aux' in 'struct panel_simple'
if (!panel->aux) {
~~~~~ ^
15 errors generated.
vim +185 drivers/gpu/drm/panel/panel-simple.c
182
183 struct edp_backlight {
184 struct backlight_device *dev;
> 185 struct drm_edp_backlight_info info;
186 };
187
188 struct panel_simple {
189 struct drm_panel base;
190 bool enabled;
191 bool no_hpd;
192
193 bool prepared;
194
195 ktime_t prepared_time;
196 ktime_t unprepared_time;
197
198 const struct panel_desc *desc;
199
200 struct regulator *supply;
201 struct i2c_adapter *ddc;
202
203 struct gpio_desc *enable_gpio;
204 struct gpio_desc *hpd_gpio;
205
206 struct edid *edid;
207
208 struct edp_backlight *edp_bl;
209
210 struct drm_display_mode override_mode;
211
212 enum drm_panel_orientation orientation;
213 };
214
215 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
216 {
217 return container_of(panel, struct panel_simple, base);
218 }
219
220 static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
221 struct drm_connector *connector)
222 {
223 struct drm_display_mode *mode;
224 unsigned int i, num = 0;
225
226 for (i = 0; i < panel->desc->num_timings; i++) {
227 const struct display_timing *dt = &panel->desc->timings[i];
228 struct videomode vm;
229
230 videomode_from_timing(dt, &vm);
231 mode = drm_mode_create(connector->dev);
232 if (!mode) {
233 dev_err(panel->base.dev, "failed to add mode %ux%u\n",
234 dt->hactive.typ, dt->vactive.typ);
235 continue;
236 }
237
238 drm_display_mode_from_videomode(&vm, mode);
239
240 mode->type |= DRM_MODE_TYPE_DRIVER;
241
242 if (panel->desc->num_timings == 1)
243 mode->type |= DRM_MODE_TYPE_PREFERRED;
244
245 drm_mode_probed_add(connector, mode);
246 num++;
247 }
248
249 return num;
250 }
251
252 static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
253 struct drm_connector *connector)
254 {
255 struct drm_display_mode *mode;
256 unsigned int i, num = 0;
257
258 for (i = 0; i < panel->desc->num_modes; i++) {
259 const struct drm_display_mode *m = &panel->desc->modes[i];
260
261 mode = drm_mode_duplicate(connector->dev, m);
262 if (!mode) {
263 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n",
264 m->hdisplay, m->vdisplay,
265 drm_mode_vrefresh(m));
266 continue;
267 }
268
269 mode->type |= DRM_MODE_TYPE_DRIVER;
270
271 if (panel->desc->num_modes == 1)
272 mode->type |= DRM_MODE_TYPE_PREFERRED;
273
274 drm_mode_set_name(mode);
275
276 drm_mode_probed_add(connector, mode);
277 num++;
278 }
279
280 return num;
281 }
282
283 static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
284 struct drm_connector *connector)
285 {
286 struct drm_display_mode *mode;
287 bool has_override = panel->override_mode.type;
288 unsigned int num = 0;
289
290 if (!panel->desc)
291 return 0;
292
293 if (has_override) {
294 mode = drm_mode_duplicate(connector->dev,
295 &panel->override_mode);
296 if (mode) {
297 drm_mode_probed_add(connector, mode);
298 num = 1;
299 } else {
300 dev_err(panel->base.dev, "failed to add override mode\n");
301 }
302 }
303
304 /* Only add timings if override was not there or failed to validate */
305 if (num == 0 && panel->desc->num_timings)
306 num = panel_simple_get_timings_modes(panel, connector);
307
308 /*
309 * Only add fixed modes if timings/override added no mode.
310 *
311 * We should only ever have either the display timings specified
312 * or a fixed mode. Anything else is rather bogus.
313 */
314 WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
315 if (num == 0)
316 num = panel_simple_get_display_modes(panel, connector);
317
318 connector->display_info.bpc = panel->desc->bpc;
319 connector->display_info.width_mm = panel->desc->size.width;
320 connector->display_info.height_mm = panel->desc->size.height;
321 if (panel->desc->bus_format)
322 drm_display_info_set_bus_formats(&connector->display_info,
323 &panel->desc->bus_format, 1);
324 connector->display_info.bus_flags = panel->desc->bus_flags;
325
326 return num;
327 }
328
329 static void panel_simple_wait(ktime_t start_ktime, unsigned int min_ms)
330 {
331 ktime_t now_ktime, min_ktime;
332
333 if (!min_ms)
334 return;
335
336 min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms));
337 now_ktime = ktime_get();
338
339 if (ktime_before(now_ktime, min_ktime))
340 msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1);
341 }
342
343 static int panel_simple_disable(struct drm_panel *panel)
344 {
345 struct panel_simple *p = to_panel_simple(panel);
346 struct edp_backlight *bl = p->edp_bl;
347
348 if (!p->enabled)
349 return 0;
350
351 if (p->desc->uses_dpcd_backlight && bl)
> 352 drm_edp_backlight_disable(p->aux, &bl->info);
353
354 if (p->desc->delay.disable)
355 msleep(p->desc->delay.disable);
356
357 p->enabled = false;
358
359 return 0;
360 }
361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37707 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [v4 1/4] drm/panel-simple: Add basic DPCD backlight support
Date: Tue, 25 May 2021 19:41:08 +0800 [thread overview]
Message-ID: <202105251933.Avf4dMlY-lkp@intel.com> (raw)
In-Reply-To: <1621927831-29471-2-git-send-email-rajeevny@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 11762 bytes --]
Hi Rajeev,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
[also build test ERROR on next-20210525]
[cannot apply to robh/for-next drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.13-rc3]
[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/Rajeev-Nandan/drm-Support-basic-DPCD-backlight-in-panel-simple-and-add-a-new-panel-ATNA33XC20/20210525-153326
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: arm-randconfig-r025-20210525 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/24e7ccb98951b0b4c7ae8a367273f8e73c074804
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rajeev-Nandan/drm-Support-basic-DPCD-backlight-in-panel-simple-and-add-a-new-panel-ATNA33XC20/20210525-153326
git checkout 24e7ccb98951b0b4c7ae8a367273f8e73c074804
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/panel/panel-simple.c:185:32: error: field has incomplete type 'struct drm_edp_backlight_info'
struct drm_edp_backlight_info info;
^
drivers/gpu/drm/panel/panel-simple.c:185:9: note: forward declaration of 'struct drm_edp_backlight_info'
struct drm_edp_backlight_info info;
^
>> drivers/gpu/drm/panel/panel-simple.c:352:3: error: implicit declaration of function 'drm_edp_backlight_disable' [-Werror,-Wimplicit-function-declaration]
drm_edp_backlight_disable(p->aux, &bl->info);
^
drivers/gpu/drm/panel/panel-simple.c:352:3: note: did you mean 'backlight_disable'?
include/linux/backlight.h:379:19: note: 'backlight_disable' declared here
static inline int backlight_disable(struct backlight_device *bd)
^
>> drivers/gpu/drm/panel/panel-simple.c:352:32: error: no member named 'aux' in 'struct panel_simple'
drm_edp_backlight_disable(p->aux, &bl->info);
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:527:3: error: implicit declaration of function 'drm_edp_backlight_enable' [-Werror,-Wimplicit-function-declaration]
drm_edp_backlight_enable(p->aux, &bl->info,
^
drivers/gpu/drm/panel/panel-simple.c:527:3: note: did you mean 'backlight_enable'?
include/linux/backlight.h:363:19: note: 'backlight_enable' declared here
static inline int backlight_enable(struct backlight_device *bd)
^
drivers/gpu/drm/panel/panel-simple.c:527:31: error: no member named 'aux' in 'struct panel_simple'
drm_edp_backlight_enable(p->aux, &bl->info,
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:598:9: error: implicit declaration of function 'drm_edp_backlight_set_level' [-Werror,-Wimplicit-function-declaration]
return drm_edp_backlight_set_level(p->aux, &bl->info, bd->props.brightness);
^
drivers/gpu/drm/panel/panel-simple.c:598:40: error: no member named 'aux' in 'struct panel_simple'
return drm_edp_backlight_set_level(p->aux, &bl->info, bd->props.brightness);
~ ^
>> drivers/gpu/drm/panel/panel-simple.c:611:14: error: use of undeclared identifier 'EDP_DISPLAY_CTL_CAP_SIZE'
u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE];
^
>> drivers/gpu/drm/panel/panel-simple.c:618:8: error: implicit declaration of function 'drm_dp_dpcd_read' [-Werror,-Wimplicit-function-declaration]
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:618:32: error: no member named 'aux' in 'struct panel_simple'
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
~~~~~ ^
>> drivers/gpu/drm/panel/panel-simple.c:618:37: error: use of undeclared identifier 'DP_EDP_DPCD_REV'
ret = drm_dp_dpcd_read(panel->aux, DP_EDP_DPCD_REV, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:619:11: error: use of undeclared identifier 'EDP_DISPLAY_CTL_CAP_SIZE'
EDP_DISPLAY_CTL_CAP_SIZE);
^
>> drivers/gpu/drm/panel/panel-simple.c:623:8: error: implicit declaration of function 'drm_edp_backlight_init' [-Werror,-Wimplicit-function-declaration]
ret = drm_edp_backlight_init(panel->aux, &bl->info, 0, edp_dpcd,
^
drivers/gpu/drm/panel/panel-simple.c:623:38: error: no member named 'aux' in 'struct panel_simple'
ret = drm_edp_backlight_init(panel->aux, &bl->info, 0, edp_dpcd,
~~~~~ ^
drivers/gpu/drm/panel/panel-simple.c:871:15: error: no member named 'aux' in 'struct panel_simple'
if (!panel->aux) {
~~~~~ ^
15 errors generated.
vim +185 drivers/gpu/drm/panel/panel-simple.c
182
183 struct edp_backlight {
184 struct backlight_device *dev;
> 185 struct drm_edp_backlight_info info;
186 };
187
188 struct panel_simple {
189 struct drm_panel base;
190 bool enabled;
191 bool no_hpd;
192
193 bool prepared;
194
195 ktime_t prepared_time;
196 ktime_t unprepared_time;
197
198 const struct panel_desc *desc;
199
200 struct regulator *supply;
201 struct i2c_adapter *ddc;
202
203 struct gpio_desc *enable_gpio;
204 struct gpio_desc *hpd_gpio;
205
206 struct edid *edid;
207
208 struct edp_backlight *edp_bl;
209
210 struct drm_display_mode override_mode;
211
212 enum drm_panel_orientation orientation;
213 };
214
215 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
216 {
217 return container_of(panel, struct panel_simple, base);
218 }
219
220 static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
221 struct drm_connector *connector)
222 {
223 struct drm_display_mode *mode;
224 unsigned int i, num = 0;
225
226 for (i = 0; i < panel->desc->num_timings; i++) {
227 const struct display_timing *dt = &panel->desc->timings[i];
228 struct videomode vm;
229
230 videomode_from_timing(dt, &vm);
231 mode = drm_mode_create(connector->dev);
232 if (!mode) {
233 dev_err(panel->base.dev, "failed to add mode %ux%u\n",
234 dt->hactive.typ, dt->vactive.typ);
235 continue;
236 }
237
238 drm_display_mode_from_videomode(&vm, mode);
239
240 mode->type |= DRM_MODE_TYPE_DRIVER;
241
242 if (panel->desc->num_timings == 1)
243 mode->type |= DRM_MODE_TYPE_PREFERRED;
244
245 drm_mode_probed_add(connector, mode);
246 num++;
247 }
248
249 return num;
250 }
251
252 static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
253 struct drm_connector *connector)
254 {
255 struct drm_display_mode *mode;
256 unsigned int i, num = 0;
257
258 for (i = 0; i < panel->desc->num_modes; i++) {
259 const struct drm_display_mode *m = &panel->desc->modes[i];
260
261 mode = drm_mode_duplicate(connector->dev, m);
262 if (!mode) {
263 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n",
264 m->hdisplay, m->vdisplay,
265 drm_mode_vrefresh(m));
266 continue;
267 }
268
269 mode->type |= DRM_MODE_TYPE_DRIVER;
270
271 if (panel->desc->num_modes == 1)
272 mode->type |= DRM_MODE_TYPE_PREFERRED;
273
274 drm_mode_set_name(mode);
275
276 drm_mode_probed_add(connector, mode);
277 num++;
278 }
279
280 return num;
281 }
282
283 static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
284 struct drm_connector *connector)
285 {
286 struct drm_display_mode *mode;
287 bool has_override = panel->override_mode.type;
288 unsigned int num = 0;
289
290 if (!panel->desc)
291 return 0;
292
293 if (has_override) {
294 mode = drm_mode_duplicate(connector->dev,
295 &panel->override_mode);
296 if (mode) {
297 drm_mode_probed_add(connector, mode);
298 num = 1;
299 } else {
300 dev_err(panel->base.dev, "failed to add override mode\n");
301 }
302 }
303
304 /* Only add timings if override was not there or failed to validate */
305 if (num == 0 && panel->desc->num_timings)
306 num = panel_simple_get_timings_modes(panel, connector);
307
308 /*
309 * Only add fixed modes if timings/override added no mode.
310 *
311 * We should only ever have either the display timings specified
312 * or a fixed mode. Anything else is rather bogus.
313 */
314 WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
315 if (num == 0)
316 num = panel_simple_get_display_modes(panel, connector);
317
318 connector->display_info.bpc = panel->desc->bpc;
319 connector->display_info.width_mm = panel->desc->size.width;
320 connector->display_info.height_mm = panel->desc->size.height;
321 if (panel->desc->bus_format)
322 drm_display_info_set_bus_formats(&connector->display_info,
323 &panel->desc->bus_format, 1);
324 connector->display_info.bus_flags = panel->desc->bus_flags;
325
326 return num;
327 }
328
329 static void panel_simple_wait(ktime_t start_ktime, unsigned int min_ms)
330 {
331 ktime_t now_ktime, min_ktime;
332
333 if (!min_ms)
334 return;
335
336 min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms));
337 now_ktime = ktime_get();
338
339 if (ktime_before(now_ktime, min_ktime))
340 msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1);
341 }
342
343 static int panel_simple_disable(struct drm_panel *panel)
344 {
345 struct panel_simple *p = to_panel_simple(panel);
346 struct edp_backlight *bl = p->edp_bl;
347
348 if (!p->enabled)
349 return 0;
350
351 if (p->desc->uses_dpcd_backlight && bl)
> 352 drm_edp_backlight_disable(p->aux, &bl->info);
353
354 if (p->desc->delay.disable)
355 msleep(p->desc->delay.disable);
356
357 p->enabled = false;
358
359 return 0;
360 }
361
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37707 bytes --]
next prev parent reply other threads:[~2021-05-25 11:42 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 7:30 [v4 0/4] drm: Support basic DPCD backlight in panel-simple and add a new panel ATNA33XC20 Rajeev Nandan
2021-05-25 7:30 ` Rajeev Nandan
2021-05-25 7:30 ` [v4 1/4] drm/panel-simple: Add basic DPCD backlight support Rajeev Nandan
2021-05-25 7:30 ` Rajeev Nandan
2021-05-25 11:41 ` kernel test robot [this message]
2021-05-25 11:41 ` kernel test robot
2021-05-25 11:41 ` kernel test robot
2021-05-25 17:18 ` Doug Anderson
2021-05-25 17:18 ` Doug Anderson
2021-05-27 12:21 ` rajeevny
2021-05-27 12:21 ` rajeevny
2021-05-27 21:41 ` Doug Anderson
2021-05-27 21:41 ` Doug Anderson
2021-06-01 18:28 ` Lyude Paul
2021-06-01 18:28 ` Lyude Paul
2021-06-01 22:20 ` Lyude Paul
2021-06-01 22:20 ` Lyude Paul
2021-06-02 5:38 ` rajeevny
2021-06-02 5:38 ` rajeevny
2021-06-08 21:02 ` Doug Anderson
2021-06-08 21:02 ` Doug Anderson
2021-05-25 7:30 ` [v4 2/4] drm/panel-simple: Support for delays between GPIO & regulator Rajeev Nandan
2021-05-25 7:30 ` Rajeev Nandan
2021-05-25 17:18 ` Doug Anderson
2021-05-25 17:18 ` Doug Anderson
2021-05-25 7:30 ` [v4 3/4] dt-bindings: display: simple: Add Samsung ATNA33XC20 Rajeev Nandan
2021-05-25 7:30 ` Rajeev Nandan
2021-05-25 17:19 ` Doug Anderson
2021-05-25 17:19 ` Doug Anderson
2021-05-25 7:30 ` [v4 4/4] drm/panel-simple: " Rajeev Nandan
2021-05-25 7:30 ` Rajeev Nandan
2021-05-25 17:19 ` Doug Anderson
2021-05-25 17:19 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202105251933.Avf4dMlY-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rajeevny@codeaurora.org \
--cc=robdclark@gmail.com \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
--cc=y@qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.