Skip to content

Commit a9ac6cc

Browse files
committed
Merge tag 'fbdev-v4.20' of https://github.com/bzolnier/linux
Pull fbdev updates from Bartlomiej Zolnierkiewicz: "No major changes to the subsystem itself, mainly fb drivers fixes & cleanups (atyfb & udlfb updates stand out from the rest) + removal of no longer needed old clps711xfb driver. Details: - update atyfb driver - improvements for ATI Mach64 chips: detect the dot clock divider correctly on Sparc, fix display corruptions (due to endianness issues and improper reading of accelerator registers), optimize scrolling performance and also fix debugging printks (Mikulas Patocka) - rewrite USB unplug handling in udlfb driver using framebuffer subsystem reference counting (Mikulas Patocka) - fix support for native-mode display-timings in atmel_lcdfb driver (Sam Ravnborg) - fix information leak & add missing access_ok() checks in sbuslib (Dan Carpenter) - allow using GPIO expanders that can sleep in ssd1307fb driver (Michal Vokáč) - convert omapfb driver to use GPIO descriptors instead of GPIO numbers for Amstrad Delta board (Janusz Krzysztofik) - fix broken Kconfig menu dependencies (Randy Dunlap) - convert fbdev subsystem to use %pOFn instead of device_node.name (Rob Herring) - remove the dead old CLPS711x LCD support driver (the new CLPS711x LCD support driver is still available) - misc fixes (Jia-Ju Bai, Gustavo A. R. Silva) - misc cleanups (Mehdi Bounya, Nathan Chancellor, YueHaibing)" * tag 'fbdev-v4.20' of https://github.com/bzolnier/linux: (22 commits) video: fbdev: remove redundant 'default n' from Kconfig-s video: fbdev: remove dead old CLPS711x LCD support driver Revert "video: ssd1307fb: Do not hard code active-low reset sequence" video: fbdev: arcfb: mark expected switch fall-through pxa168fb: remove set but not used variables 'mi' video: ssd1307fb: Do not hard code active-low reset sequence video: ssd1307fb: Use gpiod_set_value_cansleep() for reset fbdev: fix broken menu dependencies video: fbdev: sis: Remove unnecessary parentheses and commented code video: fbdev: omapfb: lcd_ams_delta: use GPIO lookup table fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper() fbdev: sbuslib: use checked version of put_user() fbdev: Convert to using %pOFn instead of device_node.name atmel_lcdfb: support native-mode display-timings Video: vgastate: fixed a spacing coding style atyfb: fix debugging printks mach64: optimize wait_for_fifo mach64: fix image corruption due to reading accelerator registers mach64: fix display corruption on big endian machines mach64: detect the dot clock divider correctly on sparc ...
2 parents d547d44 + 217188d commit a9ac6cc

File tree

27 files changed

+158
-620
lines changed

27 files changed

+158
-620
lines changed

drivers/video/fbdev/Kconfig

Lines changed: 11 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
# fbdev configuration
33
#
44

5+
config FB_CMDLINE
6+
bool
7+
8+
config FB_NOTIFY
9+
bool
10+
511
menuconfig FB
612
tristate "Support for frame buffer devices"
713
select FB_CMDLINE
@@ -41,7 +47,6 @@ menuconfig FB
4147
config FIRMWARE_EDID
4248
bool "Enable firmware EDID"
4349
depends on FB
44-
default n
4550
---help---
4651
This enables access to the EDID transferred from the firmware.
4752
On the i386, this is from the Video BIOS. Enable this if DDC/I2C
@@ -54,31 +59,22 @@ config FIRMWARE_EDID
5459
combination with certain motherboards and monitors are known to
5560
suffer from this problem.
5661

57-
config FB_CMDLINE
58-
bool
59-
60-
config FB_NOTIFY
61-
bool
62-
6362
config FB_DDC
6463
tristate
6564
depends on FB
6665
select I2C_ALGOBIT
6766
select I2C
68-
default n
6967

7068
config FB_BOOT_VESA_SUPPORT
7169
bool
7270
depends on FB
73-
default n
7471
---help---
7572
If true, at least one selected framebuffer driver can take advantage
7673
of VESA video modes set at an early boot stage via the vga= parameter.
7774

