aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/savage/savage_state.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05drm/savage: drop use of drmP.hSam Ravnborg1-1/+8
Drop use of the deprecated drmP.h header file. Replace it with the necessary includes of other headers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190605140313.13629-3-sam@ravnborg.org
2019-01-30drm/savage: mark expected switch fall-throughsGustavo A. R. Silva1-0/+4
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/gpu/drm/savage/savage_state.c:301:8: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/gpu/drm/savage/savage_state.c:438:8: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/gpu/drm/savage/savage_state.c:559:8: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/gpu/drm/savage/savage_state.c:697:8: warning: this statement may fall through [-Wimplicit-fallthrough=] Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190129202005.GA25789@embeddedor
2018-07-04drm/savage: off by one in savage_bci_cmdbuf()Dan Carpenter1-1/+1
The > should be >= here so that we don't read beyond the end of the dma->buflist[] array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180704094810.whrgn6jxe7uibnfv@kili.mountain
2016-10-13drm/savage: dereferencing an error pointerDan Carpenter1-0/+1
A recent cleanup changed the kmalloc() + copy_from_user() to memdup_user() but the error handling wasn't updated so we might call kfree(-EFAULT) and crash. Fixes: a6e3918bcdb1 ('GPU-DRM-Savage: Use memdup_user() rather than duplicating') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20161012062227.GU12841@mwanda
2016-08-19GPU-DRM-Savage: Use memdup_user() rather than duplicatingMarkus Elfring1-9/+3
Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/021efa32-c259-e799-a80e-630972291815@users.sourceforge.net
2013-12-18drm: Kill DRM_*MEMORYBARRIERDaniel Vetter1-1/+1
The real linux interfaces are soooo much easier on the eyes ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-12-18drm: Kill DRM_COPY_(TO|FROM)_USERDaniel Vetter1-3/+3
Less yelling ftw! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells1-2/+2
Convert #include "..." to #include <path/...> in drivers/gpu/. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Dave Airlie <airlied@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
2012-04-10drm/savage: fix integer overflows in savage_bci_cmdbuf()Xi Wang1-3/+3
Since cmdbuf->size and cmdbuf->nbox are from userspace, a large value would overflow the allocation size, leading to out-of-bounds access. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-20drivers/gpu/drm/savage/savage_state.c: add missing kfreeJulia Lawall1-2/+3
Most of the error handling code in this function frees the buffers kcmd_addr, kvb_addr, and kbox_addr allocated at the beginning of this function. These two branches are changed to do the same. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-06-18drm: Remove memory debugging infrastructure.Eric Anholt1-9/+8
It hasn't been used in ages, and having the user tell your how much memory is being freed at free time is a recipe for disaster even if it was ever used. Signed-off-by: Eric Anholt <eric@anholt.net>
2008-07-14drm: reorganise drm tree to be more future proof.Dave Airlie1-0/+1163
With the coming of kernel based modesetting and the memory manager stuff, the everything in one directory approach was getting very ugly and starting to be unmanageable. This restructures the drm along the lines of other kernel components. It creates a drivers/gpu/drm directory and moves the hw drivers into subdirectores. It moves the includes into an include/drm, and sets up the unifdef for the userspace headers we should be exporting. Signed-off-by: Dave Airlie <airlied@redhat.com>