Re: [PATCH v11 7/9] drm/mediatek: enable dither function

2021-01-28 Thread Hsin-Yi Wang
On Thu, Jan 28, 2021 at 4:32 PM Yongqiang Niu wrote: > > On Thu, 2021-01-28 at 16:28 +0800, CK Hu wrote: > > On Thu, 2021-01-28 at 16:18 +0800, Hsin-Yi Wang wrote: > > > On Thu, Jan 28, 2021 at 4:10 PM Yongqiang Niu > > > wrote: > > > > > > &g

Re: [PATCH v11 3/9] drm/mediatek: add RDMA fifo size error handle

2021-01-28 Thread Hsin-Yi Wang
On Thu, Jan 28, 2021 at 3:52 PM CK Hu wrote: > > Hi, Hsin-Yi: > > On Thu, 2021-01-28 at 15:27 +0800, Hsin-Yi Wang wrote: > > From: Yongqiang Niu > > > > This patch add RDMA fifo size error handle > > rdma fifo size will not always bigger than the calculated

[PATCH v12 2/8] arm64: dts: mt8183: refine gamma compatible name

2021-01-28 Thread Hsin-Yi Wang
From: Yongqiang Niu mt8183 gamma is different with mt8173 remove mt8173 compatible name for mt8183 gamma Fixes: 91f9c963ce79 ("arm64: dts: mt8183: Add display nodes for MT8183") Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra --- arch/

[PATCH v12 0/8] drm/mediatek: add support for mediatek SOC MT8183

2021-01-28 Thread Hsin-Yi Wang
ifiers for mediatek drm in patch 25 Hsin-Yi Wang (1): drm/mediatek: add mtk_dither_set_common() function Yongqiang Niu (7): arm64: dts: mt8183: rename rdma fifo size arm64: dts: mt8183: refine gamma compatible name drm/mediatek: separate gamma module drm/mediatek: add has_dither privat

[PATCH v12 4/8] drm/mediatek: separate gamma module

2021-01-28 Thread Hsin-Yi Wang
From: Yongqiang Niu mt8183 gamma module will different with mt8173 separate gamma for add private data Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/Makefile | 1 + drivers/gpu/drm/mediatek/mtk_disp_drv.h | 10

[PATCH v12 3/8] drm/mediatek: add mtk_dither_set_common() function

2021-01-28 Thread Hsin-Yi Wang
Current implementation of mtk_dither_set() cast dev data to struct mtk_ddp_comp_dev. But other devices with different dev data would also call this function. Separate necessary parameters out so other device components (dither, gamma) can call this function. Signed-off-by: Hsin-Yi Wang Reviewed

[PATCH v12 1/8] arm64: dts: mt8183: rename rdma fifo size

2021-01-28 Thread Hsin-Yi Wang
From: Yongqiang Niu property name must include only lowercase and '-' Fixes: 91f9c963ce79 ("arm64: dts: mt8183: Add display nodes for MT8183") Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Reviewed-by: Chun-Kuang Hu Reviewed-by: Enric Balletbo i Serra ---

[PATCH v12 8/8] drm/mediatek: add support for mediatek SOC MT8183

2021-01-28 Thread Hsin-Yi Wang
From: Yongqiang Niu 1. add ovl private data 2. add rdma private data 3. add gamma privte data 4. add main and external path module for crtc create Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 1 + drivers/gpu

[PATCH v12 5/8] drm/mediatek: add has_dither private data for gamma

2021-01-28 Thread Hsin-Yi Wang
From: Yongqiang Niu Not all SoC has dither function in gamma module. Add private data to control this function setting. Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 14 ++ 1 file changed, 10

[PATCH v12 7/8] soc: mediatek: add mtk mutex support for MT8183

2021-01-28 Thread Hsin-Yi Wang
From: Yongqiang Niu Add mtk mutex support for MT8183 SoC. Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang --- drivers/soc/mediatek/mtk-mutex.c | 50 1 file changed, 50 insertions(+) diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc

[PATCH v12 6/8] drm/mediatek: enable dither function

2021-01-28 Thread Hsin-Yi Wang
From: Yongqiang Niu for 5 or 6 bpc panel, we need enable dither function to improve the display quality Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git

[PATCH 1/2] arm64: dts: mt8183: config dsi node

