From: Brad Volkin Date: Thu, 11 Dec 2014 20:13:10 +0000 (-0800) Subject: drm/i915: Use batch length instead of object size in command parser X-Git-Tag: fixes-v4.0-rc1~91^2~43^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9ffd80ed659c559152c042e74741f4f60cac691;p=pandora-kernel.git drm/i915: Use batch length instead of object size in command parser Previously we couldn't trust the user-supplied batch length because it came directly from userspace (i.e. untrusted code). It would have affected what commands software parsed without regard to what hardware would actually execute, leaving a potential hole. With the parser now copying the user supplied batch buffer and writing MI_NOP commands to any space after the copied region, we can safely use the batch length input. This should be a performance win as the actual batch length is frequently much smaller than the allocated object size. v2: Fix handling of non-zero batch_start_offset Issue: VIZ-4719 Signed-off-by: Brad Volkin Reviewed-By: Jon Bloomfield Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed