diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4443-drm-amdgpu-add-JPEG-HW-IP-and-SW-structures.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4443-drm-amdgpu-add-JPEG-HW-IP-and-SW-structures.patch | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4443-drm-amdgpu-add-JPEG-HW-IP-and-SW-structures.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4443-drm-amdgpu-add-JPEG-HW-IP-and-SW-structures.patch new file mode 100644 index 00000000..8e58ca5f --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4443-drm-amdgpu-add-JPEG-HW-IP-and-SW-structures.patch @@ -0,0 +1,100 @@ +From cec3b16f457e14003559707bd0bb5c2f40953630 Mon Sep 17 00:00:00 2001 +From: Leo Liu <leo.liu@amd.com> +Date: Fri, 8 Nov 2019 10:00:24 -0500 +Subject: [PATCH 4443/4736] drm/amdgpu: add JPEG HW IP and SW structures + +It will be used for JPEG IP 1.0, 2.0, 2.5 and later. + +Signed-off-by: Leo Liu <leo.liu@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++ + drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h | 46 ++++++++++++++++++++++++ + 2 files changed, 51 insertions(+) + create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h +index 715739799383..9915f0472611 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h +@@ -70,6 +70,7 @@ + #include "amdgpu_uvd.h" + #include "amdgpu_vce.h" + #include "amdgpu_vcn.h" ++#include "amdgpu_jpeg.h" + #include "amdgpu_mn.h" + #include "amdgpu_gmc.h" + #include "amdgpu_gfx.h" +@@ -724,6 +725,7 @@ enum amd_hw_ip_block_type { + MP1_HWIP, + UVD_HWIP, + VCN_HWIP = UVD_HWIP, ++ JPEG_HWIP = VCN_HWIP, + VCE_HWIP, + DF_HWIP, + DCE_HWIP, +@@ -944,6 +946,9 @@ struct amdgpu_device { + /* vcn */ + struct amdgpu_vcn vcn; + ++ /* jpeg */ ++ struct amdgpu_jpeg jpeg; ++ + /* firmwares */ + struct amdgpu_firmware firmware; + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h +new file mode 100644 +index 000000000000..36e2b7340c97 +--- /dev/null ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h +@@ -0,0 +1,46 @@ ++/* ++ * Copyright 2019 Advanced Micro Devices, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++#ifndef __AMDGPU_JPEG_H__ ++#define __AMDGPU_JPEG_H__ ++ ++#define AMDGPU_MAX_JPEG_INSTANCES 2 ++ ++struct amdgpu_jpeg_reg{ ++ unsigned jpeg_pitch; ++}; ++ ++struct amdgpu_jpeg_inst { ++ struct amdgpu_ring ring_dec; ++ struct amdgpu_irq_src irq; ++ struct amdgpu_jpeg_reg external; ++}; ++ ++struct amdgpu_jpeg { ++ uint8_t num_jpeg_inst; ++ struct amdgpu_jpeg_inst inst[AMDGPU_MAX_JPEG_INSTANCES]; ++ struct amdgpu_jpeg_reg internal; ++ unsigned harvest_config; ++}; ++ ++#endif /*__AMDGPU_JPEG_H__*/ +-- +2.17.1 + |