2021-01-06 Thread Hsin-Yi Wang
Config dsi node for mt8183 kukui. Set panel and ports. Signed-off-by: Hsin-Yi Wang --- .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 38 +++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183

[PATCH 2/2] arm64: dts: mt8183: Add krane-sku0 board.

2021-01-06 Thread Hsin-Yi Wang
Similar to krane-sku176 but using a different panel source. Signed-off-by: Hsin-Yi Wang --- .../devicetree/bindings/arm/mediatek.yaml | 1 + arch/arm64/boot/dts/mediatek/Makefile | 1 + .../dts/mediatek/mt8183-kukui-krane-sku0.dts | 30 +++ 3 files changed, 32

[PATCH v2 2/2] arm64: dts: mt8183: Add krane-sku0 board.

2021-01-06 Thread Hsin-Yi Wang
Similar to krane-sku176 but using a different panel source. Signed-off-by: Hsin-Yi Wang --- Change: v2: move compatible to board dts --- .../devicetree/bindings/arm/mediatek.yaml | 1 + arch/arm64/boot/dts/mediatek/Makefile | 1 + .../dts/mediatek/mt8183-kukui-krane-sku0.dts | 23

[PATCH v2 1/2] arm64: dts: mt8183: config dsi node

2021-01-06 Thread Hsin-Yi Wang
Config dsi node for mt8183 kukui. Set panel and ports. Several kukui boards share the same panel property and only compatible is different. So compatible will be set in board dts for comparison convenience. Signed-off-by: Hsin-Yi Wang --- Change: v2: move compatible to board dts

[PATCH 0/3] Add domain supply for mtk power domains

2021-01-07 Thread Hsin-Yi Wang
Some power domains (eg. mfg on mt8183) needs to turn on its domain power supply before power on. Otherwise readx_poll_timeout() in scpsys_power_on() would timeout. Hsin-Yi Wang (3): dt-bindings: power: Add domain regulator supply soc: mediatek: pm-domains: Add domain regulator supply arm64

[PATCH 1/3] dt-bindings: power: Add domain regulator supply

2021-01-07 Thread Hsin-Yi Wang
Some power domains (eg. mfg) needs to turn on power supply before power on. Signed-off-by: Hsin-Yi Wang --- .../bindings/power/mediatek,power-controller.yaml| 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/power/mediatek,power

[PATCH 2/3] soc: mediatek: pm-domains: Add domain regulator supply

2021-01-07 Thread Hsin-Yi Wang
Some power domains (eg. mfg) needs to turn on power supply before power on. Signed-off-by: Hsin-Yi Wang --- drivers/soc/mediatek/mt8183-pm-domains.h | 1 + drivers/soc/mediatek/mtk-pm-domains.c| 36 +++- drivers/soc/mediatek/mtk-pm-domains.h| 1 + 3 files changed

[PATCH 3/3] arm64: dts: mediatek: mt8183: Add domain supply for mfg

2021-01-07 Thread Hsin-Yi Wang
Add domain supply for mfg node. Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch

Re: [PATCH v2, 2/2] soc: mediatek: mmsys: Use function call for setting the routing registers

2020-12-16 Thread Hsin-Yi Wang
On Wed, Dec 9, 2020 at 9:32 AM Yongqiang Niu wrote: > > Actually, setting the registers for routing, use multiple 'if-else' for > different > routes, but this code would be more and more complicated while we > support more and more SoCs. Change that and use a function call per SoC so the > code w

Re: [PATCH v8, 6/6] drm/mediatek: add support for mediatek SOC MT8183

2020-12-17 Thread Hsin-Yi Wang
On Thu, Dec 10, 2020 at 9:07 AM Yongqiang Niu wrote: > > This patch add support for mediatek SOC MT8183 > 1. add ovl private data > 2. add rdma private data > 3. add mutes private data > 4. add main and external path module for crtc create > > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm

[PATCH v2 2/2] drm/bridge: anx7625: disable regulators when power off

2020-11-22 Thread Hsin-Yi Wang
When suspending the driver, anx7625_power_standby() will be called to turn off reset-gpios and enable-gpios. However, power supplies are not disabled. To save power, the driver can get the power supply regulators and turn off them in anx7625_power_standby(). Signed-off-by: Hsin-Yi Wang

[PATCH v2 1/2] dt-bindings: drm/bridge: anx7625: Add power supplies

