From: jsg Date: Thu, 22 Jun 2023 05:10:03 +0000 (+0000) Subject: drm/amd: Make sure image is written to trigger VBIOS image update flow X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e60282a843d316590816654a796608f75fde064d;p=openbsd drm/amd: Make sure image is written to trigger VBIOS image update flow From Mario Limonciello b2706d862b6577b8218bdef1c238e175624b906d in linux-6.1.y/6.1.35 3eb1a3a04056ba3df3205e169b8acc9da0c65a94 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c index 3ab88a18cc3..cdd12fa064d 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c @@ -3570,6 +3570,9 @@ static ssize_t amdgpu_psp_vbflash_read(struct file *filp, struct kobject *kobj, void *fw_pri_cpu_addr; int ret; + if (adev->psp.vbflash_image_size == 0) + return -EINVAL; + dev_info(adev->dev, "VBIOS flash to PSP started"); ret = amdgpu_bo_create_kernel(adev, adev->psp.vbflash_image_size,