Skip to content

Commit 607132d

Browse files
CharlesWu465CL Chin-Long Wang
authored andcommitted
fbdev: andes: ftlcdc100: support the framebuffer feature (torvalds#187)
Support FTLCDC100 framebuffer function. Reformed from the following patches on RISCV-Linux-6.1: - (c2be1a1) fbdev: andes: ftlcdc100: change OSD_putc if...else to switch - (db22aa6) fbdev: andes: ftlcdc100: Change the default LCD panel type from CONFIG_PANEL_LW500AC9601 to CONFIG_PANEL_AUA036QN01. - (7137e6f) fbdev: andes: ftlcdc100: To support AUA036QN01, change the FFB mode from 24BPP to 16BPP. Signed-off-by: Charles Ci-Jyun Wu <[email protected]> Signed-off-by: CL Wang <[email protected]> Co-authored-by: CL Chin-Long Wang <[email protected]> Reviewed-on: https://gitea.andestech.com/RD-SW/linux/pulls/187 Reviewed-by: randolph <[email protected]> Reviewed-by: CL Chin-Long Wang <[email protected]> Co-authored-by: charles <[email protected]> Co-committed-by: charles <[email protected]>
1 parent e53607e commit 607132d

File tree

10 files changed

+2008
-0
lines changed

10 files changed

+2008
-0
lines changed

arch/riscv/configs/andes-support.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ CONFIG_ATCIIC_IRQ=y
2424

2525
CONFIG_GPIO_ATCGPIO100=y
2626
CONFIG_ANDES_ATCSMU=y
27+
28+
CONFIG_FB_FTLCDC100=y
29+
CONFIG_PANEL_AUA036QN01=y
30+
CONFIG_FFB_MODE_RGB=y
31+
CONFIG_FFB_MODE_16BPP=y

arch/riscv/configs/andes_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ CONFIG_RCU_EQS_DEBUG=y
179179
# CONFIG_RUNTIME_TESTING_MENU is not set
180180
CONFIG_MEMTEST=y
181181

182+
CONFIG_FB_CFB_FILLRECT=y
183+
CONFIG_FB_CFB_COPYAREA=y
184+
CONFIG_FB_CFB_IMAGEBLIT=y
185+
182186
CONFIG_SOUND=y
183187
CONFIG_SOUND_OSS_CORE=y
184188
CONFIG_SOUND_OSS_CORE_PRECLAIM=y

drivers/video/fbdev/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,5 +1814,6 @@ config FB_SM712
18141814
source "drivers/video/fbdev/omap/Kconfig"
18151815
source "drivers/video/fbdev/omap2/Kconfig"
18161816
source "drivers/video/fbdev/mmp/Kconfig"
1817+
source "drivers/video/fbdev/ftlcdc100/Kconfig"
18171818

18181819
source "drivers/video/fbdev/core/Kconfig"

drivers/video/fbdev/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ obj-y += omap2/
111111
obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o
112112
obj-$(CONFIG_FB_CARMINE) += carminefb.o
113113
obj-$(CONFIG_FB_MB862XX) += mb862xx/
114+
obj-$(CONFIG_FB_FTLCDC100) += ftlcdc100/
114115
obj-$(CONFIG_FB_HYPERV) += hyperv_fb.o
115116
obj-$(CONFIG_FB_OPENCORES) += ocfb.o
116117
obj-$(CONFIG_FB_SM712) += sm712fb.o
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
config FB_FTLCDC100
2+
tristate "Faraday FTLCDC100 driver"
3+
depends on FB
4+
select FB_CFB_FILLRECT
5+
select FB_CFB_COPYAREA
6+
select FB_CFB_IMAGEBLIT
7+
8+
choice
9+
prompt "Default LCD Panel"
10+
depends on FB_FTLCDC100
11+
default PANEL_AUA036QN01
12+
help
13+
This option select a default panel setting for the LCD controller
14+
15+
config PANEL_AUA036QN01
16+
bool "AU 3.5 inch LCD Panel"
17+
18+
config PANEL_CH7013A
19+
bool "Chrontel Digital PC to TV Encoder"
20+
select I2C
21+
select I2C_FARADAY
22+
select CH7013A
23+
24+
config PANEL_AUA070VW04
25+
bool "AU 7.0 inch LCD Panel"
26+
27+
config PANEL_LW500AC9601
28+
bool "CHIMEI 5.0 inch LCD panel"
29+
30+
endchoice
31+
32+
# config FTLCD_OSD
33+
# bool "Enable OSD (On Screen Display)"
34+
# depends on FB_FTLCDC100
35+
# default n
36+
# ---help---
37+
# This enables access to the OSD (On Screen Display) for Faraday
38+
# FTLCDC100 LCD control. Disabling OSD will reduce the size of
39+
# the kernel by approximately 6kb.
40+
#
41+
42+
choice
43+
prompt "Default Color Mode"
44+
depends on FB_FTLCDC100
45+
default FFB_MODE_RGB
46+
help
47+
This option select default color mode
48+
49+
config FFB_MODE_RGB
50+
bool "RGB Mode"
51+
config FFB_MODE_YUV422
52+
bool "YUV422 Mode"
53+
config FFB_MODE_YUV420
54+
bool "YUV420 Mode"
55+
endchoice
56+
57+
choice
58+
prompt "Default BPP"
59+
depends on FB_FTLCDC100
60+
default FFB_MODE_16BPP
61+
help
62+
This option select default BPP (bits-per-pixel)
63+
64+
config FFB_MODE_8BPP
65+
depends on FFB_MODE_RGB || FFB_MODE_YUV420
66+
bool "8 bits-per-pixel"
67+
config FFB_MODE_16BPP
68+
depends on FFB_MODE_RGB || FFB_MODE_YUV422
69+
bool "16 bits-per-pixel"
70+
config FFB_MODE_24BPP
71+
depends on FFB_MODE_RGB
72+
bool "24 bits-per-pixel"
73+
endchoice
74+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_FB_FTLCDC100) += faradayfb-main.o

0 commit comments

Comments
 (0)