2020-11-22 Thread Hsin-Yi Wang
anx7625 requires 3 power supply regulators. Signed-off-by: Hsin-Yi Wang --- Change: v2: remove maxItems for supplies --- .../bindings/display/bridge/analogix,anx7625.yaml | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge

Re: [PATCH v2 7/8] thermal: mediatek: add another get_temp ops for thermal sensors

2019-09-09 Thread Hsin-Yi Wang
On Fri, May 10, 2019 at 9:27 PM michael.kao wrote: > > From: Michael Kao > > Provide thermal zone to read thermal sensor > in the SoC. We can read all the thermal sensors > value in the SoC by the node /sys/class/thermal/ > > Signed-off-by: Michael Kao > --- > drivers/thermal/mtk_thermal.c | 68

[PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER

2019-09-10 Thread Hsin-Yi Wang
If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register() fail with EPROBE_DEFER, we shouldn't print an error message, as the device will be probed again later. Signed-off-by: Hsin-Yi Wang --- drivers/thermal/thermal-generic-adc.c | 9 ++--- 1 file changed, 6 insertions(

Re: [PATCH v9 2/3] fdt: add support for rng-seed

2019-08-29 Thread Hsin-Yi Wang
On Thu, Aug 29, 2019 at 1:36 AM Kees Cook wrote: > > Can this please be a boot param (with the default controlled by the > CONFIG)? See how CONFIG_RANDOM_TRUST_CPU is wired up... > > -Kees > Currently rng-seed read and added in setup_arch() --> setup_machine_fdt().. -> early_init_dt_scan_chosen()

Re: [PATCH v8 2/3] fdt: add support for rng-seed

2019-08-20 Thread Hsin-Yi Wang
Then we'd still use add_device_randomness() in case that bootloader provides weak entropy. On Tue, Aug 20, 2019 at 7:14 PM Ard Biesheuvel wrote: > > On Tue, 20 Aug 2019 at 10:43, Hsin-Yi Wang wrote: > > > > Hi Ted, > > > > Thanks for raising this question.

[PATCH RESEND] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-21 Thread Hsin-Yi Wang
0: Reported-by: Alexandru M Stan Signed-off-by: Hsin-Yi Wang --- Previous patch and discussion: http://patchwork.ozlabs.org/patch/1042684/ --- drivers/i2c/busses/i2c-mt65xx.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers

[PATCH v9 0/3] add support for rng-seed

2019-08-22 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH v9 2/3] fdt: add support for rng-seed

2019-08-22 Thread Hsin-Yi Wang
add_device_randomness(). Decision is controlled by kernel config RANDOM_TRUST_BOOTLOADER. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring --- Change from v8: * Add a new interface add_bootloader_randomness * Add a new kernel config --- drivers/char/Kconfig | 10 ++ drivers

