struct drm_gem_cma_object *tile_bo;
uint32_t tile_alloc_offset;
+ uint32_t tile_width, tile_height;
+
/**
* Computed addresses pointing into exec_bo where we start the
* bin thread (ct0) and render thread (ct1).
int
vc4_cl_validate(struct drm_device *dev, struct vc4_exec_info *exec)
{
+ struct drm_vc4_submit_cl *args = exec->args;
int ret = 0;
+ if (args->color_write.bits & VC4_RENDER_CONFIG_MS_MODE_4X) {
+ exec->tile_width = 32;
+ exec->tile_height = 32;
+ } else {
+ exec->tile_width = 64;
+ exec->tile_height = 64;
+ }
+
if (exec->args->bin_cl_size != 0) {
ret = vc4_get_bcl(dev, exec);
if (ret)
uint8_t x, uint8_t y)
{
return bo->paddr + surf->offset + VC4_TILE_BUFFER_SIZE *
- (DIV_ROUND_UP(exec->args->width, 32) * y + x);
+ (DIV_ROUND_UP(exec->args->width, exec->tile_width) * y + x);
}
/*
struct drm_vc4_submit_rcl_surface *surf)
{
struct drm_vc4_submit_cl *args = exec->args;
- u32 render_tiles_stride = DIV_ROUND_UP(exec->args->width, 32);
+ u32 render_tiles_stride = DIV_ROUND_UP(exec->args->width,
+ exec->tile_width);
if (surf->offset > obj->base.size) {
DRM_ERROR("surface offset %d > BO size %zd\n",