b/drivers/gpu/drm/drm_fb_cma_he
@@ -214,7 +214,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper
*helper
mode_cmd.width = sizes->surface_width;
mode_cmd.height = sizes->surface_height;
- mode_cmd.pitches[0] = sizes->surface_width * bytes_per_pixel;
+ mode_cmd.pitches[0] = roundup(sizes->surface_width *
bytes_per_pixel, 32);
mode_cmd.pixel_format =
drm_mode_legacy_fb_format(sizes->surface_bpp,
sizes->surface_depth);
@@ -219,7 +219,7 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc,
}
bpp = crtc->fb->bits_per_pixel / 8;
- win.stride = win.outw * bpp;
+ win.stride = roundup(win.outw * bpp, 32);
/* program window registers */
value = tegra_dc_readl(dc, DC_CMD_DISPLAY_WINDOW_HEADER);