id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
609db7e73b3ecc6a0b44dc6486e88e4bce6fd8c0
Analyze and fix the following issue in the Linux kernel code: rust: kbuild: Add -fdiagnostics-show-context to bindgen_skip_c_flags
Problem Details: This got added with: 7454048db27d ("kbuild: Enable GCC diagnostic context for value-tracking warnings") but clang does not have this option, so avoid passing it to bindgen. [ Details about what the option does are in the commit above. Nathan also expands on this: Right, this does look corre...
```diff diff --git a/rust/Makefile b/rust/Makefile index 5d357dce1704..4dcc2eff51cb 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -383,6 +383,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \ -fno-inline-functions-called-once -fsanitize=bounds-strict \ -fstrict-flex-arrays=% -fmin-f...
e558cca217790286e799a8baacd1610bda31b261
Analyze and fix the following issue in the Linux kernel code: bpf, test_run: Subtract size of xdp_frame from allowed metadata size
Problem Details: The xdp_frame structure takes up part of the XDP frame headroom, limiting the size of the metadata. However, in bpf_test_run, we don't take this into account, which makes it possible for userspace to supply a metadata size that is too large (taking up the entire headroom). If userspace supplies such a...
```diff diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index 655efac6f133..e6c0ad204b92 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -1294,8 +1294,6 @@ int bpf_prog_test_run_xdp(struct bpf_prog *prog, const union bpf_attr *kattr, batch_size = NAPI_POLL_WEIGHT; else if (batch_size > TEST_XDP_...
8f3e00af8e52c0d2d8e0e15154d28ec7d639d4d9
Analyze and fix the following issue in the Linux kernel code: riscv, bpf: Fix incorrect usage of BPF_TRAMP_F_ORIG_STACK
Problem Details: The usage of BPF_TRAMP_F_ORIG_STACK in __arch_prepare_bpf_trampoline() is wrong, and it should be BPF_TRAMP_F_CALL_ORIG, which caused crash as Andreas reported: Insufficient stack space to handle exception! Task stack: [0xff20000000010000..0xff20000000014000] Overflow stack: [0xff600000ffdad...
```diff diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c index 5f9457e910e8..37888abee70c 100644 --- a/arch/riscv/net/bpf_jit_comp64.c +++ b/arch/riscv/net/bpf_jit_comp64.c @@ -1133,10 +1133,6 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, store_args(nr_arg_slo...
083029bd8b445595222a3cd14076b880781c1765
Analyze and fix the following issue in the Linux kernel code: idpf: keep the netdev when a reset fails
Problem Details: During a successful reset the driver would re-allocate vport resources while keeping the netdevs intact. However, in case of an error in the init task, the netdev of the failing vport will be unregistered, effectively removing the network interface: [ 121.211076] idpf 0000:83:00.0: enabling device (0...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_lib.c b/drivers/net/ethernet/intel/idpf/idpf_lib.c index 7ce4eb71a433..313803c08847 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_lib.c +++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c @@ -1579,6 +1579,10 @@ void idpf_init_task(struct work_struct *work) g...
955b263c421c6fe5075369c52199f278289ec8c4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix wrong register range of rk3576 gpu
Problem Details: According to RK3576 TRM part1 Table 1-1 Address Mapping, the size of the GPU registers is 128 KB. The current mapping incorrectly includes the addresses of multiple following IP like the eInk interface at 0x27900000. This has not been detected by the DT tooling as none of the extra mapped IP is descri...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi index a86fc6b4e8c4..c72343e7a045 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi @@ -1261,7 +1261,7 @@ gpu: gpu@27800000 { compatible = "rockchip,rk3576-...
3e4a81881c0929b21a0577bc6e69514c09da5c3f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Configure MCLK for analog sound on NanoPi M5
Problem Details: NanoPi M5 derives its analog sound signal from SAI2 in M0 pin mode, so the MCLK pin should be configured accordingly for the sound codec to get its I2S signal from the SoC. Request the required pin config. The clock itself should also be CLK_SAI2_MCLKOUT_TO_IO for the sound to work (otherwise there is...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts index 37184913f918..bb2cc2814b83 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts +++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts @@ -201,6 +201,7 @@ pinctrl-names = "defau...
5ab3dd9d0a63af66377f58633fec9dad650e6827
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix headphones widget name on NanoPi M5
Problem Details: Fix the mismatch between the simple-audio-card routing table vs. widget names, which caused the following error at boot preventing the sound card from getting added: [ 6.625634] asoc-simple-card sound: ASoC: DAPM unknown pin Headphones [ 6.627247] asoc-simple-card sound: ASoC: Failed to add rout...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts index cce34c541f7c..37184913f918 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts +++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts @@ -211,7 +211,7 @@ "Headphones", "HPOR",...
fc808f80cf298caaa403755ca808cf650844f2f5
Analyze and fix the following issue in the Linux kernel code: dt-bindings: arm: rockchip: fix description for Radxa CM5
Problem Details: "Radxa CM5" is the correct name[1], so fix the description. While at it, move the CM5 entry after the CM3I. [1] https://dl.radxa.com/cm5/radxa_cm5_product_brief.pdf Signed-off-by: FUKAUMI Naoki <naoki@radxa.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/202512290458...
```diff diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml index 410a9715a0fc..59a7aed538b4 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.yaml +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml @@ -907,13 +907,6 @@ properties: ...
a1823b88d35f1bf04ec4e4f86b9206f699b362d0
Analyze and fix the following issue in the Linux kernel code: dt-bindings: arm: rockchip: fix description for Radxa CM3I
Problem Details: "Radxa CM3I" is the correct name[1], so fix the description. [1] https://dl.radxa.com/cm3i/docs/hw/radxa_cm3i_product_brief.pdf Signed-off-by: FUKAUMI Naoki <naoki@radxa.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20251229045838.2917-1-naoki@radxa.com Signed-off-...
```diff diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml index 79e99694577e..410a9715a0fc 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.yaml +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml @@ -914,7 +914,7 @@ properties: ...
148891e95014b5dc5878acefa57f1940c281c431
Analyze and fix the following issue in the Linux kernel code: bus: fsl-mc: fix use-after-free in driver_override_show()
Problem Details: The driver_override_show() function reads the driver_override string without holding the device_lock. However, driver_override_store() uses driver_set_override(), which modifies and frees the string while holding the device_lock. This can result in a concurrent use-after-free if the string is freed by...
```diff diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index c08c04047ae2..08b99b0b342f 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -231,8 +231,12 @@ static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, ...
0b2761eb1287bd9f62367cccf6626eb3107cef6f
Analyze and fix the following issue in the Linux kernel code: ARM: dts: allwinner: sun5i-a13-utoo-p66: delete "power-gpios" property
Problem Details: The P66's device tree includes the reference design dtsi files, which defines a node and properties for the touchpanel in the common design. The P66 dts file then overrides all the properties to match its own design, but as the touchpanel model is different, a different schema is matched. This other sc...
```diff diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-utoo-p66.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-utoo-p66.dts index be486d28d04f..428cab5a0e90 100644 --- a/arch/arm/boot/dts/allwinner/sun5i-a13-utoo-p66.dts +++ b/arch/arm/boot/dts/allwinner/sun5i-a13-utoo-p66.dts @@ -102,6 +102,7 @@ /* The P66 uses a d...
f8c7600d468bdb6e44ed3b3247c6e53f5be5d8de
Analyze and fix the following issue in the Linux kernel code: x86/tsx: Set default TSX mode to auto
Problem Details: At SUSE we've been releasing our kernels with TSX enabled for the past 6 years and some customers have started to rely on it. Furthermore, the last known vulnerability concerning TSX was TAA (CVE-2019-11135) and a significant amount time has passed since then without anyone reporting any issues. Intel ...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 80527299f859..f1c98a973fcd 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1816,7 +1816,7 @@ config ARCH_PKEY_BITS choice prompt "TSX enable mode" depends on CPU_SUP_INTEL - default X86_INTEL_TSX_MODE_OFF + default X86_INTEL_TSX_MODE_AUTO he...
18fe1f58623f8c1fddd21a3d044d668ba9d8b0a9
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Drop unused Kconfig symbol X86_P6_NOP
Problem Details: This symbol was removed in early 2025 but 2 dangling references to it were missed. Delete them now. It should be safe to drop the -mtune=generic32 option since gcc 4.3 and later do not cause the problem (see 28f7e66fc1da ("x86: prevent binutils from being "smart" and generating NOPLs for us")). Also, ...
```diff diff --git a/arch/x86/Kconfig.cpufeatures b/arch/x86/Kconfig.cpufeatures index 733d5aff2456..b435952249a0 100644 --- a/arch/x86/Kconfig.cpufeatures +++ b/arch/x86/Kconfig.cpufeatures @@ -38,7 +38,7 @@ config X86_REQUIRED_FEATURE_ALWAYS config X86_REQUIRED_FEATURE_NOPL def_bool y - depends on X86_64 || X86_...
85ba57ad88cf96b2fb4cf6c81639c7907bf3cd94
Analyze and fix the following issue in the Linux kernel code: drm/etnaviv: Add PPU flop reset
Problem Details: The PPU flop reset is required on some hardware to clear the temporary registers. This code follows the implementation of the PPU flop reset as found in the public galcore kernel module. Compared to that code some superfluous parts were removed and only the code path for SoC chip_model = 0x8000 and rev...
```diff diff --git a/drivers/gpu/drm/etnaviv/Makefile b/drivers/gpu/drm/etnaviv/Makefile index 46e5ffad69a6..903101e8751a 100644 --- a/drivers/gpu/drm/etnaviv/Makefile +++ b/drivers/gpu/drm/etnaviv/Makefile @@ -14,6 +14,7 @@ etnaviv-y := \ etnaviv_iommu.o \ etnaviv_mmu.o \ etnaviv_perfmon.o \ + etnaviv_flop_reset...
9fcdece1a734bc71d2d9f9e3dd301cc9fff23327
Analyze and fix the following issue in the Linux kernel code: drm/etnaviv: Add a new function to emit a series of states to cmd stream
Problem Details: v2: fix formatting and remove superfluous masking (Lucas) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Tested-by: Marek Vasut <marek.vasut@mailbox.org> # STM32MP255C DHCOS DHSBC Link: https://patch.msgid.link/20251119164624.9297-4-gert.wol...
```diff diff --git a/drivers/gpu/drm/etnaviv/etnaviv_buffer.h b/drivers/gpu/drm/etnaviv/etnaviv_buffer.h index a5c347c778c1..9f9eb4d545a2 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_buffer.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_buffer.h @@ -36,6 +36,19 @@ static inline void CMD_LOAD_STATE(struct etnaviv_cmdbuf *buffe...
a8fffbe7dec7d2dda19ed8c7cc13bed744546c05
Analyze and fix the following issue in the Linux kernel code: drm/etnaviv: Add command stream definitions required for a PPU flop reset
Problem Details: v2: move some defines that resided in etnaviv_flop_reset.c into the header as well v3: fix spacing/tab stops [cgmeiner: remove use of multiple blank lines] Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Tested-by: Marek Vasut <marek.va...
```diff diff --git a/drivers/gpu/drm/etnaviv/state_3d.xml.h b/drivers/gpu/drm/etnaviv/state_3d.xml.h index ebbd4fcf3096..a654c05414ec 100644 --- a/drivers/gpu/drm/etnaviv/state_3d.xml.h +++ b/drivers/gpu/drm/etnaviv/state_3d.xml.h @@ -4,6 +4,101 @@ /* This is a cut-down version of the state_3d.xml.h file */ +#defi...
0e2036a06dcf61dbd100168830287d6c42cd61e1
Analyze and fix the following issue in the Linux kernel code: scripts/atomic: Fix kerneldoc spelling in try_cmpxchg()
Problem Details: Fix a typo in the kerneldoc comment template. This changes 'occured' to 'occurred' in generated documentation. Signed-off-by: oldzhu <oldrunner999@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260106040158.31461-1-oldrunner999@gmail.com
```diff diff --git a/include/linux/atomic/atomic-arch-fallback.h b/include/linux/atomic/atomic-arch-fallback.h index 2f9d36b72bd8..cdc25f8979f7 100644 --- a/include/linux/atomic/atomic-arch-fallback.h +++ b/include/linux/atomic/atomic-arch-fallback.h @@ -2121,7 +2121,7 @@ raw_atomic_cmpxchg_relaxed(atomic_t *v, int old...
2246c24426fbc1069cb2a47e0624ccffe5f2627b
Analyze and fix the following issue in the Linux kernel code: perf pmu: Relax uncore wildcard matching to allow numeric suffix
Problem Details: Diamond Rapids introduces two types of PCIe related uncore PMUs: "uncore_pcie4_*" and "uncore_pcie6_*". To ensure that generic PCIe events (e.g., UNC_PCIE_CLOCKTICKS) can match and collect events from both PMU types, slightly relax the wildcard matching logic in perf_pmu__match_wildcard(). This chang...
```diff diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 956ea273c2c7..01a21b6aa031 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -939,6 +939,7 @@ static bool perf_pmu__match_wildcard(const char *pmu_name, const char *tok) { const char *p, *suffix; bool has_hex = false; + bool h...
098fe55a450b280d8a8584b2511634e1236ba96d
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel/uncore: Move uncore discovery init struct to header
Problem Details: The discovery base MSR or PCI device is platform-specific and must be defined statically in the per-platform init table and passed to the discovery code. Move the definition of struct intel_uncore_init_fun to uncore.h so it can be accessed by discovery code, and rename it to reflect that it now carrie...
```diff diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c index e228e564b15e..cd561290be8c 100644 --- a/arch/x86/events/intel/uncore.c +++ b/arch/x86/events/intel/uncore.c @@ -1697,133 +1697,123 @@ err: return ret; } -struct intel_uncore_init_fun { - void (*cpu_init)(void); - int (*pci_i...
632d89b030f1dac8d91875cd56a08adededba349
Analyze and fix the following issue in the Linux kernel code: perf/x86/uncore: clean up const mismatch
Problem Details: In some cmp functions, a const pointer is cast out to a non-const pointer by using container_of() which is not correct. Fix this up by properly marking the pointers as const, which preserves the correct type of the pointer passed into the functions. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoun...
```diff diff --git a/arch/x86/events/intel/uncore_discovery.c b/arch/x86/events/intel/uncore_discovery.c index 7d57ce706feb..330bca2f14b3 100644 --- a/arch/x86/events/intel/uncore_discovery.c +++ b/arch/x86/events/intel/uncore_discovery.c @@ -52,7 +52,7 @@ static int get_device_die_id(struct pci_dev *dev) static inl...
08e136ebd193eae7d5eff4c66d576c4a2dabdc3f
Analyze and fix the following issue in the Linux kernel code: loop: don't change loop device under exclusive opener in loop_set_status
Problem Details: loop_set_status() is allowed to change the loop device while there are other openers of the device, even exclusive ones. In this case, it causes a KASAN: slab-out-of-bounds Read in ext4_search_dir(), since when looking for an entry in an inlined directory, e_value_offs is changed underneath the filesy...
```diff diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 32a3a5b13802..ca74cc31bf07 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1225,13 +1225,24 @@ static int loop_clr_fd(struct loop_device *lo) } static int -loop_set_status(struct loop_device *lo, const struct loop_info64 *info) ...
4ac9690d4b9456ca1d5276d86547fa2e7cd47684
Analyze and fix the following issue in the Linux kernel code: rnbd-srv: Fix server side setting of bi_size for special IOs
Problem Details: On rnbd-srv, the bi_size of the bio is set during the bio_add_page function, to which datalen is passed. But for special IOs like DISCARD and WRITE_ZEROES, datalen is 0, since there is no data to write. For these special IOs, use the bi_size of the rnbd_msg_io. Fixes: f6f84be089c9 ("block/rnbd-srv: Ad...
```diff diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c index 2df8941a6b14..9b3fdc202e15 100644 --- a/drivers/block/rnbd/rnbd-srv.c +++ b/drivers/block/rnbd/rnbd-srv.c @@ -145,18 +145,30 @@ static int process_rdma(struct rnbd_srv_session *srv_sess, priv->sess_dev = sess_dev; priv->id = id...
e1384543e85b11b494051d11728d6d88a93161bc
Analyze and fix the following issue in the Linux kernel code: rnbd-srv: fix the trace format for flags
Problem Details: The __print_flags helper meant for bitmask, while the rnbd_rw_flags is mixed with bitmask and enum, to avoid confusion, just print the data as it is. Signed-off-by: Jack Wang <jinpu.wang@ionos.com> Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com> Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@...
```diff diff --git a/drivers/block/rnbd/rnbd-srv-trace.h b/drivers/block/rnbd/rnbd-srv-trace.h index 89d0bcb17195..18ae2ed5537a 100644 --- a/drivers/block/rnbd/rnbd-srv-trace.h +++ b/drivers/block/rnbd/rnbd-srv-trace.h @@ -44,24 +44,6 @@ DEFINE_EVENT(rnbd_srv_link_class, name, \ DEFINE_LINK_EVENT(create_sess); DEFINE...
dd4d71f587f3908f058b516d3793aaed66cfb692
Analyze and fix the following issue in the Linux kernel code: arm64/efi: Don't fail check current_in_efi() if preemptible
Problem Details: As EFI runtime services can now be run without disabling preemption remove the check for non preemptible in current_in_efi(). Without this change, firmware errors that were previously recovered from by __efi_runtime_kernel_fixup_exception() will lead to a kernel oops. Fixes: a5baf582f4c0 ("arm64/efi: ...
```diff diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index aa91165ca140..e8a9783235cb 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -45,7 +45,7 @@ void arch_efi_call_virt_teardown(void); * switching to the EFI runtime stack. */ #define current_in_efi() ...
6b6dbf3e4ecfd7d1086bd7cd8b31ca8e45d4dc1f
Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: always build sparc32 tests with -mcpu=v8
Problem Details: Since LLVM commit 39e30508a7f6 ("[Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (#109278)"), clang defaults to -mcpu=v9 for 32-bit SPARC builds. -mcpu=v9 generates instructions which are not recognized by qemu-sparc and qemu-system-sparc. Explicitly enforce -mcpu=v8 to generate compatibl...
```diff diff --git a/tools/testing/selftests/nolibc/Makefile.nolibc b/tools/testing/selftests/nolibc/Makefile.nolibc index b17ba2f8fb46..f5704193038f 100644 --- a/tools/testing/selftests/nolibc/Makefile.nolibc +++ b/tools/testing/selftests/nolibc/Makefile.nolibc @@ -226,7 +226,7 @@ CFLAGS_mipsn32be = -EB -mabi=n32 -mar...
050a0aab15da9e1d14cd41073046d12d29f443c6
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/uncore-freq: Replace sprintf() with scnprintf()
Problem Details: Replace unbounded sprintf() calls with scnprintf() to prevent potential buffer overflows when formatting device names. While the current format strings cannot overflow the buffer, using scnprintf() follows kernel best practices for string formatting. Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar...
```diff diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c index 65897fae17df..e9495ac5ecd0 100644 --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c +++ b/drivers/platform/x86/intel/uncore-f...
7aa6c24697ef5db1402dd38743914493cd5b356d
Analyze and fix the following issue in the Linux kernel code: clk: meson: g12a: Limit the HDMI PLL OD to /4
Problem Details: GXBB has the HDMI PLL OD in the HHI_HDMI_PLL_CNTL2 register while for G12A/G12B/SM1 the OD has moved to HHI_HDMI_PLL_CNTL0. At first glance the rest of the OD setup seems identical. However, looking at the downstream kernel sources as well as testing shows that G12A/G12B/SM1 only supports three OD val...
```diff diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index 185b6348251d..d0d4c7b6dc82 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -777,12 +777,23 @@ static struct clk_regmap g12a_hdmi_pll_dco = { }, }; +/* + * G12/SM1 hdmi OD dividers are POWER_OF_TWO dividers but li...
5b1a43950fd3162af0ce52b13c14a2d29b179d4f
Analyze and fix the following issue in the Linux kernel code: clk: meson: gxbb: Limit the HDMI PLL OD to /4 on GXL/GXM SoCs
Problem Details: GXBB has the HDMI PLL OD in the HHI_HDMI_PLL_CNTL2 register while for GXL/GXM the OD has moved to HHI_HDMI_PLL_CNTL3. At first glance the rest of the OD setup seems identical. However, looking at the downstream kernel sources as well as testing shows that GXL only supports three OD values: - register ...
```diff diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 5a229c4ffae1..ec9a3414875a 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -349,12 +349,23 @@ static struct clk_regmap gxbb_hdmi_pll = { }, }; +/* + * GXL hdmi OD dividers are POWER_OF_TWO dividers but limited to...
1716c1e0860b42980f338b69b974149d035582ca
Analyze and fix the following issue in the Linux kernel code: platform/surface: Replace deprecated strcpy() in surface_button_add()
Problem Details: strcpy() has been deprecated [1] because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. Replace it with the safer strscpy(). No functional changes. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1] Reviewed-by: Chen Yu <yu.c...
```diff diff --git a/drivers/platform/surface/surfacepro3_button.c b/drivers/platform/surface/surfacepro3_button.c index 2755601f979c..e652c85c9161 100644 --- a/drivers/platform/surface/surfacepro3_button.c +++ b/drivers/platform/surface/surfacepro3_button.c @@ -10,6 +10,7 @@ #include <linux/kernel.h> #include <linux...
b75710155a823369976bba9f3497cee113830ae9
Analyze and fix the following issue in the Linux kernel code: media: ipu-bridge: Add DMI quirk for Dell XPS laptops with upside down sensors
Problem Details: The Dell XPS 13 9350 and XPS 16 9640 both have an upside-down mounted OV02C10 sensor. This rotation of 180° is reported in neither the SSDB nor the _PLD for the sensor (both report a rotation of 0°). Add a DMI quirk mechanism for upside-down sensors and add 2 initial entries to the DMI quirk list for ...
```diff diff --git a/drivers/media/pci/intel/Kconfig b/drivers/media/pci/intel/Kconfig index d9fcddce028b..3f14ca110d06 100644 --- a/drivers/media/pci/intel/Kconfig +++ b/drivers/media/pci/intel/Kconfig @@ -6,7 +6,7 @@ source "drivers/media/pci/intel/ivsc/Kconfig" config IPU_BRIDGE tristate "Intel IPU Bridge" - de...
1d2e3b4443a85374fdd6fb8fd2c015e3e3e16100
Analyze and fix the following issue in the Linux kernel code: media: ov02c10: Fix the horizontal flip control
Problem Details: During sensor calibration I noticed that with the hflip control set to false/disabled the image was mirrored. The horizontal flip control is inverted and needs to be set to 1 to not flip. This is something which seems to be common with various recent Omnivision sensors, the ov01a10 and ov08x40 also ha...
```diff diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c index 384c2f0b1608..f912ae142040 100644 --- a/drivers/media/i2c/ov02c10.c +++ b/drivers/media/i2c/ov02c10.c @@ -170,7 +170,7 @@ static const struct reg_sequence sensor_1928x1092_30fps_setting[] = { {0x3816, 0x01}, {0x3817, 0x01}, - {0x...
d0bb6f1f2b79d96953bf81a3839ac2aa946ba2fa
Analyze and fix the following issue in the Linux kernel code: media: ov02c10: Adjust x-win/y-win when changing flipping to preserve bayer-pattern
Problem Details: The ov02c10 is capable of having its (crop) window shifted around with 1 pixel precision while streaming. This allows changing the x/y window coordinates when changing flipping to preserve the bayer-pattern. __v4l2_ctrl_handler_setup() will now write the window coordinates at 0x3810 and 0x3812 so the...
```diff diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c index 6369841de88b..384c2f0b1608 100644 --- a/drivers/media/i2c/ov02c10.c +++ b/drivers/media/i2c/ov02c10.c @@ -165,10 +165,6 @@ static const struct reg_sequence sensor_1928x1092_30fps_setting[] = { {0x3809, 0x88}, {0x380a, 0x04}, {0x3...
905120d7470e5ed79d59b61ef6aa13344ffca229
Analyze and fix the following issue in the Linux kernel code: media: ov02c10: Fix bayer-pattern change after default vflip change
Problem Details: After commit d5ebe3f7d13d ("media: ov02c10: Fix default vertical flip") the reported bayer-pattern of MEDIA_BUS_FMT_SGRBG10_1X10 is no longer correct. Change the 16-bit x-win register (0x3810) value from 2 to 1 so that the sensor will generate data in GRBG bayer-order again. Fixes: d5ebe3f7d13d ("med...
```diff diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c index b1e540eb8326..6369841de88b 100644 --- a/drivers/media/i2c/ov02c10.c +++ b/drivers/media/i2c/ov02c10.c @@ -168,7 +168,7 @@ static const struct reg_sequence sensor_1928x1092_30fps_setting[] = { {0x3810, 0x00}, {0x3811, 0x02}, {0x38...
d5bdf88d1f9d1e4808177f03d89de3d0ba6c6e84
Analyze and fix the following issue in the Linux kernel code: drm/fb-helper: Fix vblank timeout during suspend/reset
Problem Details: During GPU reset, VBlank interrupts are disabled which causes drm_fb_helper_fb_dirty() to wait for VBlank timeout. This will create call traces like (seen on an RX7900 series dGPU): [ 101.313646] ------------[ cut here ]------------ [ 101.313648] amdgpu 0000:03:00.0: [drm] vblank wait timed out on c...
```diff diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 4a7f72044ab8..4b47aa0dab35 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -366,6 +366,9 @@ static void drm_fb_helper_damage_work(struct work_struct *work) { struct drm_fb_helper *helper...
fd390ff144513eb0310c350b1cf5fa8d6ddd0c53
Analyze and fix the following issue in the Linux kernel code: PCI/VGA: Don't assume the only VGA device on a system is `boot_vga`
Problem Details: Some systems ship with multiple display class devices but not all of them are VGA devices. If the "only" VGA device on the system is not used for displaying the image on the screen marking it as `boot_vga` because nothing was found is totally wrong. This behavior actually leads to mistakes of the wron...
```diff diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index 436fa7f4c387..baa242b14099 100644 --- a/drivers/pci/vgaarb.c +++ b/drivers/pci/vgaarb.c @@ -652,13 +652,6 @@ static bool vga_is_boot_device(struct vga_device *vgadev) return true; } - /* - * Vgadev has neither IO nor MEM enabled. If we have...
1338e8ae4084e55c0359a79e617b2ae183d01579
Analyze and fix the following issue in the Linux kernel code: drm/msm/dp: Update msm_dp_controller IDs for sa8775p
Problem Details: The Qualcomm SA8775P platform comes with 2 DisplayPort controllers for each mdss. Update controller id for DPTX0 and DPTX1 of mdss1. Fixes: dcb380d19e58 ("drm/msm/dp: Add DisplayPort controller for SA8775P") Signed-off-by: Mani Chandana Ballary Kuntumalla <quic_mkuntuma@quicinc.com> Reviewed-by: Dmitr...
```diff diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 9bd9cd5c1e03..a082f4d3ebe2 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -141,8 +141,8 @@ static const struct msm_dp_desc msm_dp_desc_glymur[] = { static const struct msm...
794b0e68caba49b950b42ec32e364028c2facf57
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: fix WD timer handling on DPU 8.x
Problem Details: Since DPU 8.x Watchdog timer settings were moved from the TOP to the INTF block. Support programming the timer in the INTF block. Fixes tag points to the commit which removed register access to those registers on DPU 8.x+ (and which also should have added proper support for WD timer on those devices). ...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index af5122a514bd..eba1d52211f6 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -786,13 +786,13 @@ static void _dpu_encoder_update_vsync_source(st...
1ad9880f059c9b0943e53714f9a59924cb035bbb
Analyze and fix the following issue in the Linux kernel code: drm/msm/dpu: Set vsync source irrespective of mdp top support
Problem Details: Since DPU 5.x the vsync source TE setup is split between MDP TOP and INTF blocks. Currently all code to setup vsync_source is only executed if MDP TOP implements the setup_vsync_source() callback. However on DPU >= 8.x this callback is not implemented, making DPU driver skip all vsync setup. Move the I...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 9f3957f24c6a..af5122a514bd 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -785,6 +785,8 @@ static void _dpu_encoder_update_vsync_source(stru...
2892de3f4f985fa779c330468e2f341fdb762ccd
Analyze and fix the following issue in the Linux kernel code: drm/msm/disp/dpu: add merge3d support for sc7280
Problem Details: On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split ...
```diff diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h index 8f978b9c3452..2f8688224f34 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h @@ -13,6 +13,7 @@ static ...
88c72bab77aaf389beccf762e112828253ca0564
Analyze and fix the following issue in the Linux kernel code: cxl/region: fix format string for resource_size_t
Problem Details: The size of this type is architecture specific, and the recommended way to print it portably is through the custom %pap format string. Fixes: d6602e25819d ("cxl/region: Add support to indicate region has extended linear cache") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ira Weiny <ira.w...
```diff diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c index ae899f68551f..fc36a5413d3f 100644 --- a/drivers/cxl/core/region.c +++ b/drivers/cxl/core/region.c @@ -759,7 +759,7 @@ static ssize_t extended_linear_cache_size_show(struct device *dev, ACQUIRE(rwsem_read_intr, rwsem)(&cxl_rwsem.region); ...
269031b15c1433ff39e30fa7ea3ab8f0be9d6ae2
Analyze and fix the following issue in the Linux kernel code: x86/kaslr: Recognize all ZONE_DEVICE users as physaddr consumers
Problem Details: Commit 7ffb791423c7 ("x86/kaslr: Reduce KASLR entropy on most x86 systems") is too narrow. The effect being mitigated in that commit is caused by ZONE_DEVICE which PCI_P2PDMA has a dependency. ZONE_DEVICE, in general, lets any physical address be added to the direct-map. I.e. not only ACPI hotplug rang...
```diff diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c index 3c306de52fd4..834641c6049a 100644 --- a/arch/x86/mm/kaslr.c +++ b/arch/x86/mm/kaslr.c @@ -115,12 +115,12 @@ void __init kernel_randomize_memory(void) /* * Adapt physical memory region size based on available memory, - * except when CONFIG_PCI_...
238e03d0466239410b72294b79494e43d4fabe77
Analyze and fix the following issue in the Linux kernel code: net: fix memory leak in skb_segment_list for GRO packets
Problem Details: When skb_segment_list() is called during packet forwarding, it handles packets that were aggregated by the GRO engine. Historically, the segmentation logic in skb_segment_list assumes that individual segments are split from a parent SKB and may need to carry their own socket memory accounting. Accordi...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index a00808f7be6a..a56133902c0d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4636,12 +4636,14 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb, { struct sk_buff *list_skb = skb_shinfo(skb)->frag_list; unsigned int tnl_hlen = skb_tnl_h...
938d79ec2b059fea2f3bf0f53107650a64372acf
Analyze and fix the following issue in the Linux kernel code: riscv: kexec_image: Fix dead link to boot-image-header.rst
Problem Details: Fix the reference to 'boot-image-header.rst', which was moved to 'Documentation/arch/riscv/' in commit 'ed843ae947f8' ("docs: move riscv under arch"). Signed-off-by: Soham Metha <sohammetha01@gmail.com> Link: https://patch.msgid.link/20251203194355.63265-1-sohammetha01@gmail.com Signed-off-by: Paul Wa...
```diff diff --git a/arch/riscv/kernel/kexec_image.c b/arch/riscv/kernel/kexec_image.c index 8f2eb900910b..51dc89259f16 100644 --- a/arch/riscv/kernel/kexec_image.c +++ b/arch/riscv/kernel/kexec_image.c @@ -22,7 +22,7 @@ static int image_probe(const char *kernel_buf, unsigned long kernel_len) if (!h || kernel_len < s...
5e5be092ffadcab0093464ccd9e30f0c5cce16b9
Analyze and fix the following issue in the Linux kernel code: riscv: pgtable: Cleanup useless VA_USER_XXX definitions
Problem Details: These marcos are not used after commit b5b4287accd7 ("riscv: mm: Use hint address in mmap if available"). Cleanup VA_USER_XXX definitions in asm/pgtable.h. Fixes: b5b4287accd7 ("riscv: mm: Use hint address in mmap if available") Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org> Reviewe...
```diff diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 6bb1f5bdc5d2..9acd58a67123 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -124,10 +124,6 @@ #ifdef CONFIG_64BIT #include <asm/pgtable-64.h> -#define VA_USER_SV39 (UL(1) << (VA_BITS...
8632180daf735074a746ce2b3808a8f2c079310e
Analyze and fix the following issue in the Linux kernel code: riscv: cpufeature: Fix Zk bundled extension missing Zknh
Problem Details: The Zk extension is a bundle consisting of Zkn, Zkr, and Zkt. The Zkn extension itself is a bundle consisting of Zbkb, Zbkc, Zbkx, Zknd, Zkne, and Zknh. The current implementation of riscv_zk_bundled_exts manually listed the dependencies but missed RISCV_ISA_EXT_ZKNH. Fix this by introducing a RISCV_...
```diff diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index c05b11596c19..fa591aff9d33 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -301,23 +301,22 @@ static const unsigned int riscv_a_exts[] = { RISCV_ISA_EXT_ZALRSC, }; +#define RISCV_ISA_EXT_Z...
a7fc8c641cab855824c45e5e8877e40fd528b5df
Analyze and fix the following issue in the Linux kernel code: net: airoha: Fix npu rx DMA definitions
Problem Details: Fix typos in npu rx DMA descriptor definitions. Fixes: b3ef7bdec66fb ("net: airoha: Add airoha_offload.h header") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260102-airoha-npu-dma-rx-def-fixes-v1-1-205fc6bf7d94@kernel.org Signed-off-by: Jakub Kicinski <kuba@ke...
```diff diff --git a/include/linux/soc/airoha/airoha_offload.h b/include/linux/soc/airoha/airoha_offload.h index 4d23cbb7d407..ab64ecdf39a0 100644 --- a/include/linux/soc/airoha/airoha_offload.h +++ b/include/linux/soc/airoha/airoha_offload.h @@ -71,12 +71,12 @@ static inline void airoha_ppe_dev_check_skb(struct airoha...
9892353726ad222219aa18c329e3a3636134dd56
Analyze and fix the following issue in the Linux kernel code: net/sched: act_mirred: Fix leak when redirecting to self on egress
Problem Details: Whenever a mirred redirect to self on egress happens, mirred allocates a new skb (skb_to_send). The loop to self check was done after that allocation, but was not freeing the newly allocated skb, causing a leak. Fix this by moving the if-statement to before the allocation of the new skb. The issue wa...
```diff diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 91c96cc625bd..05e0b14b5773 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -266,11 +266,22 @@ static int tcf_mirred_to_dev(struct sk_buff *skb, struct tcf_mirred *m, goto err_cant_do; } + want_ingress = tcf_mirred_act_...
530e3d4af566ca44807d79359b90794dea24c4f3
Analyze and fix the following issue in the Linux kernel code: btrfs: fix NULL pointer dereference in do_abort_log_replay()
Problem Details: Coverity reported a NULL pointer dereference issue (CID 1666756) in do_abort_log_replay(). When btrfs_alloc_path() fails in replay_one_buffer(), wc->subvol_path is NULL, but btrfs_abort_log_replay() calls do_abort_log_replay() which unconditionally dereferences wc->subvol_path when attempting to print ...
```diff diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 5831754bb01c..2d9d38b82daa 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -190,7 +190,7 @@ static void do_abort_log_replay(struct walk_control *wc, const char *function, btrfs_abort_transaction(wc->trans, error); - if (wc->subvol_...
cefd80925180a85c818e18c2876911b002a595fd
Analyze and fix the following issue in the Linux kernel code: btrfs: force free space tree for bs > ps cases
Problem Details: [BUG] Currently we only enforcing the free space tree for bs < ps cases, but with the recently added bs > ps support, we lack the free space tree enforcing, causing explicit v1 cache mount option to fail on bs > ps cases: # mount -o space_cache=v1 /dev/test/scratch1 /mnt/btrfs/ mount: /mnt/btrfs:...
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9f8546498818..af56fdbba65d 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -736,7 +736,7 @@ bool btrfs_check_options(const struct btrfs_fs_info *info, */ void btrfs_set_free_space_cache_settings(struct btrfs_fs_info *fs_info) { - if (fs_info->se...
30bcf4e824aa37d305502f52e1527c7b1eabef3d
Analyze and fix the following issue in the Linux kernel code: btrfs: only enforce free space tree if v1 cache is required for bs < ps cases
Problem Details: [BUG] Since the introduction of btrfs bs < ps support, v1 cache was never on the plan due to its hard coded PAGE_SIZE usage, and the future plan to properly deprecate it. However for bs < ps cases, even if 'nospace_cache,clear_cache' mount option is specified, it's never respected and free space tree ...
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 1999533b52be..9f8546498818 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -736,14 +736,12 @@ bool btrfs_check_options(const struct btrfs_fs_info *info, */ void btrfs_set_free_space_cache_settings(struct btrfs_fs_info *fs_info) { - if (fs_info->...
8731f2c50b0b1d2b58ed5b9671ef2c4bdc2f8347
Analyze and fix the following issue in the Linux kernel code: btrfs: release path before initializing extent tree in btrfs_read_locked_inode()
Problem Details: In btrfs_read_locked_inode() we are calling btrfs_init_file_extent_tree() while holding a path with a read locked leaf from a subvolume tree, and btrfs_init_file_extent_tree() may do a GFP_KERNEL allocation, which can trigger reclaim. This can create a circular lock dependency which lockdep warns abou...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index bfb8e98d8c02..5ea1c392bbc7 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4046,11 +4046,6 @@ static int btrfs_read_locked_inode(struct btrfs_inode *inode, struct btrfs_path btrfs_set_inode_mapping_order(inode); cache_index: - ret = btrfs_init...
1aff297ffb925ee49299f86af5fcdf854cb48c5f
Analyze and fix the following issue in the Linux kernel code: btrfs: avoid access-beyond-folio for bs > ps encoded writes
Problem Details: [POTENTIAL BUG] If the system page size is 4K and fs block size is 8K, and max_inline mount option is set to 6K, we can inline a 6K sized data extent. Then a encoded write submitted a compressed extent which is at file offset 0, and the compressed length is 6K, which is allowed to be inlined. Now a r...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 03337fa7a61c..bfb8e98d8c02 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -480,13 +480,15 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, ASSERT(size <= sectorsize); /* - * The compressed size also needs to be no larger ...
48a4aa9d9c393abf122454bc9050aac15de6d27f
Analyze and fix the following issue in the Linux kernel code: ipv4: Improve martian logs
Problem Details: At the current moment, the logs for martian packets are as follows: ``` martian source {DST} from {SRC}, on dev {DEV} martian destination {DST} from {SRC}, dev {DEV} ``` These messages feel rather hard to understand in production, especially the "martian source" one, mostly because it is grammatically...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index b549d6a57307..05f8c550a915 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1795,8 +1795,8 @@ static void ip_handle_martian_source(struct net_device *dev, * RFC1812 recommendation, if source is martian, * the only hint is MAC header. */ ...
ce5e612dd411de096aa041b9e9325ba1bec5f9f4
Analyze and fix the following issue in the Linux kernel code: vsock: Make accept()ed sockets use custom setsockopt()
Problem Details: SO_ZEROCOPY handling in vsock_connectible_setsockopt() does not get called on accept()ed sockets due to a missing flag. Flip it. Fixes: e0718bd82e27 ("vsock: enable setting SO_ZEROCOPY") Signed-off-by: Michal Luczaj <mhal@rbox.co> Link: https://patch.msgid.link/20251229-vsock-child-sock-custom-sockopt...
```diff diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index adcba1b7bf74..a3505a4dcee0 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1787,6 +1787,10 @@ static int vsock_accept(struct socket *sock, struct socket *newsock, } else { newsock->state = SS_CONNECTED; so...
5ce3218d4f102aca5e90d3c831259b6e380f88b4
Analyze and fix the following issue in the Linux kernel code: overflow: Remove is_non_negative() and is_negative()
Problem Details: The is_non_negative() and is_negative() function-like macros just exist as a workaround to silence the -Wtype-limits warning. Now that this warning is disabled, those two macros have lost their raison d'être. Remove them. This reverts commit dc7fe518b049 ("overflow: Fix -Wtype-limits compilation warni...
```diff diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 736f633b2d5f..ab142d60c6b5 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -36,12 +36,6 @@ #define __type_min(T) ((T)((T)-type_max(T)-(T)1)) #define type_min(t) __type_min(typeof(t)) -/* - * Avoids triggering -Wty...
660e899103e29aabcc05447ab20684811ea86107
Analyze and fix the following issue in the Linux kernel code: kbuild: remove gcc's -Wtype-limits
Problem Details: W=2 builds are heavily polluted by the -Wtype-limits warning. Here are some W=12 statistics on Linux v6.19-rc1 for an x86_64 defconfig (with just CONFIG_WERROR set to "n") using gcc 14.3.1: Warning name count percent ------------------------------------------------- -Wlogical-op 2 0.00...
```diff diff --git a/scripts/Makefile.warn b/scripts/Makefile.warn index 68e6fafcb80c..c593ab1257de 100644 --- a/scripts/Makefile.warn +++ b/scripts/Makefile.warn @@ -55,6 +55,9 @@ else KBUILD_CFLAGS += -Wno-main endif +# Too noisy on range checks and in macros handling both signed and unsigned. +KBUILD_CFLAGS += -...
4d982084507d663df160546c4c48066a8887ed89
Analyze and fix the following issue in the Linux kernel code: PCI/PM: Avoid redundant delays on D3hot->D3cold
Problem Details: When transitioning to D3cold, __pci_set_power_state() first transitions to D3hot. If the device was already in D3hot, this adds excess work: (a) read/modify/write PMCSR; and (b) excess delay (pci_dev_d3_sleep()). For (b), we already performed the necessary delay on the previous D3hot entry; this ...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 13dbb405dc31..86ccbd0efb49 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1488,6 +1488,9 @@ static int pci_set_low_power_state(struct pci_dev *dev, pci_power_t state, bool || (state == PCI_D2 && !dev->d2_support)) return -EIO; + if (...
72d7f4573660287f1b66c30319efecd6fcde92ee
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix query for VPE block_type and ip_count
Problem Details: [Why] Query for VPE block_type and ip_count is missing. [How] Add VPE case in ip_block_type and hw_ip_count query. Reviewed-by: Lang Yu <lang.yu@amd.com> Signed-off-by: Alan Liu <haoping.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit a6ea0a430aca5932b9...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 6ee77f431d56..f65edd80cabf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -201,6 +201,9 @@ static enum amd_ip_block_type type = (amdgpu_device_ip_get_ip_...
e0d20a7658129fc681e392ba27edea99b77c2e21
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add missing encoder setup to DACnEncoderControl
Problem Details: Apparently the DAC encoder needs to be set up before use. The BIOS parser in DC did not support this so I assumed it was not necessary, but the DAC doesn't work without it on some GPUs. Fixes: 69b29b894660 ("drm/amd/display: Hook up DAC to bios_parser_encoder_control") Reviewed-by: Alex Deucher <alexa...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index d1471f34e419..9f11e6ca4051 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c @@ -763,14 +763,14 @@ static enum bp_result b...
90b5f2dce9d919a4e37abf29598d23c7f20108ba
Analyze and fix the following issue in the Linux kernel code: test_list_sort: fix up const mismatch
Problem Details: In the internal cmp function, a const pointer is cast out to a non-const pointer by using container_of(). This is probably not what is intended at all, so fix up the const marking to properly preserve what is really happening (i.e. the const should flow through the container_of() call) Cc: Jakub Kici...
```diff diff --git a/lib/tests/test_list_sort.c b/lib/tests/test_list_sort.c index 30879abc8a42..28158557b164 100644 --- a/lib/tests/test_list_sort.c +++ b/lib/tests/test_list_sort.c @@ -26,7 +26,7 @@ struct debug_el { unsigned int serial; }; -static void check(struct kunit *test, struct debug_el *ela, struct debu...
e70a307b852804b2a7aaaafdd37542ca11e6eb00
Analyze and fix the following issue in the Linux kernel code: kunit: fix up const mis-match in many assert functions
Problem Details: In many kunit assert functions a const pointer is passed to container_of() and out pops a non-const pointer, which really isn't the correct thing to do at all. Fix this up by correctly marking the casted-to pointer as const to preserve the marking. Cc: Brendan Higgins <brendan.higgins@linux.dev> Cc: ...
```diff diff --git a/lib/kunit/assert.c b/lib/kunit/assert.c index 867aa5c4bccf..4c751ad8506a 100644 --- a/lib/kunit/assert.c +++ b/lib/kunit/assert.c @@ -51,7 +51,7 @@ void kunit_unary_assert_format(const struct kunit_assert *assert, const struct va_format *message, struct string_stream *stream) ...
e25834d7691f0661fa9700c167c48d18752f62bf
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: Add The Fairphone (Gen. 6)
Problem Details: Add a devicetree for The Fairphone (Gen. 6) smartphone, which is based on the Milos/SM7635 SoC. Supported functionality as of this initial submission: * Debug UART * Regulators (PM7550, PM8550VS, PMR735B, PM8008) * Remoteprocs (ADSP, CDSP, MPSS, WPSS) * Power Button, Volume Keys, Switch * PMIC-GLINK (...
```diff diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index ce29b26473b3..0ccd6ec16dfb 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -39,6 +39,7 @@ lemans-evk-camera-dtbs := lemans-evk.dtb lemans-evk-camera.dtbo dtb-$(CONFIG_ARCH_QCOM) ...
fd40c146c8ed7f7e8ae36922dcc583bd0ca70b75
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Correct color depth for SelectCRTC_Source
Problem Details: Pass the correct enum values as expected by the VBIOS. Previously the actual bit depth integer value was passed, which was a mistake. Fixes: 7fb4f254c8eb ("drm/amd/display: Add SelectCRTC_Source to BIOS parser") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Timur Kristóf <timur....
```diff diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b/drivers/gpu/drm/amd/display/dc/bios/command_table.c index 22457f417e65..d56c0d3763dd 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c @@ -1797,7 +1797,30 @@ static enum bp...
7ed51e3a1381422278933d0d3ebda0268b6825de
Analyze and fix the following issue in the Linux kernel code: drm/amd/amdgpu: Fix SMU warning during isp suspend-resume
Problem Details: ISP mfd child devices are using genpd and the system suspend-resume operations between genpd and amdgpu parent device which uses only runtime suspend-resume are not in sync. Linux power manager during suspend-resume resuming the genpd devices earlier than the amdgpu parent device. This is resulting in...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 37270c4dab8d..532f83d783d1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c @@ -318,12 +318,36 @@ void isp_kernel_buffer_free(void **buf_obj, u64 *gpu_addr, void...
dc8a887de1a7d397ab4131f45676e89565417aa8
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: force send pcie parmater on navi1x
Problem Details: v1: the PMFW didn't initialize the PCIe DPM parameters and requires the KMD to actively provide these parameters. v2: clean & remove unused code logic (lijo) Fixes: 1a18607c07bb ("drm/amd/pm: override pcie dpm parameters only if it is necessary") Closes: https://gitlab.freedesktop.org/drm/amd/-/issue...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 16e3cc10891d..c4966dcc6875 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -2455,24 +2455,21 @@ static int navi10_update_pcie...
4f74c2dd970611d3ec3bb0d58215e73af5cd7214
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix wrong pcie parameter on navi1x
Problem Details: fix wrong pcie dpm parameter on navi1x Fixes: 1a18607c07bb ("drm/amd/pm: override pcie dpm parameters only if it is necessary") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4671 Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Co-developed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 7c9f77124ab2..16e3cc10891d 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -2464,8 +2464,8 @@ static int navi10_update_pcie_p...
14b6a73ce1a33e20d6e526415c0af34a9e01f64a
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v13.0.0
Problem Details: put wrong value into incorrect data into following function, which caused it to fail to match the correct item on smu v13.0.0: smu_cmn_print_pcie_levels() Fixes: a95f01edd80b ("drm/amd/pm: Use common helper for smuv13.0.0 dpm") Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Lijo Lazar ...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c index c95dbee06f49..cddb8b283e3b 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c @@ -1234,8 +1234,10 @@ static int...
137a9127759fb6a6c526dece90fa78222c1164d6
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v13.0.7
Problem Details: put wrong value into incorrect data into following function, which caused it to fail to match the correct item on smu v13.0.7: smu_cmn_print_pcie_levels() Fixes: b2debbbb60f1 ("drm/amd/pm: Use common helper for smuv13.0.7 dpm") Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Lijo Lazar ...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c index 1465e0c80175..b60c7ff75a64 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c @@ -1223,8 +1223,10 @@ static int...
c01b52830fdc8e907e9f8462d5d7d798b7ed19dc
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix pp_dpm_pcie wrong state issue for smu v14.0.2
Problem Details: put wrong value into incorrect data into following function, which caused it to fail to match the correct item on smu v14.0.2: smu_cmn_print_pcie_levels() Fixes: 03d11f8564ca ("drm/amd/pm: Use common helper for smuv14.0.2 dpm") Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Lijo Lazar ...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c index b1016debdf06..ea08dc11d754 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c @@ -1095,8 +1095,10 @@ static int...
bd8150a1b3370a9f7761c5814202a3fe5a79f44f
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Refactor amdgpu_gem_va_ioctl for Handling Last Fence Update and Timeline Management v4
Problem Details: This commit simplifies the amdgpu_gem_va_ioctl function, key updates include: - Moved the logic for managing the last update fence directly into amdgpu_gem_va_update_vm. - Introduced checks for the timeline point to enable conditional replacement or addition of fences. v2: Addressed review com...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index dda383a8cb70..032971d0a3cc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -112,47 +112,6 @@ amdgpu_gem_update_timeline_node(struct drm_file *filp, return ...
a6ea0a430aca5932b9c75d8e38deeb45665dd2ae
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix query for VPE block_type and ip_count
Problem Details: [Why] Query for VPE block_type and ip_count is missing. [How] Add VPE case in ip_block_type and hw_ip_count query. Reviewed-by: Lang Yu <lang.yu@amd.com> Signed-off-by: Alan Liu <haoping.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index f05d1b98d34d..1878e0faa722 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -201,6 +201,9 @@ static enum amd_ip_block_type type = (amdgpu_device_ip_get_ip_...
0d89268d20c961b6226a4aa948fdbe9f93021d95
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Don't repeat DAC load detection
Problem Details: The analog link detection code path had already performed the DAC load detection by the time the EDID read is attempted. So there is no need to repeat the DAC load detection, we can know that no display is connected if no EDID is read. Fixes: ac1bb4952267 ("drm/amd/display: Use DAC load detection on a...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c index 03db7116cf09..f24365395cd9 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c @@ -1173,11 +1173,10 @@ static bo...
bb5dfe2f5630ce344c654c705d28b4e20cb9d334
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add missing encoder setup to DACnEncoderControl
Problem Details: Apparently the DAC encoder needs to be set up before use. The BIOS parser in DC did not support this so I assumed it was not necessary, but the DAC doesn't work without it on some GPUs. Fixes: 69b29b894660 ("drm/amd/display: Hook up DAC to bios_parser_encoder_control") Reviewed-by: Alex Deucher <alexa...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index d1471f34e419..9f11e6ca4051 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c @@ -763,14 +763,14 @@ static enum bp_result b...
cdf6e4c0cdab129ffc4e41a8ac53a0738f805072
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Correct color depth for SelectCRTC_Source
Problem Details: Pass the correct enum values as expected by the VBIOS. Previously the actual bit depth integer value was passed, which was a mistake. Fixes: 7fb4f254c8eb ("drm/amd/display: Add SelectCRTC_Source to BIOS parser") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Timur Kristóf <timur....
```diff diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b/drivers/gpu/drm/amd/display/dc/bios/command_table.c index 22457f417e65..d56c0d3763dd 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c @@ -1797,7 +1797,30 @@ static enum bp...
436d0d22aa7035a9f9b24fb14cd0e84d6571ea87
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Pass proper DAC encoder ID to VBIOS
Problem Details: Similarly to the analog_engine field, add a new analog_id field which contains the encoder ID of the analog encoder that corresponds to the link encoder. Previously, the default encoder ID of the link encoder was used, which meant that we passed the wrong ID in case of DVI-I. Fixes: 5834c33fd3f6 ("dr...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c index b44c364519dc..7f0766b5fa3d 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c @@ -852,6 +852,7 @@ void dce1...
0288a345f19b2162546352161509bb24614729e1
Analyze and fix the following issue in the Linux kernel code: drm/amd/amdgpu: Fix SMU warning during isp suspend-resume
Problem Details: ISP mfd child devices are using genpd and the system suspend-resume operations between genpd and amdgpu parent device which uses only runtime suspend-resume are not in sync. Linux power manager during suspend-resume resuming the genpd devices earlier than the amdgpu parent device. This is resulting in...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 37270c4dab8d..532f83d783d1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c @@ -318,12 +318,36 @@ void isp_kernel_buffer_free(void **buf_obj, u64 *gpu_addr, void...
c29935e4092c61f57c204e7d61eebb91b0a2fad5
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.364
Problem Details: This version brings along the following updates: - Add frame skip feature support flag. - Add sink EDID data null check. - Update function name to link_detect_connection_type_analog. - Fix mismatched unlock for DMUB HW lock in HWSS fast path. - Fix P010, NV12, YUY2 scale down by four times failur...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 30e913607aea..69fa7fc02fa8 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -63,7 +63,7 @@ struct dcn_dsc_reg_state; struct dcn_optc_reg_state; struct dcn_dccg_reg_state; ...
878a4b73c11111ff5f820730f59a7f8c6fd59374
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix dsc eDP issue
Problem Details: [why] Need to add function hook check before use Reviewed-by: Mohit Bawa <mohit.bawa@amd.com> Signed-off-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c index ebdb885826aa..c5761f3ed0ae 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c @@ -1846,6 +1...
5ad5b0b7845c973bdec30ea8d486add9cdfdc543
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix and reenable UPDATE_V3_FLOW_NEW_CONTEXT_MINIMAL
Problem Details: [Why] Reenable new split implementation, previously partially reverted due to issues with ODM on high-bandwidth displays 4k144Hz, resulting in a corrupted gray screen. Minimal flows require two separate commits, with extra intermediate commit to enable seamless transitions, each followed by a swap. Si...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 1be5c1c15798..57f6a4c8afff 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -784,7 +784,7 @@ bool dc_stream_get_crc(struct dc *dc, struct dc_stream_state ...
fd3fece04db80c8877361bf4c9f59521ce457be0
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure
Problem Details: [WHY] When performing 4:1 downscaling with subsampled formats, the SPL remainder distribution logic (+1) overrides the upper layer’s aligned width, resulting in odd segment widths and causing hang. The upper layer alignment ensures the width is sufficient and even, so SPL should not modify it further....
```diff diff --git a/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c index f506ab70a307..d8aebaff7c3f 100644 --- a/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c +++ b/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c @@ -226,7 +226,8 @@ static struct spl_rect calculate_mpc_slice_in...
af3303970da5ce5bfe6dffdd07f38f42aad603e0
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix mismatched unlock for DMUB HW lock in HWSS fast path
Problem Details: [Why] The evaluation for whether we need to use the DMUB HW lock isn't the same as whether we need to unlock which results in a hang when the fast path is used for ASIC without FAMS support. [How] Store a flag that indicates whether we should use the lock and use that same flag to specify whether unlo...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c index e2763b60482a..052d573408c3 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c @@ -741,6 +741,7 @@ void hwss...
b0dbd5db7cf1f81e4aaedd25cb5e72ce369387b2
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: force send pcie parmater on navi1x
Problem Details: v1: the PMFW didn't initialize the PCIe DPM parameters and requires the KMD to actively provide these parameters. v2: clean & remove unused code logic (lijo) Fixes: 1a18607c07bb ("drm/amd/pm: override pcie dpm parameters only if it is necessary") Closes: https://gitlab.freedesktop.org/drm/amd/-/issue...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 0c26fe6fb949..4896200a0bd9 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -2207,24 +2207,21 @@ static int navi10_update_pcie...
216779827f8d52a39d94d43c47737a829991ad8c
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: add helpers to access cross-die registers smn addr for soc v1_0
Problem Details: Encode die_id/socket_id for upper 32bits of soc v1_0 registers SMN address. v2: fix logical error caught by clang Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c index e9c7be1ed602..59ab952d5cce 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c @@ -72,6 +72,37 @@ static void soc_v1_0_doorbell_index_init(struct amdgpu_device *adev) ade...
af26fa751c2eef66916acbf0d3c3e9159da56186
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Use explicit VCN instance 0 in SR-IOV init
Problem Details: vcn_v2_0_start_sriov() declares a local variable "i" initialized to zero and uses it only as the instance index in SOC15_REG_OFFSET(UVD, i, ...). The value is never changed and all other fields are taken from adev->vcn.inst[0], so this path only ever programs VCN instance 0. This triggered a Smatch: w...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index 8897dcc9c1a0..e35fae9cdaf6 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c @@ -1964,7 +1964,8 @@ static int vcn_v2_0_start_sriov(struct amdgpu_device *adev) struct mm...
1005ab86cf75aec3462c1c58d6efa87871f2843f
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix VGPR bank state save in gfx12.1 trap handler
Problem Details: S_SETREG_IMM32_B32 does not apply a mask to the MODE bank bits. SRC2 is consequently unconditonally cleared during context save. Use S_SETREG_B32 instead to preserve SRC2. Signed-off-by: Jay Cornwall <jay.cornwall@amd.com> Reviewed-by: Lancelot Six <lancelot.six@amd.com> Signed-off-by: Alex Deucher <...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h b/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h index 5c6d533a5956..d82ce2f1e9b9 100644 --- a/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +++ b/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h @@ -4731,7 +4731,7 @@ static const uint32_t cwsr_trap_gfx...
c14af4cc24e640e50d4c64b1930093a24402d4ce
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: fix partitioned gfx12 address watch enablement
Problem Details: GFX 12 devices that support spatial partitioning should use the WREG32 per XCC macro when updating address watch settings, similar to GFX 9 devices that support spatial partitioning. Signed-off-by: Jonathan Kim <jonathan.kim@amd.com> Reviewed-by: Mukul Joshi <mukul.joshi@amd.com> Signed-off-by: Alex D...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c index 14e4c60b9d79..965c7e688535 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c @@ -347,13 +347,13 @@ static uint...
7bd5d763b8e125bec578ab66ce5d90a4c83e1bff
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Add gfx_v12_1_kfd2kgd interface for GFX12_1
Problem Details: Create new kfd2kgd interface for gfx v12_1, based on gfx v12. Support register program accoding to xcc id. V2: Fix SDMA register address for muti-xcc. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Mukul Joshi <mukul.joshi@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index d0c506a44569..fc85622187f5 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -282,7 +282,8 @@ amdgpu-y += \ amdgpu_amdkfd_gfx_v10.o \ amdgpu_amdkfd_gfx_v10_3.o \ amdgpu_...
5fd4fef3f8e6b5be4e1df49f32efc8b200ed07d5
Analyze and fix the following issue in the Linux kernel code: drm/amd: Drop amdgpu prefix from message prints
Problem Details: Hardcoding the prefix isn't necessary when using drm_* or dev_* message prints. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c index a050167e76a4..1cbba9803d31 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c @@ -66,7 +66,7 @@ static void amdgpu_benchmark_log_results(st...
217737bb5a17297aa7ac74ca6638628efc74c661
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix DPMS log printing
Problem Details: [Why] Spaces before newline are not necessary. Inserting newlines in multi-line strings are harder to follow when tracing messages. [How] Drop extra new lines and split multi-line messages into one print per line. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Reviewed-by: Aurabindo Pill...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c index 7384676e646d..323cc0b3c09a 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c @@ -1330,13 +1330,34 @@ static void remove_stream_fro...
fe4d39879ad99781a18eb31692cbe02292cbc8f1
Analyze and fix the following issue in the Linux kernel code: drm/amd: Drop dev_fmt prefix
Problem Details: The `amdgpu:` prefix in dev_fmt() isn't needed because the core already includes the driver in the print. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 91a9236d19d7..6a234fdb7e8e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -34,12 +34,6 @@ #define pr_fmt(fmt) "amdgpu: " fmt -#ifdef dev_fmt -#undef dev_fmt -#endif - ...
e6c7ebeaba4080562e71a59a788ac90b41e09240
Analyze and fix the following issue in the Linux kernel code: drm/amd: Add correct prefix for VBIOS message
Problem Details: It's not obvious which GPU the ATOM BIOS message goes with. Use drm_info() to show the correct one. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c index 7a063e44d429..371ee82a8912 100644 --- a/drivers/gpu/drm/amd/amdgpu/atom.c +++ b/drivers/gpu/drm/amd/amdgpu/atom.c @@ -1463,7 +1463,7 @@ static void atom_get_vbios_pn(struct atom_context *ctx) ctx->vbios_pn[count] = 0; ...
31dc58adda9874420ab8fa5a2f9c43377745753a
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix signal_eviction_fence() bool return value
Problem Details: signal_eviction_fence() is declared to return bool, but returns -EINVAL when no eviction fence is present. This makes the "no fence" or "the NULL-fence" path evaluate to true and triggers a Smatch warning. v2: Return true instead to explicitly indicate that there is no eviction fence to signal and th...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index adffa44fff2c..593b3af10241 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -2096,7 +2096,7 @@ static int signal_eviction_fence(struct kfd_process *p) e...
5c5189cf4b0cc0a22bac74a40743ee711cff07f8
Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix wrong pcie parameter on navi1x
Problem Details: fix wrong pcie dpm parameter on navi1x Fixes: 1a18607c07bb ("drm/amd/pm: override pcie dpm parameters only if it is necessary") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4671 Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Co-developed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off...
```diff diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 882830770b79..0c26fe6fb949 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -2216,8 +2216,8 @@ static int navi10_update_pcie_p...
11194b416ef95012c2cfe5f546d71af07b639e93
Analyze and fix the following issue in the Linux kernel code: libceph: reset sparse-read state in osd_fault()
Problem Details: When a fault occurs, the connection is abandoned, reestablished, and any pending operations are retried. The OSD client tracks the progress of a sparse-read reply using a separate state machine, largely independent of the messenger's state. If a connection is lost mid-payload or the sparse-read state ...
```diff diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 3667319b949d..1a7be2f615dc 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -4281,6 +4281,9 @@ static void osd_fault(struct ceph_connection *con) goto out_unlock; } + osd->o_sparse_op_idx = -1; + ceph_init_sparse_read(&osd-...
e84b48d31b5008932c0a0902982809fbaa1d3b70
Analyze and fix the following issue in the Linux kernel code: libceph: return the handler error from mon_handle_auth_done()
Problem Details: Currently any error from ceph_auth_handle_reply_done() is propagated via finish_auth() but isn't returned from mon_handle_auth_done(). This results in higher layers learning that (despite the monitor considering us to be successfully authenticated) something went wrong in the authentication phase and ...
```diff diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index c227ececa925..fa8dd2a20f7d 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -1417,7 +1417,7 @@ static int mon_handle_auth_done(struct ceph_connection *con, if (!ret) finish_hunting(monc); mutex_unlock(&monc->mutex); - retur...
e0392a10c9e80a3991855a81317da3039fcbe32c
Analyze and fix the following issue in the Linux kernel code: io_uring/io-wq: fix incorrect io_wq_for_each_worker() termination logic
Problem Details: A previous commit added this helper, and had it terminate if false is returned from the handler. However, that is completely opposite, it should abort the loop if true is returned. Fix this up by having io_wq_for_each_worker() keep iterating as long as false is returned, and only abort if true is retu...
```diff diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index cd13d8aac3d2..6c5ef629e59a 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -952,11 +952,11 @@ static bool io_wq_for_each_worker(struct io_wq *wq, void *data) { for (int i = 0; i < IO_WQ_ACCT_NR; i++) { - if (!io_acct_for_each_worker(&wq->...
8644084a74a4573278d6f454c6638ccd5965f4e2
Analyze and fix the following issue in the Linux kernel code: drm/amd: Drop "amdgpu kernel modesetting enabled" message
Problem Details: The behavior for amdgpu was changed with commit e00e5c223878 ("drm/amdgpu: adjust drm_firmware_drivers_only() handling") to potentially allow loading even if nomodeset was set, so the message is no longer accurate. Just drop it to avoid confusion. Fixes: e00e5c223878 ("drm/amdgpu: adjust drm_firmware...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 848e6b7db482..1325275dfbd6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -3164,7 +3164,6 @@ static int __init amdgpu_init(void) if (r) goto error_fenc...
15dd20dda979ebab72f6df97845828e78d63ab91
Analyze and fix the following issue in the Linux kernel code: arm64: kernel: initialize missing kexec_buf->random field
Problem Details: Commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly") introduced the kexec_buf->random field to enable random placement of kexec_buf. However, this field was never properly initialized for kexec images that do not need to be placed randomly, leading to the following UBSAN warning: [ ...
```diff diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_image.c index 532d72ea42ee..b70f4df15a1a 100644 --- a/arch/arm64/kernel/kexec_image.c +++ b/arch/arm64/kernel/kexec_image.c @@ -41,7 +41,7 @@ static void *image_load(struct kimage *image, struct arm64_image_header *h; u64 flags, value; ...
47ae1f938d1259d1e10e885dc64fe93f92f0ac7c
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: add support for GC IP version 11.5.4
Problem Details: This initializes GC IP version 11.5.4. v2: squash in RLC offset fix Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Tim Huang <tim.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index 20d05a3e4516..116cb437c81b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c @@ -1988,6 +1988,7 @@ static int amdgpu_discovery_set_common_...
bc35ae1a09ca02c25df54327fb1e7a09d2556e1a
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix xcc_id input for soc_v1_0_grbm_select
Problem Details: Ensure the GRBM_GFX_CNTL is programmed correctly Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c index 321ca7ac2693..64b949195587 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c @@ -1448,7 +1448,7 @@ static void gfx_v12_1_xcc_constants_init(struct amdgpu_device *adev...