Re: [PATCH v2 09/11] drm/panel: Add panel driver for Samsung SOUXP00-A DDIC

kernel test robot
2025-12-24T17:26:50Z

Hi Marijn,

kernel test robot noticed the following build warnings:

[auto build test WARNING on cc3aa43b44bdb43dfbac0fcb51c56594a11338a8]

url: https://github.com/intel-lab-lkp/linux/commits/Marijn-Suijten/drm-panel-Clean-up-SOFEF00-config-dependencies/20251222-073548
base: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
patch link: https://lore.kernel.org/r/20251222-drm-panels-sony-v2-9-82a87465d163%40somainline.org
patch subject: [PATCH v2 09/11] drm/panel: Add panel driver for Samsung SOUXP00-A DDIC
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20251225/202512250101.ljTix9QV-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251225/202512250101.ljTix9QV-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512250101.ljTix9QV-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/panel/panel-samsung-souxp00.c:304:20: warning: cast to smaller integer type 'enum panel_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
304 | ctx->panel_type = (enum panel_type)of_device_get_match_data(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

vim +304 drivers/gpu/drm/panel/panel-samsung-souxp00.c

285
286 static int samsung_souxp00_a_probe(struct mipi_dsi_device *dsi)
287 {
288 const struct backlight_properties props = {
289 .type = BACKLIGHT_RAW,
290 .brightness = 400,
291 .max_brightness = 4095,
292 };
293 const u16 hdisplay = enable_4k ? 1644 : 1096;
294 struct device *dev = &dsi->dev;
295 struct samsung_souxp00_a *ctx;
296 int ret;
297
298 ctx = devm_drm_panel_alloc(dev, struct samsung_souxp00_a, panel,
299 &samsung_souxp00_a_panel_funcs,
300 DRM_MODE_CONNECTOR_DSI);
301 if (IS_ERR(ctx))
302 return PTR_ERR(ctx);
303
> 304 ctx->panel_type = (enum panel_type)of_device_get_match_data(dev);
305
306 ret = devm_regulator_bulk_get_const(
307 dev,
308 ARRAY_SIZE(samsung_souxp00_a_supplies),
309 samsung_souxp00_a_supplies,
310 &ctx->supplies);
311 if (ret < 0)
312 return dev_err_probe(dev, ret, "Failed to get regulators\n");
313
314 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
315 if (IS_ERR(ctx->reset_gpio))
316 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
317 "Failed to get reset-gpios\n");
318
319 ctx->dsi = dsi;
320 mipi_dsi_set_drvdata(dsi, ctx);
321
322 dsi->lanes = 4;
323 dsi->format = MIPI_DSI_FMT_RGB888;
324 dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS;
325
326 ctx->panel.prepare_prev_first = true;
327
328 ctx->panel.backlight = devm_backlight_device_register(
329 dev, dev_name(dev), dev, dsi,
330 &samsung_souxp00_a_bl_ops,
331 &props);
332 if (IS_ERR(ctx->panel.backlight))
333 return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),
334 "Failed to create backlight\n");
335
336 drm_panel_add(&ctx->panel);
337
338 /* This panel only supports DSC; unconditionally enable it */
339 dsi->dsc = &ctx->dsc;
340
341 ctx->dsc.dsc_version_major = 1;
342 ctx->dsc.dsc_version_minor = 1;
343
344 ctx->dsc.slice_height = 32;
345 ctx->dsc.slice_count = 2;
346 /*
347 * hdisplay should be read from the selected mode once
348 * it is passed back to drm_panel (in prepare?)
349 */
350 WARN_ON(hdisplay % ctx->dsc.slice_count);
351 ctx->dsc.slice_width = hdisplay / ctx->dsc.slice_count;
352 ctx->dsc.bits_per_component = 8;
353 ctx->dsc.bits_per_pixel = 8 << 4; /* 4 fractional bits */
354 ctx->dsc.block_pred_enable = true;
355
356 ret = mipi_dsi_attach(dsi);
357 if (ret < 0) {
358 dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
359 drm_panel_remove(&ctx->panel);
360 return ret;
361 }
362
363 return 0;
364 }
365

--
0-DAY CI Kernel Test Service