* [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE @ 2024-11-08 6:46 Hsin-Te Yuan 2024-11-08 8:21 ` Chen-Yu Tsai 2024-11-14 8:13 ` Daniel Lezcano 0 siblings, 2 replies; 5+ messages in thread From: Hsin-Te Yuan @ 2024-11-08 6:46 UTC (permalink / raw) To: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba, Matthias Brugger, AngeloGioacchino Del Regno Cc: linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek, Hsin-Te Yuan Currently, MT8192 cannot suspend with FILTERED_MODE. Switch to IMMEDIATE_MODE will fix this. Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> --- drivers/thermal/mediatek/lvts_thermal.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 1997e91bb3be94a3059db619238aa5787edc7675..daad52f14fc03d0c4131f2ffdf3eb6b49a4a43d0 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -1541,7 +1541,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { }, VALID_SENSOR_MAP(1, 1, 0, 0), .offset = 0x0, - .mode = LVTS_MSR_FILTERED_MODE, }, { .lvts_sensor = { @@ -1552,7 +1551,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { }, VALID_SENSOR_MAP(1, 1, 0, 0), .offset = 0x100, - .mode = LVTS_MSR_FILTERED_MODE, }, { .lvts_sensor = { @@ -1567,7 +1565,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { }, VALID_SENSOR_MAP(1, 1, 1, 1), .offset = 0x200, - .mode = LVTS_MSR_FILTERED_MODE, } }; --- base-commit: 906bd684e4b1e517dd424a354744c5b0aebef8af change-id: 20241108-lvts-f7beb36efc59 Best regards, -- Hsin-Te Yuan <yuanhsinte@chromium.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE 2024-11-08 6:46 [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE Hsin-Te Yuan @ 2024-11-08 8:21 ` Chen-Yu Tsai 2024-11-09 15:26 ` Nícolas F. R. A. Prado 2024-11-14 8:13 ` Daniel Lezcano 1 sibling, 1 reply; 5+ messages in thread From: Chen-Yu Tsai @ 2024-11-08 8:21 UTC (permalink / raw) To: Hsin-Te Yuan, Nícolas F . R . A . Prado Cc: Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba, Matthias Brugger, AngeloGioacchino Del Regno, linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek On Fri, Nov 8, 2024 at 2:51 PM Hsin-Te Yuan <yuanhsinte@chromium.org> wrote: > > Currently, MT8192 cannot suspend with FILTERED_MODE. Switch to > IMMEDIATE_MODE will fix this. > Probably should have a Fixes tag. Also, Nicolas previously reported that the threshold interrupts don't work with the immediate mode [1], which is why filtered mode was used in the final version. ChenYu [1] https://lore.kernel.org/linux-mediatek/37680c5e-e61c-410b-b48d-829914200e4a@notapiano/ > Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> > --- > drivers/thermal/mediatek/lvts_thermal.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c > index 1997e91bb3be94a3059db619238aa5787edc7675..daad52f14fc03d0c4131f2ffdf3eb6b49a4a43d0 100644 > --- a/drivers/thermal/mediatek/lvts_thermal.c > +++ b/drivers/thermal/mediatek/lvts_thermal.c > @@ -1541,7 +1541,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { > }, > VALID_SENSOR_MAP(1, 1, 0, 0), > .offset = 0x0, > - .mode = LVTS_MSR_FILTERED_MODE, > }, > { > .lvts_sensor = { > @@ -1552,7 +1551,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { > }, > VALID_SENSOR_MAP(1, 1, 0, 0), > .offset = 0x100, > - .mode = LVTS_MSR_FILTERED_MODE, > }, > { > .lvts_sensor = { > @@ -1567,7 +1565,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { > }, > VALID_SENSOR_MAP(1, 1, 1, 1), > .offset = 0x200, > - .mode = LVTS_MSR_FILTERED_MODE, > } > }; > > > --- > base-commit: 906bd684e4b1e517dd424a354744c5b0aebef8af > change-id: 20241108-lvts-f7beb36efc59 > > Best regards, > -- > Hsin-Te Yuan <yuanhsinte@chromium.org> > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE 2024-11-08 8:21 ` Chen-Yu Tsai @ 2024-11-09 15:26 ` Nícolas F. R. A. Prado 0 siblings, 0 replies; 5+ messages in thread From: Nícolas F. R. A. Prado @ 2024-11-09 15:26 UTC (permalink / raw) To: Chen-Yu Tsai Cc: Hsin-Te Yuan, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba, Matthias Brugger, AngeloGioacchino Del Regno, linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek On Fri, Nov 08, 2024 at 04:21:07PM +0800, Chen-Yu Tsai wrote: > On Fri, Nov 8, 2024 at 2:51 PM Hsin-Te Yuan <yuanhsinte@chromium.org> wrote: > > > > Currently, MT8192 cannot suspend with FILTERED_MODE. Switch to > > IMMEDIATE_MODE will fix this. Do you mean that the whole MT8192 SoC is not able to enter system suspend? I just tested that on a fairly recent linux-next and it was working without a problem. We need more context here. > > > > Probably should have a Fixes tag. > > Also, Nicolas previously reported that the threshold interrupts don't > work with the immediate mode [1], which is why filtered mode was used > in the final version. Indeed. I suppose it would be possible to configure immediate mode only during suspend if this is really the problem. Thanks, Nícolas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE 2024-11-08 6:46 [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE Hsin-Te Yuan 2024-11-08 8:21 ` Chen-Yu Tsai @ 2024-11-14 8:13 ` Daniel Lezcano 2024-11-14 10:28 ` AngeloGioacchino Del Regno 1 sibling, 1 reply; 5+ messages in thread From: Daniel Lezcano @ 2024-11-14 8:13 UTC (permalink / raw) To: Hsin-Te Yuan, Rafael J. Wysocki, Zhang Rui, Lukasz Luba, Matthias Brugger, AngeloGioacchino Del Regno Cc: linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek On 08/11/2024 07:46, Hsin-Te Yuan wrote: > Currently, MT8192 cannot suspend with FILTERED_MODE. Switch to > IMMEDIATE_MODE will fix this. Given the comments and the different changes related to the filtered and immediate modes, I won't apply the patch until this is clearly sorted out. > Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> > --- > drivers/thermal/mediatek/lvts_thermal.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c > index 1997e91bb3be94a3059db619238aa5787edc7675..daad52f14fc03d0c4131f2ffdf3eb6b49a4a43d0 100644 > --- a/drivers/thermal/mediatek/lvts_thermal.c > +++ b/drivers/thermal/mediatek/lvts_thermal.c > @@ -1541,7 +1541,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { > }, > VALID_SENSOR_MAP(1, 1, 0, 0), > .offset = 0x0, > - .mode = LVTS_MSR_FILTERED_MODE, > }, > { > .lvts_sensor = { > @@ -1552,7 +1551,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { > }, > VALID_SENSOR_MAP(1, 1, 0, 0), > .offset = 0x100, > - .mode = LVTS_MSR_FILTERED_MODE, > }, > { > .lvts_sensor = { > @@ -1567,7 +1565,6 @@ static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = { > }, > VALID_SENSOR_MAP(1, 1, 1, 1), > .offset = 0x200, > - .mode = LVTS_MSR_FILTERED_MODE, > } > }; > > > --- > base-commit: 906bd684e4b1e517dd424a354744c5b0aebef8af > change-id: 20241108-lvts-f7beb36efc59 > > Best regards, -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE 2024-11-14 8:13 ` Daniel Lezcano @ 2024-11-14 10:28 ` AngeloGioacchino Del Regno 0 siblings, 0 replies; 5+ messages in thread From: AngeloGioacchino Del Regno @ 2024-11-14 10:28 UTC (permalink / raw) To: Daniel Lezcano, Hsin-Te Yuan, Rafael J. Wysocki, Zhang Rui, Lukasz Luba, Matthias Brugger, Nícolas F. R. A. Prado, Chen-Yu Tsai Cc: linux-pm, linux-kernel, linux-arm-kernel, linux-mediatek Il 14/11/24 09:13, Daniel Lezcano ha scritto: > On 08/11/2024 07:46, Hsin-Te Yuan wrote: >> Currently, MT8192 cannot suspend with FILTERED_MODE. Switch to >> IMMEDIATE_MODE will fix this. > > Given the comments and the different changes related to the filtered and immediate > modes, I won't apply the patch until this is clearly sorted out. > Thanks - indeed do not apply this for now. If this has been broken for a year, one or two more weeks ain't gonna be a show stopper, as long as we can come to a proper fix during that time, instead of yet another compromise. Anyway.... We discussed about that internally and we do suspect that there might be some interrupt that is getting erroneously enabled, never handled, and constantly firing because.. well, it was never handled, so... :-) Nicolas is looking into this issue, and I really hope that we can come to a conclusion that will make us switch back all of the SoCs to filtered mode instead, as there indeed are some advantages in using that. Cheers, Angelo >> Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> >> --- >> drivers/thermal/mediatek/lvts_thermal.c | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/ >> lvts_thermal.c >> index >> 1997e91bb3be94a3059db619238aa5787edc7675..daad52f14fc03d0c4131f2ffdf3eb6b49a4a43d0 100644 >> --- a/drivers/thermal/mediatek/lvts_thermal.c >> +++ b/drivers/thermal/mediatek/lvts_thermal.c >> @@ -1541,7 +1541,6 @@ static const struct lvts_ctrl_data >> mt8192_lvts_mcu_data_ctrl[] = { >> }, >> VALID_SENSOR_MAP(1, 1, 0, 0), >> .offset = 0x0, >> - .mode = LVTS_MSR_FILTERED_MODE, >> }, >> { >> .lvts_sensor = { >> @@ -1552,7 +1551,6 @@ static const struct lvts_ctrl_data >> mt8192_lvts_mcu_data_ctrl[] = { >> }, >> VALID_SENSOR_MAP(1, 1, 0, 0), >> .offset = 0x100, >> - .mode = LVTS_MSR_FILTERED_MODE, >> }, >> { >> .lvts_sensor = { >> @@ -1567,7 +1565,6 @@ static const struct lvts_ctrl_data >> mt8192_lvts_mcu_data_ctrl[] = { >> }, >> VALID_SENSOR_MAP(1, 1, 1, 1), >> .offset = 0x200, >> - .mode = LVTS_MSR_FILTERED_MODE, >> } >> }; >> >> --- >> base-commit: 906bd684e4b1e517dd424a354744c5b0aebef8af >> change-id: 20241108-lvts-f7beb36efc59 >> >> Best regards, > > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-14 10:28 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-11-08 6:46 [PATCH] thermal/drivers/mediatek/lvts_thermal: Switch to IMMEDIATE_MODE Hsin-Te Yuan 2024-11-08 8:21 ` Chen-Yu Tsai 2024-11-09 15:26 ` Nícolas F. R. A. Prado 2024-11-14 8:13 ` Daniel Lezcano 2024-11-14 10:28 ` AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®