diff mbox series

[1/2] configs/stm32f469_disco: enable Linux DRM support

Message ID 20211017162839.20278-2-dariobin@libero.it
State Accepted
Headers show
Series configs/stm32f469_disco: enable Linux DRM support | expand

Commit Message

Dario Binacchi Oct. 17, 2021, 4:28 p.m. UTC
The patch [1], which is required for DRM to work properly, has been
merged into Linux version 5.14-rc3. There's a 5.14.12 now in stable, so
I took that one.

After Linux boots, /dev/fb0 will be accessible. You can control the
brightness of the display after enabling the framebuffer by running the
following commands:

~ # echo 0 0 > /sys/class/graphics/fb0/pan
~ # echo 255 >/sys/class/backlight/40016c00.dsi.0/brightness

The brightness ranges from 0 to 255, as you can see running the
command:

~ # cat /sys/class/backlight/40016c00.dsi.0/max_brightness

[1] 24b5b1978cd5 ("clk: stm32f4: fix post divisor setup for I2S/SAI PLLs")

Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
 board/stmicroelectronics/stm32f469-disco/linux.fragment | 8 +++++++-
 configs/stm32f469_disco_defconfig                       | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

Comments

Christophe Priouzeau Oct. 18, 2021, 11:06 a.m. UTC | #1
Acked-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>

On 10/17/21 6:28 PM, Dario Binacchi wrote:
> The patch [1], which is required for DRM to work properly, has been
> merged into Linux version 5.14-rc3. There's a 5.14.12 now in stable, so
> I took that one.
> 
> After Linux boots, /dev/fb0 will be accessible. You can control the
> brightness of the display after enabling the framebuffer by running the
> following commands:
> 
> ~ # echo 0 0 > /sys/class/graphics/fb0/pan
> ~ # echo 255 >/sys/class/backlight/40016c00.dsi.0/brightness
> 
> The brightness ranges from 0 to 255, as you can see running the
> command:
> 
> ~ # cat /sys/class/backlight/40016c00.dsi.0/max_brightness
> 
> [1] 24b5b1978cd5 ("clk: stm32f4: fix post divisor setup for I2S/SAI PLLs")
> 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> ---
>   board/stmicroelectronics/stm32f469-disco/linux.fragment | 8 +++++++-
>   configs/stm32f469_disco_defconfig                       | 4 ++--
>   2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> index 90f5e8a8ff..e5d39bf04a 100644
> --- a/board/stmicroelectronics/stm32f469-disco/linux.fragment
> +++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> @@ -1 +1,7 @@
> -# CONFIG_XIP_KERNEL is not set
> \ No newline at end of file
> +# CONFIG_XIP_KERNEL is not set
> +CONFIG_DRM=y
> +CONFIG_DRM_STM=y
> +CONFIG_DRM_STM_DSI=y
> +CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
> +CONFIG_FB=y
> +CONFIG_BACKLIGHT_CLASS_DEVICE=y
> diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
> index e538a664e2..438d32150c 100644
> --- a/configs/stm32f469_disco_defconfig
> +++ b/configs/stm32f469_disco_defconfig
> @@ -1,12 +1,12 @@
>   BR2_arm=y
>   BR2_cortex_m4=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
>   BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
>   BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>   BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
>   BR2_LINUX_KERNEL=y
>   BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.11"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12"
>   BR2_LINUX_KERNEL_DEFCONFIG="stm32"
>   BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment"
>   BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
>
Arnout Vandecappelle Oct. 26, 2021, 7:31 p.m. UTC | #2
On 17/10/2021 18:28, Dario Binacchi wrote:
> The patch [1], which is required for DRM to work properly, has been
> merged into Linux version 5.14-rc3. There's a 5.14.12 now in stable, so
> I took that one.
> 
> After Linux boots, /dev/fb0 will be accessible. You can control the
> brightness of the display after enabling the framebuffer by running the
> following commands:
> 
> ~ # echo 0 0 > /sys/class/graphics/fb0/pan
> ~ # echo 255 >/sys/class/backlight/40016c00.dsi.0/brightness
> 
> The brightness ranges from 0 to 255, as you can see running the
> command:
> 
> ~ # cat /sys/class/backlight/40016c00.dsi.0/max_brightness

  I've added the above text to the readme.txt and applied to master, thanks.

  Regards,
  Arnout

> 
> [1] 24b5b1978cd5 ("clk: stm32f4: fix post divisor setup for I2S/SAI PLLs")
> 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> ---
>   board/stmicroelectronics/stm32f469-disco/linux.fragment | 8 +++++++-
>   configs/stm32f469_disco_defconfig                       | 4 ++--
>   2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> index 90f5e8a8ff..e5d39bf04a 100644
> --- a/board/stmicroelectronics/stm32f469-disco/linux.fragment
> +++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
> @@ -1 +1,7 @@
> -# CONFIG_XIP_KERNEL is not set
> \ No newline at end of file
> +# CONFIG_XIP_KERNEL is not set
> +CONFIG_DRM=y
> +CONFIG_DRM_STM=y
> +CONFIG_DRM_STM_DSI=y
> +CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
> +CONFIG_FB=y
> +CONFIG_BACKLIGHT_CLASS_DEVICE=y
> diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
> index e538a664e2..438d32150c 100644
> --- a/configs/stm32f469_disco_defconfig
> +++ b/configs/stm32f469_disco_defconfig
> @@ -1,12 +1,12 @@
>   BR2_arm=y
>   BR2_cortex_m4=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
>   BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
>   BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>   BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
>   BR2_LINUX_KERNEL=y
>   BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.11"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12"
>   BR2_LINUX_KERNEL_DEFCONFIG="stm32"
>   BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment"
>   BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
>
diff mbox series

Patch

diff --git a/board/stmicroelectronics/stm32f469-disco/linux.fragment b/board/stmicroelectronics/stm32f469-disco/linux.fragment
index 90f5e8a8ff..e5d39bf04a 100644
--- a/board/stmicroelectronics/stm32f469-disco/linux.fragment
+++ b/board/stmicroelectronics/stm32f469-disco/linux.fragment
@@ -1 +1,7 @@ 
-# CONFIG_XIP_KERNEL is not set
\ No newline at end of file
+# CONFIG_XIP_KERNEL is not set
+CONFIG_DRM=y
+CONFIG_DRM_STM=y
+CONFIG_DRM_STM_DSI=y
+CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
+CONFIG_FB=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
diff --git a/configs/stm32f469_disco_defconfig b/configs/stm32f469_disco_defconfig
index e538a664e2..438d32150c 100644
--- a/configs/stm32f469_disco_defconfig
+++ b/configs/stm32f469_disco_defconfig
@@ -1,12 +1,12 @@ 
 BR2_arm=y
 BR2_cortex_m4=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_12=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.11"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12"
 BR2_LINUX_KERNEL_DEFCONFIG="stm32"
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment"
 BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y