Skip to content

Commit e43020f

Browse files
author
CKI KWF Bot
committed
Merge: drivers/video rebase (fbcon/fbdev) from v6.14
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/805 JIRA: https://issues.redhat.com/browse/RHEL-75959 This update the drivers/video subsystem to v6.14. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Approved-by: José Expósito <jexposit@redhat.com> Approved-by: Vitaly Kuznetsov <vkuznets@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 43552f0 + 36eb0c4 commit e43020f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+296
-464
lines changed

arch/powerpc/configs/pmac32_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ CONFIG_FB_ATY=y
208208
CONFIG_FB_ATY_CT=y
209209
CONFIG_FB_ATY_GX=y
210210
CONFIG_FB_3DFX=y
211+
CONFIG_BACKLIGHT_CLASS_DEVICE=y
211212
# CONFIG_VGA_CONSOLE is not set
212213
CONFIG_FRAMEBUFFER_CONSOLE=y
213214
CONFIG_LOGO=y

arch/powerpc/configs/ppc6xx_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ CONFIG_FB_TRIDENT=m
717717
CONFIG_FB_SM501=m
718718
CONFIG_FB_IBM_GXT4500=y
719719
CONFIG_LCD_PLATFORM=m
720+
CONFIG_BACKLIGHT_CLASS_DEVICE=y
720721
CONFIG_FRAMEBUFFER_CONSOLE=y
721722
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
722723
CONFIG_LOGO=y

drivers/auxdisplay/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ config IMG_ASCII_LCD
489489

490490
config HT16K33
491491
tristate "Holtek Ht16K33 LED controller with keyscan"
492-
depends on FB && I2C && INPUT
492+
depends on FB && I2C && INPUT && BACKLIGHT_CLASS_DEVICE
493493
select FB_SYSMEM_HELPERS
494494
select INPUT_MATRIXKMAP
495495
select FB_BACKLIGHT

drivers/hid/hid-picolcd_fb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,10 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
497497
#endif
498498
#endif
499499

500+
#ifdef CONFIG_HID_PICOLCD_LCD
501+
info->lcd_dev = data->lcd;
502+
#endif
503+
500504
fbdata = info->par;
501505
spin_lock_init(&fbdata->lock);
502506
fbdata->picolcd = data;

drivers/hid/hid-picolcd_lcd.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,9 @@ static int picolcd_set_contrast(struct lcd_device *ldev, int contrast)
4141
return 0;
4242
}
4343

44-
static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb)
45-
{
46-
return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev));
47-
}
48-
4944
static const struct lcd_ops picolcd_lcdops = {
5045
.get_contrast = picolcd_get_contrast,
5146
.set_contrast = picolcd_set_contrast,
52-
.check_fb = picolcd_check_lcd_fb,
5347
};
5448

5549
int picolcd_init_lcd(struct picolcd_data *data, struct hid_report *report)

drivers/macintosh/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ config PMAC_MEDIABAY
120120
config PMAC_BACKLIGHT
121121
bool "Backlight control for LCD screens"
122122
depends on PPC_PMAC && ADB_PMU && FB = y && (BROKEN || !PPC64)
123+
depends on BACKLIGHT_CLASS_DEVICE=y
123124
select FB_BACKLIGHT
124125
help
125126
Say Y here to enable Macintosh specific extensions of the generic

drivers/staging/fbtft/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ menuconfig FB_TFT
33
tristate "Support for small TFT LCD display modules"
44
depends on FB && SPI
55
depends on FB_DEVICE
6+
depends on BACKLIGHT_CLASS_DEVICE
67
depends on GPIOLIB || COMPILE_TEST
78
select FB_BACKLIGHT
89
select FB_SYSMEM_HELPERS_DEFERRED

