From: Greg Kroah-Hartman Date: Mon, 14 Mar 2022 08:12:19 +0000 (+0100) Subject: 5.16-stable patches X-Git-Tag: v4.9.307~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28143558f47ab983a772927841cc5ac07188641f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.16-stable patches added patches: drm-panel-select-drm_dp_helper-for-drm_panel_edp.patch perf-parse-fix-event-parser-error-for-hybrid-systems.patch --- diff --git a/queue-5.16/drm-panel-select-drm_dp_helper-for-drm_panel_edp.patch b/queue-5.16/drm-panel-select-drm_dp_helper-for-drm_panel_edp.patch new file mode 100644 index 00000000000..d4fe523ccf7 --- /dev/null +++ b/queue-5.16/drm-panel-select-drm_dp_helper-for-drm_panel_edp.patch @@ -0,0 +1,55 @@ +From 3755d35ee1d2454b20b8a1e20d790e56201678a4 Mon Sep 17 00:00:00 2001 +From: Thomas Zimmermann +Date: Thu, 3 Feb 2022 10:39:22 +0100 +Subject: drm/panel: Select DRM_DP_HELPER for DRM_PANEL_EDP + +From: Thomas Zimmermann + +commit 3755d35ee1d2454b20b8a1e20d790e56201678a4 upstream. + +As reported in [1], DRM_PANEL_EDP depends on DRM_DP_HELPER. Select +the option to fix the build failure. The error message is shown +below. + + arm-linux-gnueabihf-ld: drivers/gpu/drm/panel/panel-edp.o: in function + `panel_edp_probe': panel-edp.c:(.text+0xb74): undefined reference to + `drm_panel_dp_aux_backlight' + make[1]: *** [/builds/linux/Makefile:1222: vmlinux] Error 1 + +The issue has been reported before, when DisplayPort helpers were +hidden behind the option CONFIG_DRM_KMS_HELPER. [2] + +v2: + * fix and expand commit description (Arnd) + +Signed-off-by: Thomas Zimmermann +Fixes: 9d6366e743f3 ("drm: fb_helper: improve CONFIG_FB dependency") +Reported-by: Naresh Kamboju +Reported-by: Linux Kernel Functional Testing +Reviewed-by: Lyude Paul +Acked-by: Sam Ravnborg +Link: https://lore.kernel.org/dri-devel/CA+G9fYvN0NyaVkRQmA1O6rX7H8PPaZrUAD7=RDy33QY9rUU-9g@mail.gmail.com/ # [1] +Link: https://lore.kernel.org/all/20211117062704.14671-1-rdunlap@infradead.org/ # [2] +Cc: Thomas Zimmermann +Cc: Lyude Paul +Cc: Daniel Vetter +Cc: Maarten Lankhorst +Cc: Maxime Ripard +Cc: dri-devel@lists.freedesktop.org +Link: https://patchwork.freedesktop.org/patch/msgid/20220203093922.20754-1-tzimmermann@suse.de +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/panel/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -95,6 +95,7 @@ config DRM_PANEL_EDP + depends on PM + select VIDEOMODE_HELPERS + select DRM_DP_AUX_BUS ++ select DRM_DP_HELPER + help + DRM panel driver for dumb eDP panels that need at most a regulator and + a GPIO to be powered up. Optionally a backlight can be attached so diff --git a/queue-5.16/perf-parse-fix-event-parser-error-for-hybrid-systems.patch b/queue-5.16/perf-parse-fix-event-parser-error-for-hybrid-systems.patch new file mode 100644 index 00000000000..a83bb6f5881 --- /dev/null +++ b/queue-5.16/perf-parse-fix-event-parser-error-for-hybrid-systems.patch @@ -0,0 +1,118 @@ +From 91c9923a473a694eb1c5c01ab778a77114969707 Mon Sep 17 00:00:00 2001 +From: Zhengjun Xing +Date: Mon, 7 Mar 2022 23:16:27 +0800 +Subject: perf parse: Fix event parser error for hybrid systems + +From: Zhengjun Xing + +commit 91c9923a473a694eb1c5c01ab778a77114969707 upstream. + +This bug happened on hybrid systems when both cpu_core and cpu_atom +have the same event name such as "UOPS_RETIRED.MS" while their event +terms are different, then during perf stat, the event for cpu_atom +will parse fail and then no output for cpu_atom. + +UOPS_RETIRED.MS -> cpu_core/period=0x1e8483,umask=0x4,event=0xc2,frontend=0x8/ +UOPS_RETIRED.MS -> cpu_atom/period=0x1e8483,umask=0x1,event=0xc2/ + +It is because event terms in the "head" of parse_events_multi_pmu_add +will be changed to event terms for cpu_core after parsing UOPS_RETIRED.MS +for cpu_core, then when parsing the same event for cpu_atom, it still +uses the event terms for cpu_core, but event terms for cpu_atom are +different with cpu_core, the event parses for cpu_atom will fail. This +patch fixes it, the event terms should be parsed from the original +event. + +This patch can work for the hybrid systems that have the same event +in more than 2 PMUs. It also can work in non-hybrid systems. + +Before: + + # perf stat -v -e UOPS_RETIRED.MS -a sleep 1 + + Using CPUID GenuineIntel-6-97-1 + UOPS_RETIRED.MS -> cpu_core/period=0x1e8483,umask=0x4,event=0xc2,frontend=0x8/ + Control descriptor is not initialized + UOPS_RETIRED.MS: 2737845 16068518485 16068518485 + + Performance counter stats for 'system wide': + + 2,737,845 cpu_core/UOPS_RETIRED.MS/ + + 1.002553850 seconds time elapsed + +After: + + # perf stat -v -e UOPS_RETIRED.MS -a sleep 1 + + Using CPUID GenuineIntel-6-97-1 + UOPS_RETIRED.MS -> cpu_core/period=0x1e8483,umask=0x4,event=0xc2,frontend=0x8/ + UOPS_RETIRED.MS -> cpu_atom/period=0x1e8483,umask=0x1,event=0xc2/ + Control descriptor is not initialized + UOPS_RETIRED.MS: 1977555 16076950711 16076950711 + UOPS_RETIRED.MS: 568684 8038694234 8038694234 + + Performance counter stats for 'system wide': + + 1,977,555 cpu_core/UOPS_RETIRED.MS/ + 568,684 cpu_atom/UOPS_RETIRED.MS/ + + 1.004758259 seconds time elapsed + +Fixes: fb0811535e92c6c1 ("perf parse-events: Allow config on kernel PMU events") +Reviewed-by: Kan Liang +Signed-off-by: Zhengjun Xing +Cc: Adrian Hunter +Cc: Alexander Shishkin +Cc: Andi Kleen +Cc: Ian Rogers +Cc: Ingo Molnar +Cc: Jiri Olsa +Cc: Peter Zijlstra +Link: https://lore.kernel.org/r/20220307151627.30049-1-zhengjun.xing@linux.intel.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/parse-events.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c +index dfb50a5f83d0..24997925ae00 100644 +--- a/tools/perf/util/parse-events.c ++++ b/tools/perf/util/parse-events.c +@@ -1648,6 +1648,7 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state, + { + struct parse_events_term *term; + struct list_head *list = NULL; ++ struct list_head *orig_head = NULL; + struct perf_pmu *pmu = NULL; + int ok = 0; + char *config; +@@ -1674,7 +1675,6 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state, + } + list_add_tail(&term->list, head); + +- + /* Add it for all PMUs that support the alias */ + list = malloc(sizeof(struct list_head)); + if (!list) +@@ -1687,13 +1687,15 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state, + + list_for_each_entry(alias, &pmu->aliases, list) { + if (!strcasecmp(alias->name, str)) { ++ parse_events_copy_term_list(head, &orig_head); + if (!parse_events_add_pmu(parse_state, list, +- pmu->name, head, ++ pmu->name, orig_head, + true, true)) { + pr_debug("%s -> %s/%s/\n", str, + pmu->name, alias->str); + ok++; + } ++ parse_events_terms__delete(orig_head); + } + } + } +-- +2.35.1 + diff --git a/queue-5.16/series b/queue-5.16/series index 35a63f175e0..1a698eca9ed 100644 --- a/queue-5.16/series +++ b/queue-5.16/series @@ -115,3 +115,5 @@ x86-boot-add-setup_indirect-support-in-early_memremap_is_setup_data.patch x86-module-fix-the-paravirt-vs-alternative-order.patch x86-sgx-free-backing-memory-after-faulting-the-enclave-page.patch x86-traps-mark-do_int3-nokprobe_symbol.patch +drm-panel-select-drm_dp_helper-for-drm_panel_edp.patch +perf-parse-fix-event-parser-error-for-hybrid-systems.patch