linux/drivers/gpu/drm/vmwgfx
Eric Engestrom b3c11ac267 drm: move allocation out of drm_get_format_name()
The function's behaviour was changed in 90844f0004, without changing
its signature, causing people to keep using it the old way without
realising they were now leaking memory.
Rob Clark also noticed it was also allocating GFP_KERNEL memory in
atomic contexts, breaking them.

Instead of having to allocate GFP_ATOMIC memory and fixing the callers
to make them cleanup the memory afterwards, let's change the function's
signature by having the caller take care of the memory and passing it to
the function.
The new parameter is a single-field struct in order to enforce the size
of its buffer and help callers to correctly manage their memory.

Fixes: 90844f0004 ("drm: make drm_get_format_name thread-safe")
Cc: Rob Clark <robdclark@gmail.com>
Cc: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Sinclair Yeh <syeh@vmware.com> (vmwgfx)
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161112011309.9799-1-eric@engestrom.ch
2016-11-12 14:19:38 +01:00
..
device_include
Kconfig
Makefile
vmwgfx_binding.c
vmwgfx_binding.h
vmwgfx_buffer.c drm/ttm: make eviction decision a driver callback v2 2016-10-25 14:44:04 -04:00
vmwgfx_cmdbuf_res.c
vmwgfx_cmdbuf.c
vmwgfx_context.c
vmwgfx_cotable.c
vmwgfx_dmabuf.c
vmwgfx_drv.c drm/vmwgfx: Replace numeric parameter like 0444 with macro 2016-10-10 11:14:20 -07:00
vmwgfx_drv.h Merge branch 'drm-vmwgfx-fixes' of ssh://people.freedesktop.org/~syeh/repos_linux into drm-fixes 2016-10-21 13:26:58 +10:00
vmwgfx_execbuf.c drm/vmwgfx: Avoid validating views on view destruction 2016-10-10 11:15:05 -07:00
vmwgfx_fb.c
vmwgfx_fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
vmwgfx_fence.h dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
vmwgfx_fifo.c
vmwgfx_gmr.c
vmwgfx_gmrid_manager.c
vmwgfx_ioctl.c
vmwgfx_irq.c
vmwgfx_kms.c drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
vmwgfx_kms.h
vmwgfx_ldu.c
vmwgfx_marker.c
vmwgfx_mob.c
vmwgfx_msg.c
vmwgfx_msg.h
vmwgfx_overlay.c
vmwgfx_prime.c
vmwgfx_reg.h
vmwgfx_resource_priv.h
vmwgfx_resource.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
vmwgfx_scrn.c
vmwgfx_shader.c
vmwgfx_so.c
vmwgfx_so.h
vmwgfx_stdu.c
vmwgfx_surface.c drm/vmwgfx: Adjust checks for null pointers in 13 functions 2016-10-10 13:23:16 -07:00
vmwgfx_ttm_glue.c