[PATCH 4/4] drm/tinydrm: Use damage helper for dirtyfb
kbuild test robot
lkp at intel.com
Fri Jan 11 19:18:34 UTC 2019
Hi Noralf,
url: https://github.com/0day-ci/linux/commits/Noralf-Tr-nnes/drm-tinydrm-Use-damage-helper-for-dirtyfb/20190110-194410
New smatch warnings:
drivers/gpu/drm/tinydrm/mipi-dbi.c:305 mipi_dbi_enable_flush() warn: variable dereferenced before check 'fb' (see line 299)
Old smatch warnings:
drivers/gpu/drm/tinydrm/mipi-dbi.c:108 mipi_dbi_command_is_read() error: buffer overflow 'mipi->read_commands' 21 <= 254
drivers/gpu/drm/tinydrm/mipi-dbi.c:110 mipi_dbi_command_is_read() error: buffer overflow 'mipi->read_commands' 21 <= 254
# https://github.com/0day-ci/linux/commit/50dd14907581e982f534b7718bc3f8c903f46c88
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 50dd14907581e982f534b7718bc3f8c903f46c88
vim +/fb +305 drivers/gpu/drm/tinydrm/mipi-dbi.c
02dd95fe Noralf Trønnes 2017-01-22 281
02dd95fe Noralf Trønnes 2017-01-22 282 /**
22edc8d3 Noralf Trønnes 2018-01-10 283 * mipi_dbi_enable_flush - MIPI DBI enable helper
22edc8d3 Noralf Trønnes 2018-01-10 284 * @mipi: MIPI DBI structure
5685ca0c Noralf Trønnes 2018-07-10 285 * @crtc_state: CRTC state
5685ca0c Noralf Trønnes 2018-07-10 286 * @plane_state: Plane state
22edc8d3 Noralf Trønnes 2018-01-10 287 *
22edc8d3 Noralf Trønnes 2018-01-10 288 * This function sets &mipi_dbi->enabled, flushes the whole framebuffer and
22edc8d3 Noralf Trønnes 2018-01-10 289 * enables the backlight. Drivers can use this in their
22edc8d3 Noralf Trønnes 2018-01-10 290 * &drm_simple_display_pipe_funcs->enable callback.
22edc8d3 Noralf Trønnes 2018-01-10 291 */
e85d3006 Ville Syrjälä 2018-03-23 292 void mipi_dbi_enable_flush(struct mipi_dbi *mipi,
e85d3006 Ville Syrjälä 2018-03-23 293 struct drm_crtc_state *crtc_state,
e85d3006 Ville Syrjälä 2018-03-23 294 struct drm_plane_state *plane_state)
22edc8d3 Noralf Trønnes 2018-01-10 295 {
e85d3006 Ville Syrjälä 2018-03-23 296 struct drm_framebuffer *fb = plane_state->fb;
50dd1490 Noralf Trønnes 2019-01-09 297 struct drm_rect rect = {
50dd1490 Noralf Trønnes 2019-01-09 298 .x1 = 0,
50dd1490 Noralf Trønnes 2019-01-09 @299 .x2 = fb->width,
50dd1490 Noralf Trønnes 2019-01-09 300 .y1 = 0,
50dd1490 Noralf Trønnes 2019-01-09 301 .y2 = fb->height,
50dd1490 Noralf Trønnes 2019-01-09 302 };
22edc8d3 Noralf Trønnes 2018-01-10 303
22edc8d3 Noralf Trønnes 2018-01-10 304 mipi->enabled = true;
22edc8d3 Noralf Trønnes 2018-01-10 @305 if (fb)
50dd1490 Noralf Trønnes 2019-01-09 306 mipi_dbi_fb_dirty(fb, &rect);
22edc8d3 Noralf Trønnes 2018-01-10 307
414147e8 Meghana Madhyastha 2018-01-24 308 backlight_enable(mipi->backlight);
22edc8d3 Noralf Trønnes 2018-01-10 309 }
22edc8d3 Noralf Trønnes 2018-01-10 310 EXPORT_SYMBOL(mipi_dbi_enable_flush);
22edc8d3 Noralf Trønnes 2018-01-10 311
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
More information about the dri-devel
mailing list