drm/amdgpu: update tmr mc address
authorJames Zhu <jzhums@gmail.com>
Thu, 9 Aug 2018 16:31:39 +0000 (00:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:45:33 +0000 (09:45 +0200)
commit 435198f33b56d7b875a8173a0227ddf0de285aa1 upstream.

Update tmr mc address with firmware loading address
which is returned from PSP firmware

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 8c2204c7b3847c3ce18042b48d70516155b843e5..7ad8fa891ce6b97bac4390eb0bd377d4b280b1d5 100644 (file)
@@ -134,6 +134,11 @@ psp_cmd_submit_buf(struct psp_context *psp,
                msleep(1);
        }
 
+       if (ucode) {
+               ucode->tmr_mc_addr_lo = psp->cmd_buf_mem->resp.fw_addr_lo;
+               ucode->tmr_mc_addr_hi = psp->cmd_buf_mem->resp.fw_addr_hi;
+       }
+
        return ret;
 }