From 0b6100c9f651057270658fb301cfc9d02a41a77d6bf4629e0c2b9e2b93b35f52 Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Fri, 22 Oct 2021 13:53:51 +0000 Subject: [PATCH] Accepting request 926979 from hardware:boot:staging OBS-URL: https://build.opensuse.org/request/show/926979 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=154 --- ...-Enable-EFI-and-ISO-partitions-suppo.patch | 24 ++++++ ...-Revert-video-backlight-fix-pwm-s-du.patch | 74 +++++++++++++++++++ u-boot.changes | 8 ++ u-boot.spec | 2 + 4 files changed, 108 insertions(+) create mode 100644 0015-Enable-EFI-and-ISO-partitions-suppo.patch create mode 100644 0016-Revert-video-backlight-fix-pwm-s-du.patch diff --git a/0015-Enable-EFI-and-ISO-partitions-suppo.patch b/0015-Enable-EFI-and-ISO-partitions-suppo.patch new file mode 100644 index 0000000..cdb8889 --- /dev/null +++ b/0015-Enable-EFI-and-ISO-partitions-suppo.patch @@ -0,0 +1,24 @@ +From a519f498352b5a1a1009310c033dc2b74128d832 Mon Sep 17 00:00:00 2001 +From: Guillaume Gardet +Date: Thu, 21 Oct 2021 09:55:50 +0200 +Subject: [PATCH] Enable EFI and ISO partitions support on socfpga_de0_nano_soc + to fix boot This is a partial revert of + f369e1564cf4f81654b8a806fdc325b62b6627dc + +--- + configs/socfpga_de0_nano_soc_defconfig | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig +index 4539d08dea..1c940ec6de 100644 +--- a/configs/socfpga_de0_nano_soc_defconfig ++++ b/configs/socfpga_de0_nano_soc_defconfig +@@ -33,8 +33,6 @@ CONFIG_CMD_EXT4_WRITE=y + CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0" + CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)" + CONFIG_CMD_UBI=y +-# CONFIG_ISO_PARTITION is not set +-# CONFIG_EFI_PARTITION is not set + CONFIG_ENV_IS_IN_MMC=y + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_VERSION_VARIABLE=y diff --git a/0016-Revert-video-backlight-fix-pwm-s-du.patch b/0016-Revert-video-backlight-fix-pwm-s-du.patch new file mode 100644 index 0000000..3ee15ff --- /dev/null +++ b/0016-Revert-video-backlight-fix-pwm-s-du.patch @@ -0,0 +1,74 @@ +From 30b758689c60de57a3e55276a78a37974f43047a Mon Sep 17 00:00:00 2001 +From: Guillaume Gardet +Date: Thu, 21 Oct 2021 15:20:10 +0200 +Subject: [PATCH] Revert "video: backlight: fix pwm's duty cycle calculation" + +This reverts commit 76c2ff3e5fd8068b433acbb0e76d33fa5116dade. + +This fixes backlight on Chromebook snow - boo#1187573 +--- + drivers/video/pwm_backlight.c | 2 +- + test/dm/panel.c | 12 ++++++------ + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c +index d7c096923b..2f3a68ba87 100644 +--- a/drivers/video/pwm_backlight.c ++++ b/drivers/video/pwm_backlight.c +@@ -64,7 +64,7 @@ static int set_pwm(struct pwm_backlight_priv *priv) + + if (priv->period_ns) { + duty_cycle = priv->period_ns * (priv->cur_level - priv->min_level) / +- (priv->max_level - priv->min_level); ++ (priv->max_level - priv->min_level + 1); + ret = pwm_set_config(priv->pwm, priv->channel, priv->period_ns, + duty_cycle); + } else { +diff --git a/test/dm/panel.c b/test/dm/panel.c +index 4d435a0d25..9229c7f4ea 100644 +--- a/test/dm/panel.c ++++ b/test/dm/panel.c +@@ -40,7 +40,7 @@ static int dm_test_panel(struct unit_test_state *uts) + ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, + &enable, &polarity)); + ut_asserteq(1000, period_ns); +- ut_asserteq(170 * 1000 / 255, duty_ns); ++ ut_asserteq(170 * 1000 / 256, duty_ns); + ut_asserteq(true, enable); + ut_asserteq(false, polarity); + ut_asserteq(1, sandbox_gpio_get_value(gpio, 1)); +@@ -49,29 +49,29 @@ static int dm_test_panel(struct unit_test_state *uts) + ut_assertok(panel_set_backlight(dev, 40)); + ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, + &enable, &polarity)); +- ut_asserteq(64 * 1000 / 255, duty_ns); ++ ut_asserteq(64 * 1000 / 256, duty_ns); + + ut_assertok(panel_set_backlight(dev, BACKLIGHT_MAX)); + ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, + &enable, &polarity)); +- ut_asserteq(255 * 1000 / 255, duty_ns); ++ ut_asserteq(255 * 1000 / 256, duty_ns); + + ut_assertok(panel_set_backlight(dev, BACKLIGHT_MIN)); + ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, + &enable, &polarity)); +- ut_asserteq(0 * 1000 / 255, duty_ns); ++ ut_asserteq(0 * 1000 / 256, duty_ns); + ut_asserteq(1, sandbox_gpio_get_value(gpio, 1)); + + ut_assertok(panel_set_backlight(dev, BACKLIGHT_DEFAULT)); + ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, + &enable, &polarity)); + ut_asserteq(true, enable); +- ut_asserteq(170 * 1000 / 255, duty_ns); ++ ut_asserteq(170 * 1000 / 256, duty_ns); + + ut_assertok(panel_set_backlight(dev, BACKLIGHT_OFF)); + ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, + &enable, &polarity)); +- ut_asserteq(0 * 1000 / 255, duty_ns); ++ ut_asserteq(0 * 1000 / 256, duty_ns); + ut_asserteq(0, sandbox_gpio_get_value(gpio, 1)); + ut_asserteq(false, regulator_get_enable(reg)); + diff --git a/u-boot.changes b/u-boot.changes index 79ce568..13d824b 100644 --- a/u-boot.changes +++ b/u-boot.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Oct 22 13:01:25 UTC 2021 - Guillaume GARDET + +Patch queue updated from https://github.com/openSUSE/u-boot.git tumbleweed-2021.10 +* Patches added: + 0015-Enable-EFI-and-ISO-partitions-suppo.patch + 0016-Revert-video-backlight-fix-pwm-s-du.patch - boo#1187573 + ------------------------------------------------------------------- Tue Oct 5 08:09:14 UTC 2021 - Guillaume GARDET diff --git a/u-boot.spec b/u-boot.spec index c9526d9..556cf26 100644 --- a/u-boot.spec +++ b/u-boot.spec @@ -234,6 +234,8 @@ Patch0011: 0011-Disable-CONFIG_CMD_BTRFS-in-xilinx_.patch Patch0012: 0012-smbios-Fix-table-when-no-string-is-.patch Patch0013: 0013-riscv-enable-CMD_BTRFS.patch Patch0014: 0014-Disable-timer-check-in-file-loading.patch +Patch0015: 0015-Enable-EFI-and-ISO-partitions-suppo.patch +Patch0016: 0016-Revert-video-backlight-fix-pwm-s-du.patch # Patches: end BuildRequires: bc BuildRequires: bison