7875
config FB_CFB_FILLRECT
7976
tristate
8077
depends on FB
81-
default n
8278
---help---
8379
Include the cfb_fillrect function for generic software rectangle
8480
filling. This is used by drivers that don't provide their own
@@ -87,7 +83,6 @@ config FB_CFB_FILLRECT
8783
config FB_CFB_COPYAREA
8884
tristate
8985
depends on FB
90-
default n
9186
---help---
9287
Include the cfb_copyarea function for generic software area copying.
9388
This is used by drivers that don't provide their own (accelerated)
@@ -96,7 +91,6 @@ config FB_CFB_COPYAREA
9691
config FB_CFB_IMAGEBLIT
9792
tristate
9893
depends on FB
99-
default n
10094
---help---
10195
Include the cfb_imageblit function for generic software image
10296
blitting. This is used by drivers that don't provide their own
@@ -105,7 +99,6 @@ config FB_CFB_IMAGEBLIT
10599
config FB_CFB_REV_PIXELS_IN_BYTE
106100
bool
107101
depends on FB
108-
default n
109102
---help---
110103
Allow generic frame-buffer functions to work on displays with 1, 2
111104
and 4 bits per pixel depths which has opposite order of pixels in
@@ -114,7 +107,6 @@ config FB_CFB_REV_PIXELS_IN_BYTE
114107
config FB_SYS_FILLRECT
115108
tristate
116109
depends on FB
117-
default n
118110
---help---
119111
Include the sys_fillrect function for generic software rectangle
120112
filling. This is used by drivers that don't provide their own
@@ -123,7 +115,6 @@ config FB_SYS_FILLRECT
123115
config FB_SYS_COPYAREA
124116
tristate
125117
depends on FB
126-
default n
127118
---help---
128119
Include the sys_copyarea function for generic software area copying.
129120
This is used by drivers that don't provide their own (accelerated)
@@ -132,7 +123,6 @@ config FB_SYS_COPYAREA
132123
config FB_SYS_IMAGEBLIT
133124
tristate
134125
depends on FB
135-
default n
136126
---help---
137127
Include the sys_imageblit function for generic software image
138128
blitting. This is used by drivers that don't provide their own
@@ -141,7 +131,6 @@ config FB_SYS_IMAGEBLIT
141131
config FB_PROVIDE_GET_FB_UNMAPPED_AREA
142132
bool
143133
depends on FB
144-
default n
145134
---help---
146135
Allow generic frame-buffer to provide get_fb_unmapped_area
147136
function.
@@ -173,7 +162,6 @@ endchoice
173162
config FB_SYS_FOPS
174163
tristate
175164
depends on FB
176-
default n
177165

178166
config FB_DEFERRED_IO
179167
bool
@@ -187,27 +175,23 @@ config FB_HECUBA
187175
config FB_SVGALIB
188176
tristate
189177
depends on FB
190-
default n
191178
---help---
192179
Common utility functions useful to fbdev drivers of VGA-based
193180
cards.
194181

195182
config FB_MACMODES
196183
tristate
197184
depends on FB
198-
default n
199185

200186
config FB_BACKLIGHT
201187
bool
202188
depends on FB
203189
select BACKLIGHT_LCD_SUPPORT
204190
select BACKLIGHT_CLASS_DEVICE
205-
default n
206191

207192
config FB_MODE_HELPERS
208193
bool "Enable Video Mode Handling Helpers"
209194
depends on FB
210-
default n
211195
---help---
212196
This enables functions for handling video modes using the
213197
Generalized Timing Formula and the EDID parser. A few drivers rely
@@ -218,7 +202,6 @@ config FB_MODE_HELPERS
218202
config FB_TILEBLITTING
219203
bool "Enable Tile Blitting Support"
220204
depends on FB
221-
default n
222205
---help---
223206
This enables tile blitting. Tile blitting is a drawing technique
224207
where the screen is divided into rectangular sections (tiles), whereas
@@ -329,16 +312,9 @@ config FB_ACORN
329312
hardware found in Acorn RISC PCs and other ARM-based machines. If
330313
unsure, say N.
331314

