Skip to content

Commit

Permalink
Merge tag 'fbdev-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
Linus Torvalds committed Sep 1, 2023
2 parents 1c9f8df + 4a9762a commit b84acc1
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 1,805 deletions.
11 changes: 0 additions & 11 deletions drivers/video/fbdev/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion drivers/video/fbdev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions drivers/video/fbdev/core/fbsysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand Down
22 changes: 5 additions & 17 deletions drivers/video/fbdev/core/modedb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) +
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
Loading

0 comments on commit b84acc1

Please sign in to comment.