fbdev fixes and cleanups for 6.6-rc1:
- Drop the mx3fb driver - Use list_for_each_entry() helper in fbcore code - Shorten neofb product names for fb-fix id field - reduce memory usage in ssd1307fb -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZPGP7gAKCRD3ErUQojoP XxkZAQDTjxXgieEIsQ7fCN0PKIM36zabe/bP4FK18Gaqyf33GgEAkcj8kD8ECfLh cu5LmrfQZj6dWYIumArh9JzQLkJdkwk= =mI8j -----END PGP SIGNATURE----- Merge tag 'fbdev-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: - Drop the mx3fb driver - Use list_for_each_entry() helper in fbcore code - Shorten neofb product names for fb-fix id field - reduce memory usage in ssd1307fb * tag 'fbdev-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: Update fbdev source file paths fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags fbdev: neofb: Shorten Neomagic product name in info struct fbdev: mx3fb: Remove the driver fbdev/core: Use list_for_each_entry() helper
This commit is contained in:
Коммит
b84acc11b1
|
@ -1887,17 +1887,6 @@ config FB_PRE_INIT_FB
|
|||
Select this option if display contents should be inherited as set by
|
||||
the bootloader.
|
||||
|
||||
config FB_MX3
|
||||
tristate "MX3 Framebuffer support"
|
||||
depends on FB && MX3_IPU
|
||||
select BACKLIGHT_CLASS_DEVICE
|
||||
select FB_IOMEM_HELPERS
|
||||
default y
|
||||
help
|
||||
This is a framebuffer device for the i.MX31 LCD Controller. So
|
||||
far only synchronous displays are supported. If you plan to use
|
||||
an LCD display with your i.MX31 system, say Y here.
|
||||
|
||||
config FB_BROADSHEET
|
||||
tristate "E-Ink Broadsheet/Epson S1D13521 controller support"
|
||||
depends on FB && (ARCH_PXA || COMPILE_TEST)
|
||||
|
|
|
@ -122,7 +122,6 @@ obj-$(CONFIG_FB_VESA) += vesafb.o
|
|||
obj-$(CONFIG_FB_EFI) += efifb.o
|
||||
obj-$(CONFIG_FB_VGA16) += vga16fb.o
|
||||
obj-$(CONFIG_FB_OF) += offb.o
|
||||
obj-$(CONFIG_FB_MX3) += mx3fb.o
|
||||
obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o
|
||||
obj-$(CONFIG_FB_SSD1307) += ssd1307fb.o
|
||||
obj-$(CONFIG_FB_SIMPLE) += simplefb.o
|
||||
|
|
|
@ -61,14 +61,12 @@ static ssize_t store_mode(struct device *device, struct device_attribute *attr,
|
|||
struct fb_var_screeninfo var;
|
||||
struct fb_modelist *modelist;
|
||||
struct fb_videomode *mode;
|
||||
struct list_head *pos;
|
||||
size_t i;
|
||||
int err;
|
||||
|
||||
memset(&var, 0, sizeof(var));
|
||||
|
||||
list_for_each(pos, &fb_info->modelist) {
|
||||
modelist = list_entry(pos, struct fb_modelist, list);
|
||||
list_for_each_entry(modelist, &fb_info->modelist, list) {
|
||||
mode = &modelist->mode;
|
||||
i = mode_string(mstr, 0, mode);
|
||||
if (strncmp(mstr, buf, max(count, i)) == 0) {
|
||||
|
@ -129,13 +127,11 @@ static ssize_t show_modes(struct device *device, struct device_attribute *attr,
|
|||
{
|
||||
struct fb_info *fb_info = dev_get_drvdata(device);
|
||||
unsigned int i;
|
||||
struct list_head *pos;
|
||||
struct fb_modelist *modelist;
|
||||
const struct fb_videomode *mode;
|
||||
|
||||
i = 0;
|
||||
list_for_each(pos, &fb_info->modelist) {
|
||||
modelist = list_entry(pos, struct fb_modelist, list);
|
||||
list_for_each_entry(modelist, &fb_info->modelist, list) {
|
||||
mode = &modelist->mode;
|
||||
i += mode_string(buf, i, mode);
|
||||
}
|
||||
|
|
|
@ -963,15 +963,12 @@ int fb_mode_is_equal(const struct fb_videomode *mode1,
|
|||
const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var,
|
||||
struct list_head *head)
|
||||
{
|
||||
struct list_head *pos;
|
||||
struct fb_modelist *modelist;
|
||||
struct fb_videomode *mode, *best = NULL;
|
||||
u32 diff = -1;
|
||||
|
||||
list_for_each(pos, head) {
|
||||
list_for_each_entry(modelist, head, list) {
|
||||
u32 d;
|
||||
|
||||
modelist = list_entry(pos, struct fb_modelist, list);
|
||||
mode = &modelist->mode;
|
||||
|
||||
if (mode->xres >= var->xres && mode->yres >= var->yres) {
|
||||
|
@ -1001,15 +998,12 @@ const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var
|
|||
const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
|
||||
struct list_head *head)
|
||||
{
|
||||
struct list_head *pos;
|
||||
struct fb_modelist *modelist;
|
||||
struct fb_videomode *cmode, *best = NULL;
|
||||
u32 diff = -1, diff_refresh = -1;
|
||||
|
||||
list_for_each(pos, head) {
|
||||
list_for_each_entry(modelist, head, list) {
|
||||
u32 d;
|
||||
|
||||
modelist = list_entry(pos, struct fb_modelist, list);
|
||||
cmode = &modelist->mode;
|
||||
|
||||
d = abs(cmode->xres - mode->xres) +
|
||||
|
@ -1041,13 +1035,11 @@ const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
|
|||
const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
|
||||
struct list_head *head)
|
||||
{
|
||||
struct list_head *pos;
|
||||
struct fb_modelist *modelist;
|
||||
struct fb_videomode *m, mode;
|
||||
|
||||
fb_var_to_videomode(&mode, var);
|
||||
list_for_each(pos, head) {
|
||||
modelist = list_entry(pos, struct fb_modelist, list);
|
||||
list_for_each_entry(modelist, head, list) {
|
||||
m = &modelist->mode;
|
||||
if (fb_mode_is_equal(m, &mode))
|
||||
return m;
|
||||
|
@ -1065,13 +1057,11 @@ const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
|
|||
*/
|
||||
int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head)
|
||||
{
|
||||
struct list_head *pos;
|
||||
struct fb_modelist *modelist;
|
||||
struct fb_videomode *m;
|
||||
int found = 0;
|
||||
|
||||
list_for_each(pos, head) {
|
||||
modelist = list_entry(pos, struct fb_modelist, list);
|
||||
list_for_each_entry(modelist, head, list) {
|
||||
m = &modelist->mode;
|
||||
if (fb_mode_is_equal(m, mode)) {
|
||||
found = 1;
|
||||
|
@ -1152,7 +1142,6 @@ void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
|
|||
const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
|
||||
struct list_head *head)
|
||||
{
|
||||
struct list_head *pos;
|
||||
struct fb_modelist *modelist;
|
||||
const struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL;
|
||||
int first = 0;
|
||||
|
@ -1161,8 +1150,7 @@ const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
|
|||
goto finished;
|
||||
|
||||
/* get the first detailed mode and the very first mode */
|
||||
list_for_each(pos, head) {
|
||||
modelist = list_entry(pos, struct fb_modelist, list);
|
||||
list_for_each_entry(modelist, head, list) {
|
||||
m = &modelist->mode;
|
||||
|
||||
if (!first) {
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1948,49 +1948,40 @@ static struct fb_info *neo_alloc_fb_info(struct pci_dev *dev,
|
|||
|
||||
switch (info->fix.accel) {
|
||||
case FB_ACCEL_NEOMAGIC_NM2070:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 128");
|
||||
strscpy(info->fix.id, "MagicGraph128", sizeof(info->fix.id));
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2090:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 128V");
|
||||
strscpy(info->fix.id, "MagicGraph128V", sizeof(info->fix.id));
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2093:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 128ZV");
|
||||
strscpy(info->fix.id, "MagicGraph128ZV", sizeof(info->fix.id));
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2097:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 128ZV+");
|
||||
strscpy(info->fix.id, "Mag.Graph128ZV+", sizeof(info->fix.id));
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2160:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 128XD");
|
||||
strscpy(info->fix.id, "MagicGraph128XD", sizeof(info->fix.id));
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2200:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 256AV");
|
||||
strscpy(info->fix.id, "MagicGraph256AV", sizeof(info->fix.id));
|
||||
info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_COPYAREA |
|
||||
FBINFO_HWACCEL_FILLRECT;
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2230:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 256AV+");
|
||||
strscpy(info->fix.id, "Mag.Graph256AV+", sizeof(info->fix.id));
|
||||
info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_COPYAREA |
|
||||
FBINFO_HWACCEL_FILLRECT;
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2360:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 256ZX");
|
||||
strscpy(info->fix.id, "MagicGraph256ZX", sizeof(info->fix.id));
|
||||
info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_COPYAREA |
|
||||
FBINFO_HWACCEL_FILLRECT;
|
||||
break;
|
||||
case FB_ACCEL_NEOMAGIC_NM2380:
|
||||
snprintf(info->fix.id, sizeof(info->fix.id),
|
||||
"MagicGraph 256XL+");
|
||||
strscpy(info->fix.id, "Mag.Graph256XL+", sizeof(info->fix.id));
|
||||
info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
|
||||
FBINFO_HWACCEL_COPYAREA |
|
||||
FBINFO_HWACCEL_FILLRECT;
|
||||
|
|
|
@ -52,8 +52,8 @@ struct ssd1307fb_deviceinfo {
|
|||
u32 default_vcomh;
|
||||
u32 default_dclk_div;
|
||||
u32 default_dclk_frq;
|
||||
int need_pwm;
|
||||
int need_chargepump;
|
||||
bool need_pwm;
|
||||
bool need_chargepump;
|
||||
};
|
||||
|
||||
struct ssd1307fb_par {
|
||||
|
|
|
@ -588,7 +588,7 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
|
|||
.fb_copyarea = sys_copyarea, \
|
||||
.fb_imageblit = sys_imageblit
|
||||
|
||||
/* drivers/video/fbmem.c */
|
||||
/* fbmem.c */
|
||||
extern int register_framebuffer(struct fb_info *fb_info);
|
||||
extern void unregister_framebuffer(struct fb_info *fb_info);
|
||||
extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
|
||||
|
@ -631,7 +631,7 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
|
|||
}
|
||||
}
|
||||
|
||||
/* drivers/video/fb_defio.c */
|
||||
/* fb_defio.c */
|
||||
int fb_deferred_io_mmap(struct fb_info *info, struct vm_area_struct *vma);
|
||||
extern int fb_deferred_io_init(struct fb_info *info);
|
||||
extern void fb_deferred_io_open(struct fb_info *info,
|
||||
|
@ -734,7 +734,7 @@ extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
|
|||
extern void framebuffer_release(struct fb_info *info);
|
||||
extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
|
||||
|
||||
/* drivers/video/fbmon.c */
|
||||
/* fbmon.c */
|
||||
#define FB_MAXTIMINGS 0
|
||||
#define FB_VSYNCTIMINGS 1
|
||||
#define FB_HSYNCTIMINGS 2
|
||||
|
@ -768,7 +768,7 @@ extern int of_get_fb_videomode(struct device_node *np,
|
|||
extern int fb_videomode_from_videomode(const struct videomode *vm,
|
||||
struct fb_videomode *fbmode);
|
||||
|
||||
/* drivers/video/modedb.c */
|
||||
/* modedb.c */
|
||||
#define VESA_MODEDB_SIZE 43
|
||||
#define DMT_SIZE 0x50
|
||||
|
||||
|
@ -794,7 +794,7 @@ extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
|
|||
extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
|
||||
struct list_head *head);
|
||||
|
||||
/* drivers/video/fbcmap.c */
|
||||
/* fbcmap.c */
|
||||
extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
|
||||
extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags);
|
||||
extern void fb_dealloc_cmap(struct fb_cmap *cmap);
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (C) 2008
|
||||
* Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de>
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_MX3FB_H__
|
||||
#define __ASM_ARCH_MX3FB_H__
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/fb.h>
|
||||
|
||||
/* Proprietary FB_SYNC_ flags */
|
||||
#define FB_SYNC_OE_ACT_HIGH 0x80000000
|
||||
#define FB_SYNC_CLK_INVERT 0x40000000
|
||||
#define FB_SYNC_DATA_INVERT 0x20000000
|
||||
#define FB_SYNC_CLK_IDLE_EN 0x10000000
|
||||
#define FB_SYNC_SHARP_MODE 0x08000000
|
||||
#define FB_SYNC_SWAP_RGB 0x04000000
|
||||
#define FB_SYNC_CLK_SEL_EN 0x02000000
|
||||
|
||||
/*
|
||||
* Specify the way your display is connected. The IPU can arbitrarily
|
||||
* map the internal colors to the external data lines. We only support
|
||||
* the following mappings at the moment.
|
||||
*/
|
||||
enum disp_data_mapping {
|
||||
/* blue -> d[0..5], green -> d[6..11], red -> d[12..17] */
|
||||
IPU_DISP_DATA_MAPPING_RGB666,
|
||||
/* blue -> d[0..4], green -> d[5..10], red -> d[11..15] */
|
||||
IPU_DISP_DATA_MAPPING_RGB565,
|
||||
/* blue -> d[0..7], green -> d[8..15], red -> d[16..23] */
|
||||
IPU_DISP_DATA_MAPPING_RGB888,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mx3fb_platform_data - mx3fb platform data
|
||||
*
|
||||
* @dma_dev: pointer to the dma-device, used for dma-slave connection
|
||||
* @mode: pointer to a platform-provided per mxc_register_fb() videomode
|
||||
*/
|
||||
struct mx3fb_platform_data {
|
||||
struct device *dma_dev;
|
||||
const char *name;
|
||||
const struct fb_videomode *mode;
|
||||
int num_modes;
|
||||
enum disp_data_mapping disp_data_fmt;
|
||||
};
|
||||
|
||||
#endif
|
Загрузка…
Ссылка в новой задаче