drm/radeon: Fix 3 regressions - since buffer rework
authorJean Delvare <khali@linux-fr.org>
Tue, 11 May 2010 04:01:45 +0000 (14:01 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 11 May 2010 04:01:48 +0000 (14:01 +1000)
commitc9ff04c941d2cd87d27496d7fee8923238bb2ebb
tree42ed249578600f9c03653ec27bf1a70589dcb168
parent8cfe92d683a0041ac8e016a0b0a487c99a78f6c1
drm/radeon: Fix 3 regressions - since buffer rework

Commit b4fe945405e477cded91772b4fec854705443dd5 introduced 3 bugs,
fix them:

* Use the right command dword for second packet offset in
  RADEON_CNTL_PAINT/BITBLT_MULTI.
* Don't leak memory if drm_buffer_copy_from_user() fails.
* Don't call drm_buffer_unprocessed() unless drm_buffer_alloc() and
  drm_buffer_copy_from_user() have been called successfully first.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_state.c