drivers/video/backlight/88pm860x_bl.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,22 +151,21 @@ static int pm860x_backlight_dt_init(struct platform_device *pdev,
151151
struct pm860x_backlight_data *data,
152152
char *name)
153153
{
154-
struct device_node *nproot, *np;
154+
struct device_node *nproot;
155155
int iset = 0;
156156

157157
nproot = of_get_child_by_name(pdev->dev.parent->of_node, "backlights");
158158
if (!nproot) {
159159
dev_err(&pdev->dev, "failed to find backlights node\n");
160160
return -ENODEV;
161161
}
162-
for_each_child_of_node(nproot, np) {
162+
for_each_child_of_node_scoped(nproot, np) {
163163
if (of_node_name_eq(np, name)) {
164164
of_property_read_u32(np, "marvell,88pm860x-iset",
165165
&iset);
166166
data->iset = PM8606_WLED_CURRENT(iset);
167167
of_property_read_u32(np, "marvell,88pm860x-pwm",
168168
&data->pwm);
169-
of_node_put(np);
170169
break;
171170
}
172171
}

drivers/video/backlight/backlight.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565

6666
static struct list_head backlight_dev_list;
6767
static struct mutex backlight_dev_list_mutex;
68-
static struct blocking_notifier_head backlight_notifier;
6968

7069
static const char *const backlight_types[] = {
7170
[BACKLIGHT_RAW] = "raw",
@@ -467,9 +466,6 @@ struct backlight_device *backlight_device_register(const char *name,
467466
list_add(&new_bd->entry, &backlight_dev_list);
468467
mutex_unlock(&backlight_dev_list_mutex);
469468

470-
blocking_notifier_call_chain(&backlight_notifier,
471-
BACKLIGHT_REGISTERED, new_bd);
472-
473469
return new_bd;
474470
}
475471
EXPORT_SYMBOL(backlight_device_register);
@@ -539,9 +535,6 @@ void backlight_device_unregister(struct backlight_device *bd)
539535
mutex_unlock(&pmac_backlight_mutex);
540536
#endif
541537

542-
blocking_notifier_call_chain(&backlight_notifier,
543-
BACKLIGHT_UNREGISTERED, bd);
544-
545538
mutex_lock(&bd->ops_lock);
546539
bd->ops = NULL;
547540
mutex_unlock(&bd->ops_lock);
@@ -566,40 +559,6 @@ static int devm_backlight_device_match(struct device *dev, void *res,
566559
return *r == data;
567560
}
568561

569-
/**
570-
* backlight_register_notifier - get notified of backlight (un)registration
571-
* @nb: notifier block with the notifier to call on backlight (un)registration
572-
*
573-
* Register a notifier to get notified when backlight devices get registered
574-
* or unregistered.
575-
*
576-
* RETURNS:
577-
*
578-
* 0 on success, otherwise a negative error code
579-
*/
580-
int backlight_register_notifier(struct notifier_block *nb)
581-
{
582-
return blocking_notifier_chain_register(&backlight_notifier, nb);
583-
}
584-
EXPORT_SYMBOL(backlight_register_notifier);
585-
586-
/**
587-
* backlight_unregister_notifier - unregister a backlight notifier
588-
* @nb: notifier block to unregister
589-
*
590-
* Register a notifier to get notified when backlight devices get registered
591-
* or unregistered.
592-
*
593-
* RETURNS:
594-
*
595-
* 0 on success, otherwise a negative error code
596-
*/
597-
int backlight_unregister_notifier(struct notifier_block *nb)
598-
{
599-
return blocking_notifier_chain_unregister(&backlight_notifier, nb);
600-
}
601-
EXPORT_SYMBOL(backlight_unregister_notifier);
602-
603562
/**
604563
* devm_backlight_device_register - register a new backlight device
605564
* @dev: the device to register
@@ -767,7 +726,6 @@ static int __init backlight_class_init(void)
767726

768727
INIT_LIST_HEAD(&backlight_dev_list);
769728
mutex_init(&backlight_dev_list_mutex);
770-
BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier);
771729

772730
return 0;
773731
}

drivers/video/backlight/corgi_lcd.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
#include <linux/init.h>
1818
#include <linux/delay.h>
1919
#include <linux/gpio/consumer.h>
20-
#include <linux/fb.h>
2120
#include <linux/lcd.h>
2221
#include <linux/spi/spi.h>
2322
#include <linux/spi/corgi_lcd.h>
2423
#include <linux/slab.h>
2524
#include <asm/mach/sharpsl_param.h>
2625

27-
#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
26+
#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED)
2827

2928
/* Register Addresses */
3029
#define RESCTL_ADRS 0x00
@@ -332,12 +331,12 @@ static void corgi_lcd_power_off(struct corgi_lcd *lcd)
332331
POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
333332
}
334333

335-
static int corgi_lcd_set_mode(struct lcd_device *ld, struct fb_videomode *m)
334+
static int corgi_lcd_set_mode(struct lcd_device *ld, u32 xres, u32 yres)
336335
{
337336
struct corgi_lcd *lcd = lcd_get_data(ld);
338337
int mode = CORGI_LCD_MODE_QVGA;
339338

340-
if (m->xres == 640 || m->xres == 480)
339+
if (xres == 640 || xres == 480)
341340
mode = CORGI_LCD_MODE_VGA;
342341

343342
if (lcd->mode == mode)
@@ -455,7 +454,7 @@ static int corgi_lcd_suspend(struct device *dev)
455454

456455
corgibl_flags |= CORGIBL_SUSPENDED;
457456
corgi_bl_set_intensity(lcd, 0);
458-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
457+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF);
459458
return 0;
460459
}
461460

@@ -464,7 +463,7 @@ static int corgi_lcd_resume(struct device *dev)
464463
struct corgi_lcd *lcd = dev_get_drvdata(dev);
465464

466465
corgibl_flags &= ~CORGIBL_SUSPENDED;
467-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
466+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON);
468467
backlight_update_status(lcd->bl_dev);
469468
return 0;
470469
}
@@ -513,7 +512,7 @@ static int corgi_lcd_probe(struct spi_device *spi)
513512
if (IS_ERR(lcd->lcd_dev))
514513
return PTR_ERR(lcd->lcd_dev);
515514

516-
lcd->power = FB_BLANK_POWERDOWN;
515+
lcd->power = LCD_POWER_OFF;
517516
lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA;
518517

519518
memset(&props, 0, sizeof(struct backlight_properties));
@@ -535,7 +534,7 @@ static int corgi_lcd_probe(struct spi_device *spi)
535534
lcd->kick_battery = pdata->kick_battery;
536535

537536
spi_set_drvdata(spi, lcd);
538-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
537+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON);
539538
backlight_update_status(lcd->bl_dev);
540539

541540
lcd->limit_mask = pdata->limit_mask;
@@ -550,7 +549,7 @@ static void corgi_lcd_remove(struct spi_device *spi)
550549
lcd->bl_dev->props.power = BACKLIGHT_POWER_ON;
551550
lcd->bl_dev->props.brightness = 0;
552551
backlight_update_status(lcd->bl_dev);
553-
corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
552+
corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF);
554553
}
555554

556555
static struct spi_driver corgi_lcd_driver = {

0 commit comments

Comments
 (0)