drm/bridge: tc358762: Instruct DSI host to generate HSE packets
Subsystems (6)
Sasha Levin
maintainerPATCH 1/22 drm/bridge: tc358762: Instruct DSI host to generate HSE packets
From: Marek Vasut <[email protected]>
[ Upstream commit 362fa8f6e6a05089872809f4465bab9d011d05b3 ]
This bridge seems to need the HSE packet, otherwise the image is shifted up and corrupted at the bottom. This makes the bridge work with Samsung DSIM on i.MX8MM and i.MX8MP.
--- drivers/gpu/drm/bridge/tc358762.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/tc358762.c +1 -1
@@ -216,7 +216,7 @@ static int tc358762_probe(struct mipi_dsi_device *dsi) dsi->lanes =1 ; dsi->format =MIPI_DSI_FMT_RGB888 ; dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_SYNC_PULSE | -MIPI_DSI_MODE_LPM ; +MIPI_DSI_MODE_LPM |MIPI_DSI_MODE_VIDEO_HSE ; ret =tc358762_parse_dt (ctx);if (ret <0 )
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 2/22 drm/edid: Add quirk for OSVR HDK 2.0
From: Ralph Campbell <[email protected]>
[ Upstream commit 98d4cb705bc00afd4a9a71cc1e84f7111682639a ]
The OSVR virtual reality headset HDK 2.0 uses a different EDID vendor and device identifier than the HDK 1.1 - 1.4 headsets. Add the HDK 2.0 vendor and device identifier to the quirks table so that window managers do not try to display the desktop screen on the headset display.
--- drivers/gpu/drm/drm_edid.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_edid.c +1 -0
@@ -231,6 +231,7 @@ static const struct edid_quirk {/* OSVR HDK and HDK2 VR Headsets */ EDID_QUIRK ('S' ,'V' ,'R' ,0x1019 ,EDID_QUIRK_NON_DESKTOP ), + EDID_QUIRK('A', 'U', 'O', 0x1111, EDID_QUIRK_NON_DESKTOP), };/*
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 3/22 arm64: dts: qcom: sm6125-pdx201: correct ramoops pmsg-size
In reply to Sasha LevinFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit c42f5452de6ad2599c6e5e2a64c180a4ac835d27 ]
There is no 'msg-size' property in ramoops, so assume intention was for 'pmsg-size':
sm6125-sony-xperia-seine-pdx201.dtb: ramoops@ffc00000: Unevaluated properties are not allowed ('msg-size' was unexpected)
--- arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts +1 -1
@@ -73,7 +73,7 @@ pstore_mem: ramoops@ffc00000 { reg = <0x0 0xffc40000 0x0 0xc0000>; record-size = <0x1000>; console-size = <0x40000>; - msg-size = <0x20000 0x20000>; + pmsg-size = <0x20000>; }; cmdline_mem: memory@ffd00000 {
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 4/22 arm64: dts: qcom: sm6350: correct ramoops pmsg-size
In reply to Sasha LevinFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit c86b97a72065e06eacb993dc71fa9febc93422af ]
There is no 'msg-size' property in ramoops, so assume intention was for 'pmsg-size':
sm6350-sony-xperia-lena-pdx213.dtb: ramoops@ffc00000: Unevaluated properties are not allowed ('msg-size' was unexpected)
--- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6350.dtsi +1 -1
@@ -346,7 +346,7 @@ ramoops: ramoops@ffc00000 { reg = <0 0xffc00000 0 0x100000>; record-size = <0x1000>; console-size = <0x40000>; - msg-size = <0x20000 0x20000>; + pmsg-size = <0x20000>; ecc-size = <16>; no-map; };
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 5/22 arm64: dts: qcom: sm8150-kumano: correct ramoops pmsg-size
In reply to Sasha LevinFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 4e6b942f092653ebcdbbc0819b2d1f08ab415bdc ]
There is no 'msg-size' property in ramoops, so assume intention was for 'pmsg-size':
sm8150-sony-xperia-kumano-griffin.dtb: ramoops@ffc00000: Unevaluated properties are not allowed ('msg-size' was unexpected)
--- arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi +1 -1
@@ -127,7 +127,7 @@ ramoops@ffc00000 { reg = <0x0 0xffc00000 0x0 0x100000>; record-size = <0x1000>; console-size = <0x40000>; - msg-size = <0x20000 0x20000>; + pmsg-size = <0x20000>; ecc-size = <16>; no-map; };
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 6/22 arm64: dts: qcom: sm8250-edo: correct ramoops pmsg-size
In reply to Sasha LevinFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 7dc3606f91427414d00a2fb09e6e0e32c14c2093 ]
There is no 'msg-size' property in ramoops, so assume intention was for 'pmsg-size':
sm8250-sony-xperia-edo-pdx206.dtb: ramoops@ffc00000: Unevaluated properties are not allowed ('msg-size' was unexpected)
--- arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi +1 -1
@@ -112,7 +112,7 @@ ramoops@ffc00000 { reg = <0x0 0xffc00000 0x0 0x100000>; record-size = <0x1000>; console-size = <0x40000>; - msg-size = <0x20000 0x20000>; + pmsg-size = <0x20000>; ecc-size = <16>; no-map; };
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 7/22 samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'
In reply to Sasha LevinFrom: Rong Tao <[email protected]>
[ Upstream commit 910e230d5f1bb72c54532e94fbb1705095c7bab6 ]
Macro symbol_put() is defined as __symbol_put(__stringify(x))
ksym_name = "jiffies"
symbol_put(ksym_name)
will be resolved as
__symbol_put("ksym_name")which is clearly wrong. So symbol_put must be replaced with __symbol_put.
When we uninstall hw_breakpoint.ko (rmmod), a kernel bug occurs with the following error:
[11381.854152] kernel BUG at kernel/module/main.c:779! [11381.854159] invalid opcode: 0000 [#2] PREEMPT SMP PTI [11381.854163] CPU: 8 PID: 59623 Comm: rmmod Tainted: G D OE 6.2.9-200.fc37.x86_64 #1 [11381.854167] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./B360M-HDV, BIOS P3.20 10/23/2018 [11381.854169] RIP: 0010:__symbol_put+0xa2/0xb0 [11381.854175] Code: 00 e8 92 d2 f7 ff 65 8b 05 c3 2f e6 78 85 c0 74 1b 48 8b 44 24 30 65 48 2b 04 25 28 00 00 00 75 12 48 83 c4 38 c3 cc cc cc cc <0f> 0b 0f 1f 44 00 00 eb de e8 c0 df d8 00 90 90 90 90 90 90 90 90 [11381.854178] RSP: 0018:ffffad8ec6ae7dd0 EFLAGS: 00010246 [11381.854181] RAX: 0000000000000000 RBX: ffffffffc1fd1240 RCX: 000000000000000c [11381.854184] RDX: 000000000000006b RSI: ffffffffc02bf7c7 RDI: ffffffffc1fd001c [11381.854186] RBP: 000055a38b76e7c8 R08: ffffffff871ccfe0 R09: 0000000000000000 [11381.854188] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [11381.854190] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [11381.854192] FS: 00007fbf7c62c740(0000) GS:ffff8c5badc00000(0000) knlGS:0000000000000000 [11381.854195] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [11381.854197] CR2: 000055a38b7793f8 CR3: 0000000363e1e001 CR4: 00000000003726e0 [11381.854200] DR0: ffffffffb3407980 DR1: 0000000000000000 DR2: 0000000000000000 [11381.854202] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [11381.854204] Call Trace: [11381.854207] <TASK> [11381.854212] s_module_exit+0xc/0xff0 [symbol_getput] [11381.854219] __do_sys_delete_module.constprop.0+0x198/0x2f0 [11381.854225] do_syscall_64+0x58/0x80 [11381.854231] ? exit_to_user_mode_prepare+0x180/0x1f0 [11381.854237] ? syscall_exit_to_user_mode+0x17/0x40 [11381.854241] ? do_syscall_64+0x67/0x80 [11381.854245] ? syscall_exit_to_user_mode+0x17/0x40 [11381.854248] ? do_syscall_64+0x67/0x80 [11381.854252] ? exc_page_fault+0x70/0x170 [11381.854256] entry_SYSCALL_64_after_hwframe+0x72/0xdc
--- samples/hw_breakpoint/data_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
samples/hw_breakpoint/data_breakpoint.c +1 -1
@@ -70,7 +70,7 @@ static int __init hw_break_module_init(void) static void __exit hw_break_module_exit(void) {unregister_wide_hw_breakpoint (sample_hbp); -symbol_put (ksym_name); +__symbol_put (ksym_name);printk (KERN_INFO "HW Breakpoint for %s write uninstalled\n" , ksym_name); }
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 8/22 drm/amd/display: Read down-spread percentage from lut to adjust dprefclk.
In reply to Sasha LevinFrom: Martin Tsai <[email protected]>
[ Upstream commit 6917b0b711713b9d84d7e0844e9aa613997a51b2 ]
[Why]
Panels show corruption with high refresh rate timings when ss is enabled.
[How]
Read down-spread percentage from lut to adjust dprefclk.
--- .../dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 33 +++++++++++++++++-- .../dc/clk_mgr/dcn314/dcn314_clk_mgr.h | 7 ++++ 2 files changed, 38 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c +31 -2
@@ -87,6 +87,14 @@ static const struct IP_BASE CLK_BASE = { { { { 0x00016C00, 0x02401800, 0, 0, 0,#define CLK1_CLK_PLL_REQ__PllSpineDiv_MASK 0x0000F000L#define CLK1_CLK_PLL_REQ__FbMult_frac_MASK 0xFFFF0000L +#define regCLK1_CLK2_BYPASS_CNTL 0x029c +#define regCLK1_CLK2_BYPASS_CNTL_BASE_IDX 0 + +#define CLK1_CLK2_BYPASS_CNTL__CLK2_BYPASS_SEL__SHIFT 0x0 +#define CLK1_CLK2_BYPASS_CNTL__LK2_BYPASS_DIV__SHIFT 0x10 +#define CLK1_CLK2_BYPASS_CNTL__CLK2_BYPASS_SEL_MASK 0x00000007L +#define CLK1_CLK2_BYPASS_CNTL__LK2_BYPASS_DIV_MASK 0x000F0000L +#define REG (reg_name) \ (CLK_BASE.instance[0].segment[reg ## reg_name ## _BASE_IDX] + reg ## reg_name)
@@ -440,6 +448,11 @@ static DpmClocks314_t dummy_clocks;static struct dcn314_watermarks dummy_wms = {0 }; +static struct dcn314_ss_info_table ss_info_table = { + .ss_divider =1000 , + .ss_percentage = {0 ,0 ,375 ,375 ,375 } +}; +static void dcn314_build_watermark_ranges (struct clk_bw_params *bw_params,struct dcn314_watermarks *table) {int i, num_valid_sets;
@@ -719,6 +732,20 @@ static struct clk_mgr_funcs dcn314_funcs = { };extern struct clk_mgr_funcs dcn3_fpga_funcs; +static void dcn314_read_ss_info_from_lut (struct clk_mgr_internal *clk_mgr) +{ +uint32_t clock_source; + +REG_GET (CLK1_CLK2_BYPASS_CNTL ,CLK2_BYPASS_SEL , &clock_source); + + clk_mgr->dprefclk_ss_percentage = ss_info_table.ss_percentage[clock_source]; + +if (clk_mgr->dprefclk_ss_percentage !=0 ) { + clk_mgr->ss_on_dprefclk = true; + clk_mgr->dprefclk_ss_divider = ss_info_table.ss_divider; + } +} + void dcn314_clk_mgr_construct( struct dc_context *ctx, struct clk_mgr_dcn314 *clk_mgr,
@@ -791,9 +818,11 @@ void dcn314_clk_mgr_construct( clk_mgr->base.base.dprefclk_khz =600000 ; clk_mgr->base.base.clks.ref_dtbclk_khz =600000 ; -dce_clock_read_ss_info (&clk_mgr->base); + +dcn314_read_ss_info_from_lut (&clk_mgr->base);/*if bios enabled SS, driver needs to adjust dtb clock, only enable with correct bios*/ -//clk_mgr->base.dccg->ref_dtbclk_khz = dce_adjust_dp_ref_freq_for_ss(clk_mgr_internal, clk_mgr->base.base.dprefclk_khz); + clk_mgr->base.base.dprefclk_khz = +dce_adjust_dp_ref_freq_for_ss (&clk_mgr->base, clk_mgr->base.base.dprefclk_khz); clk_mgr->base.base.bw_params = &dcn314_bw_params;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.h +7 -0
@@ -28,6 +28,8 @@#define __DCN314_CLK_MGR_H__#include "clk_mgr_internal.h" +#define NUM_CLOCK_SOURCES 5 +struct dcn314_watermarks ;struct dcn314_smu_watermark_set {
@@ -40,6 +42,11 @@ struct clk_mgr_dcn314 {struct dcn314_smu_watermark_set smu_wm_set; }; +struct dcn314_ss_info_table { +uint32_t ss_divider; +uint32_t ss_percentage[NUM_CLOCK_SOURCES ]; +}; +bool dcn314_are_clock_states_equal (struct dc_clocks *a,struct dc_clocks *b);
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 9/22 drm/amd/display: Fix underflow issue on 175hz timing
In reply to Sasha LevinFrom: Leo Ma <[email protected]>
[ Upstream commit 735688eb905db529efea0c78466fccc1461c3fde ]
[Why]
Screen underflows happen on 175hz timing for 3 plane overlay case.
[How]
Based on dst y prefetch value clamp to equ or oto for bandwidth calculation.
--- .../amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +6 -1
@@ -3454,6 +3454,7 @@ bool dml32_CalculatePrefetchSchedule(double TimeForFetchingMetaPTE =0 ;double TimeForFetchingRowInVBlank =0 ;double LinesToRequestPrefetchPixelData =0 ; +double LinesForPrefetchBandwidth =0 ;unsigned int HostVMDynamicLevelsTrips;double trip_to_mem;double Tvm_trips;
@@ -3883,11 +3884,15 @@ bool dml32_CalculatePrefetchSchedule( TimeForFetchingMetaPTE = Tvm_oto; TimeForFetchingRowInVBlank = Tr0_oto; *PrefetchBandwidth = prefetch_bw_oto; +/* Clamp to oto for bandwidth calculation */ + LinesForPrefetchBandwidth = dst_y_prefetch_oto; }else { *DestinationLinesForPrefetch = dst_y_prefetch_equ; TimeForFetchingMetaPTE = Tvm_equ; TimeForFetchingRowInVBlank = Tr0_equ; *PrefetchBandwidth = prefetch_bw_equ; +/* Clamp to equ for bandwidth calculation */ + LinesForPrefetchBandwidth = dst_y_prefetch_equ; } *DestinationLinesToRequestVMInVBlank =dml_ceil (4.0 * TimeForFetchingMetaPTE / LineTime,1.0 ) /4.0 ;
@@ -3895,7 +3900,7 @@ bool dml32_CalculatePrefetchSchedule( *DestinationLinesToRequestRowInVBlank =dml_ceil (4.0 * TimeForFetchingRowInVBlank / LineTime,1.0 ) /4.0 ; - LinesToRequestPrefetchPixelData = *DestinationLinesForPrefetch - + LinesToRequestPrefetchPixelData = LinesForPrefetchBandwidth - *DestinationLinesToRequestVMInVBlank -2 * *DestinationLinesToRequestRowInVBlank;#ifdef __DML_VBA_DEBUG__
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 10/22 drm/vkms: Fix race-condition between the hrtimer and the atomic commit
In reply to Sasha LevinFrom: Maíra Canal <[email protected]>
[ Upstream commit a0e6a017ab56936c0405fe914a793b241ed25ee0 ]
Currently, it is possible for the composer to be set as enabled and then as disabled without a proper call for the vkms_vblank_simulate(). This is problematic, because the driver would skip one CRC output, causing CRC tests to fail. Therefore, we need to make sure that, for each time the composer is set as enabled, a composer job is added to the queue.
In order to provide this guarantee, add a mutex that will lock before the composer is set as enabled and will unlock only after the composer job is added to the queue. This way, we can have a guarantee that the driver won't skip a CRC entry.
This race-condition is affecting the IGT test "writeback-check-output", making the test fail and also, leaking writeback framebuffers, as the writeback job is queued, but it is not signaled. This patch avoids both problems.
[v2]:
* Create a new mutex and keep the spinlock across the atomic commit in order to avoid interrupts that could result in deadlocks.
--- drivers/gpu/drm/vkms/vkms_composer.c | 9 +++++++-- drivers/gpu/drm/vkms/vkms_crtc.c | 9 +++++---- drivers/gpu/drm/vkms/vkms_drv.h | 4 +++- 3 files changed, 15 insertions(+), 7 deletions(-)
drivers/gpu/drm/vkms/vkms_composer.c +7 -2
@@ -296,10 +296,15 @@ void vkms_set_composer(struct vkms_output *out, bool enabled)if (enabled)drm_crtc_vblank_get (&out->crtc); -spin_lock_irq (&out->lock); +mutex_lock (&out->enabled_lock); old_enabled = out->composer_enabled; out->composer_enabled = enabled; -spin_unlock_irq (&out->lock); + +/* the composition wasn't enabled, so unlock the lock to make sure the lock +* will be balanced even if we have a failed commit +*/ +if (!out->composer_enabled) +mutex_unlock (&out->enabled_lock);if (old_enabled)drm_crtc_vblank_put (&out->crtc);
drivers/gpu/drm/vkms/vkms_crtc.c +5 -4
@@ -16,7 +16,7 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)struct drm_crtc *crtc = &output->crtc;struct vkms_crtc_state *state;u64 ret_overrun; -bool ret, fence_cookie; +bool ret, fence_cookie, composer_enabled; fence_cookie =dma_fence_begin_signalling ();
@@ -25,15 +25,15 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)if (ret_overrun !=1 )pr_warn ("%s: vblank timer overrun\n" , __func__); -spin_lock (&output->lock); ret =drm_crtc_handle_vblank (crtc);if (!ret)DRM_ERROR ("vkms failure on handling vblank" ); state = output->composer_state; -spin_unlock (&output->lock); + composer_enabled = output->composer_enabled; +mutex_unlock (&output->enabled_lock); -if (state && output->composer_enabled) { +if (state && composer_enabled) {u64 frame =drm_crtc_accurate_vblank_count (crtc);/* update frame_start only if a queued vkms_composer_worker()
@@ -293,6 +293,7 @@ int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,spin_lock_init (&vkms_out->lock);spin_lock_init (&vkms_out->composer_lock); +mutex_init (&vkms_out->enabled_lock); vkms_out->composer_workq =alloc_ordered_workqueue ("vkms_composer" ,0 );if (!vkms_out->composer_workq)
drivers/gpu/drm/vkms/vkms_drv.h +3 -1
@@ -98,8 +98,10 @@ struct vkms_output {struct workqueue_struct *composer_workq;/* protects concurrent access to composer */ spinlock_t lock; +/* guarantees that if the composer is enabled, a job will be queued */ +struct mutex enabled_lock; -/* protected by @lock */ +/* protected by @enabled_lock */ bool composer_enabled;struct vkms_crtc_state *composer_state;
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 11/22 ASoC: SOF: topology: simplify code to prevent static analysis warnings
In reply to Sasha LevinFrom: Pierre-Louis Bossart <[email protected]>
[ Upstream commit 55cb3dc271d81f1982c949a2ac483a6daf613b92 ]
make KCFLAGS='-fanalyzer' sound/soc/sof/intel/ reports a possible NULL pointer dereference.
sound/soc/sof/topology.c:1136:21: error: dereference of NULL ‘w’ [CWE-476] [-Werror=analyzer-null-dereference]
1136 | strcmp(w->sname, rtd->dai_link->stream_name))
The code is rather confusing and can be simplified to make static analysis happy. No functionality change.
--- sound/soc/sof/topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/sof/topology.c +3 -2
@@ -1086,16 +1086,17 @@ static void sof_disconnect_dai_widget(struct snd_soc_component *scomp, {struct snd_soc_card *card = scomp->card;struct snd_soc_pcm_runtime *rtd; +const char *sname = w->sname;struct snd_soc_dai *cpu_dai;int i; -if (!w->sname) +if (!sname)return ;list_for_each_entry (rtd, &card->rtd_list, list) {/* does stream match DAI link ? */ if (!rtd->dai_link->stream_name || -strcmp (w->sname, rtd->dai_link->stream_name)) +strcmp (sname, rtd->dai_link->stream_name))continue ;switch (w->id) {
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 12/22 ASoC: Intel: sof_sdw: Update BT offload config for soundwire config
In reply to Sasha LevinFrom: Uday M Bhat <[email protected]>
[ Upstream commit a14aded9299187bb17ef90700eb2cf1120ef5885 ]
For soundwire config, SSP1 is used for BT offload. This is enabled in sof_sdw_quirk_table
--- sound/soc/intel/boards/sof_sdw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/intel/boards/sof_sdw.c +3 -1
@@ -388,7 +388,9 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {DMI_MATCH (DMI_SYS_VENDOR ,"Google" ), DMI_MATCH(DMI_PRODUCT_NAME, "Rex"), }, - .driver_data = (void *)(SOF_SDW_PCH_DMIC), + .driver_data = (void *)(SOF_SDW_PCH_DMIC | +SOF_BT_OFFLOAD_SSP (1 ) | + SOF_SSP_BT_OFFLOAD_PRESENT), }, /* LunarLake devices */ {
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 13/22 ALSA: hda: intel-dsp-cfg: add LunarLake support
In reply to Sasha LevinFrom: Pierre-Louis Bossart <[email protected]>
[ Upstream commit d2852b8c045ebd31d753b06f2810df5be30ed56a ]
One more PCI ID for the road.
--- sound/hda/intel-dsp-config.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/hda/intel-dsp-config.c +8 -0
@@ -481,6 +481,14 @@ static const struct config_entry config_table[] = { },#endif +/* Lunar Lake */ +#if IS_ENABLED (CONFIG_SND_SOC_SOF_LUNARLAKE ) +/* Lunarlake-P */ + { + .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, + .device = PCI_DEVICE_ID_INTEL_HDA_LNL_P, + }, +#endif };static const struct config_entry *snd_intel_dsp_find_config
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 14/22 drm/amd/display: Use DTBCLK as refclk instead of DPREFCLK
In reply to Sasha LevinFrom: Austin Zheng <[email protected]>
[ Upstream commit 4a30cc2bd281fa176a68b5305cd3695d636152ad ]
[Why]
Flash of corruption observed when UCLK switching after transitioning from DTBCLK to DPREFCLK on subVP(DP) + subVP(HDMI) config Scenario where DPREFCLK is required instead of DTBCLK is not expected
[How]
Always set the DTBCLK source as DTBCLK0
--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c +2 -1
@@ -290,7 +290,8 @@ static void dccg32_set_dpstreamclk(struct dcn_dccg *dccg_dcn =TO_DCN_DCCG (dccg);/* set the dtbclk_p source */ -dccg32_set_dtbclk_p_src (dccg, src, otg_inst); +/* always program refclk as DTBCLK. No use-case expected to require DPREFCLK as refclk */ +dccg32_set_dtbclk_p_src (dccg,DTBCLK0 , otg_inst);/* enabled to select one of the DTBCLKs for pipe */ switch (dp_hpo_inst) {
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 15/22 drm/amd/display: Blocking invalid 420 modes on HDMI TMDS for DCN31
In reply to Sasha LevinFrom: Leo Chen <[email protected]>
[ Upstream commit 026a71babf48efb6b9884a3a66fa31aec9e1ea54 ]
[Why & How]
HDMI TMDS does not have ODM support. Filtering 420 modes that exceed the 4096 FMT limitation on DCN31 will resolve intermittent corruptions issues.
--- .../gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c +3 -1
@@ -4133,7 +4133,9 @@ void dml31_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l }if (v->OutputFormat[k] == dm_420 && v->HActive[k] >DCN31_MAX_FMT_420_BUFFER_WIDTH && v->ODMCombineEnablePerState[i][k] != dm_odm_combine_mode_4to1) { -if (v->HActive[k] /2 >DCN31_MAX_FMT_420_BUFFER_WIDTH ) { +if (v->Output[k] == dm_hdmi) { + FMTBufferExceeded = true; + }else if (v->HActive[k] /2 >DCN31_MAX_FMT_420_BUFFER_WIDTH ) { v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_4to1; v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine4To1;
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 16/22 drm/amd/display: Blocking invalid 420 modes on HDMI TMDS for DCN314
In reply to Sasha LevinFrom: Leo Chen <[email protected]>
[ Upstream commit 4c6107a653ccf361cb1b6ba35d558a1a5e6e57ac ]
[Why & How]
HDMI TMDS does not have ODM support. Filtering 420 modes that exceed the 4096 FMT limitation on DCN314 will resolve intermittent corruptions issues.
--- .../gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c +3 -1
@@ -4225,7 +4225,9 @@ void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_ }if (v->OutputFormat[k] == dm_420 && v->HActive[k] >DCN314_MAX_FMT_420_BUFFER_WIDTH && v->ODMCombineEnablePerState[i][k] != dm_odm_combine_mode_4to1) { -if (v->HActive[k] /2 >DCN314_MAX_FMT_420_BUFFER_WIDTH ) { +if (v->Output[k] == dm_hdmi) { + FMTBufferExceeded = true; + }else if (v->HActive[k] /2 >DCN314_MAX_FMT_420_BUFFER_WIDTH ) { v->ODMCombineEnablePerState[i][k] = dm_odm_combine_mode_4to1; v->PlaneRequiredDISPCLK = v->PlaneRequiredDISPCLKWithODMCombine4To1;
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 17/22 drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
In reply to Sasha LevinFrom: Tuo Li <[email protected]>
[ Upstream commit 2e63972a2de14482d0eae1a03a73e379f1c3f44c ]
The variable crtc->state->event is often protected by the lock crtc->dev->event_lock when is accessed. However, it is accessed as a condition of an if statement in exynos_drm_crtc_atomic_disable() without holding the lock:
if (crtc->state->event && !crtc->state->active)
However, if crtc->state->event is changed to NULL by another thread right after the conditions of the if statement is checked to be true, a null-pointer dereference can occur in drm_crtc_send_vblank_event():
e->pipe = pipe;
To fix this possible null-pointer dereference caused by data race, the spin lock coverage is extended to protect the if statement as well as the function call to drm_crtc_send_vblank_event().
Added relevant link.
--- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +2 -3
@@ -39,13 +39,12 @@ static void exynos_drm_crtc_atomic_disable(struct drm_crtc *crtc,if (exynos_crtc->ops->atomic_disable) exynos_crtc->ops->atomic_disable (exynos_crtc); +spin_lock_irq (&crtc->dev->event_lock);if (crtc->state->event && !crtc->state->active) { -spin_lock_irq (&crtc->dev->event_lock);drm_crtc_send_vblank_event (crtc, crtc->state->event); -spin_unlock_irq (&crtc->dev->event_lock); - crtc->state->event =NULL ; } +spin_unlock_irq (&crtc->dev->event_lock); } static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 18/22 drm/mediatek: dp: Change logging to dev for mtk_dp_aux_transfer()
In reply to Sasha LevinFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit fd70e2019bfbcb0ed90c5e23839bf510ce6acf8f ]
Change logging from drm_{err,info}() to dev_{err,info}() in functions mtk_dp_aux_transfer() and mtk_dp_aux_do_transfer(): this will be essential to avoid getting NULL pointer kernel panics if any kind of error happens during AUX transfers happening before the bridge is attached.
This may potentially start happening in a later commit implementing aux-bus support, as AUX transfers will be triggered from the panel driver (for EDID) before the mtk-dp bridge gets attached, and it's done in preparation for the same.
--- drivers/gpu/drm/mediatek/mtk_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/mediatek/mtk_dp.c +3 -3
@@ -847,7 +847,7 @@ static int mtk_dp_aux_do_transfer(struct mtk_dp *mtk_dp, bool is_read, u8 cmd,u32 phy_status =mtk_dp_read (mtk_dp,MTK_DP_AUX_P0_3628 ) &AUX_RX_PHY_STATE_AUX_TX_P0_MASK ;if (phy_status !=AUX_RX_PHY_STATE_AUX_TX_P0_RX_IDLE ) { -drm_err (mtk_dp->drm_dev, +dev_err (mtk_dp->dev,"AUX Rx Aux hang, need SW reset\n" );return -EIO ; }
@@ -2057,7 +2057,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux, is_read = true;break ;default : -drm_err (mtk_aux->drm_dev,"invalid aux cmd = %d\n" , +dev_err (mtk_dp->dev,"invalid aux cmd = %d\n" , msg->request); ret = -EINVAL ; goto err;
@@ -2073,7 +2073,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux, to_access, &msg->reply);if (ret) { -drm_info (mtk_dp->drm_dev, +dev_info (mtk_dp->dev,"Failed to do AUX transfer: %d\n" , ret); goto err; }
Signature · 1 line
2.40.1
Re: [PATCH AUTOSEL 6.1 18/22] drm/mediatek: dp: Change logging to dev for mtk_dp_aux_transfer()
Hi!
Quoted 10 lines
From: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit
fd70e2019bfbcb0ed90c5e23839bf510ce6acf8f]Change logging from drm_{err,info}() to dev_{err,info}() in functions
mtk_dp_aux_transfer()andmtk_dp_aux_do_transfer(): this will be essential to avoid getting NULL pointer kernel panics if any kind of error happens during AUX transfers happening before the bridge is attached.
Quoted 4 lines
This may potentially start happening in a later commit implementing aux-bus support, as AUX transfers will be triggered from the panel driver (for EDID) before the mtk-dp bridge gets attached, and it's done in preparation for the same.
This is preparation for patches we are not going to apply to stable. Please drop.
BR,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Sasha Levin
maintainerPATCH 19/22 bus: ti-sysc: Configure uart quirks for k3 SoC
In reply to Sasha LevinFrom: Tony Lindgren <[email protected]>
[ Upstream commit 03a711d3cb83692733f865312f49e665c49de6de ]
Enable the uart quirks similar to the earlier SoCs. Let's assume we are likely going to need a k3 specific quirk mask separate from the earlier SoCs, so let's not start changing the revision register mask at this point.
Note that SYSC_QUIRK_LEGACY_IDLE will be needed until we can remove the need for pm_runtime_irq_safe() from 8250_omap driver.
--- drivers/bus/ti-sysc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/bus/ti-sysc.c +2 -0
@@ -1548,6 +1548,8 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE),SYSC_QUIRK ("uart" ,0 ,0x50 ,0x54 ,0x58 ,0x47422e03 ,0xffffffff ,SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_LEGACY_IDLE ), +SYSC_QUIRK ("uart" ,0 ,0x50 ,0x54 ,0x58 ,0x47424e03 ,0xffffffff , +SYSC_QUIRK_SWSUP_SIDLE |SYSC_QUIRK_LEGACY_IDLE ),/* Quirks that need to be set based on the module address */ SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 20/22 block: Allow bio_iov_iter_get_pages() with bio->bi_bdev unset
In reply to Sasha LevinFrom: Kent Overstreet <[email protected]>
[ Upstream commit 168145f617d57bf4e474901b7ffa869337a802e6 ]
bio_iov_iter_get_pages() trims the IO based on the block size of the block device the IO will be issued to.
However, bcachefs is a multi device filesystem; when we're creating the bio we don't yet know which block device the bio will be submitted to - we have to handle the alignment checks elsewhere.
Thus this is needed to avoid a null ptr deref.
--- block/bio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
block/bio.c +6 -4
@@ -1198,7 +1198,7 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)struct page **pages = (struct page **)bv;ssize_t size, left;unsigned len, i =0 ; -size_t offset, trim; +size_t offset;int ret =0 ;/*
@@ -1223,10 +1223,12 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) nr_pages =DIV_ROUND_UP (offset + size,PAGE_SIZE ); - trim = size & (bdev_logical_block_size (bio->bi_bdev) -1 ); -iov_iter_revert (iter, trim); +if (bio->bi_bdev) { +size_t trim = size & (bdev_logical_block_size (bio->bi_bdev) -1 ); +iov_iter_revert (iter, trim); + size -= trim; + } - size -= trim;if (unlikely (!size)) { ret = -EFAULT ; goto out;
Signature · 1 line
2.40.1
Re: [PATCH AUTOSEL 6.1 20/22] block: Allow bio_iov_iter_get_pages() with bio->bi_bdev unset
Hi!
Quoted 4 lines
From: Kent Overstreet <[email protected]>
[ Upstream commit
168145f617d57bf4e474901b7ffa869337a802e6]
Quoted 8 lines
bio_iov_iter_get_pages()trims the IO based on the block size of the block device the IO will be issued to.However, bcachefs is a multi device filesystem; when we're creating the bio we don't yet know which block device the bio will be submitted to - we have to handle the alignment checks elsewhere.
Thus this is needed to avoid a null ptr deref.
We are certainly not going to backport bcachefs to -stable. Please drop.
BR,
Pavel
Quoted 26 lines
+++
b/block/bio.cblock/bio.c +6
-4@@ -1198,7 +1198,7 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)struct page **pages = (struct page **)bv;ssize_t size, left;unsigned len, i =0 ; -size_t offset, trim; +size_t offset;int ret =0 ;/* @@ -1223,10 +1223,12 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter) nr_pages =DIV_ROUND_UP (offset + size,PAGE_SIZE ); - trim = size & (bdev_logical_block_size (bio->bi_bdev) -1 ); -iov_iter_revert (iter, trim); +if (bio->bi_bdev) { +size_t trim = size & (bdev_logical_block_size (bio->bi_bdev) -1 ); +iov_iter_revert (iter, trim); + size -= trim; + } - size -= trim;if (unlikely (!size)) { ret = -EFAULT ; goto out;
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Jens Axboe
maintainerRe: [PATCH AUTOSEL 6.1 20/22] block: Allow bio_iov_iter_get_pages() with bio->bi_bdev unset
Quoted 9 lines · Pavel Machek
Hi!
Quoted 7 lines
From: Kent Overstreet <[email protected]>
[ Upstream commit
168145f617d57bf4e474901b7ffa869337a802e6]
bio_iov_iter_get_pages()trims the IO based on the block size of the block device the IO will be issued to.
Quoted 8 lines
Quoted 5 lines
However, bcachefs is a multi device filesystem; when we're creating the bio we don't yet know which block device the bio will be submitted to - we have to handle the alignment checks elsewhere.
Thus this is needed to avoid a null ptr deref.
We are certainly not going to backport bcachefs to -stable. Please drop.
I already said as much 3 days ago:
https://lore.kernel.org/all/[email protected]/
but didn't hear back yet.
Signature · 1 line
Jens Axboe
Sasha Levin
maintainerRe: [PATCH AUTOSEL 6.1 20/22] block: Allow bio_iov_iter_get_pages() with bio->bi_bdev unset
Quoted 16 lines · Jens Axboe
Quoted 15 lines · Pavel Machek
Hi!
Quoted 12 lines
From: Kent Overstreet <[email protected]>
[ Upstream commit
168145f617d57bf4e474901b7ffa869337a802e6]
bio_iov_iter_get_pages()trims the IO based on the block size of the block device the IO will be issued to.However, bcachefs is a multi device filesystem; when we're creating the bio we don't yet know which block device the bio will be submitted to - we have to handle the alignment checks elsewhere.
Thus this is needed to avoid a null ptr deref.
Quoted 8 lines
Quoted 2 lines
We are certainly not going to backport bcachefs to -stable. Please drop.
I already said as much 3 days ago:
https://lore.kernel.org/all/[email protected]/
but didn't hear back yet.
Dropped, and sorry for lack of timely replies on this - I let them collect feedback for a few weeks before going through it and dropping what needs to be dropped.
Signature · 2 lines
Thanks, Sasha
Sasha Levin
maintainerPATCH 21/22 md: raid1: fix potential OOB in raid1_remove_disk()
In reply to Sasha LevinFrom: Zhang Shurong <[email protected]>
[ Upstream commit 8b0472b50bcf0f19a5119b00a53b63579c8e1e4d ]
If rddev->raid_disk is greater than mddev->raid_disks, there will be an out-of-bounds in raid1_remove_disk(). We have already found similar reports as follows:
1) commit d17f744e883b ("md-raid10: fix KASAN warning")
2) commit 1ebc2cec0b7d ("dm raid: fix KASAN warning in raid5_remove_disk")
Fix this bug by checking whether the "number" variable is valid.
--- drivers/md/raid1.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/md/raid1.c +4 -0
@@ -1826,6 +1826,10 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)struct r1conf *conf = mddev->private;int err =0 ;int number = rdev->raid_disk; + +if (unlikely (number >= conf->raid_disks)) + goto abort; +struct raid1_info *p = conf->mirrors + number;if (rdev != p->rdev)
Signature · 1 line
2.40.1
Sasha Levin
maintainerPATCH 22/22 ext2: fix datatype of block number in ext2_xattr_set2()
In reply to Sasha LevinFrom: Georg Ottinger <[email protected]>
[ Upstream commit e88076348425b7d0491c8c98d8732a7df8de7aa3 ]
I run a small server that uses external hard drives for backups. The backup software I use uses ext2 filesystems with 4KiB block size and the server is running SELinux and therefore relies on xattr. I recently upgraded the hard drives from 4TB to 12TB models. I noticed that after transferring some TBs I got a filesystem error "Freeing blocks not in datazone - block = 18446744071529317386, count = 1" and the backup process stopped. Trying to fix the fs with e2fsck resulted in a completely corrupted fs. The error probably came from ext2_free_blocks(), and because of the large number 18e19 this problem immediately looked like some kind of integer overflow. Whereas the 4TB fs was about 1e9 blocks, the new 12TB is about 3e9 blocks. So, searching the ext2 code, I came across the line in fs/ext2/xattr.c:745 where ext2_new_block() is called and the resulting block number is stored in the variable block as an int datatype. If a block with a block number greater than INT32_MAX is returned, this variable overflows and the call to sb_getblk() at line fs/ext2/xattr.c:750 fails, then the call to ext2_free_blocks() produces the error.
Message-Id: <[email protected]>
--- fs/ext2/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ext2/xattr.c +2 -2
@@ -744,10 +744,10 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,/* We need to allocate a new block */ ext2_fsblk_t goal =ext2_group_first_block_no (sb,EXT2_I (inode)->i_block_group); -int block =ext2_new_block (inode, goal, &error); +ext2_fsblk_t block =ext2_new_block (inode, goal, &error);if (error) goto cleanup; -ea_idebug (inode,"creating block %d" , block); +ea_idebug (inode,"creating block %lu" , block); new_bh =sb_getblk (sb, block);if (unlikely (!new_bh)) {
Signature · 1 line
2.40.1