var->transp.length, var->transp.offset);
fix->visual = color_format_pt->color_type;
/* adjust memory length. */
- fix->line_length = var->xres_virtual * var->bits_per_pixel / 8;
+ fix->line_length =
+ CANVAS_ALIGNED(var->xres_virtual * var->bits_per_pixel / 8);
osd_log_dbg(MODULE_BASE, "xvirtual=%d, bpp:%d, line_length=%d\n",
var->xres_virtual, var->bits_per_pixel, fix->line_length);
(fbdev->color->color_index > 16 ?
(fbdev->color->color_index > 24 ?
4 : 3) : 2) : 1);
- fix->line_length = var->xres_virtual * bpp;
+ fix->line_length = CANVAS_ALIGNED(var->xres_virtual * bpp);
fix->smem_start = fbdev->fb_mem_paddr;
fix->smem_len = fbdev->fb_len;
if (fb_alloc_cmap(&fbi->cmap, 16, 0) != 0) {
s64 timestamp[VIU_COUNT];
static unsigned int osd_h_filter_mode = 1;
-#define CANVAS_ALIGNED(x) (((x) + 31) & ~31)
#define BYTE_32_ALIGNED(x) (((x) + 31) & ~31)
#define BYTE_16_ALIGNED(x) (((x) + 15) & ~15)
#define BYTE_8_ALIGNED(x) (((x) + 7) & ~7)
else {
canvas_config(osd_hw.fb_gem[index].canvas_idx,
osd_hw.fb_gem[index].addr,
- osd_hw.fb_gem[index].width,
+ CANVAS_ALIGNED(osd_hw.fb_gem[index].width),
osd_hw.fb_gem[index].height,
CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
}
if (!osd_hw.osd_afbcd[index].enable) {
canvas_config(osd_hw.fb_gem[index].canvas_idx,
ext_addr,
- fence_map->byte_stride,
+ CANVAS_ALIGNED(fence_map->byte_stride),
fence_map->height,
CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
osd_hw.screen_base[index] = ext_addr;
canvas_config(osd_hw.fb_gem[index].canvas_idx,
osd_hw.fb_gem[index].addr,
- osd_hw.fb_gem[index].width,
+ CANVAS_ALIGNED(
+ osd_hw.fb_gem[index].width),
osd_hw.fb_gem[index].height,
CANVAS_ADDR_NOWRAP,
CANVAS_BLKMODE_LINEAR);
if (!osd_hw.osd_afbcd[i].enable)
canvas_config(osd_hw.fb_gem[i].canvas_idx,
osd_hw.fb_gem[i].addr,
- osd_hw.fb_gem[i].width,
+ CANVAS_ALIGNED(osd_hw.fb_gem[i].width),
osd_hw.fb_gem[i].height,
CANVAS_ADDR_NOWRAP,
CANVAS_BLKMODE_LINEAR);
if (!osd_hw.osd_afbcd[index].enable)
canvas_config(osd_hw.fb_gem[index].canvas_idx,
osd_hw.fb_gem[index].addr,
- osd_hw.fb_gem[index].width,
+ CANVAS_ALIGNED(osd_hw.fb_gem[index].width),
osd_hw.fb_gem[index].height,
CANVAS_ADDR_NOWRAP,
CANVAS_BLKMODE_LINEAR);
if (!osd_hw.osd_afbcd[index].enable)
canvas_config(osd_hw.fb_gem[index].canvas_idx,
osd_hw.fb_gem[index].addr,
- osd_hw.fb_gem[index].width,
+ CANVAS_ALIGNED(osd_hw.fb_gem[index].width),
osd_hw.fb_gem[index].height,
CANVAS_ADDR_NOWRAP,
CANVAS_BLKMODE_LINEAR);
for (i = 0; i < osd_hw.osd_meson_dev.osd_count; i++)
canvas_config(osd_hw.fb_gem[i].canvas_idx,
osd_hw.fb_gem[i].addr,
- osd_hw.fb_gem[i].width,
+ CANVAS_ALIGNED(osd_hw.fb_gem[i].width),
osd_hw.fb_gem[i].height,
CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
}
} else {
canvas_config(osd_hw.fb_gem[index].canvas_idx,
phy_addr,
- plane_map->byte_stride,
+ CANVAS_ALIGNED(plane_map->byte_stride),
plane_map->src_h,
CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);
}
plane_map->byte_stride * plane_map->src_h;
canvas_config(osd_hw.fb_gem[index].canvas_idx,
phy_addr,
- plane_map->byte_stride,
+ CANVAS_ALIGNED(plane_map->byte_stride),
plane_map->src_h,
CANVAS_ADDR_NOWRAP, CANVAS_BLKMODE_LINEAR);