drm/amdgpu/display: fix the NULL pointer reference on dmucb on dcn301
authorHuang Rui <ray.huang@amd.com>
Thu, 15 Oct 2020 07:12:23 +0000 (15:12 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Oct 2020 18:44:11 +0000 (14:44 -0400)
commitf9dbefa884fd6618a99c29a29c64de58bdcbca85
treeba27a55e03615e5725d1a21d76f1e0e29514a3c8
parentf0c746ce07c8df0d5b5582a87b0baf238ab49d27
drm/amdgpu/display: fix the NULL pointer reference on dmucb on dcn301

DCN301 needs to use dmub create abm instance instead of dce.

[ 1138.854204] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 1138.854206] #PF: supervisor instruction fetch in kernel mode
[ 1138.854207] #PF: error_code(0x0010) - not-present page
[ 1138.854208] PGD 0 P4D 0
[ 1138.854212] Oops: 0010 [#1] SMP NOPTI
[ 1138.854216] CPU: 6 PID: 1240 Comm: modprobe Tainted: G        W  OE     5.9.0-rc2-custom #1
[ 1138.854217] Hardware name: AMD Chachani-VN/Chachani-VN, BIOS BAerithA104 10/01/2020
[ 1138.854221] RIP: 0010:0x0
[ 1138.854224] Code: Bad RIP value.
[ 1138.854226] RSP: 0018:ffffc90001c4f638 EFLAGS: 00010286
[ 1138.854228] RAX: 0000000000000000 RBX: ffff88804f2b2800 RCX: ffffc90001c4f740
[ 1138.854229] RDX: 00000000000000e8 RSI: ffffc90001c4f640 RDI: ffff88805816f300
[ 1138.854230] RBP: ffffc90001c4f850 R08: ffffc90001c4f644 R09: ffffc90001c4f654
[ 1138.854231] R10: ffffc90001c4f72c R11: ffffc90001c4f740 R12: ffffc90001c4f640
[ 1138.854232] R13: ffffc90001c4f728 R14: 0000000000000000 R15: ffff888007296381
[ 1138.854235] FS:  00007f5f44d84540(0000) GS:ffff88805e380000(0000) knlGS:0000000000000000
[ 1138.854236] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1138.854237] CR2: ffffffffffffffd6 CR3: 00000000194f4000 CR4: 0000000000050ee0
[ 1138.854239] Call Trace:
[ 1138.854447]  dmub_init_abm_config+0x220/0x267 [amdgpu]
[ 1138.854654]  dm_late_init+0x197/0x1ad [amdgpu]
[ 1138.854846]  ? dm_late_init+0x197/0x1ad [amdgpu]
[ 1138.854999]  amdgpu_device_ip_late_init+0x6f/0x21b [amdgpu]
[ 1138.855148]  amdgpu_device_init+0x1b7f/0x1cfb [amdgpu]
[ 1138.855293]  amdgpu_driver_load_kms+0x2c/0x26e [amdgpu]
[ 1138.855437]  amdgpu_pci_probe+0x1c7/0x249 [amdgpu]
[ 1138.920489]  local_pci_probe+0x48/0x80
[ 1138.920492]  pci_device_probe+0x10f/0x1c0

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c