mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 12:54:09 +07:00
0a5239985a
Commita5efb4c9a5
("drm/panfrost: Restructure the GEM object creation") moved the drm_mm_insert_node_generic() call to the gem->open() hook, but forgot to update perfcnt accordingly. Patch the perfcnt logic to call panfrost_gem_open/close() where appropriate. Fixes:a5efb4c9a5
("drm/panfrost: Restructure the GEM object creation") Cc: <stable@vger.kernel.org> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-6-boris.brezillon@collabora.com
56 lines
1.5 KiB
C
56 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
|
|
|
|
#ifndef __PANFROST_GEM_H__
|
|
#define __PANFROST_GEM_H__
|
|
|
|
#include <drm/drm_gem_shmem_helper.h>
|
|
#include <drm/drm_mm.h>
|
|
|
|
struct panfrost_mmu;
|
|
|
|
struct panfrost_gem_object {
|
|
struct drm_gem_shmem_object base;
|
|
struct sg_table *sgts;
|
|
|
|
struct panfrost_mmu *mmu;
|
|
struct drm_mm_node node;
|
|
bool is_mapped :1;
|
|
bool noexec :1;
|
|
bool is_heap :1;
|
|
};
|
|
|
|
static inline
|
|
struct panfrost_gem_object *to_panfrost_bo(struct drm_gem_object *obj)
|
|
{
|
|
return container_of(to_drm_gem_shmem_obj(obj), struct panfrost_gem_object, base);
|
|
}
|
|
|
|
static inline
|
|
struct panfrost_gem_object *drm_mm_node_to_panfrost_bo(struct drm_mm_node *node)
|
|
{
|
|
return container_of(node, struct panfrost_gem_object, node);
|
|
}
|
|
|
|
struct drm_gem_object *panfrost_gem_create_object(struct drm_device *dev, size_t size);
|
|
|
|
struct drm_gem_object *
|
|
panfrost_gem_prime_import_sg_table(struct drm_device *dev,
|
|
struct dma_buf_attachment *attach,
|
|
struct sg_table *sgt);
|
|
|
|
struct panfrost_gem_object *
|
|
panfrost_gem_create_with_handle(struct drm_file *file_priv,
|
|
struct drm_device *dev, size_t size,
|
|
u32 flags,
|
|
uint32_t *handle);
|
|
|
|
int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_priv);
|
|
void panfrost_gem_close(struct drm_gem_object *obj,
|
|
struct drm_file *file_priv);
|
|
|
|
void panfrost_gem_shrinker_init(struct drm_device *dev);
|
|
void panfrost_gem_shrinker_cleanup(struct drm_device *dev);
|
|
|
|
#endif /* __PANFROST_GEM_H__ */
|