diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-10 12:59:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-10 12:59:51 -0400 |
commit | cccd559e98c05b669bdc37b01802f920cff1d6dd (patch) | |
tree | 4b62f164a55dc71a6582918953a431dc51f51832 /drivers/video/fbdev/amba-clcd.c | |
parent | Merge tag 'pwm/for-5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm (diff) | |
parent | video: fbdev: Use dev_get_drvdata() (diff) | |
download | linux-dev-cccd559e98c05b669bdc37b01802f920cff1d6dd.tar.xz linux-dev-cccd559e98c05b669bdc37b01802f920cff1d6dd.zip |
Merge tag 'fbdev-v5.2' of git://github.com/bzolnier/linux
Pull fbdev updates from Bartlomiej Zolnierkiewicz:
"Four small fixes for fb core, updates for udlfb, sm712fb, macfb and
atafb drivers. Redundant code removals from amba-clcd and atmel_lcdfb
drivers. Minor fixes/cleanups for other fb drivers
Detailed summary:
- fix regression in fbcon logo handling on 'quiet' boots (Andreas
Schwab)
- fix divide-by-zero error in fb_var_to_videomode() (Shile Zhang)
- fix 'WARNING in __alloc_pages_nodemask' bug (Jiufei Xue)
- list all PCI memory BARs as conflicting apertures (Gerd Hoffmann)
- update udlfb driver: fix sleeping inside spinlock, add mutex around
rendering calls and remove redundant code (Mikulas Patocka)
- update sm712fb driver: fix SM720 support related issues (Yifeng Li)
- update macfb driver: fix DAFB colour table pointer initialization
and remove redundant code (Finn Thain)
- update atafb driver: fix kexec support, use dev_*() calls instead
of printk() and remove obsolete module support (Geert Uytterhoeven)
- add support to mxsfb driver for skipping display initialization for
flicker-free display takeover from bootloader (Melchior Franz)
- remove Versatile and Nomadik board families support from amba-clcd
driver as they are handled by DRM driver nowadays (Linus Walleij)
- remove no longer needed AVR and platform_data support from
atmel_lcdfb driver (Alexandre Belloni)
- misc fixes (Colin Ian King, Julia Lawall, Gustavo A. R. Silva,
Aditya Pakki, Kangjie Lu, YueHaibing)
- misc cleanups (Enrico Weigelt, Kefeng Wang)"
* tag 'fbdev-v5.2' of git://github.com/bzolnier/linux: (38 commits)
video: fbdev: Use dev_get_drvdata()
fbcon: Don't reset logo_shown when logo is currently shown
video: fbdev: atmel_lcdfb: remove set but not used variable 'pdata'
video: fbdev: mxsfb: remove set but not used variable 'line_count'
video: fbdev: pvr2fb: remove set but not used variable 'size'
fbdev: fix WARNING in __alloc_pages_nodemask bug
video: amba-clcd: Decomission Versatile and Nomadik
fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough
fbdev: fix divide error in fb_var_to_videomode
fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display
fbdev: sm712fb: fix support for 1024x768-16 mode
fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting
fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM
fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA
fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75
fbdev: sm712fb: fix brightness control on reboot, don't set SR30
fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F
video: imsttfb: fix potential NULL pointer dereferences
video: hgafb: fix potential NULL pointer dereference
fbdev: list all pci memory bars as conflicting apertures
...
Diffstat (limited to 'drivers/video/fbdev/amba-clcd.c')
-rw-r--r-- | drivers/video/fbdev/amba-clcd.c | 98 |
1 files changed, 2 insertions, 96 deletions
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 38c1f324ce15..89324e42a033 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -30,9 +30,6 @@ #include <video/of_display_timing.h> #include <video/videomode.h> -#include "amba-clcd-nomadik.h" -#include "amba-clcd-versatile.h" - #define to_clcd(info) container_of(info, struct clcd_fb, fb) /* This is limited to 16 characters when displayed by X startup */ @@ -223,15 +220,6 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) var->blue.length = 4; } break; - case 24: - if (fb->vendor->packed_24_bit_pixels) { - var->red.length = 8; - var->green.length = 8; - var->blue.length = 8; - } else { - ret = -EINVAL; - } - break; case 32: /* If we can't do 888, reject */ caps &= CLCD_CAP_888; @@ -318,12 +306,6 @@ static int clcdfb_set_par(struct fb_info *info) clcdfb_disable(fb); - /* Some variants must be clocked here */ - if (fb->vendor->clock_timregs && !fb->clk_enabled) { - fb->clk_enabled = true; - clk_enable(fb->clk); - } - writel(regs.tim0, fb->regs + CLCD_TIM0); writel(regs.tim1, fb->regs + CLCD_TIM1); writel(regs.tim2, fb->regs + CLCD_TIM2); @@ -465,14 +447,8 @@ static int clcdfb_register(struct clcd_fb *fb) fb->off_ienb = CLCD_PL111_IENB; fb->off_cntl = CLCD_PL111_CNTL; } else { - if (of_machine_is_compatible("arm,versatile-ab") || - of_machine_is_compatible("arm,versatile-pb")) { - fb->off_ienb = CLCD_PL111_IENB; - fb->off_cntl = CLCD_PL111_CNTL; - } else { - fb->off_ienb = CLCD_PL110_IENB; - fb->off_cntl = CLCD_PL110_CNTL; - } + fb->off_ienb = CLCD_PL110_IENB; + fb->off_cntl = CLCD_PL110_CNTL; } fb->clk = clk_get(&fb->dev->dev, NULL); @@ -713,42 +689,6 @@ static int clcdfb_of_init_tft_panel(struct clcd_fb *fb, u32 r0, u32 g0, u32 b0) if (r0 != 0 && b0 == 0) fb->panel->bgr_connection = true; - if (fb->panel->caps && fb->vendor->st_bitmux_control) { - /* - * Set up the special bits for the Nomadik control register - * (other platforms tend to do this through an external - * register). - */ - - /* Offset of the highest used color */ - int maxoff = max3(r0, g0, b0); - /* Most significant bit out, highest used bit */ - int msb = 0; - - if (fb->panel->caps & CLCD_CAP_888) { - msb = maxoff + 8 - 1; - } else if (fb->panel->caps & CLCD_CAP_565) { - msb = maxoff + 5 - 1; - fb->panel->cntl |= CNTL_ST_1XBPP_565; - } else if (fb->panel->caps & CLCD_CAP_5551) { - msb = maxoff + 5 - 1; - fb->panel->cntl |= CNTL_ST_1XBPP_5551; - } else if (fb->panel->caps & CLCD_CAP_444) { - msb = maxoff + 4 - 1; - fb->panel->cntl |= CNTL_ST_1XBPP_444; - } - - /* Send out as many bits as we need */ - if (msb > 17) - fb->panel->cntl |= CNTL_ST_CDWID_24; - else if (msb > 15) - fb->panel->cntl |= CNTL_ST_CDWID_18; - else if (msb > 11) - fb->panel->cntl |= CNTL_ST_CDWID_16; - else - fb->panel->cntl |= CNTL_ST_CDWID_12; - } - return fb->panel->caps ? 0 : -EINVAL; } @@ -775,12 +715,6 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) if (!panel) return -ENODEV; - if (fb->vendor->init_panel) { - err = fb->vendor->init_panel(fb, panel); - if (err) - return err; - } - err = clcdfb_of_get_backlight(panel, fb->panel); if (err) return err; @@ -941,7 +875,6 @@ static struct clcd_board *clcdfb_of_get_board(struct amba_device *dev) static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) { struct clcd_board *board = dev_get_platdata(&dev->dev); - struct clcd_vendor_data *vendor = id->data; struct clcd_fb *fb; int ret; @@ -951,12 +884,6 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) if (!board) return -EINVAL; - if (vendor->init_board) { - ret = vendor->init_board(dev, board); - if (ret) - return ret; - } - ret = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32)); if (ret) goto out; @@ -974,7 +901,6 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) } fb->dev = dev; - fb->vendor = vendor; fb->board = board; dev_info(&fb->dev->dev, "PL%03x designer %02x rev%u at 0x%08llx\n", @@ -1021,30 +947,10 @@ static int clcdfb_remove(struct amba_device *dev) return 0; } -static struct clcd_vendor_data vendor_arm = { - /* Sets up the versatile board displays */ - .init_panel = versatile_clcd_init_panel, -}; - -static struct clcd_vendor_data vendor_nomadik = { - .clock_timregs = true, - .packed_24_bit_pixels = true, - .st_bitmux_control = true, - .init_board = nomadik_clcd_init_board, - .init_panel = nomadik_clcd_init_panel, -}; - static const struct amba_id clcdfb_id_table[] = { { .id = 0x00041110, .mask = 0x000ffffe, - .data = &vendor_arm, - }, - /* ST Electronics Nomadik variant */ - { - .id = 0x00180110, - .mask = 0x00fffffe, - .data = &vendor_nomadik, }, { 0, 0 }, }; |