Compare
8e8cd9a4c6dc006e9bd51b8ad0079fb4576b48d3..7669e0b1b92a8296a3dace4f2cc49fec0dd83fd3
Merge tag 'drm-xe-fixes-2026-10-15' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes
An OA uAPI fix by zeroing OA buffer at allocation, and other 3 small fixes around eviction and shrinker. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/atDNMV-Aohu6s0gE@intel.com
Dave Airlie <airlied@redhat.com> · 2026-10-16 08:36 UTC
32 files changed,
+237
−140
- MAINTAINERS
- drivers/accel/amdxdna/Kconfig
- drivers/accel/rocket/rocket_device.c
- drivers/accel/rocket/rocket_device.h
- drivers/accel/rocket/rocket_drv.c
- drivers/accel/rocket/rocket_job.c
- drivers/dma-buf/Kconfig
- drivers/gpu/drm/drm_exec.c
- drivers/gpu/drm/i915/display/intel_cx0_phy.c
- drivers/gpu/drm/i915/display/intel_dmc.c
- drivers/gpu/drm/i915/display/intel_dmc_regs.h
- drivers/gpu/drm/panthor/panthor_hw.c
- drivers/gpu/drm/vc4/vc4_hdmi.c
- drivers/gpu/drm/virtio/virtgpu_drv.c
- drivers/gpu/drm/virtio/virtgpu_plane.c
- drivers/gpu/drm/xe/xe_bo.c
- drivers/gpu/drm/xe/xe_exec.c
- drivers/gpu/drm/xe/xe_oa.c
- drivers/gpu/drm/xe/xe_vm.c
- drivers/gpu/drm/xe/xe_vm.h
- include/drm/drm_exec.h
- sound/soc/amd/yc/pci-acp6x.c
- sound/soc/codecs/cs42l52.c
- sound/soc/codecs/cs42l56.c
- sound/soc/codecs/max98371.c
- sound/soc/codecs/nau8822.c
- sound/soc/codecs/pcm3168a.c
- sound/soc/codecs/wm8978.c
- sound/soc/intel/avs/pcm.c
- sound/soc/sof/ipc4-topology.c
- sound/soc/sof/sof-client.c
- sound/soc/stm/stm32_spdifrx.c
modified MAINTAINERS
| @@ -8013,6 +8013,7 @@ F: include/uapi/drm/ivpu_accel.h | |||
| 8013 | 8013 | ||
| 8014 | 8014 | DRM ACCEL DRIVER FOR ROCKCHIP NPU | |
| 8015 | 8015 | M: Tomeu Vizoso <tomeu@tomeuvizoso.net> | |
| 8016 | + | R: Heiko Stuebner <heiko@sntech.de> | |
| 8016 | 8017 | L: dri-devel@lists.freedesktop.org | |
| 8017 | 8018 | S: Supported | |
| 8018 | 8019 | T: git https://gitlab.freedesktop.org/drm/misc/kernel.git | |
| @@ -8575,7 +8576,7 @@ F: Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml | |||
| 8575 | 8576 | F: drivers/gpu/drm/panel/panel-synaptics-r63353.c | |
| 8576 | 8577 | ||
| 8577 | 8578 | DRM DRIVER FOR SYNOPSYS DESIGNWARE DISPLAYPORT BRIDGE | |
| 8578 | - | M: Andy Yan <andy.yan@rock-chips.com> | |
| 8579 | + | M: Andy Yan <andyshrk@163.com> | |
| 8579 | 8580 | S: Maintained | |
| 8580 | 8581 | T: git https://gitlab.freedesktop.org/drm/misc/kernel.git | |
| 8581 | 8582 | F: Documentation/devicetree/bindings/display/rockchip/rockchip,dw-dp.yaml | |
| @@ -8928,7 +8929,7 @@ F: include/linux/platform_data/shmob_drm.h | |||
| 8928 | 8929 | DRM DRIVERS FOR ROCKCHIP | |
| 8929 | 8930 | M: Sandy Huang <hjc@rock-chips.com> | |
| 8930 | 8931 | M: Heiko Stübner <heiko@sntech.de> | |
| 8931 | - | M: Andy Yan <andy.yan@rock-chips.com> | |
| 8932 | + | M: Andy Yan <andyshrk@163.com> | |
| 8932 | 8933 | L: dri-devel@lists.freedesktop.org | |
| 8933 | 8934 | L: linux-rockchip@lists.infradead.org | |
| 8934 | 8935 | S: Maintained | |
| @@ -12883,7 +12884,7 @@ S: Maintained | |||
| 12883 | 12884 | F: drivers/power/supply/ip5xxx_power.c | |
| 12884 | 12885 | ||
| 12885 | 12886 | INNOSILICON HDMI BRIDGE DRIVER | |
| 12886 | - | M: Andy Yan <andy.yan@rock-chips.com> | |
| 12887 | + | M: Andy Yan <andyshrk@163.com> | |
| 12887 | 12888 | L: dri-devel@lists.freedesktop.org | |
| 12888 | 12889 | S: Maintained | |
| 12889 | 12890 | T: git https://gitlab.freedesktop.org/drm/misc/kernel.git | |
modified drivers/accel/amdxdna/Kconfig
| @@ -6,6 +6,7 @@ config DRM_ACCEL_AMDXDNA | |||
| 6 | 6 | depends on DRM_ACCEL | |
| 7 | 7 | depends on PCI && HAS_IOMEM | |
| 8 | 8 | depends on X86_64 | |
| 9 | + | depends on AMD_PMF || !AMD_PMF | |
| 9 | 10 | select DRM_SCHED | |
| 10 | 11 | select DRM_GEM_SHMEM_HELPER | |
| 11 | 12 | select FW_LOADER | |
modified drivers/accel/rocket/rocket_device.c
| @@ -31,6 +31,8 @@ struct rocket_device *rocket_device_init(struct platform_device *pdev, | |||
| 31 | 31 | if (of_device_is_available(core_node)) | |
| 32 | 32 | num_cores++; | |
| 33 | 33 | ||
| 34 | + | rdev->max_cores = num_cores; | |
| 35 | + | ||
| 34 | 36 | rdev->cores = devm_kcalloc(dev, num_cores, sizeof(*rdev->cores), GFP_KERNEL); | |
| 35 | 37 | if (!rdev->cores) | |
| 36 | 38 | return ERR_PTR(-ENOMEM); | |
modified drivers/accel/rocket/rocket_device.h
| @@ -19,6 +19,7 @@ struct rocket_device { | |||
| 19 | 19 | ||
| 20 | 20 | struct rocket_core *cores; | |
| 21 | 21 | unsigned int num_cores; | |
| 22 | + | unsigned int max_cores; | |
| 22 | 23 | }; | |
| 23 | 24 | ||
| 24 | 25 | struct rocket_device *rocket_device_init(struct platform_device *pdev, | |
modified drivers/accel/rocket/rocket_drv.c
| @@ -165,8 +165,11 @@ static int rocket_probe(struct platform_device *pdev) | |||
| 165 | 165 | /* First core probing, initialize DRM device. */ | |
| 166 | 166 | rdev = rocket_device_init(drm_dev, &rocket_drm_driver); | |
| 167 | 167 | if (IS_ERR(rdev)) { | |
| 168 | + | int err = PTR_ERR(rdev); | |
| 169 | + | ||
| 168 | 170 | dev_err(&pdev->dev, "failed to initialize rocket device\n"); | |
| 169 | - | return PTR_ERR(rdev); | |
| 171 | + | rdev = NULL; | |
| 172 | + | return err; | |
| 170 | 173 | } | |
| 171 | 174 | } | |
| 172 | 175 | ||
| @@ -223,7 +226,7 @@ static int find_core_for_dev(struct device *dev) | |||
| 223 | 226 | { | |
| 224 | 227 | struct rocket_device *rdev = dev_get_drvdata(dev); | |
| 225 | 228 | ||
| 226 | - | for (unsigned int core = 0; core < rdev->num_cores; core++) { | |
| 229 | + | for (unsigned int core = 0; core < rdev->max_cores; core++) { | |
| 227 | 230 | if (dev == rdev->cores[core].dev) | |
| 228 | 231 | return core; | |
| 229 | 232 | } | |
modified drivers/accel/rocket/rocket_job.c
| @@ -283,7 +283,7 @@ static struct rocket_core *sched_to_core(struct rocket_device *rdev, | |||
| 283 | 283 | { | |
| 284 | 284 | unsigned int core; | |
| 285 | 285 | ||
| 286 | - | for (core = 0; core < rdev->num_cores; core++) { | |
| 286 | + | for (core = 0; core < rdev->max_cores; core++) { | |
| 287 | 287 | if (&rdev->cores[core].sched == sched) | |
| 288 | 288 | return &rdev->cores[core]; | |
| 289 | 289 | } | |
modified drivers/dma-buf/Kconfig
| @@ -43,7 +43,7 @@ config UDMABUF | |||
| 43 | 43 | config DMABUF_DEBUG | |
| 44 | 44 | bool "DMA-BUF debug checks" | |
| 45 | 45 | depends on DMA_SHARED_BUFFER | |
| 46 | - | default y if DEBUG_KERNEL | |
| 46 | + | default y if DEBUG | |
| 47 | 47 | help | |
| 48 | 48 | This option enables additional checks for DMA-BUF importers and | |
| 49 | 49 | exporters. Specifically it validates that importers do not peek at the | |
modified drivers/gpu/drm/drm_exec.c
| @@ -48,6 +48,16 @@ | |||
| 48 | 48 | * See struct dma_exec for more details. | |
| 49 | 49 | */ | |
| 50 | 50 | ||
| 51 | + | /* Unlock and put the prelocked obj */ | |
| 52 | + | static void drm_exec_drop_prelocked(struct drm_exec *exec) | |
| 53 | + | { | |
| 54 | + | if (exec->prelocked) { | |
| 55 | + | dma_resv_unlock(exec->prelocked->resv); | |
| 56 | + | drm_gem_object_put(exec->prelocked); | |
| 57 | + | exec->prelocked = NULL; | |
| 58 | + | } | |
| 59 | + | } | |
| 60 | + | ||
| 51 | 61 | /* Unlock all objects and drop references */ | |
| 52 | 62 | static void drm_exec_unlock_all(struct drm_exec *exec) | |
| 53 | 63 | { | |
| @@ -58,8 +68,7 @@ static void drm_exec_unlock_all(struct drm_exec *exec) | |||
| 58 | 68 | drm_gem_object_put(obj); | |
| 59 | 69 | } | |
| 60 | 70 | ||
| 61 | - | drm_gem_object_put(exec->prelocked); | |
| 62 | - | exec->prelocked = NULL; | |
| 71 | + | drm_exec_drop_prelocked(exec); | |
| 63 | 72 | } | |
| 64 | 73 | ||
| 65 | 74 | /** | |
| @@ -118,6 +127,14 @@ EXPORT_SYMBOL(drm_exec_fini); | |||
| 118 | 127 | bool drm_exec_cleanup(struct drm_exec *exec) | |
| 119 | 128 | { | |
| 120 | 129 | if (likely(!exec->contended)) { | |
| 130 | + | ||
| 131 | + | /* | |
| 132 | + | * The contended and prelocked object might never be passed to | |
| 133 | + | * drm_exec_lock_obj() again. This can happen when the object | |
| 134 | + | * is about to be cleaned up and we now hold the last reference | |
| 135 | + | * to it. Make sure that we don't unnecessarily keep it around. | |
| 136 | + | */ | |
| 137 | + | drm_exec_drop_prelocked(exec); | |
| 121 | 138 | ww_acquire_done(&exec->ticket); | |
| 122 | 139 | return false; | |
| 123 | 140 | } | |
| @@ -175,16 +192,16 @@ static int drm_exec_lock_contended(struct drm_exec *exec) | |||
| 175 | 192 | dma_resv_lock_slow(obj->resv, &exec->ticket); | |
| 176 | 193 | } | |
| 177 | 194 | ||
| 178 | - | ret = drm_exec_obj_locked(exec, obj); | |
| 179 | - | if (unlikely(ret)) | |
| 180 | - | goto error_unlock; | |
| 195 | + | /* | |
| 196 | + | * It is perfectly possible that we see another contention before the | |
| 197 | + | * first one is fully handled. | |
| 198 | + | */ | |
| 199 | + | drm_exec_drop_prelocked(exec); | |
| 181 | 200 | ||
| 201 | + | /* We move the reference from contended to prelocked here */ | |
| 182 | 202 | exec->prelocked = obj; | |
| 183 | 203 | return 0; | |
| 184 | 204 | ||
| 185 | - | error_unlock: | |
| 186 | - | dma_resv_unlock(obj->resv); | |
| 187 | - | ||
| 188 | 205 | error_dropref: | |
| 189 | 206 | drm_gem_object_put(obj); | |
| 190 | 207 | return ret; | |
| @@ -212,35 +229,31 @@ int drm_exec_lock_obj(struct drm_exec *exec, struct drm_gem_object *obj) | |||
| 212 | 229 | if (exec->prelocked == obj) { | |
| 213 | 230 | drm_gem_object_put(exec->prelocked); | |
| 214 | 231 | exec->prelocked = NULL; | |
| 215 | - | return 0; | |
| 216 | - | } | |
| 232 | + | } else { | |
| 233 | + | if (exec->flags & DRM_EXEC_INTERRUPTIBLE_WAIT) | |
| 234 | + | ret = dma_resv_lock_interruptible(obj->resv, | |
| 235 | + | &exec->ticket); | |
| 236 | + | else | |
| 237 | + | ret = dma_resv_lock(obj->resv, &exec->ticket); | |
| 238 | + | ||
| 239 | + | if (unlikely(ret == -EDEADLK)) { | |
| 240 | + | drm_gem_object_get(obj); | |
| 241 | + | exec->contended = obj; | |
| 242 | + | return -EDEADLK; | |
| 243 | + | } | |
| 217 | 244 | ||
| 218 | - | if (exec->flags & DRM_EXEC_INTERRUPTIBLE_WAIT) | |
| 219 | - | ret = dma_resv_lock_interruptible(obj->resv, &exec->ticket); | |
| 220 | - | else | |
| 221 | - | ret = dma_resv_lock(obj->resv, &exec->ticket); | |
| 245 | + | if (unlikely(ret == -EALREADY) && | |
| 246 | + | exec->flags & DRM_EXEC_IGNORE_DUPLICATES) | |
| 247 | + | return 0; | |
| 222 | 248 | ||
| 223 | - | if (unlikely(ret == -EDEADLK)) { | |
| 224 | - | drm_gem_object_get(obj); | |
| 225 | - | exec->contended = obj; | |
| 226 | - | return -EDEADLK; | |
| 249 | + | if (unlikely(ret)) | |
| 250 | + | return ret; | |
| 227 | 251 | } | |
| 228 | 252 | ||
| 229 | - | if (unlikely(ret == -EALREADY) && | |
| 230 | - | exec->flags & DRM_EXEC_IGNORE_DUPLICATES) | |
| 231 | - | return 0; | |
| 232 | - | ||
| 233 | - | if (unlikely(ret)) | |
| 234 | - | return ret; | |
| 235 | - | ||
| 236 | 253 | ret = drm_exec_obj_locked(exec, obj); | |
| 237 | 254 | if (ret) | |
| 238 | - | goto error_unlock; | |
| 239 | - | ||
| 240 | - | return 0; | |
| 255 | + | dma_resv_unlock(obj->resv); | |
| 241 | 256 | ||
| 242 | - | error_unlock: | |
| 243 | - | dma_resv_unlock(obj->resv); | |
| 244 | 257 | return ret; | |
| 245 | 258 | } | |
| 246 | 259 | EXPORT_SYMBOL(drm_exec_lock_obj); | |
modified drivers/gpu/drm/i915/display/intel_cx0_phy.c
| @@ -2342,12 +2342,14 @@ static void intel_c10pll_dump_hw_state(struct drm_printer *p, | |||
| 2342 | 2342 | static bool is_arrowlake_s_by_host_bridge(void) | |
| 2343 | 2343 | { | |
| 2344 | 2344 | struct pci_dev *pdev = NULL; | |
| 2345 | - | u16 host_bridge_pci_dev_id; | |
| 2346 | - | ||
| 2347 | - | while ((pdev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, pdev))) | |
| 2348 | - | host_bridge_pci_dev_id = pdev->device; | |
| 2345 | + | while ((pdev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, pdev))) { | |
| 2346 | + | if (IS_ARROWLAKE_S_BY_HOST_BRIDGE_ID(pdev->device)) { | |
| 2347 | + | pci_dev_put(pdev); | |
| 2348 | + | return true; | |
| 2349 | + | } | |
| 2350 | + | } | |
| 2349 | 2351 | ||
| 2350 | - | return pdev && IS_ARROWLAKE_S_BY_HOST_BRIDGE_ID(host_bridge_pci_dev_id); | |
| 2352 | + | return false; | |
| 2351 | 2353 | } | |
| 2352 | 2354 | ||
| 2353 | 2355 | static u16 intel_c20_hdmi_tmds_tx_cgf_1(struct intel_display *display) | |
modified drivers/gpu/drm/i915/display/intel_dmc.c
| @@ -1023,6 +1023,55 @@ static void dmc_set_fw_offset(struct intel_dmc *dmc, | |||
| 1023 | 1023 | } | |
| 1024 | 1024 | } | |
| 1025 | 1025 | ||
| 1026 | + | /* | |
| 1027 | + | * Check if the load address is within the valid range for the given DMC ID. | |
| 1028 | + | */ | |
| 1029 | + | static bool dmc_load_addr_sanity_check(struct intel_dmc *dmc, | |
| 1030 | + | u32 start_addr, u32 payload_size, | |
| 1031 | + | int header_ver, enum intel_dmc_id dmc_id) | |
| 1032 | + | { | |
| 1033 | + | u32 start_range, end_range, end_addr; | |
| 1034 | + | ||
| 1035 | + | if (header_ver != 3) | |
| 1036 | + | return true; | |
| 1037 | + | ||
| 1038 | + | switch (dmc_id) { | |
| 1039 | + | case DMC_FW_MAIN: | |
| 1040 | + | start_range = DMC_MAIN_PROGRAM_BASE_START; | |
| 1041 | + | end_range = DMC_MAIN_PROGRAM_BASE_END; | |
| 1042 | + | break; | |
| 1043 | + | case DMC_FW_PIPEA: | |
| 1044 | + | start_range = DMC_PIPEA_PROGRAM_BASE_START; | |
| 1045 | + | end_range = DMC_PIPEA_PROGRAM_BASE_END; | |
| 1046 | + | break; | |
| 1047 | + | case DMC_FW_PIPEB: | |
| 1048 | + | start_range = DMC_PIPEB_PROGRAM_BASE_START; | |
| 1049 | + | end_range = DMC_PIPEB_PROGRAM_BASE_END; | |
| 1050 | + | break; | |
| 1051 | + | case DMC_FW_PIPEC: | |
| 1052 | + | start_range = DMC_PIPEC_PROGRAM_BASE_START; | |
| 1053 | + | end_range = DMC_PIPEC_PROGRAM_BASE_END; | |
| 1054 | + | break; | |
| 1055 | + | case DMC_FW_PIPED: | |
| 1056 | + | start_range = DMC_PIPED_PROGRAM_BASE_START; | |
| 1057 | + | end_range = DMC_PIPED_PROGRAM_BASE_END; | |
| 1058 | + | break; | |
| 1059 | + | default: | |
| 1060 | + | MISSING_CASE(dmc_id); | |
| 1061 | + | return false; | |
| 1062 | + | } | |
| 1063 | + | ||
| 1064 | + | if (payload_size == 0) | |
| 1065 | + | end_addr = start_addr; | |
| 1066 | + | else if (check_add_overflow(start_addr, payload_size - 1, &end_addr)) | |
| 1067 | + | return false; | |
| 1068 | + | ||
| 1069 | + | if (start_addr < start_range || end_addr > end_range) | |
| 1070 | + | return false; | |
| 1071 | + | ||
| 1072 | + | return true; | |
| 1073 | + | } | |
| 1074 | + | ||
| 1026 | 1075 | static bool dmc_mmio_addr_sanity_check(struct intel_dmc *dmc, | |
| 1027 | 1076 | const u32 *mmioaddr, u32 mmio_count, | |
| 1028 | 1077 | int header_ver, enum intel_dmc_id dmc_id) | |
| @@ -1120,7 +1169,7 @@ static u32 parse_dmc_fw_header(struct intel_dmc *dmc, | |||
| 1120 | 1169 | } | |
| 1121 | 1170 | ||
| 1122 | 1171 | /* Cache the dmc header info. */ | |
| 1123 | - | if (mmio_count > mmio_count_max) { | |
| 1172 | + | if (!mmio_count || mmio_count > mmio_count_max) { | |
| 1124 | 1173 | drm_err(display->drm, "DMC firmware has wrong mmio count %u\n", mmio_count); | |
| 1125 | 1174 | return 0; | |
| 1126 | 1175 | } | |
| @@ -1166,13 +1215,21 @@ static u32 parse_dmc_fw_header(struct intel_dmc *dmc, | |||
| 1166 | 1215 | disable_dmc_evt(display, dmc_id, dmc_info->mmioaddr[i], | |
| 1167 | 1216 | dmc_info->mmiodata[i]) ? " (disabling)" : ""); | |
| 1168 | 1217 | } | |
| 1169 | - | dmc_info->mmio_count = mmio_count; | |
| 1170 | - | dmc_info->start_mmioaddr = start_mmioaddr; | |
| 1171 | 1218 | ||
| 1172 | 1219 | rem_size -= header_len_bytes; | |
| 1173 | 1220 | ||
| 1174 | 1221 | /* fw_size is in dwords, so multiplied by 4 to convert into bytes. */ | |
| 1175 | - | payload_size = dmc_header->fw_size * 4; | |
| 1222 | + | if (check_mul_overflow(dmc_header->fw_size, 4u, &payload_size)) { | |
| 1223 | + | drm_err(display->drm, "DMC fw_size too large (%u dwords)\n", | |
| 1224 | + | dmc_header->fw_size); | |
| 1225 | + | return 0; | |
| 1226 | + | } | |
| 1227 | + | ||
| 1228 | + | if (!payload_size) { | |
| 1229 | + | drm_err(display->drm, "DMC firmware has empty payload\n"); | |
| 1230 | + | return 0; | |
| 1231 | + | } | |
| 1232 | + | ||
| 1176 | 1233 | if (rem_size < payload_size) | |
| 1177 | 1234 | goto error_truncated; | |
| 1178 | 1235 | ||
| @@ -1180,12 +1237,21 @@ static u32 parse_dmc_fw_header(struct intel_dmc *dmc, | |||
| 1180 | 1237 | drm_err(display->drm, "DMC FW too big (%u bytes)\n", payload_size); | |
| 1181 | 1238 | return 0; | |
| 1182 | 1239 | } | |
| 1183 | - | dmc_info->dmc_fw_size = dmc_header->fw_size; | |
| 1240 | + | ||
| 1241 | + | if (!dmc_load_addr_sanity_check(dmc, start_mmioaddr, payload_size, | |
| 1242 | + | dmc_header->header_ver, dmc_id)) { | |
| 1243 | + | drm_err(display->drm, "DMC %d: firmware has wrong load address\n", dmc_id); | |
| 1244 | + | return 0; | |
| 1245 | + | } | |
| 1184 | 1246 | ||
| 1185 | 1247 | dmc_info->payload = kmalloc(payload_size, GFP_KERNEL); | |
| 1186 | 1248 | if (!dmc_info->payload) | |
| 1187 | 1249 | return 0; | |
| 1188 | 1250 | ||
| 1251 | + | dmc_info->mmio_count = mmio_count; | |
| 1252 | + | dmc_info->start_mmioaddr = start_mmioaddr; | |
| 1253 | + | dmc_info->dmc_fw_size = dmc_header->fw_size; | |
| 1254 | + | ||
| 1189 | 1255 | payload = (u8 *)(dmc_header) + header_len_bytes; | |
| 1190 | 1256 | memcpy(dmc_info->payload, payload, payload_size); | |
| 1191 | 1257 | ||
modified drivers/gpu/drm/i915/display/intel_dmc_regs.h
| @@ -521,6 +521,18 @@ enum pipedmc_event_id { | |||
| 521 | 521 | #define TGL_PIPE_MMIO_END(dmc_id) _PICK_EVEN(((dmc_id) - 1), _TGL_PIPEA_MMIO_END,\ | |
| 522 | 522 | _TGL_PIPEB_MMIO_END) | |
| 523 | 523 | ||
| 524 | + | /* For DMC header version v3*/ | |
| 525 | + | #define DMC_MAIN_PROGRAM_BASE_START 0x80000 | |
| 526 | + | #define DMC_MAIN_PROGRAM_BASE_END 0x86fff | |
| 527 | + | #define DMC_PIPEA_PROGRAM_BASE_START 0x90000 | |
| 528 | + | #define DMC_PIPEA_PROGRAM_BASE_END 0x96fff | |
| 529 | + | #define DMC_PIPEB_PROGRAM_BASE_START 0x98000 | |
| 530 | + | #define DMC_PIPEB_PROGRAM_BASE_END 0x9efff | |
| 531 | + | #define DMC_PIPEC_PROGRAM_BASE_START 0x52000 | |
| 532 | + | #define DMC_PIPEC_PROGRAM_BASE_END 0x53fff | |
| 533 | + | #define DMC_PIPED_PROGRAM_BASE_START 0x59000 | |
| 534 | + | #define DMC_PIPED_PROGRAM_BASE_END 0x5afff | |
| 535 | + | ||
| 524 | 536 | #define SKL_DMC_DC3_DC5_COUNT _MMIO(0x80030) | |
| 525 | 537 | #define SKL_DMC_DC5_DC6_COUNT _MMIO(0x8002C) | |
| 526 | 538 | #define BXT_DMC_DC3_DC5_COUNT _MMIO(0x80038) | |
modified drivers/gpu/drm/panthor/panthor_hw.c
| @@ -136,7 +136,7 @@ static char *get_gpu_model_name(struct panthor_device *ptdev) | |||
| 136 | 136 | case GPU_PROD_ID_MAKE(10, 7): | |
| 137 | 137 | return "Mali-G610"; | |
| 138 | 138 | case GPU_PROD_ID_MAKE(11, 2): | |
| 139 | - | if (shader_core_count > 10 && ray_intersection) | |
| 139 | + | if (shader_core_count >= 10 && ray_intersection) | |
| 140 | 140 | return "Mali-G715-Immortalis"; | |
| 141 | 141 | else if (shader_core_count >= 7) | |
| 142 | 142 | return "Mali-G715"; | |
modified drivers/gpu/drm/vc4/vc4_hdmi.c
| @@ -894,7 +894,7 @@ static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder, | |||
| 894 | 894 | ||
| 895 | 895 | spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); | |
| 896 | 896 | ||
| 897 | - | HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, 0); | |
| 897 | + | HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, VC4_HDMI_RAM_PACKET_ENABLE); | |
| 898 | 898 | ||
| 899 | 899 | HDMI_WRITE(HDMI_VID_CTL, HDMI_READ(HDMI_VID_CTL) | VC4_HD_VID_CTL_CLRRGB); | |
| 900 | 900 | ||
| @@ -1663,9 +1663,6 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder, | |||
| 1663 | 1663 | WARN_ONCE(ret, "Timeout waiting for " | |
| 1664 | 1664 | "VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE\n"); | |
| 1665 | 1665 | } else { | |
| 1666 | - | HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, | |
| 1667 | - | HDMI_READ(HDMI_RAM_PACKET_CONFIG) & | |
| 1668 | - | ~(VC4_HDMI_RAM_PACKET_ENABLE)); | |
| 1669 | 1666 | HDMI_WRITE(HDMI_SCHEDULER_CONTROL, | |
| 1670 | 1667 | HDMI_READ(HDMI_SCHEDULER_CONTROL) & | |
| 1671 | 1668 | ~VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI); | |
| @@ -1684,9 +1681,6 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder, | |||
| 1684 | 1681 | WARN_ON(!(HDMI_READ(HDMI_SCHEDULER_CONTROL) & | |
| 1685 | 1682 | VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE)); | |
| 1686 | 1683 | ||
| 1687 | - | HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, | |
| 1688 | - | VC4_HDMI_RAM_PACKET_ENABLE); | |
| 1689 | - | ||
| 1690 | 1684 | spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); | |
| 1691 | 1685 | vc4_hdmi->packet_ram_enabled = true; | |
| 1692 | 1686 | ||
| @@ -3143,6 +3137,11 @@ static int vc5_hdmi_init_resources(struct drm_device *drm, | |||
| 3143 | 3137 | static int vc4_hdmi_runtime_suspend(struct device *dev) | |
| 3144 | 3138 | { | |
| 3145 | 3139 | struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); | |
| 3140 | + | unsigned long flags; | |
| 3141 | + | ||
| 3142 | + | spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); | |
| 3143 | + | HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, 0); | |
| 3144 | + | spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); | |
| 3146 | 3145 | ||
| 3147 | 3146 | clk_disable_unprepare(vc4_hdmi->audio_clock); | |
| 3148 | 3147 | clk_disable_unprepare(vc4_hdmi->hsm_clock); | |
| @@ -3153,9 +3152,8 @@ static int vc4_hdmi_runtime_suspend(struct device *dev) | |||
| 3153 | 3152 | static int vc4_hdmi_runtime_resume(struct device *dev) | |
| 3154 | 3153 | { | |
| 3155 | 3154 | struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); | |
| 3156 | - | unsigned long __maybe_unused flags; | |
| 3155 | + | unsigned long rate, flags; | |
| 3157 | 3156 | u32 __maybe_unused value; | |
| 3158 | - | unsigned long rate; | |
| 3159 | 3157 | int ret; | |
| 3160 | 3158 | ||
| 3161 | 3159 | ret = clk_prepare_enable(vc4_hdmi->hsm_clock); | |
| @@ -3201,6 +3199,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev) | |||
| 3201 | 3199 | } | |
| 3202 | 3200 | #endif | |
| 3203 | 3201 | ||
| 3202 | + | spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); | |
| 3203 | + | HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, VC4_HDMI_RAM_PACKET_ENABLE); | |
| 3204 | + | spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags); | |
| 3205 | + | ||
| 3204 | 3206 | return 0; | |
| 3205 | 3207 | ||
| 3206 | 3208 | err_disable_clk: | |
modified drivers/gpu/drm/virtio/virtgpu_drv.c
| @@ -225,6 +225,7 @@ static int virtgpu_freeze(struct virtio_device *vdev) | |||
| 225 | 225 | goto err_resume; | |
| 226 | 226 | } | |
| 227 | 227 | ||
| 228 | + | virtio_reset_device(vdev); | |
| 228 | 229 | vdev->config->del_vqs(vdev); | |
| 229 | 230 | ||
| 230 | 231 | return 0; | |
modified drivers/gpu/drm/virtio/virtgpu_plane.c
| @@ -589,7 +589,6 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, | |||
| 589 | 589 | struct drm_plane *plane; | |
| 590 | 590 | const uint32_t *formats; | |
| 591 | 591 | int nformats; | |
| 592 | - | int ret; | |
| 593 | 592 | ||
| 594 | 593 | if (type == DRM_PLANE_TYPE_CURSOR) { | |
| 595 | 594 | formats = virtio_gpu_cursor_formats; | |
| @@ -615,17 +614,5 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, | |||
| 615 | 614 | drm_plane_create_blend_mode_property(plane, | |
| 616 | 615 | BIT(DRM_MODE_BLEND_PREMULTI)); | |
| 617 | 616 | ||
| 618 | - | if (type == DRM_PLANE_TYPE_CURSOR) { | |
| 619 | - | /* | |
| 620 | - | * The cursor plane exposes a format with an alpha channel, | |
| 621 | - | * which requires a blend mode property. The host blends | |
| 622 | - | * premultiplied alpha, matching the property's default. | |
| 623 | - | */ | |
| 624 | - | ret = drm_plane_create_blend_mode_property(plane, | |
| 625 | - | BIT(DRM_MODE_BLEND_PREMULTI)); | |
| 626 | - | if (ret) | |
| 627 | - | return ERR_PTR(ret); | |
| 628 | - | } | |
| 629 | - | ||
| 630 | 617 | return plane; | |
| 631 | 618 | } | |
modified drivers/gpu/drm/xe/xe_bo.c
| @@ -330,6 +330,12 @@ static void xe_evict_flags(struct ttm_buffer_object *tbo, | |||
| 330 | 330 | return; | |
| 331 | 331 | } | |
| 332 | 332 | ||
| 333 | + | /* No resource: nothing is placed/mapped, so there is nothing to evict. */ | |
| 334 | + | if (!tbo->resource) { | |
| 335 | + | placement->num_placement = 0; | |
| 336 | + | return; | |
| 337 | + | } | |
| 338 | + | ||
| 333 | 339 | bo = ttm_to_xe_bo(tbo); | |
| 334 | 340 | if (bo->flags & XE_BO_FLAG_CPU_ADDR_MIRROR) { | |
| 335 | 341 | *placement = sys_placement; | |
| @@ -944,6 +950,8 @@ static int xe_bo_move_notify(struct xe_bo *bo, | |||
| 944 | 950 | * | |
| 945 | 951 | * Transfers pages between shrinkable and purgeable buckets when the BO | |
| 946 | 952 | * purgeable state changes. Called automatically from xe_bo_set_purgeable_state(). | |
| 953 | + | * For pinned BOs, whose pages are not accounted, only the purgeable flag is | |
| 954 | + | * updated, so that the correct bucket is used when the BO is unpinned. | |
| 947 | 955 | */ | |
| 948 | 956 | static void xe_bo_set_purgeable_shrinker(struct xe_bo *bo, | |
| 949 | 957 | enum xe_madv_purgeable_state new_state) | |
| @@ -960,7 +968,8 @@ static void xe_bo_set_purgeable_shrinker(struct xe_bo *bo, | |||
| 960 | 968 | return; | |
| 961 | 969 | ||
| 962 | 970 | xe_tt = container_of(tt, struct xe_ttm_tt, ttm); | |
| 963 | - | tt_pages = tt->num_pages; | |
| 971 | + | /* Pinned bos are not accounted. Only update the purgeable flag. */ | |
| 972 | + | tt_pages = xe_bo_is_pinned(bo) ? 0 : tt->num_pages; | |
| 964 | 973 | ||
| 965 | 974 | if (!xe_tt->purgeable && new_state == XE_MADV_PURGEABLE_DONTNEED) { | |
| 966 | 975 | xe_tt->purgeable = true; | |
modified drivers/gpu/drm/xe/xe_exec.c
| @@ -346,11 +346,8 @@ retry: | |||
| 346 | 346 | xe_sched_job_push(job); | |
| 347 | 347 | xe_vm_reactivate_rebind(vm); | |
| 348 | 348 | ||
| 349 | - | if (!err && !xe_vm_in_lr_mode(vm)) { | |
| 350 | - | spin_lock(&xe->ttm.lru_lock); | |
| 351 | - | ttm_lru_bulk_move_tail(&vm->lru_bulk_move); | |
| 352 | - | spin_unlock(&xe->ttm.lru_lock); | |
| 353 | - | } | |
| 349 | + | if (!err && !xe_vm_in_lr_mode(vm)) | |
| 350 | + | xe_vm_bump_lru(vm, exec); | |
| 354 | 351 | ||
| 355 | 352 | if (mode == EXEC_MODE_LR) | |
| 356 | 353 | xe_hw_engine_group_resume_faulting_lr_jobs(group); | |
modified drivers/gpu/drm/xe/xe_oa.c
| @@ -914,6 +914,13 @@ static int xe_oa_alloc_oa_buffer(struct xe_oa_stream *stream, size_t size) | |||
| 914 | 914 | if (IS_ERR(bo)) | |
| 915 | 915 | return PTR_ERR(bo); | |
| 916 | 916 | ||
| 917 | + | /* | |
| 918 | + | * ttm_bo_type_kernel BOs are not zeroed on allocation, so the buffer can | |
| 919 | + | * hold stale data from previously freed pages. Since the OA buffer is | |
| 920 | + | * mmap'able by userspace, clear it here to avoid leaking kernel memory. | |
| 921 | + | */ | |
| 922 | + | xe_map_memset(stream->oa->xe, &bo->vmap, 0, 0, xe_bo_size(bo)); | |
| 923 | + | ||
| 917 | 924 | stream->oa_buffer.bo = bo; | |
| 918 | 925 | ||
| 919 | 926 | stream->oa_buffer.bounce = kmalloc(stream->oa_buffer.format->size, GFP_KERNEL); | |
modified drivers/gpu/drm/xe/xe_vm.c
| @@ -410,6 +410,33 @@ int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec, | |||
| 410 | 410 | return 0; | |
| 411 | 411 | } | |
| 412 | 412 | ||
| 413 | + | /** | |
| 414 | + | * xe_vm_bump_lru() - Bump the LRU position of BOs used by a submission | |
| 415 | + | * @vm: The vm for which we are bumping LRUs. | |
| 416 | + | * @exec: The struct drm_exec with the locked GEM objects. | |
| 417 | + | * | |
| 418 | + | * Move the VM's private BOs, and all external objects locked by @exec, | |
| 419 | + | * to the LRU tail. Private BOs are moved in bulk using @vm's | |
| 420 | + | * &xe_vm.lru_bulk_move. External objects, which may be shared with other | |
| 421 | + | * VMs, are not part of that bulk move and are bumped individually. | |
| 422 | + | */ | |
| 423 | + | void xe_vm_bump_lru(struct xe_vm *vm, struct drm_exec *exec) | |
| 424 | + | { | |
| 425 | + | spinlock_t *lru_lock = &vm->xe->ttm.lru_lock; | |
| 426 | + | struct drm_gem_object *obj; | |
| 427 | + | ||
| 428 | + | spin_lock(lru_lock); | |
| 429 | + | ttm_lru_bulk_move_tail(&vm->lru_bulk_move); | |
| 430 | + | drm_exec_for_each_locked_object(exec, obj) { | |
| 431 | + | if (!drm_gpuvm_is_extobj(&vm->gpuvm, obj)) | |
| 432 | + | continue; | |
| 433 | + | ||
| 434 | + | ttm_bo_move_to_lru_tail(&gem_to_xe_bo(obj)->ttm); | |
| 435 | + | cond_resched_lock(lru_lock); | |
| 436 | + | } | |
| 437 | + | spin_unlock(lru_lock); | |
| 438 | + | } | |
| 439 | + | ||
| 413 | 440 | static int xe_preempt_work_begin(struct drm_exec *exec, struct xe_vm *vm, | |
| 414 | 441 | bool *done) | |
| 415 | 442 | { | |
| @@ -560,9 +587,7 @@ retry: | |||
| 560 | 587 | ||
| 561 | 588 | #undef retry_required | |
| 562 | 589 | ||
| 563 | - | spin_lock(&vm->xe->ttm.lru_lock); | |
| 564 | - | ttm_lru_bulk_move_tail(&vm->lru_bulk_move); | |
| 565 | - | spin_unlock(&vm->xe->ttm.lru_lock); | |
| 590 | + | xe_vm_bump_lru(vm, &exec); | |
| 566 | 591 | ||
| 567 | 592 | /* Point of no return. */ | |
| 568 | 593 | arm_preempt_fences(vm, &preempt_fences); | |
modified drivers/gpu/drm/xe/xe_vm.h
| @@ -284,6 +284,8 @@ int xe_vm_lock_vma(struct drm_exec *exec, struct xe_vma *vma); | |||
| 284 | 284 | int xe_vm_validate_rebind(struct xe_vm *vm, struct drm_exec *exec, | |
| 285 | 285 | unsigned int num_fences); | |
| 286 | 286 | ||
| 287 | + | void xe_vm_bump_lru(struct xe_vm *vm, struct drm_exec *exec); | |
| 288 | + | ||
| 287 | 289 | struct dma_fence *xe_vm_bind_kernel_bo(struct xe_vm *vm, struct xe_bo *bo, | |
| 288 | 290 | struct xe_exec_queue *q, u64 addr, | |
| 289 | 291 | enum xe_cache_level cache_lvl); | |
modified include/drm/drm_exec.h
| @@ -73,13 +73,15 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) | |||
| 73 | 73 | ||
| 74 | 74 | /* Helper for drm_exec_for_each_locked_object(). Internal use only. */ | |
| 75 | 75 | #define __drm_exec_for_each_locked_object(exec, obj, __index) \ | |
| 76 | - | for (unsigned long __index = 0; ((obj) = drm_exec_obj(exec, __index)); ++__index) | |
| 76 | + | for (unsigned long __index = 0; ((obj) = drm_exec_obj(exec, __index)); \ | |
| 77 | + | ++__index) | |
| 77 | 78 | /** | |
| 78 | 79 | * drm_exec_for_each_locked_object - iterate over all the locked objects | |
| 79 | 80 | * @exec: drm_exec object | |
| 80 | 81 | * @obj: the current GEM object | |
| 81 | 82 | * | |
| 82 | - | * Iterate over all the locked GEM objects inside the drm_exec object. | |
| 83 | + | * Iterate over all the explicitly locked GEM objects inside the drm_exec | |
| 84 | + | * container, except for the contended and implicit prelocked one. | |
| 83 | 85 | */ | |
| 84 | 86 | #define drm_exec_for_each_locked_object(exec, obj) \ | |
| 85 | 87 | __drm_exec_for_each_locked_object(exec, obj, __UNIQUE_ID(drm_exec)) | |
| @@ -94,12 +96,13 @@ drm_exec_obj(struct drm_exec *exec, unsigned long index) | |||
| 94 | 96 | * @exec: drm_exec object | |
| 95 | 97 | * @obj: the current GEM object | |
| 96 | 98 | * | |
| 97 | - | * Iterate over all the locked GEM objects inside the drm_exec object in | |
| 98 | - | * reverse locking order. Note that the internal index may wrap around, | |
| 99 | - | * but that will be caught by drm_exec_obj(), returning a NULL object. | |
| 99 | + | * Iterate over all the explicitly locked GEM objects inside the drm_exec | |
| 100 | + | * container in reverse locking order. Note that the internal index may wrap | |
| 101 | + | * around, but that will be caught by drm_exec_obj(), returning a NULL object. | |
| 100 | 102 | */ | |
| 101 | 103 | #define drm_exec_for_each_locked_object_reverse(exec, obj) \ | |
| 102 | - | __drm_exec_for_each_locked_object_reverse(exec, obj, __UNIQUE_ID(drm_exec)) | |
| 104 | + | __drm_exec_for_each_locked_object_reverse(exec, obj, \ | |
| 105 | + | __UNIQUE_ID(drm_exec)) | |
| 103 | 106 | ||
| 104 | 107 | /** | |
| 105 | 108 | * drm_exec_until_all_locked - loop until all GEM objects are locked | |
modified sound/soc/amd/yc/pci-acp6x.c
| @@ -301,7 +301,7 @@ static int snd_acp6x_suspend(struct device *dev) | |||
| 301 | 301 | return ret; | |
| 302 | 302 | } | |
| 303 | 303 | ||
| 304 | - | static int snd_acp6x_runtime_resume(struct device *dev) | |
| 304 | + | static int snd_acp6x_resume(struct device *dev) | |
| 305 | 305 | { | |
| 306 | 306 | struct acp6x_dev_data *adata; | |
| 307 | 307 | int ret; | |
| @@ -313,42 +313,8 @@ static int snd_acp6x_runtime_resume(struct device *dev) | |||
| 313 | 313 | return ret; | |
| 314 | 314 | } | |
| 315 | 315 | ||
| 316 | - | static void acp6x_disable_msi_on_resume(struct pci_dev *pdev) | |
| 317 | - | { | |
| 318 | - | u16 control; | |
| 319 | - | ||
| 320 | - | if (!pdev->msi_cap) | |
| 321 | - | return; | |
| 322 | - | ||
| 323 | - | pci_read_config_word(pdev, pdev->msi_cap + PCI_MSI_FLAGS, &control); | |
| 324 | - | if (control & PCI_MSI_FLAGS_ENABLE) { | |
| 325 | - | dev_warn(&pdev->dev, | |
| 326 | - | "ACP: MSI unexpectedly enabled after resume (flags=0x%04x), disabling\n", | |
| 327 | - | control); | |
| 328 | - | control &= ~PCI_MSI_FLAGS_ENABLE; | |
| 329 | - | pci_write_config_word(pdev, pdev->msi_cap + PCI_MSI_FLAGS, control); | |
| 330 | - | } | |
| 331 | - | } | |
| 332 | - | ||
| 333 | - | static int snd_acp6x_resume(struct device *dev) | |
| 334 | - | { | |
| 335 | - | struct pci_dev *pdev = to_pci_dev(dev); | |
| 336 | - | ||
| 337 | - | /* | |
| 338 | - | * BIOS/firmware may re-enable MSI in PCI config space during | |
| 339 | - | * system resume even though this driver only uses legacy INTx | |
| 340 | - | * interrupts. If MSI is left enabled with stale address/data | |
| 341 | - | * registers, the device will write interrupts to a bogus address | |
| 342 | - | * causing IOMMU IO_PAGE_FAULT and interrupt delivery failure. | |
| 343 | - | * Explicitly clear the MSI Enable bit before reinitializing | |
| 344 | - | * the ACP hardware. | |
| 345 | - | */ | |
| 346 | - | acp6x_disable_msi_on_resume(pdev); | |
| 347 | - | return snd_acp6x_runtime_resume(dev); | |
| 348 | - | } | |
| 349 | - | ||
| 350 | 316 | static const struct dev_pm_ops acp6x_pm = { | |
| 351 | - | RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_runtime_resume, NULL) | |
| 317 | + | RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume, NULL) | |
| 352 | 318 | SYSTEM_SLEEP_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume) | |
| 353 | 319 | }; | |
| 354 | 320 | ||
modified sound/soc/codecs/cs42l52.c
| @@ -290,7 +290,7 @@ static const char * const cs42l52_ng_type_text[] = { | |||
| 290 | 290 | }; | |
| 291 | 291 | ||
| 292 | 292 | static SOC_ENUM_SINGLE_DECL(ng_type_enum, | |
| 293 | - | CS42L52_NOISE_GATE_CTL, 7, | |
| 293 | + | CS42L52_NOISE_GATE_CTL, 6, | |
| 294 | 294 | cs42l52_ng_type_text); | |
| 295 | 295 | ||
| 296 | 296 | static const char * const left_swap_text[] = { | |
modified sound/soc/codecs/cs42l56.c
| @@ -481,7 +481,7 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = { | |||
| 481 | 481 | 0, 0x3f, 0, 0), | |
| 482 | 482 | SOC_SINGLE_TLV("Limiter MAX", CS42L56_LIM_THRESHOLD_CTL, | |
| 483 | 483 | 5, 0x07, 1, alc_tlv), | |
| 484 | - | SOC_SINGLE_TLV("Limiter Cushion", CS42L56_LIM_THRESHOLD_CTL, | |
| 484 | + | SOC_SINGLE_TLV("Limiter Cushion", CS42L56_ALC_THRESHOLD, | |
| 485 | 485 | 2, 0x07, 1, alc_tlv), | |
| 486 | 486 | ||
| 487 | 487 | SOC_SINGLE("NG Switch", CS42L56_NOISE_GATE_CTL, 6, 1, 1), | |
modified sound/soc/codecs/max98371.c
| @@ -166,7 +166,7 @@ static const struct snd_kcontrol_new max98371_snd_controls[] = { | |||
| 166 | 166 | 0, (1<<MAX98371_DHT_MAX_WIDTH)-1, 0, | |
| 167 | 167 | max98371_dht_max_gain), | |
| 168 | 168 | SOC_SINGLE_TLV("Speaker DHT Min Volume", MAX98371_DHT_GAIN, | |
| 169 | - | 4, (1<<MAX98371_DHT_GAIN_WIDTH)-1, 0, | |
| 169 | + | 0, (1<<MAX98371_DHT_GAIN_WIDTH)-1, 0, | |
| 170 | 170 | max98371_dht_min_gain), | |
| 171 | 171 | SOC_SINGLE_TLV("Speaker DHT Rotation Volume", MAX98371_DHT_GAIN, | |
| 172 | 172 | 0, (1<<MAX98371_DHT_ROT_WIDTH)-1, 0, | |
modified sound/soc/codecs/nau8822.c
| @@ -383,9 +383,9 @@ static const struct snd_kcontrol_new nau8822_snd_controls[] = { | |||
| 383 | 383 | NAU8822_REG_RIGHT_ADC_BOOST_CONTROL, 0, 7, 0, boost_tlv), | |
| 384 | 384 | ||
| 385 | 385 | SOC_SINGLE("DAC 128x Oversampling Switch", | |
| 386 | - | NAU8822_REG_DAC_CONTROL, 3, 1, 0), | |
| 386 | + | NAU8822_REG_DAC_CONTROL, 5, 1, 0), | |
| 387 | 387 | SOC_SINGLE("ADC 128x Oversampling Switch", | |
| 388 | - | NAU8822_REG_ADC_CONTROL, 3, 1, 0), | |
| 388 | + | NAU8822_REG_ADC_CONTROL, 5, 1, 0), | |
| 389 | 389 | }; | |
| 390 | 390 | ||
| 391 | 391 | /* LMAIN and RMAIN Mixer */ | |
modified sound/soc/codecs/pcm3168a.c
| @@ -103,7 +103,7 @@ static SOC_ENUM_SINGLE_DECL(pcm3168a_dac_zf_func, PCM3168A_DAC_ATT_DEMP_ZF, | |||
| 103 | 103 | static const char *const pcm3168a_pol[] = { "Active High", "Active Low" }; | |
| 104 | 104 | ||
| 105 | 105 | static SOC_ENUM_SINGLE_DECL(pcm3168a_dac_zf_pol, PCM3168A_DAC_ATT_DEMP_ZF, | |
| 106 | - | PCM3168A_DAC_ZREV_SHIFT, pcm3168a_pol); | |
| 106 | + | PCM3168A_DAC_ATSPDA_SHIFT, pcm3168a_pol); | |
| 107 | 107 | ||
| 108 | 108 | static const char *const pcm3168a_con[] = { "Differential", "Single-Ended" }; | |
| 109 | 109 | ||
modified sound/soc/codecs/wm8978.c
| @@ -255,9 +255,9 @@ static const struct snd_kcontrol_new wm8978_snd_controls[] = { | |||
| 255 | 255 | ||
| 256 | 256 | /* DAC / ADC oversampling */ | |
| 257 | 257 | SOC_SINGLE("DAC 128x Oversampling Switch", WM8978_DAC_CONTROL, | |
| 258 | - | 3, 1, 0), | |
| 258 | + | 5, 1, 0), | |
| 259 | 259 | SOC_SINGLE("ADC 128x Oversampling Switch", WM8978_ADC_CONTROL, | |
| 260 | - | 3, 1, 0), | |
| 260 | + | 5, 1, 0), | |
| 261 | 261 | }; | |
| 262 | 262 | ||
| 263 | 263 | /* Mixer #1: Output (OUT1, OUT2) Mixer: mix AUX, Input mixer output and DAC */ | |
modified sound/soc/intel/avs/pcm.c
| @@ -756,7 +756,7 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so | |||
| 756 | 756 | data = snd_soc_dai_get_dma_data(dai, substream); | |
| 757 | 757 | host_stream = data->host_stream; | |
| 758 | 758 | ||
| 759 | - | if (runtime->state != SNDRV_PCM_STATE_PREPARED) | |
| 759 | + | if (runtime->state == SNDRV_PCM_STATE_XRUN) | |
| 760 | 760 | hdac_stream(host_stream)->prepared = false; | |
| 761 | 761 | if (hdac_stream(host_stream)->prepared) | |
| 762 | 762 | return 0; | |
modified sound/soc/sof/ipc4-topology.c
| @@ -2458,14 +2458,11 @@ _sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget, | |||
| 2458 | 2458 | ch_map >>= 4; | |
| 2459 | 2459 | } | |
| 2460 | 2460 | ||
| 2461 | - | if ((swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) || | |
| 2462 | - | ch_count < blob->alh_cfg.device_count) { | |
| 2461 | + | if (swidget->id == snd_soc_dapm_dai_in && ch_count == out_ref_channels) { | |
| 2463 | 2462 | /* | |
| 2464 | 2463 | * For playback DAI widgets where the channel number is equal to | |
| 2465 | - | * the output reference channels, or when there are fewer | |
| 2466 | - | * channels than aggregated devices (e.g. a mono capture | |
| 2467 | - | * stream split across multiple links), set step = 0 to | |
| 2468 | - | * ensure all the ch_mask is applied to all alh mappings. | |
| 2464 | + | * the output reference channels, set the step = 0 to ensure all | |
| 2465 | + | * the ch_mask is applied to all alh mappings. | |
| 2469 | 2466 | */ | |
| 2470 | 2467 | mask = ch_mask; | |
| 2471 | 2468 | step = 0; | |
modified sound/soc/sof/sof-client.c
| @@ -576,7 +576,7 @@ void sof_client_unregister_ipc_rx_handler(struct sof_client_dev *cdev, | |||
| 576 | 576 | struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); | |
| 577 | 577 | struct sof_ipc_event_entry *event; | |
| 578 | 578 | ||
| 579 | - | guard(mutex)(&sdev->client_event_handler_mutex); | |
| 579 | + | guard(mutex)(&sdev->ipc_client_mutex); | |
| 580 | 580 | ||
| 581 | 581 | list_for_each_entry(event, &sdev->ipc_rx_handler_list, list) { | |
| 582 | 582 | if (event->cdev == cdev && event->ipc_msg_type == ipc_msg_type) { | |
| @@ -593,7 +593,7 @@ void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev) | |||
| 593 | 593 | { | |
| 594 | 594 | struct sof_state_event_entry *event; | |
| 595 | 595 | ||
| 596 | - | guard(mutex)(&sdev->client_event_handler_mutex); | |
| 596 | + | guard(mutex)(&sdev->ipc_client_mutex); | |
| 597 | 597 | ||
| 598 | 598 | list_for_each_entry(event, &sdev->fw_state_handler_list, list) | |
| 599 | 599 | event->callback(event->cdev, sdev->fw_state); | |
| @@ -628,7 +628,7 @@ void sof_client_unregister_fw_state_handler(struct sof_client_dev *cdev) | |||
| 628 | 628 | struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); | |
| 629 | 629 | struct sof_state_event_entry *event; | |
| 630 | 630 | ||
| 631 | - | guard(mutex)(&sdev->client_event_handler_mutex); | |
| 631 | + | guard(mutex)(&sdev->ipc_client_mutex); | |
| 632 | 632 | ||
| 633 | 633 | list_for_each_entry(event, &sdev->fw_state_handler_list, list) { | |
| 634 | 634 | if (event->cdev == cdev) { | |
modified sound/soc/stm/stm32_spdifrx.c
| @@ -720,7 +720,7 @@ static irqreturn_t stm32_spdifrx_isr(int irq, void *devid) | |||
| 720 | 720 | ||
| 721 | 721 | if (err) { | |
| 722 | 722 | regmap_read(spdifrx->regmap, STM32_SPDIFRX_CR, &cr); | |
| 723 | - | sync_state = FIELD_GET(SPDIFRX_CR_SPDIFEN_MASK, cr) == | |
| 723 | + | sync_state = FIELD_GET(SPDIFRX_CR_SPDIFEN_MASK, cr) && | |
| 724 | 724 | SPDIFRX_SPDIFEN_SYNC; | |
| 725 | 725 | ||
| 726 | 726 | /* SPDIFRX is in STATE_STOP. Disable SPDIFRX to clear errors */ | |