332-
config FB_CLPS711X_OLD
333-
tristate
334-
select FB_CFB_FILLRECT
335-
select FB_CFB_COPYAREA
336-
select FB_CFB_IMAGEBLIT
337-
338315
config FB_CLPS711X
339316
tristate "CLPS711X LCD support"
340317
depends on FB && (ARCH_CLPS711X || COMPILE_TEST)
341-
select FB_CLPS711X_OLD if ARCH_CLPS711X && !ARCH_MULTIPLATFORM
342318
select BACKLIGHT_LCD_SUPPORT
343319
select FB_MODE_HELPERS
344320
select FB_SYS_FILLRECT
@@ -936,7 +912,6 @@ config FB_NVIDIA_I2C
936912
config FB_NVIDIA_DEBUG
937913
bool "Lots of debug output"
938914
depends on FB_NVIDIA
939-
default n
940915
help
941916
Say Y here if you want the nVidia driver to output all sorts
942917
of debugging information to provide to the maintainer when
@@ -983,7 +958,6 @@ config FB_RIVA_I2C
983958
config FB_RIVA_DEBUG
984959
bool "Lots of debug output"
985960
depends on FB_RIVA
986-
default n
987961
help
988962
Say Y here if you want the Riva driver to output all sorts
989963
of debugging information to provide to the maintainer when
@@ -1266,7 +1240,6 @@ config FB_RADEON_BACKLIGHT
12661240
config FB_RADEON_DEBUG
12671241
bool "Lots of debug output from Radeon driver"
12681242
depends on FB_RADEON
1269-
default n
12701243
help
12711244
Say Y here if you want the Radeon driver to output all sorts
12721245
of debugging information to provide to the maintainer when
@@ -1399,7 +1372,6 @@ config FB_SAVAGE_I2C
13991372
config FB_SAVAGE_ACCEL
14001373
bool "Enable Console Acceleration"
14011374
depends on FB_SAVAGE
1402-
default n
14031375
help
14041376
This option will compile in console acceleration support. If
14051377
the resulting framebuffer console has bothersome glitches, then
@@ -1456,8 +1428,6 @@ if FB_VIA
14561428

14571429
config FB_VIA_DIRECT_PROCFS
14581430
bool "direct hardware access via procfs (DEPRECATED)(DANGEROUS)"
1459-
depends on FB_VIA
1460-
default n
14611431
help
14621432
Allow direct hardware access to some output registers via procfs.
14631433
This is dangerous but may provide the only chance to get the
@@ -1466,8 +1436,6 @@ config FB_VIA_DIRECT_PROCFS
14661436

14671437
config FB_VIA_X_COMPATIBILITY
14681438
bool "X server compatibility"
1469-
depends on FB_VIA
1470-
default n
14711439
help
14721440
This option reduces the functionality (power saving, ...) of the
14731441
framebuffer to avoid negative impact on the OpenChrome X server.
@@ -1692,7 +1660,6 @@ config FB_WM8505
16921660
config FB_WMT_GE_ROPS
16931661
bool "VT8500/WM8xxx accelerated raster ops support"
16941662
depends on (FB = y) && (FB_VT8500 || FB_WM8505)
1695-
default n
16961663
help
16971664
This adds support for accelerated raster operations on the
16981665
VIA VT8500 and Wondermedia 85xx series SoCs.
@@ -1802,17 +1769,14 @@ config FB_PXA
18021769

18031770
config FB_PXA_OVERLAY
18041771
bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
1805-
default n
18061772
depends on FB_PXA && (PXA27x || PXA3xx)
18071773

18081774
config FB_PXA_SMARTPANEL
18091775
bool "PXA Smartpanel LCD support"
1810-
default n
18111776
depends on FB_PXA
18121777

18131778
config FB_PXA_PARAMETERS
18141779
bool "PXA LCD command line parameters"
1815-
default n
18161780
depends on FB_PXA
18171781
---help---
18181782
Enable the use of kernel command line or module parameters
@@ -1850,7 +1814,6 @@ config FB_MBX
18501814
config FB_MBX_DEBUG
18511815
bool "Enable debugging info via debugfs"
18521816
depends on FB_MBX && DEBUG_FS
1853-
default n
18541817
---help---
18551818
Enable this if you want debugging information using the debug
18561819
filesystem (debugfs)
@@ -2240,7 +2203,7 @@ config FB_MX3
22402203

22412204
config FB_BROADSHEET
22422205
tristate "E-Ink Broadsheet/Epson S1D13521 controller support"
2243-
depends on FB
2206+
depends on FB && (ARCH_PXA || COMPILE_TEST)
22442207
select FB_SYS_FILLRECT
22452208
select FB_SYS_COPYAREA
22462209
select FB_SYS_IMAGEBLIT
@@ -2308,10 +2271,6 @@ config FB_SIMPLE
23082271
Configuration re: surface address, size, and format must be provided
23092272
through device tree, or plain old platform data.
23102273

