Skip to content

Commit

Permalink
Merge tag 'fbdev-v4.20' of https://github.com/bzolnier/linux
Browse files Browse the repository at this point in the history
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
  ...
  • Loading branch information
Linus Torvalds committed Oct 31, 2018
2 parents d547d44 + 217188d commit a9ac6cc
Show file tree
Hide file tree
Showing 27 changed files with 158 additions and 620 deletions.
59 changes: 11 additions & 48 deletions drivers/video/fbdev/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# fbdev configuration
#

config FB_CMDLINE
bool

config FB_NOTIFY
bool

menuconfig FB
tristate "Support for frame buffer devices"
select FB_CMDLINE
Expand Down Expand Up @@ -41,7 +47,6 @@ menuconfig FB
config FIRMWARE_EDID
bool "Enable firmware EDID"
depends on FB
default n
---help---
This enables access to the EDID transferred from the firmware.
On the i386, this is from the Video BIOS. Enable this if DDC/I2C
Expand All @@ -54,31 +59,22 @@ config FIRMWARE_EDID
combination with certain motherboards and monitors are known to
suffer from this problem.

config FB_CMDLINE
bool

config FB_NOTIFY
bool

config FB_DDC
tristate
depends on FB
select I2C_ALGOBIT
select I2C
default n

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

config FB_CFB_FILLRECT
tristate
depends on FB
default n
---help---
Include the cfb_fillrect function for generic software rectangle
filling. This is used by drivers that don't provide their own
Expand All @@ -87,7 +83,6 @@ config FB_CFB_FILLRECT
config FB_CFB_COPYAREA
tristate
depends on FB
default n
---help---
Include the cfb_copyarea function for generic software area copying.
This is used by drivers that don't provide their own (accelerated)
Expand All @@ -96,7 +91,6 @@ config FB_CFB_COPYAREA
config FB_CFB_IMAGEBLIT
tristate
depends on FB
default n
---help---
Include the cfb_imageblit function for generic software image
blitting. This is used by drivers that don't provide their own
Expand All @@ -105,7 +99,6 @@ config FB_CFB_IMAGEBLIT
config FB_CFB_REV_PIXELS_IN_BYTE
bool
depends on FB
default n
---help---
Allow generic frame-buffer functions to work on displays with 1, 2
and 4 bits per pixel depths which has opposite order of pixels in
Expand All @@ -114,7 +107,6 @@ config FB_CFB_REV_PIXELS_IN_BYTE
config FB_SYS_FILLRECT
tristate
depends on FB
default n
---help---
Include the sys_fillrect function for generic software rectangle
filling. This is used by drivers that don't provide their own
Expand All @@ -123,7 +115,6 @@ config FB_SYS_FILLRECT
config FB_SYS_COPYAREA
tristate
depends on FB
default n
---help---
Include the sys_copyarea function for generic software area copying.
This is used by drivers that don't provide their own (accelerated)
Expand All @@ -132,7 +123,6 @@ config FB_SYS_COPYAREA
config FB_SYS_IMAGEBLIT
tristate
depends on FB
default n
---help---
Include the sys_imageblit function for generic software image
blitting. This is used by drivers that don't provide their own
Expand All @@ -141,7 +131,6 @@ config FB_SYS_IMAGEBLIT
config FB_PROVIDE_GET_FB_UNMAPPED_AREA
bool
depends on FB
default n
---help---
Allow generic frame-buffer to provide get_fb_unmapped_area
function.
Expand Down Expand Up @@ -173,7 +162,6 @@ endchoice
config FB_SYS_FOPS
tristate
depends on FB
default n

config FB_DEFERRED_IO
bool
Expand All @@ -187,27 +175,23 @@ config FB_HECUBA
config FB_SVGALIB
tristate
depends on FB
default n
---help---
Common utility functions useful to fbdev drivers of VGA-based
cards.

config FB_MACMODES
tristate
depends on FB
default n

config FB_BACKLIGHT
bool
depends on FB
select BACKLIGHT_LCD_SUPPORT
select BACKLIGHT_CLASS_DEVICE
default n

config FB_MODE_HELPERS
bool "Enable Video Mode Handling Helpers"
depends on FB
default n
---help---
This enables functions for handling video modes using the
Generalized Timing Formula and the EDID parser. A few drivers rely
Expand All @@ -218,7 +202,6 @@ config FB_MODE_HELPERS
config FB_TILEBLITTING
bool "Enable Tile Blitting Support"
depends on FB
default n
---help---
This enables tile blitting. Tile blitting is a drawing technique
where the screen is divided into rectangular sections (tiles), whereas
Expand Down Expand Up @@ -329,16 +312,9 @@ config FB_ACORN
hardware found in Acorn RISC PCs and other ARM-based machines. If
unsure, say N.

config FB_CLPS711X_OLD
tristate
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT

