mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
Add the upstream host1x driver with the 'Host1x/Tegra UAPI' series [0] applied. This driver will be built as an external module for use with the NVGPU driver on upstream Linux kernels. The following modifications have been made to the series posted upstream 1. Update the Makefile to always build the driver as a module 2. Remove the tests to see if CONFIG_DRM_TEGRA_STAGING is enabled 3. Rename the include/linux/host1x.h to include/linux/host1x-next.h to avoid conflicts with upstream headers when building as an external module. 4. Rename the include/uapi/linux/host1x.h to include/uapi/linux/host1x-next.h to avoid conflicts with upstream headers when building as an external module. 5. Rename the module that is built to be host1x-next.ko instead of host1x.ko to avoid any depmod conflicts with the upstream driver. [0] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=215770 Bug 3156385 Change-Id: Ic60299546809097dd0e4a9a7157bce1491d9f794 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2435801 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
36 lines
1.5 KiB
C
36 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2017 NVIDIA Corporation.
|
|
*/
|
|
|
|
#define HOST1X_CHANNEL_DMASTART 0x0000
|
|
#define HOST1X_CHANNEL_DMASTART_HI 0x0004
|
|
#define HOST1X_CHANNEL_DMAPUT 0x0008
|
|
#define HOST1X_CHANNEL_DMAPUT_HI 0x000c
|
|
#define HOST1X_CHANNEL_DMAGET 0x0010
|
|
#define HOST1X_CHANNEL_DMAGET_HI 0x0014
|
|
#define HOST1X_CHANNEL_DMAEND 0x0018
|
|
#define HOST1X_CHANNEL_DMAEND_HI 0x001c
|
|
#define HOST1X_CHANNEL_DMACTRL 0x0020
|
|
#define HOST1X_CHANNEL_DMACTRL_DMASTOP BIT(0)
|
|
#define HOST1X_CHANNEL_DMACTRL_DMAGETRST BIT(1)
|
|
#define HOST1X_CHANNEL_DMACTRL_DMAINITGET BIT(2)
|
|
#define HOST1X_CHANNEL_CMDFIFO_STAT 0x0024
|
|
#define HOST1X_CHANNEL_CMDFIFO_STAT_EMPTY BIT(13)
|
|
#define HOST1X_CHANNEL_CMDFIFO_RDATA 0x0028
|
|
#define HOST1X_CHANNEL_CMDP_OFFSET 0x0030
|
|
#define HOST1X_CHANNEL_CMDP_CLASS 0x0034
|
|
#define HOST1X_CHANNEL_CHANNELSTAT 0x0038
|
|
#define HOST1X_CHANNEL_CMDPROC_STOP 0x0048
|
|
#define HOST1X_CHANNEL_TEARDOWN 0x004c
|
|
|
|
#define HOST1X_SYNC_SYNCPT_CPU_INCR(x) (0x6400 + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT_THRESH_CPU0_INT_STATUS(x) (0x6464 + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT_THRESH_INT_ENABLE_CPU0(x) (0x652c + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT_THRESH_INT_DISABLE(x) (0x6590 + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT_BASE(x) (0x8000 + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT(x) (0x8080 + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT_INT_THRESH(x) (0x8a00 + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT_CH_APP(x) (0x9384 + 4*(x))
|
|
#define HOST1X_SYNC_SYNCPT_CH_APP_CH(v) (((v) & 0x3f) << 8)
|