Hi Gerd.
On Tue, Aug 06, 2019 at 03:34:52PM +0200, Gerd Hoffmann wrote:
Now with ttm_buffer_object being a subclass of drm_gem_object we can easily lookup ttm_buffer_object for a given drm_gem_object, which in turm allows to create common helper functions. This patch starts off with dump mmap helpers.
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
One nit below.
include/drm/drm_gem_ttm_helper.h | 27 +++++++++++++++ drivers/gpu/drm/drm_gem_ttm_helper.c | 52 ++++++++++++++++++++++++++++ drivers/gpu/drm/Kconfig | 7 ++++ drivers/gpu/drm/Makefile | 3 ++ 4 files changed, 89 insertions(+) create mode 100644 include/drm/drm_gem_ttm_helper.h create mode 100644 drivers/gpu/drm/drm_gem_ttm_helper.c
diff --git a/include/drm/drm_gem_ttm_helper.h b/include/drm/drm_gem_ttm_helper.h new file mode 100644 index 000000000000..2c6874190b17 --- /dev/null +++ b/include/drm/drm_gem_ttm_helper.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */
+#ifndef DRM_GEM_TTM_HELPER_H +#define DRM_GEM_TTM_HELPER_H
+#include <drm/drm_gem.h> +#include <drm/ttm/ttm_bo_api.h> +#include <linux/kernel.h> /* for container_of() */
The typical order of include files is:
#include <linux/*>
#include <drm/*>
So space between each block of includes and sort within each block.
The comment "/* for container_of() */" is not really useful for anyone.
Sam