drm/msm: fix cmdstream size check
authorRob Clark <robdclark@gmail.com>
Fri, 6 Sep 2013 19:36:40 +0000 (15:36 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 10 Sep 2013 17:57:42 +0000 (13:57 -0400)
commit198725337ef1f73b73e7dc953c6ffb0799f26ffe
treef0772c0a34e6c55a99ff83d5043281ff8f712e37
parent26791c48e1dcdc17c6c952585806b0ecc493f939
drm/msm: fix cmdstream size check

Need to check size+offset against bo size (duh!).. now we have a test
case to make sure I've done it right:

https://github.com/freedreno/msmtest/blob/master/submittest.c

Also, use DRM_ERROR() for error case traces, which makes debugging
userspace easier when enabling debug traces is too much.

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gem_submit.c