mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
ff540b76f1
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 turn allows to create common helper functions. This patch starts off with a drm_gem_ttm_print_info() helper function which adds some ttm specific lines to the debug output. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-3-kraxel@redhat.com
20 lines
472 B
C
20 lines
472 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#ifndef DRM_GEM_TTM_HELPER_H
|
|
#define DRM_GEM_TTM_HELPER_H
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <drm/drm_gem.h>
|
|
#include <drm/drm_device.h>
|
|
#include <drm/ttm/ttm_bo_api.h>
|
|
#include <drm/ttm/ttm_bo_driver.h>
|
|
|
|
#define drm_gem_ttm_of_gem(gem_obj) \
|
|
container_of(gem_obj, struct ttm_buffer_object, base)
|
|
|
|
void drm_gem_ttm_print_info(struct drm_printer *p, unsigned int indent,
|
|
const struct drm_gem_object *gem);
|
|
|
|
#endif
|