[PATCH v9 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-22 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Revie

[PATCH v9 3/3] arm64: kexec_file: add rng-seed support

2019-08-22 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- No change since v7. --

Re: [PATCH RESEND] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-22 Thread Hsin-Yi Wang
On Thu, Aug 22, 2019 at 5:24 PM Yingjoe Chen wrote: > > Why do you need to change this part? > > Joe.C > You're right. We don't need to change this. I'll revert this back.

[PATCH v2] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-22 Thread Hsin-Yi Wang
0: Reported-by: Alexandru M Stan Signed-off-by: Hsin-Yi Wang --- Change from v1: * restore the order of algo and quirks --- drivers/i2c/busses/i2c-mt65xx.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c

[PATCH v10 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-22 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Revie

[PATCH v10 0/3] add support for rng-seed

2019-08-22 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH v10 2/3] fdt: add support for rng-seed

2019-08-22 Thread Hsin-Yi Wang
add_device_randomness(). Decision is controlled by kernel config RANDOM_TRUST_BOOTLOADER. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring --- Change from v9: * reword kconfig * use IS_ENABLED for config --- drivers/char/Kconfig | 9 + drivers/char/random.c | 14

[PATCH v10 3/3] arm64: kexec_file: add rng-seed support

2019-08-22 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- No change since v7 --

Re: [PATCH v2] i2c: mediatek: disable zero-length transfers for mt8183

2019-08-23 Thread Hsin-Yi Wang
On Fri, Aug 23, 2019 at 4:09 PM Qii Wang wrote: > > > > static u32 mtk_i2c_functionality(struct i2c_adapter *adap) > > { > > - return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; > > + if (adap->quirks->flags & I2C_AQ_NO_ZERO_LEN) > > + return I2C_FUNC_I2C | > > +

[PATCH RFC] reboot: hotplug cpus in migrate_to_reboot_cpu()

2019-10-02 Thread Hsin-Yi Wang
cpu hotplug in migrate_to_reboot_cpu() to avoid this issue. Signed-off-by: Hsin-Yi Wang --- kernel warnings at reboot: [1] https://lore.kernel.org/lkml/20190820100843.3028-1-hsi...@chromium.org/ [2] https://lore.kernel.org/lkml/20190727164450.ga11...@roeck-us.net/ --- kernel/cpu.c| 35

Re: [PATCH RFC] reboot: hotplug cpus in migrate_to_reboot_cpu()

2019-10-02 Thread Hsin-Yi Wang
On Wed, Oct 2, 2019 at 7:41 PM Hsin-Yi Wang wrote: > > Currently system reboots use arch specific codes (eg. smp_send_stop) to > offline non reboot cpus. Some arch like arm64, arm, and x86... set offline > masks to cpu without really offlining them. Thus it causes some race > condi

Re: [PATCH v2] i2c: i2c-mt65xx: fix NULL ptr dereference

2019-09-30 Thread Hsin-Yi Wang
On Mon, Sep 30, 2019 at 2:20 PM Cengiz Can wrote: > > On 2019-09-30 18:28, Fabien Parent wrote: > > Fixes: abf4923e97c3 ("i2c: mediatek: disable zero-length transfers for > > mt8183") > > Signed-off-by: Fabien Parent > > Reviewed-by: Cengiz Can Reviewed-by: Hsin-Yi Wang Thanks!

[PATCH RFC v2] reboot: hotplug cpus in migrate_to_reboot_cpu()

2019-10-09 Thread Hsin-Yi Wang
can do cpu hotplug in migrate_to_reboot_cpu() to avoid this issue. Signed-off-by: Hsin-Yi Wang --- change log: v1 --> v2: Call hotplug function in #ifdef CONFIG instead of IS_ENABLED. (Reported-by: kbuild test robot ) kernel warnings at reboot: [1] https://lore.kernel.org/lkml/20190820100843.3

Re: [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER

2019-10-07 Thread Hsin-Yi Wang
On Tue, Sep 10, 2019 at 12:59 AM Hsin-Yi Wang wrote: > > If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register() > fail with EPROBE_DEFER, we shouldn't print an error message, as the > device will be probed again later. > > Signed-off-by: Hsin-Yi Wang > --

[PATCH v8 0/3] add support for rng-seed

2019-08-19 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH v8 2/3] fdt: add support for rng-seed

2019-08-19 Thread Hsin-Yi Wang
(), since early_init_dt_scan_chosen() would modify fdt to erase rng-seed. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring --- Change from v7: obtain of_fdt_crc32 after early_init_dt_scan_nodes(). --- drivers/of/fdt.c | 14 -- 1 file changed, 12

[PATCH v8 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-19 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Revie

[PATCH v8 3/3] arm64: kexec_file: add rng-seed support

2019-08-19 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- No change after v7. --

Re: [PATCH v8 2/3] fdt: add support for rng-seed

2019-08-20 Thread Hsin-Yi Wang
Hi Ted, Thanks for raising this question. For UEFI based system, they have a config table that carries rng seed and can be passed to device randomness. However, they also use add_device_randomness (not sure if it's the same reason that they can't guarantee _all_ bootloader can be trusted) This pa

[PATCH RFC] smp: Add cpu unstopped mask for smp_send_stop/stop_other_cpus

2019-08-20 Thread Hsin-Yi Wang
* Sanity check. Catch the case where we try to broadcast to * offline cpus. */ if (WARN_ON_ONCE(!cpumask_subset(tmpmask, cpu_online_mask))) cpumask_and(tmpmask, tmpmask, cpu_online_mask); Signed-off-by: Hsin-Yi Wang --- Note - The warning comes from arm64 device - Previous relate

[PATCH RFC v2 1/2] devfreq: mt8183-cci: using cpu based scaling passive_governor

2019-07-16 Thread Hsin-Yi Wang
ff-by: Hsin-Yi Wang --- drivers/devfreq/mt8183-cci-devfreq.c | 239 +++ 1 file changed, 56 insertions(+), 183 deletions(-) diff --git a/drivers/devfreq/mt8183-cci-devfreq.c b/drivers/devfreq/mt8183-cci-devfreq.c index 250c963789f3..4e8e5948ed41 100644 --- a/drivers/de

[PATCH RFC v2 0/2] Use cpu based scaling passive governor for MT8183 CCI

2019-07-16 Thread Hsin-Yi Wang
passive governor for mt8183-cci to improve performance and deal with shared regulator voltage setting issue. Hsin-Yi Wang (2): devfreq: mt8183-cci: using cpu based scaling passive_governor cpufreq: mediatek: Support vproc shared by multiple component drivers/cpufreq/mediatek-cpufreq.c | 16

[PATCH RFC v2 2/2] cpufreq: mediatek: Support vproc shared by multiple component

2019-07-16 Thread Hsin-Yi Wang
igned-off-by: Hsin-Yi Wang --- drivers/cpufreq/mediatek-cpufreq.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 7282834e8fe2..f5e737b862f0 100644 --- a/drivers/cpufreq/mediatek-cpu

Re: [PATCH RFC v2 0/2] Use cpu based scaling passive governor for MT8183 CCI

2019-07-18 Thread Hsin-Yi Wang
On Wed, Jul 17, 2019 at 2:12 PM Hsin-Yi Wang wrote: > 2. cpu based scaling support to passive_governor from Sibi Sankar > https://lore.kernel.org/patchwork/patch/1101049/ This series is tested with previous version: https://patchwork.kernel.org/patch/10875195/

[PATCH] arm64: dts: mt8173: fix vcodec-enc clock

2020-05-04 Thread Hsin-Yi Wang
venc_sel 49400 ... vcodecpll_370p5 37050 venclt_sel 37050 Fixes: fbbad0287cec ("arm64: dts: Using standard CCF interface to set vcodec clk") Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dt

Re: [PATCH] random: inform about bootloader-provided randomness

2019-10-15 Thread Hsin-Yi Wang
dowski > > Cc: Ard Biesheuvel > > Cc: Hsin-Yi Wang > > Cc: Stephen Boyd > > Cc: Rob Herring > > Cc: Theodore Ts'o > > Cc: Will Deacon > > > > diff --git a/drivers/char/random.c b/drivers/char/random.c > > index de434feb873a..673375e05

[PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()

2019-02-15 Thread Hsin-Yi Wang
function returns NULL pointer. Fixes: fc66b39fe36a ("i2c: mediatek: Use DMA safe buffers for i2c transactions") Signed-off-by: Hsin-Yi Wang --- drivers/i2c/busses/i2c-mt65xx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/dri

Re: [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()

2019-02-15 Thread Hsin-Yi Wang
Ok, I can add a check in another patch. Should we return NULL pointer if msg->len is 0 or print out some warnings? Thanks. On Fri, Feb 15, 2019 at 5:10 PM Wolfram Sang wrote: > > On Fri, Feb 15, 2019 at 05:02:02PM +0800, Hsin-Yi Wang wrote: > > i2c_get_dma_safe_msg_buf() allocates

[PATCH v4 3/3] arm64: kexec_file: add rng-seed support

2019-05-19 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be deleted after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang --- * Will add corresponding part to userspace kexec-tools if this is

[PATCH v4 2/3] fdt: add support for rng-seed

2019-05-19 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang --- change log v2->v4: *

[PATCH v4 1/3] amr64: map FDT as RW for early_init_dt_scan()

2019-05-19 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some code that needs to modify FDT during init. Map FDT to RW until unflatten DT. Signed-off-by: Hsin-Yi Wang --- change log v2->v4: * v3 abandoned * add an arg pgp

Re: [PATCH v4 2/3] fdt: add support for rng-seed

2019-05-20 Thread Hsin-Yi Wang
On Mon, May 20, 2019 at 7:54 AM Nicolas Boichat wrote: > Alphabetical order. Original headers are not sorted, should I sort them here? > > > I'm a little bit concerned about this, as we really want the rng-seed > value to be wiped, and not kept in memory (even if it's hard to > access). > > IIUC

Re: [PATCH 8/8] devfreq: mediatek: cci devfreq register opp notification for SVS support

2019-05-24 Thread Hsin-Yi Wang
On Thu, May 16, 2019 at 9:08 AM Andrew-sh.Cheng wrote: > > From: "Andrew-sh.Cheng" > > SVS will change the voltage of opp item. > CCI devfreq need to react to change frequency. > > Signed-off-by: Andrew-sh.Cheng > --- > drivers/devfreq/mt8183-cci-devfreq.c | 63 > ++

[PATCH v5 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-05-26 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang --- ch

[PATCH v5 3/3] arm64: kexec_file: add rng-seed support

2019-05-26 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang --- arch/arm64/kernel/machine_kexec_file.c | 22 +-

[PATCH v5 2/3] fdt: add support for rng-seed

2019-05-26 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang --- change log v4->v5: *

Re: [PATCH 7/8] cpufreq: mediatek: add opp notification for SVS support

2019-05-27 Thread Hsin-Yi Wang
On Thu, May 16, 2019 at 9:08 AM Andrew-sh.Cheng wrote: > bool need_voltage_tracking; > + struct mutex lock; /* avoid notify and policy race condition */ > + struct notifier_block opp_nb; > + int opp_cpu; > + unsigned long opp_freq; > }; > > static LIST_HEAD(dvfs_i

[PATCH] arm64: add support for rng-seed

2019-05-06 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an 64 bytes entropy that can be passed to kernel called very early to increase device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang --- Documentation/devicetree

Re: [PATCH] arm64: add support for rng-seed

2019-05-06 Thread Hsin-Yi Wang
On Tue, May 7, 2019 at 12:54 PM Hsin-Yi Wang wrote: > > Introducing a chosen node, rng-seed, which is an 64 bytes entropy > that can be passed to kernel called very early to increase device > randomness. Bootloader should provide this entropy and the value is > read from /chosen

Re: [PATCH 6/8] thermal: mediatek: mt8183: fix bank number settings

2019-05-07 Thread Hsin-Yi Wang
, > + .num_banks = MT8183_NUM_ZONES, > .num_sensors = MT8183_NUM_SENSORS, > .vts_index = mt8183_vts_index, > .cali_val = MT8183_CALIBRATION, Tested-by: Hsin-Yi Wang

Re: [PATCH 4/8] arm64: dts: mt8183: Configure CPU cooling

2019-05-07 Thread Hsin-Yi Wang
NO_LIMIT > + THERMAL_NO_LIMIT>, > +<&cpu7 > + THERMAL_NO_LIMIT > + THERMAL_NO_LIMIT>; > + contribution = <1024>; > + }; > + }; > }; > > tzts1: tzts1 { Tested-by: Hsin-Yi Wang

Re: [PATCH 5/8] arm64: dts: mt8183: Increase polling frequency for CPU thermal zone

2019-05-07 Thread Hsin-Yi Wang
ing-delay = <1000>; > + polling-delay-passive = <100>; > + polling-delay = <500>; > > thermal-sensors = <&thermal 0>; > sustainable-power = <1500>; Tested-by: Hsin-Yi Wang

Re: [PATCH 2/8] arm64: dts: mt8183: add/update dynamic power coefficients

2019-05-03 Thread Hsin-Yi Wang
On Thu, May 2, 2019 at 10:43 AM michael.kao wrote: > > Add dynamic power coefficients for all cores and update those of > CPU0 and CPU4. > > Signed-off-by: Michael.Kao > --- > arch/arm64/boot/dts/mediatek/mt8183.dtsi | 16 > 1 file changed, 16 insertions(+) > > diff --git a/arch

Re: [PATCH 1/8] arm64: dts: mt8183: add thermal zone node

2019-05-03 Thread Hsin-Yi Wang
On Thu, May 2, 2019 at 10:43 AM michael.kao wrote: > > Add thermal zone node to Mediatek MT8183 dts file. > > Signed-off-by: Michael Kao > --- > arch/arm64/boot/dts/mediatek/mt8183.dtsi | 64 > > 1 file changed, 64 insertions(+) > > diff --git a/arch/arm64/boot/

[PATCH] i2c: mediatek: disable zero-length transfers for mt8183

2019-07-26 Thread Hsin-Yi Wang
0: Reported-by: Alexandru M Stan Signed-off-by: Hsin-Yi Wang --- Previous patch and discussion: http://patchwork.ozlabs.org/patch/1042684/ --- drivers/i2c/busses/i2c-mt65xx.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers

Re: [PATCH v7 0/3] add support for rng-seed

2019-08-05 Thread Hsin-Yi Wang
Ping on the thread. Should the series be proceeded? Thanks

Re: [PATCH v3 3/5] OPP: Improve require-opps linking

2019-07-30 Thread Hsin-Yi Wang
On Wed, Jul 17, 2019 at 10:23 PM Saravana Kannan wrote: > -free_required_tables: > - _opp_table_free_required_tables(opp_table); > -put_np: > - of_node_put(np); > + for (i = 0; i < src->required_opp_count; i++) { > + if (src->required_opp_tables[i]) > +

[PATCH RESEND v7 0/3] add support for rng-seed

2019-08-08 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH RESEND v7 2/3] fdt: add support for rng-seed

2019-08-08 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed

[PATCH RESEND v7 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-08-08 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Revie

[PATCH RESEND v7 3/3] arm64: kexec_file: add rng-seed support

2019-08-08 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- arch/arm64/kernel/machi

[PATCH RFC 0/2] Use cpufreq-map governor for MT8183 CCI

2019-06-17 Thread Hsin-Yi Wang
From: Hsin-Yi Wang This series uses cpufreq-map governor for mt8183-cci to improve performance. Hsin-Yi Wang (1): devfreq: mt8183-cci: using cpufreq-map governor in cci dvfs driver Saravana Kannan (1): PM / devfreq: Generic CPU frequency to device frequency mapping governor

[PATCH RFC 2/2] devfreq: mt8183-cci: using cpufreq-map governor in cci dvfs driver

2019-06-17 Thread Hsin-Yi Wang
From: Hsin-Yi Wang This is based on mediatek's devfreq patches[1]. In MT8183 SoC, CCI and little core cluster share same regulator. In original implementation, CCI frequency depends on regulator voltage, which results in bad memory access performance if tasks are loaded on other cpus other

[PATCH RFC 1/2] PM / devfreq: Generic CPU frequency to device frequency mapping governor

2019-06-17 Thread Hsin-Yi Wang
frequency. If the CPUs are running at their min frequency, the device runs at its min frequency. And interpolated for frequencies in between. Signed-off-by: Saravana Kannan Signed-off-by: Hsin-Yi Wang --- .../bindings/devfreq/devfreq-cpufreq-map.txt | 53 ++ drivers/devfreq/Kconfig

Re: [PATCH v5 2/3] fdt: add support for rng-seed

2019-06-10 Thread Hsin-Yi Wang
On Tue, May 28, 2019 at 11:53 PM Stephen Boyd wrote: > > Quoting Hsin-Yi Wang (2019-05-26 21:33:35) > > Introducing a chosen node, rng-seed, which is an entropy that can be > > passed to kernel called very early to increase initial device > > randomness. Bootloader should

[PATCH v7 1/3] arm64: map FDT as RW for early_init_dt_scan()

2019-07-02 Thread Hsin-Yi Wang
Currently in arm64, FDT is mapped to RO before it's passed to early_init_dt_scan(). However, there might be some codes (eg. commit "fdt: add support for rng-seed") that need to modify FDT during init. Map FDT to RO after early fixups are done. Signed-off-by: Hsin-Yi Wang Revie

[PATCH v7 0/3] add support for rng-seed

2019-07-02 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64

[PATCH v7 2/3] fdt: add support for rng-seed

2019-07-02 Thread Hsin-Yi Wang
Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. Bootloader should provide this entropy and the value is read from /chosen/rng-seed in DT. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd Reviewed

[PATCH v7 3/3] arm64: kexec_file: add rng-seed support

2019-07-02 Thread Hsin-Yi Wang
Adding "rng-seed" to dtb. It's fine to add this property if original fdt doesn't contain it. Since original seed will be wiped after read, so use a default size 128 bytes here. Signed-off-by: Hsin-Yi Wang Reviewed-by: Stephen Boyd --- change log v6->v7: * Use stac

Re: [PATCH v6 2/3] fdt: add support for rng-seed

2019-06-28 Thread Hsin-Yi Wang
On Fri, Jun 28, 2019 at 5:35 PM Mark Rutland wrote: > > On Wed, Jun 12, 2019 at 12:33:00PM +0800, Hsin-Yi Wang wrote: > > Introducing a chosen node, rng-seed, which is an entropy that can be > > passed to kernel called very early to increase initial device > > rando

Re: [PATCH v6 3/3] arm64: kexec_file: add rng-seed support

2019-06-28 Thread Hsin-Yi Wang
On Fri, Jun 28, 2019 at 5:42 PM Mark Rutland wrote: > > On Wed, Jun 12, 2019 at 12:33:02PM +0800, Hsin-Yi Wang wrote: > > Adding "rng-seed" to dtb. It's fine to add this property if original > > fdt doesn't contain it. Since original seed will be wiped aft

Re: [PATCH v6 3/3] arm64: kexec_file: add rng-seed support

2019-06-30 Thread Hsin-Yi Wang
On Fri, Jun 28, 2019 at 7:47 PM Hsin-Yi Wang wrote: > > > > If the RNG wasn't initialised, we'd carry on with a warning. Why do we > > follow a different policy here? > > (Sorry, please ignore previous comment) I think this part should be same as kaslr, since

Re: [PATCH RFC 2/9] OPP: Export a number of helpers to prevent code duplication

2019-07-07 Thread Hsin-Yi Wang
On Thu, Mar 28, 2019 at 3:28 PM Sibi Sankar wrote: > + > +/* The caller must call dev_pm_opp_put() after the OPP is used */ > +struct dev_pm_opp *dev_pm_opp_find_opp_of_np(struct opp_table *opp_table, > +struct device_node *opp_np) > +{ > + return

[PATCH resend] drm/panel: panel-innolux: set display off in innolux_panel_unprepare

2019-01-08 Thread Hsin-Yi, Wang
()), so we need these functions to be called after the switch to cmd mode happens, i.e. in innolux_panel_unprepare. Signed-off-by: Hsin-Yi, Wang --- Resend for review. --- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a

Re: [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()

2019-03-08 Thread Hsin-Yi Wang
On Fri, Mar 8, 2019 at 7:29 PM Wolfram Sang wrote: > > On Fri, Feb 22, 2019 at 02:04:11PM +0800, Hsin-Yi Wang wrote: > > Thanks for the solution. > > Previously we were testing if the driver can handle zero-length > > transfer, but it turns out it will timeout. (Also che

Re: [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()

2019-03-08 Thread Hsin-Yi Wang
On Fri, Mar 8, 2019 at 10:52 PM Wolfram Sang wrote: > > > > > I just checked this issue again and concluded that both are reasonable, > > > the suggestion from me below with the adapter quirk AND your original > > > patch setting the threshold to 1. With my suggestion the core will > > > prevent 0

Re: [PATCH] i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()

2019-02-21 Thread Hsin-Yi Wang
Thanks for the solution. Previously we were testing if the driver can handle zero-length transfer, but it turns out it will timeout. (Also checked this from mtk's datasheet) Adding original owner qii.wang to verify that. We'll apply this after verification. On Sat, Feb 16, 2019 at 12:36 AM Wolfram

Re: [PATCH v2] gpu/drm: mediatek: call mtk_dsi_stop() after mtk_drm_crtc_atomic_disable()

2019-03-21 Thread Hsin-Yi Wang
On Thu, Mar 21, 2019 at 9:46 AM CK Hu wrote: > > Hi, Hsin-yi: > > On Thu, 2019-03-21 at 09:28 +0800, CK Hu wrote: > > Hi, Hsin-yi: > > > > On Wed, 2019-03-20 at 15:18 +0800, Hsin-Yi Wang wrote: > > > mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_

Re: [PATCH v2 2/7] arm64: dts: mt6358: Add the compatible for the regulators

2020-07-01 Thread Hsin-Yi Wang
On Thu, Jun 25, 2020 at 6:18 PM Enric Balletbo i Serra wrote: > > The regulators are expected to be instantiated with matching the > device-tree compatible, so add the proper compatible name under the > regulators node. > > Signed-off-by: Enric Balletbo i Serra Teste

Re: [PATCH v2 3/7] arm64: dts: mt8183: Add MediaTek's peripheral configuration controller

2020-07-01 Thread Hsin-Yi Wang
On Thu, Jun 25, 2020 at 6:18 PM Enric Balletbo i Serra wrote: > > The MediaTek's peripheral configuration controller is present on the > MT8183 SoC. Add the node for that controller. > > Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang > --- > > Change

<    1   2   3   4   5   >