linux_dsm_epyc7002/drivers/gpu/drm/hisilicon/kirin
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
..
dw_drm_dsi.c drm/hisilicon: Fix DRM_INFO printed issue 2016-05-11 19:05:36 +08:00
dw_dsi_reg.h drm/hisilicon: Add designware dsi encoder driver 2016-04-29 16:39:13 +08:00
Kconfig drm/hisilicon: add select HISI_KIRIN_DW_DSI 2016-07-04 18:49:20 +08:00
kirin_ade_reg.h drm/hisilicon: Add crtc driver for ADE 2016-04-29 16:39:12 +08:00
kirin_drm_ade.c drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
kirin_drm_drv.c drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
kirin_drm_drv.h Revert "drm/hisilicon: Don't set drm_device->platformdev" 2016-08-17 13:59:40 +02:00
Makefile drm/hisilicon: Add designware dsi encoder driver 2016-04-29 16:39:13 +08:00