Commit ace232ef authored by YiPeng Chai's avatar YiPeng Chai Committed by Alex Deucher
Browse files

drm/amdgpu: Add ras module files into amdgpu



Add ras module files into amdgpu.

Signed-off-by: default avatarYiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 42f14878
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
	-I$(FULL_AMD_DISPLAY_PATH)/modules/inc \
	-I$(FULL_AMD_DISPLAY_PATH)/dc \
	-I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \
	-I$(FULL_AMD_PATH)/amdkfd
	-I$(FULL_AMD_PATH)/amdkfd \
	-I$(FULL_AMD_PATH)/ras/ras_mgr

# Locally disable W=1 warnings enabled in drm subsystem Makefile
subdir-ccflags-y += -Wno-override-init
@@ -324,4 +325,9 @@ amdgpu-y += \
	isp_v4_1_1.o
endif

AMD_GPU_RAS_PATH := ../ras
AMD_GPU_RAS_FULL_PATH := $(FULL_AMD_PATH)/ras
include $(AMD_GPU_RAS_FULL_PATH)/Makefile
amdgpu-y += $(AMD_GPU_RAS_FILES)

obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
+1 −0
Original line number Diff line number Diff line
@@ -504,6 +504,7 @@ struct ras_critical_region {
};

struct amdgpu_ras {
	void *ras_mgr;
	/* ras infrastructure */
	/* for ras itself. */
	uint32_t features;
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ static struct ras_core_context *ras_cmd_get_ras_core(uint64_t dev_handle)
	if (!dev_handle || (dev_handle == RAS_CMD_DEV_HANDLE_MAGIC))
		return NULL;

	ras_core = (struct ras_core_context *)(dev_handle ^ RAS_CMD_DEV_HANDLE_MAGIC);
	ras_core = (struct ras_core_context *)(uintptr_t)(dev_handle ^ RAS_CMD_DEV_HANDLE_MAGIC);

	if (ras_cmd_get_dev_handle(ras_core) == dev_handle)
		return ras_core;
+1 −1
Original line number Diff line number Diff line
@@ -373,7 +373,7 @@ struct amdgpu_ras_mgr *amdgpu_ras_mgr_get_context(struct amdgpu_device *adev)
	return (struct amdgpu_ras_mgr *)adev->psp.ras_context.ras->ras_mgr;
}

static const struct amd_ip_funcs ras_v1_0_ip_funcs = {
static const struct amd_ip_funcs __maybe_unused ras_v1_0_ip_funcs = {
	.name = "ras_v1_0",
	.sw_init = amdgpu_ras_mgr_sw_init,
	.sw_fini = amdgpu_ras_mgr_sw_fini,
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/stdarg.h>
#include <linux/printk.h>
#include <linux/dev_printk.h>
#include <linux/mempool.h>
#include "amdgpu.h"

#define RAS_DEV_ERR(device, fmt, ...)                                               \
Loading