2311-
source "drivers/video/fbdev/omap/Kconfig"
2312-
source "drivers/video/fbdev/omap2/Kconfig"
2313-
source "drivers/video/fbdev/mmp/Kconfig"
2314-
23152274
config FB_SSD1307
23162275
tristate "Solomon SSD1307 framebuffer support"
23172276
depends on FB && I2C
@@ -2341,3 +2300,7 @@ config FB_SM712
23412300
This driver is also available as a module. The module will be
23422301
called sm712fb. If you want to compile it as a module, say M
23432302
here and read <file:Documentation/kbuild/modules.txt>.
2303+
2304+
source "drivers/video/fbdev/omap/Kconfig"
2305+
source "drivers/video/fbdev/omap2/Kconfig"
2306+
source "drivers/video/fbdev/mmp/Kconfig"

drivers/video/fbdev/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ obj-$(CONFIG_FB_WMT_GE_ROPS) += wmt_ge_rops.o
1414
obj-$(CONFIG_FB_AMIGA) += amifb.o c2p_planar.o
1515
obj-$(CONFIG_FB_ARC) += arcfb.o
1616
obj-$(CONFIG_FB_CLPS711X) += clps711x-fb.o
17-
obj-$(CONFIG_FB_CLPS711X_OLD) += clps711xfb.o
1817
obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o
1918
obj-$(CONFIG_FB_GRVGA) += grvga.o
2019
obj-$(CONFIG_FB_PM2) += pm2fb.o

drivers/video/fbdev/arcfb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ static int arcfb_ioctl(struct fb_info *info,
419419
schedule();
420420
finish_wait(&arcfb_waitq, &wait);
421421
}
422+
/* fall through */
423+
422424
case FBIO_GETCONTROL2:
423425
{
424426
unsigned char ctl2;

drivers/video/fbdev/atmel_lcdfb.c

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/module.h>
2323
#include <linux/of.h>
2424
#include <linux/of_device.h>
25+
#include <video/of_videomode.h>
2526
#include <video/of_display_timing.h>
2627
#include <linux/regulator/consumer.h>
2728
#include <video/videomode.h>
@@ -1028,11 +1029,11 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
10281029
struct device *dev = &sinfo->pdev->dev;
10291030
struct device_node *np =dev->of_node;
10301031
struct device_node *display_np;
1031-
struct device_node *timings_np;
1032-
struct display_timings *timings;
10331032
struct atmel_lcdfb_power_ctrl_gpio *og;
10341033
bool is_gpio_power = false;
1034+
struct fb_videomode fb_vm;
10351035
struct gpio_desc *gpiod;
1036+
struct videomode vm;
10361037
int ret = -ENOENT;
10371038
int i;
10381039

@@ -1105,44 +1106,18 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
11051106
pdata->lcdcon_is_backlight = of_property_read_bool(display_np, "atmel,lcdcon-backlight");
11061107
pdata->lcdcon_pol_negative = of_property_read_bool(display_np, "atmel,lcdcon-backlight-inverted");
11071108

1108-
timings = of_get_display_timings(display_np);
1109-
if (!timings) {
1110-
dev_err(dev, "failed to get display timings\n");
1111-
ret = -EINVAL;
1109+
ret = of_get_videomode(display_np, &vm, OF_USE_NATIVE_MODE);
1110+
if (ret) {
1111+
dev_err(dev, "failed to get videomode from DT\n");
11121112
goto put_display_node;
11131113
}
11141114

1115-
timings_np = of_get_child_by_name(display_np, "display-timings");
1116-
if (!timings_np) {
1117-
dev_err(dev, "failed to find display-timings node\n");
1118-
ret = -ENODEV;
1115+
ret = fb_videomode_from_videomode(&vm, &fb_vm);
1116+
if (ret < 0)
11191117
goto put_display_node;
1120-
}
11211118

1122-
for (i = 0; i < of_get_child_count(timings_np); i++) {
1123-
struct videomode vm;
1124-
struct fb_videomode fb_vm;
1125-
1126-
ret = videomode_from_timings(timings, &vm, i);
1127-
if (ret < 0)
1128-
goto put_timings_node;
1129-
ret = fb_videomode_from_videomode(&vm, &fb_vm);
1130-
if (ret < 0)
1131-
goto put_timings_node;
1132-
1133-
fb_add_videomode(&fb_vm, &info->modelist);
1134-
}
1135-
1136-
/*
1137-
* FIXME: Make sure we are not referencing any fields in display_np
1138-
* and timings_np and drop our references to them before returning to
1139-
* avoid leaking the nodes on probe deferral and driver unbind.
1140-
*/
1141-
1142-
return 0;
1119+
fb_add_videomode(&fb_vm, &info->modelist);
11431120

1144-
put_timings_node:
1145-
of_node_put(timings_np);
11461121
put_display_node:
11471122
of_node_put(display_np);
11481123
return ret;

0 commit comments

Comments
 (0)