config FB_CLPS711X
tristate "CLPS711X LCD support"
depends on FB && (ARCH_CLPS711X || COMPILE_TEST)
select FB_CLPS711X_OLD if ARCH_CLPS711X && !ARCH_MULTIPLATFORM
select BACKLIGHT_LCD_SUPPORT
select FB_MODE_HELPERS
select FB_SYS_FILLRECT
Expand Down Expand Up @@ -936,7 +912,6 @@ config FB_NVIDIA_I2C
config FB_NVIDIA_DEBUG
bool "Lots of debug output"
depends on FB_NVIDIA
default n
help
Say Y here if you want the nVidia driver to output all sorts
of debugging information to provide to the maintainer when
Expand Down Expand Up @@ -983,7 +958,6 @@ config FB_RIVA_I2C
config FB_RIVA_DEBUG
bool "Lots of debug output"
depends on FB_RIVA
default n
help
Say Y here if you want the Riva driver to output all sorts
of debugging information to provide to the maintainer when
Expand Down Expand Up @@ -1266,7 +1240,6 @@ config FB_RADEON_BACKLIGHT
config FB_RADEON_DEBUG
bool "Lots of debug output from Radeon driver"
depends on FB_RADEON
default n
help
Say Y here if you want the Radeon driver to output all sorts
of debugging information to provide to the maintainer when
Expand Down Expand Up @@ -1399,7 +1372,6 @@ config FB_SAVAGE_I2C
config FB_SAVAGE_ACCEL
bool "Enable Console Acceleration"
depends on FB_SAVAGE
default n
help
This option will compile in console acceleration support. If
the resulting framebuffer console has bothersome glitches, then
Expand Down Expand Up @@ -1456,8 +1428,6 @@ if FB_VIA

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

config FB_VIA_X_COMPATIBILITY
bool "X server compatibility"
depends on FB_VIA
default n
help
This option reduces the functionality (power saving, ...) of the
framebuffer to avoid negative impact on the OpenChrome X server.
Expand Down Expand Up @@ -1692,7 +1660,6 @@ config FB_WM8505
config FB_WMT_GE_ROPS
bool "VT8500/WM8xxx accelerated raster ops support"
depends on (FB = y) && (FB_VT8500 || FB_WM8505)
default n
help
This adds support for accelerated raster operations on the
VIA VT8500 and Wondermedia 85xx series SoCs.
Expand Down Expand Up @@ -1802,17 +1769,14 @@ config FB_PXA

config FB_PXA_OVERLAY
bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer"
default n
depends on FB_PXA && (PXA27x || PXA3xx)

config FB_PXA_SMARTPANEL
bool "PXA Smartpanel LCD support"
default n
depends on FB_PXA

config FB_PXA_PARAMETERS
bool "PXA LCD command line parameters"
default n
depends on FB_PXA
---help---
Enable the use of kernel command line or module parameters
Expand Down Expand Up @@ -1850,7 +1814,6 @@ config FB_MBX
config FB_MBX_DEBUG
bool "Enable debugging info via debugfs"
depends on FB_MBX && DEBUG_FS
default n
---help---
Enable this if you want debugging information using the debug
filesystem (debugfs)
Expand Down Expand Up @@ -2240,7 +2203,7 @@ config FB_MX3

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

source "drivers/video/fbdev/omap/Kconfig"
source "drivers/video/fbdev/omap2/Kconfig"
source "drivers/video/fbdev/mmp/Kconfig"

config FB_SSD1307
tristate "Solomon SSD1307 framebuffer support"
depends on FB && I2C
Expand Down Expand Up @@ -2341,3 +2300,7 @@ config FB_SM712
This driver is also available as a module. The module will be
called sm712fb. If you want to compile it as a module, say M
here and read <file:Documentation/kbuild/modules.txt>.

source "drivers/video/fbdev/omap/Kconfig"
source "drivers/video/fbdev/omap2/Kconfig"
source "drivers/video/fbdev/mmp/Kconfig"
1 change: 0 additions & 1 deletion drivers/video/fbdev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ obj-$(CONFIG_FB_WMT_GE_ROPS) += wmt_ge_rops.o
obj-$(CONFIG_FB_AMIGA) += amifb.o c2p_planar.o
obj-$(CONFIG_FB_ARC) += arcfb.o
obj-$(CONFIG_FB_CLPS711X) += clps711x-fb.o
obj-$(CONFIG_FB_CLPS711X_OLD) += clps711xfb.o
obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o
obj-$(CONFIG_FB_GRVGA) += grvga.o
obj-$(CONFIG_FB_PM2) += pm2fb.o
Expand Down
2 changes: 2 additions & 0 deletions drivers/video/fbdev/arcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ static int arcfb_ioctl(struct fb_info *info,
schedule();
finish_wait(&arcfb_waitq, &wait);
}
/* fall through */

case FBIO_GETCONTROL2:
{
unsigned char ctl2;
Expand Down
43 changes: 9 additions & 34 deletions drivers/video/fbdev/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <video/of_videomode.h>
#include <video/of_display_timing.h>
#include <linux/regulator/consumer.h>
#include <video/videomode.h>
Expand Down Expand Up @@ -1028,11 +1029,11 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
struct device *dev = &sinfo->pdev->dev;
struct device_node *np =dev->of_node;
struct device_node *display_np;
struct device_node *timings_np;
struct display_timings *timings;
struct atmel_lcdfb_power_ctrl_gpio *og;
bool is_gpio_power = false;
struct fb_videomode fb_vm;
struct gpio_desc *gpiod;
struct videomode vm;
int ret = -ENOENT;
int i;

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

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

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

for (i = 0; i < of_get_child_count(timings_np); i++) {
struct videomode vm;
struct fb_videomode fb_vm;

ret = videomode_from_timings(timings, &vm, i);
if (ret < 0)
goto put_timings_node;
ret = fb_videomode_from_videomode(&vm, &fb_vm);
if (ret < 0)
goto put_timings_node;

fb_add_videomode(&fb_vm, &info->modelist);
}

/*
* FIXME: Make sure we are not referencing any fields in display_np
* and timings_np and drop our references to them before returning to
* avoid leaking the nodes on probe deferral and driver unbind.
*/

return 0;
fb_add_videomode(&fb_vm, &info->modelist);

put_timings_node:
of_node_put(timings_np);
put_display_node:
of_node_put(display_np);
return ret;
Expand Down
Loading

0 comments on commit a9ac6cc

Please sign in to comment.