2 * drivers/video/tegra/host/host1x/host1x_hwctx.h
4 * Tegra Graphics Host HOST1X Hardware Context Interface
6 * Copyright (c) 2012, NVIDIA Corporation.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef __NVHOST_HOST1X_HWCTX_H
24 #define __NVHOST_HOST1X_HWCTX_H
26 #include <linux/kref.h>
27 #include "nvhost_hwctx.h"
29 struct nvhost_hwctx_handler;
30 struct nvhost_channel;
32 #define to_host1x_hwctx_handler(handler) \
33 container_of((handler), struct host1x_hwctx_handler, h)
34 #define to_host1x_hwctx(h) container_of((h), struct host1x_hwctx, hwctx)
35 #define host1x_hwctx_handler(_hwctx) to_host1x_hwctx_handler((_hwctx)->hwctx.h)
38 struct nvhost_hwctx hwctx;
44 struct mem_handle *restore;
46 phys_addr_t restore_phys;
51 struct host1x_hwctx_handler {
52 struct nvhost_hwctx_handler h;
58 struct mem_handle *save_buf;
62 phys_addr_t save_phys;