summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-03-23 19:28:07 -0700
committerEric Anholt <eric@anholt.net>2015-06-04 14:15:32 -0700
commit527817b1970f00b0179b045012b762579b2fc859 (patch)
treeabfa0a78c7048fd29b9deedeab0a1b0c926c4a76
parent4f81f084ab1707f64659b8c1f2aecedc9fec5659 (diff)
downloadlinux-527817b1970f00b0179b045012b762579b2fc859.tar.gz
drm/vc4: Drop unnecessary restriction on render w/h vs bin w/h.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--drivers/gpu/drm/vc4/vc4_validate.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c
index 27eabcbb8351..02eac4f0b5e7 100644
--- a/drivers/gpu/drm/vc4/vc4_validate.c
+++ b/drivers/gpu/drm/vc4/vc4_validate.c
@@ -589,21 +589,6 @@ validate_tile_rendering_mode_config(VALIDATE_ARGS)
exec->fb_width = *(uint16_t *)(untrusted + 4);
exec->fb_height = *(uint16_t *)(untrusted + 6);
- /* Make sure that the fb width/height matches the binning config -- we
- * rely on being able to interchange these for various assertions.
- * (Within a tile, loads and stores will be clipped to the
- * width/height, but we allow load/storing to any binned tile).
- */
- if (exec->fb_width <= (exec->bin_tiles_x - 1) * 64 ||
- exec->fb_width > exec->bin_tiles_x * 64 ||
- exec->fb_height <= (exec->bin_tiles_y - 1) * 64 ||
- exec->fb_height > exec->bin_tiles_y * 64) {
- DRM_ERROR("bin config %dx%d doesn't match FB %dx%d\n",
- exec->bin_tiles_x, exec->bin_tiles_y,
- exec->fb_width, exec->fb_height);
- return -EINVAL;
- }
-
flags = *(uint16_t *)(untrusted + 8);
if ((flags & VC4_RENDER_CONFIG_FORMAT_MASK) ==
VC4_RENDER_CONFIG_FORMAT_RGBA8888) {
@@ -632,13 +617,9 @@ validate_tile_coordinates(VALIDATE_ARGS)
uint8_t tile_x = *(uint8_t *)(untrusted + 0);
uint8_t tile_y = *(uint8_t *)(untrusted + 1);
- if (tile_x >= exec->bin_tiles_x ||
- tile_y >= exec->bin_tiles_y) {
- DRM_ERROR("Tile coordinates %d,%d > bin config %d,%d\n",
- tile_x,
- tile_y,
- exec->bin_tiles_x,
- exec->bin_tiles_y);
+ if (tile_x * 64 >= exec->fb_width || tile_y * 64 >= exec->fb_height) {
+ DRM_ERROR("Tile coordinates %d,%d > render config %dx%d\n",
+ tile_x, tile_y, exec->fb_width, exec->fb_height);
return -EINVAL;
}