1. 13 Jul, 2021 4 commits
  2. 08 Jul, 2021 33 commits
  3. 01 Jul, 2021 3 commits
    • Jiri Kosina's avatar
      drm/amdgpu: Avoid printing of stack contents on firmware load error · 36f5f9d3
      Jiri Kosina authored
      In case when psp_init_asd_microcode() fails to load ASD microcode file,
      psp_v12_0_init_microcode() tries to print the firmware filename that
      failed to load before bailing out.
      
      This is wrong because:
      
      - the firmware filename it would want it print is an incorrect one as
        psp_init_asd_microcode() and psp_v12_0_init_microcode() are loading
        different filenames
      - it tries to print fw_name, but that's not yet been initialized by that
        time, so it prints random stack contents, e.g.
      
          amdgpu 0000:04:00.0: Direct firmware load for amdgpu/renoir_asd.bin failed with error -2
          amdgpu 0000:04:00.0: amdgpu: fail to initialize asd microcode
          amdgpu 0000:04:00.0: amdgpu: psp v12.0: Failed to load firmware "\xfeTO\x8e\xff\xff"
      
      Fix that by bailing out immediately, instead of priting the bogus error
      message.
      Reported-by: default avatarVojtech Pavlik <vojtech@ucw.cz>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      36f5f9d3
    • Jiri Kosina's avatar
      drm/amdgpu: Fix resource leak on probe error path · 4ef87d8f
      Jiri Kosina authored
      This reverts commit 4192f7b5.
      
      It is not true (as stated in the reverted commit changelog) that we never
      unmap the BAR on failure; it actually does happen properly on
      amdgpu_driver_load_kms() -> amdgpu_driver_unload_kms() ->
      amdgpu_device_fini() error path.
      
      What's worse, this commit actually completely breaks resource freeing on
      probe failure (like e.g. failure to load microcode), as
      amdgpu_driver_unload_kms() notices adev->rmmio being NULL and bails too
      early, leaving all the resources that'd normally be freed in
      amdgpu_acpi_fini() and amdgpu_device_fini() still hanging around, leading
      to all sorts of oopses when someone tries to, for example, access the
      sysfs and procfs resources which are still around while the driver is
      gone.
      
      Fixes: 4192f7b5 ("drm/amdgpu: unmap register bar on device init failure")
      Reported-by: default avatarVojtech Pavlik <vojtech@ucw.cz>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      4ef87d8f
    • Lang Yu's avatar
      drm/amdgpu: show explicit name instead of id in psp_cmd_submit_buf · 63123332
      Lang Yu authored
      Use amdgpu_ucode_name to show ucode name and psp_gfx_cmd_name to
      show psp_gfx_cmd name in psp_cmd_submit_buf.
      
      v2: adjust function name
      Signed-off-by: default avatarLang Yu <Lang.Yu@amd.com>
      Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      63123332