[AMD Official Use Only - General] > -----Original Message----- > From: Chai, Thomas <YiPeng.Chai@xxxxxxx> > Sent: Wednesday, July 19, 2023 8:40 PM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Chai, Thomas <YiPeng.Chai@xxxxxxx>; Zhang, Hawking > <Hawking.Zhang@xxxxxxx>; Zhou1, Tao <Tao.Zhou1@xxxxxxx>; Li, Candice > <Candice.Li@xxxxxxx>; Yang, Stanley <Stanley.Yang@xxxxxxx>; Chai, Thomas > <YiPeng.Chai@xxxxxxx> > Subject: [PATCH 1/2] drm/amdgpu: add ta initialization failure check condition > > Add ta initialization failure check condition. [Tao] better to say "Add condition check for ta initialization failure" > > Signed-off-by: YiPeng Chai <YiPeng.Chai@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c > index 468a67b302d4..049d34fd5ba0 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c > @@ -220,7 +220,7 @@ static ssize_t ta_if_load_debugfs_write(struct file *fp, > const char *buf, size_t > } > > ret = psp_fn_ta_initialize(psp); > - if (ret || context->resp_status) { > + if (ret || context->resp_status || !context->initialized) { > dev_err(adev->dev, "Failed to load TA via debugfs (%d) and status > (0x%X)\n", > ret, context->resp_status); > if (!ret) > -- > 2.34.1