/* * Copyright (C) 2013 Red Hat * Author: Rob Clark * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ #ifndef __MSM_GPU_H__ #define __MSM_GPU_H__ #include #include "msm_drv.h" /* So far, with hardware that I've seen to date, we can have: * + zero, one, or two z180 2d cores * + a3xx or a2xx 3d core, which share a common CP (the firmware * for the CP seems to implement some different PM4 packet types * but the basics of cmdstream submission are the same) * * Which means that the eventual complete "class" hierarchy, once * support for all past and present hw is in place, becomes: * + msm_gpu * + adreno_gpu * + a3xx_gpu * + a2xx_gpu * + z180_gpu */ struct msm_gpu { struct drm_device *dev; struct adreno_gpu *gpu; struct adreno_gem gem; const struct adreno_gpu_funcs *funcs; /* list of GEM active objects: */ struct list_head active_list; /* worker for handling active-list retiring: */ struct work_struct retire_work; struct iommu_domain *iommu; int id; }; struct msm_gem_submit; int msm_gpu_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit, struct msm_file_private *ctx); int msm_gpu_init(struct drm_device *drm, struct msm_gpu **gpu); void msm_gpu_cleanup(struct msm_gpu *gpu); #endif /* __MSM_GPU_H__ */