* [PATCH] staging: sm750fb: remove double space in fb_ops entries
From: Ahmet Sezgin Duran @ 2026-04-28 20:44 UTC (permalink / raw)
To: gregkh; +Cc: linux-fbdev, linux-staging, linux-kernel, Ahmet Sezgin Duran
Remove extra space after '=' in .fb_check_var assignments.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
drivers/staging/sm750fb/sm750.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 8f43eea2868b..fadba95850be 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -670,7 +670,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
static const struct fb_ops lynxfb_ops = {
.owner = THIS_MODULE,
FB_DEFAULT_IOMEM_OPS,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -680,7 +680,7 @@ static const struct fb_ops lynxfb_ops = {
static const struct fb_ops lynxfb_ops_with_cursor = {
.owner = THIS_MODULE,
FB_DEFAULT_IOMEM_OPS,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -691,7 +691,7 @@ static const struct fb_ops lynxfb_ops_with_cursor = {
static const struct fb_ops lynxfb_ops_accel = {
.owner = THIS_MODULE,
__FB_DEFAULT_IOMEM_OPS_RDWR,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -705,7 +705,7 @@ static const struct fb_ops lynxfb_ops_accel = {
static const struct fb_ops lynxfb_ops_accel_with_cursor = {
.owner = THIS_MODULE,
__FB_DEFAULT_IOMEM_OPS_RDWR,
- .fb_check_var = lynxfb_ops_check_var,
+ .fb_check_var = lynxfb_ops_check_var,
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
--
2.53.0
^ permalink raw reply related
* Re: [PATCH 2/2] backlight: Add SY7758 6-channel High Efficiency LED Driver support
From: Gyeyoung Baek @ 2026-04-28 23:35 UTC (permalink / raw)
To: Neil Armstrong
Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller, dri-devel,
linux-leds, devicetree, linux-kernel, linux-fbdev, KancyJoe
In-Reply-To: <20260428-topic-sm8650-ayaneo-pocket-s2-sy7758-v1-2-0caade5fdb32@linaro.org>
Hi,
> +
> +static int sy7758_probe(struct i2c_client *client)
> +{
> +
> + /* try read and check device id */
> + ret = regmap_read(sydev->regmap, REG_DEV_ID, &dev_id);
> + if (ret < 0)
> + return dev_err_probe(dev, -EPROBE_DEFER,
> + "failed to read device id\n");
regmap_read() seems it can return errors other than -EPROBE_DEFER
(like -EINVAL,), and hardcoding -EPROBE_DEFER here might drop the
actual error.
And maybe would keep retrying probe forever
How about this?
> + return dev_err_probe(dev, ret, "failed to read device id\n");
--
Thanks,
Gyeyoung
^ permalink raw reply
* [PATCH] sm750fb: fix spelling typo in comment
From: auth @ 2026-04-29 0:15 UTC (permalink / raw)
To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
open list:STAGING SUBSYSTEM, open list
Cc: auth
Fixed suspected typo in comment ("programe" -> "program").
Signed-off-by: auth <skunkolee@gmail.com>
---
drivers/staging/sm750fb/ddk750_mode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index 7163232c0701..6363a66d5570 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -82,7 +82,7 @@ static void program_mode_registers(struct mode_parameter *mode_param,
unsigned int tmp, reg;
if (pll->clock_type == SECONDARY_PLL) {
- /* programe secondary pixel clock */
+ /* program secondary pixel clock */
poke32(CRT_PLL_CTRL, sm750_format_pll_reg(pll));
tmp = ((mode_param->horizontal_total - 1) <<
--
2.54.0
^ permalink raw reply related
* Re: [PATCH 2/2] backlight: Add SY7758 6-channel High Efficiency LED Driver support
From: Neil Armstrong @ 2026-04-29 9:03 UTC (permalink / raw)
To: Gyeyoung Baek
Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller, dri-devel,
linux-leds, devicetree, linux-kernel, linux-fbdev, KancyJoe
In-Reply-To: <CAKbEznvPAYFUt-ykH7rCQwMFUq6N68B9x7Dd97WRDm3Mvj34fw@mail.gmail.com>
On 4/29/26 01:35, Gyeyoung Baek wrote:
> Hi,
>
>> +
>> +static int sy7758_probe(struct i2c_client *client)
>> +{
>
>> +
>> + /* try read and check device id */
>> + ret = regmap_read(sydev->regmap, REG_DEV_ID, &dev_id);
>> + if (ret < 0)
>> + return dev_err_probe(dev, -EPROBE_DEFER,
>> + "failed to read device id\n");
>
> regmap_read() seems it can return errors other than -EPROBE_DEFER
> (like -EINVAL,), and hardcoding -EPROBE_DEFER here might drop the
> actual error.
> And maybe would keep retrying probe forever
I forgot to change it, initially the powering was clunky and we had a read error
in the first probe, but now it's solved so I'll remove it.
Neil
>
> How about this?
>> + return dev_err_probe(dev, ret, "failed to read device id\n");
>
>
^ permalink raw reply
* Re: [PATCH 0/8] firmware: sysfb: Consolidate config/code wrt. sysfb_primary_screen
From: patchwork-bot+linux-riscv @ 2026-04-30 3:25 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: linux-riscv, javierm, arnd, ardb, ilias.apalodimas, chenhuacai,
kernel, maarten.lankhorst, mripard, airlied, simona, kys,
haiyangz, wei.liu, decui, longli, deller, linux-arm-kernel,
loongarch, linux-efi, dri-devel, linux-hyperv, linux-fbdev
In-Reply-To: <20260402092305.208728-1-tzimmermann@suse.de>
Hello:
This series was applied to riscv/linux.git (fixes)
by Ard Biesheuvel <ardb@kernel.org>:
On Thu, 2 Apr 2026 11:09:14 +0200 you wrote:
> The global state sysfb_primary_screen holds information about the
> framebuffer provided by EFI/BIOS systems. It is part of the sysfb
> module, but used in several places without direct connection to
> sysfb. Fix this by making users of sysfb_primary_screen depend on
> CONFIG_SYSFB. Fix a few issues in the process.
>
> Patches 1 and 2 fix general errors in the Kconfig rules. In any case,
> these patches should be considered even without the rest of the series.
>
> [...]
Here is the summary with links:
- [1/8] hv: Select CONFIG_SYSFB only for CONFIG_HYPERV_VMBUS
https://git.kernel.org/riscv/c/d33db956c961
- [2/8] firmware: efi: Never declare sysfb_primary_display on x86
https://git.kernel.org/riscv/c/5241c2ca33bb
- [3/8] firmware: sysfb: Make CONFIG_SYSFB a user-selectable option
(no matching commit)
- [4/8] firmware: sysfb: Split sysfb.c into sysfb_primary.c and sysfb_pci.c
(no matching commit)
- [5/8] firmware: sysfb: Implement screen_info relocation for primary display
(no matching commit)
- [6/8] firmware: sysfb: Avoid forward-declaring sysfb_parent_dev()
(no matching commit)
- [7/8] firmware: efi: Make CONFIG_EFI_EARLYCON depend on CONFIG_SYSFB; clean up
(no matching commit)
- [8/8] firmware: sysfb: Move CONFIG_FIRMWARE_EDID to firmware options
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply
* [PATCH] fbcon: don't suspend/resume when vc is graphics mode
From: yaolu @ 2026-04-30 6:01 UTC (permalink / raw)
To: deller, tzimmermann, simona; +Cc: dri-devel, linux-fbdev, linux-kernel, Lu Yao
From: Lu Yao <yaolu@kylinos.cn>
Don't need to do suspend/resume for fbcon in graphic mode.
Doing this may cause error, eg:
At the beginning, starting the Xorg with single screen and then an
external screen was plugged in. After logging out in Xorg, fbdev
info may using screen which is connected later on for info always
using first connected connector in list in func 'drm_setup_crtcs_fb'.
Then, S3 executed, fbcon found that the information did not match
and do atomic to switch fb. However, Xorg will not re-bind the crtc
fb but continues doing ioctl. At this time, the fb is incorrect.
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
drivers/video/fbdev/core/fbcon.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index b0e3e765360d..450e690d0bd2 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -2602,8 +2602,9 @@ void fbcon_suspended(struct fb_info *info)
return;
vc = vc_cons[par->currcon].d;
- /* Clear cursor, restore saved data */
- fbcon_cursor(vc, false);
+ /* Don't need to clear cursor and restore saved data in graphic mode */
+ if (vc->vc_mode != KD_GRAPHICS)
+ fbcon_cursor(vc, false);
}
void fbcon_resumed(struct fb_info *info)
@@ -2615,7 +2616,9 @@ void fbcon_resumed(struct fb_info *info)
return;
vc = vc_cons[par->currcon].d;
- update_screen(vc);
+ /* Graphics mode is managed by userspace */
+ if (vc->vc_mode != KD_GRAPHICS)
+ update_screen(vc);
}
static void fbcon_modechanged(struct fb_info *info)
--
2.25.1
^ permalink raw reply related
* Re: [PATCH 0/8] firmware: sysfb: Consolidate config/code wrt. sysfb_primary_screen
From: Thomas Zimmermann @ 2026-04-30 6:35 UTC (permalink / raw)
To: patchwork-bot+linux-riscv
Cc: linux-riscv, javierm, arnd, ardb, ilias.apalodimas, chenhuacai,
kernel, maarten.lankhorst, mripard, airlied, simona, kys,
haiyangz, wei.liu, decui, longli, deller, linux-arm-kernel,
loongarch, linux-efi, dri-devel, linux-hyperv, linux-fbdev
In-Reply-To: <177751955329.2274119.12779807302343885295.git-patchwork-notify@kernel.org>
Hi
Am 30.04.26 um 05:25 schrieb patchwork-bot+linux-riscv@kernel.org:
> Hello:
>
> This series was applied to riscv/linux.git (fixes)
> by Ard Biesheuvel <ardb@kernel.org>:
Patch 3 was fairly controversial.
Best regards
Thomas
>
> On Thu, 2 Apr 2026 11:09:14 +0200 you wrote:
>> The global state sysfb_primary_screen holds information about the
>> framebuffer provided by EFI/BIOS systems. It is part of the sysfb
>> module, but used in several places without direct connection to
>> sysfb. Fix this by making users of sysfb_primary_screen depend on
>> CONFIG_SYSFB. Fix a few issues in the process.
>>
>> Patches 1 and 2 fix general errors in the Kconfig rules. In any case,
>> these patches should be considered even without the rest of the series.
>>
>> [...]
> Here is the summary with links:
> - [1/8] hv: Select CONFIG_SYSFB only for CONFIG_HYPERV_VMBUS
> https://git.kernel.org/riscv/c/d33db956c961
> - [2/8] firmware: efi: Never declare sysfb_primary_display on x86
> https://git.kernel.org/riscv/c/5241c2ca33bb
> - [3/8] firmware: sysfb: Make CONFIG_SYSFB a user-selectable option
> (no matching commit)
> - [4/8] firmware: sysfb: Split sysfb.c into sysfb_primary.c and sysfb_pci.c
> (no matching commit)
> - [5/8] firmware: sysfb: Implement screen_info relocation for primary display
> (no matching commit)
> - [6/8] firmware: sysfb: Avoid forward-declaring sysfb_parent_dev()
> (no matching commit)
> - [7/8] firmware: efi: Make CONFIG_EFI_EARLYCON depend on CONFIG_SYSFB; clean up
> (no matching commit)
> - [8/8] firmware: sysfb: Move CONFIG_FIRMWARE_EDID to firmware options
> (no matching commit)
>
> You are awesome, thank you!
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply
* Re: [PATCH 1/2] dt-bindings: regulator: document the SY7758 6-channel High Efficiency LED Driver
From: Krzysztof Kozlowski @ 2026-04-30 9:40 UTC (permalink / raw)
To: Neil Armstrong
Cc: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller, dri-devel,
linux-leds, devicetree, linux-kernel, linux-fbdev, KancyJoe
In-Reply-To: <20260428-topic-sm8650-ayaneo-pocket-s2-sy7758-v1-1-0caade5fdb32@linaro.org>
On Tue, Apr 28, 2026 at 03:59:11PM +0200, Neil Armstrong wrote:
> Document the Silergy SY7758 6-channel High Efficiency LED Driver
> used for backlight brightness control.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> .../bindings/leds/backlight/silergy,sy7758.yaml | 53 ++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
subject - not a regulator prefix
> diff --git a/Documentation/devicetree/bindings/leds/backlight/silergy,sy7758.yaml b/Documentation/devicetree/bindings/leds/backlight/silergy,sy7758.yaml
> new file mode 100644
> index 000000000000..dc44b3b502e2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/backlight/silergy,sy7758.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/backlight/silergy,sy7758.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Silergy SY7758 6-channel High Efficiency LED Driver
> +
> +maintainers:
> + - Neil Armstrong <neil.armstrong@linaro.org>
> +
> +description: |
Drop |
With these two fixed:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply
* [PATCH v2 0/2] backlight: Add SY7758 6-channel High Efficiency LED Driver support
From: Neil Armstrong @ 2026-04-30 9:47 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller
Cc: dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev,
KancyJoe, Neil Armstrong, Krzysztof Kozlowski
Implement support for the Silergy SY7758 6-channel High Efficiency LED Driver
used for backlight brightness control in the Ayaneo Pocket S2 dual-DSI panel.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- Fixed bindings subject and removed "|"
- Added review tag
- Added higher delay before reading ID from HW (100us was too short)
- Removed probe defer if i2c read fails
- Link to v1: https://patch.msgid.link/20260428-topic-sm8650-ayaneo-pocket-s2-sy7758-v1-0-0caade5fdb32@linaro.org
---
KancyJoe (1):
backlight: Add SY7758 6-channel High Efficiency LED Driver support
Neil Armstrong (1):
dt-bindings: leds: backlight: document the SY7758 6-channel High Efficiency LED Driver
.../bindings/leds/backlight/silergy,sy7758.yaml | 53 ++++
drivers/video/backlight/Kconfig | 8 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/sy7758.c | 311 +++++++++++++++++++++
4 files changed, 373 insertions(+)
---
base-commit: 39704f00f747aba3144289870b5fd8ac230a9aaf
change-id: 20260428-topic-sm8650-ayaneo-pocket-s2-sy7758-3081ee7f1e25
Best regards,
--
Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply
* [PATCH v2 1/2] dt-bindings: leds: backlight: document the SY7758 6-channel High Efficiency LED Driver
From: Neil Armstrong @ 2026-04-30 9:47 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller
Cc: dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev,
KancyJoe, Neil Armstrong, Krzysztof Kozlowski
In-Reply-To: <20260430-topic-sm8650-ayaneo-pocket-s2-sy7758-v2-0-308140640de9@linaro.org>
Document the Silergy SY7758 6-channel High Efficiency LED Driver
used for backlight brightness control.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
.../bindings/leds/backlight/silergy,sy7758.yaml | 53 ++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/Documentation/devicetree/bindings/leds/backlight/silergy,sy7758.yaml b/Documentation/devicetree/bindings/leds/backlight/silergy,sy7758.yaml
new file mode 100644
index 000000000000..80e978d691c2
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/backlight/silergy,sy7758.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/backlight/silergy,sy7758.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silergy SY7758 6-channel High Efficiency LED Driver
+
+maintainers:
+ - Neil Armstrong <neil.armstrong@linaro.org>
+
+description:
+ Silergy SY7758 is a high efficiency 6-channels LED backlight
+ driver with I2C brightness control.
+
+allOf:
+ - $ref: common.yaml#
+
+properties:
+ compatible:
+ const: silergy,sy7758
+
+ reg:
+ maxItems: 1
+
+ vddio-supply: true
+
+ enable-gpios:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - vddio-supply
+ - enable-gpios
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ backlight@11 {
+ compatible = "silergy,sy7758";
+ reg = <0x11>;
+ vddio-supply = <&bl_vddio>;
+ enable-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ };
+ };
--
2.34.1
^ permalink raw reply related
* [PATCH v2 2/2] backlight: Add SY7758 6-channel High Efficiency LED Driver support
From: Neil Armstrong @ 2026-04-30 9:47 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller
Cc: dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev,
KancyJoe, Neil Armstrong
In-Reply-To: <20260430-topic-sm8650-ayaneo-pocket-s2-sy7758-v2-0-308140640de9@linaro.org>
From: KancyJoe <kancy2333@outlook.com>
Implement support for the Silergy SY7758 6-channel High Efficiency LED
Driver used for backlight brightness control in the Ayaneo Pocket S2
dual-DSI panel.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: KancyJoe <kancy2333@outlook.com>
---
drivers/video/backlight/Kconfig | 8 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/sy7758.c | 311 +++++++++++++++++++++++++++++++++++++++
3 files changed, 320 insertions(+)
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index a7a3fbaf7c29..052ac80c8213 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -207,6 +207,14 @@ config BACKLIGHT_KTZ8866
Say Y to enable the backlight driver for the Kinetic KTZ8866
found in Xiaomi Mi Pad 5 series.
+config BACKLIGHT_SY7758
+ tristate "Backlight Driver for Silergy SY7758"
+ depends on I2C
+ select REGMAP_I2C
+ help
+ Say Y to enable the backlight driver for the Silergy SY7758
+ backlight controller found in Ayaneo Socket S2.
+
config BACKLIGHT_LM3533
tristate "Backlight Driver for LM3533"
depends on MFD_LM3533
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index 794820a98ed4..39ef588b1cf2 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -56,6 +56,7 @@ obj-$(CONFIG_BACKLIGHT_PWM) += pwm_bl.o
obj-$(CONFIG_BACKLIGHT_QCOM_WLED) += qcom-wled.o
obj-$(CONFIG_BACKLIGHT_RT4831) += rt4831-backlight.o
obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o
+obj-$(CONFIG_BACKLIGHT_SY7758) += sy7758.o
obj-$(CONFIG_BACKLIGHT_SKY81452) += sky81452-backlight.o
obj-$(CONFIG_BACKLIGHT_TPS65217) += tps65217_bl.o
obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o
diff --git a/drivers/video/backlight/sy7758.c b/drivers/video/backlight/sy7758.c
new file mode 100644
index 000000000000..9b2d3bbb4ded
--- /dev/null
+++ b/drivers/video/backlight/sy7758.c
@@ -0,0 +1,311 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Silergy SY7758 6-channel High Efficiency LED Driver
+ *
+ * Copyright (C) 2025 Kancy Joe <kancy2333@outlook.com>
+ * Copyright (C) 2026 Linaro Limited
+ * Author: Neil Armstrong <neil.armstrong@linaro.org>
+ */
+#include <linux/backlight.h>
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/of.h>
+#include <linux/err.h>
+#include <linux/bits.h>
+#include <linux/regmap.h>
+#include <linux/bitfield.h>
+#include <linux/gpio/consumer.h>
+#include <linux/regulator/consumer.h>
+
+#define DEFAULT_BRIGHTNESS 1024
+#define MAX_BRIGHTNESS 4080
+#define REG_MAX 0xAE
+
+/* Registers */
+#define REG_BRT_8BIT 0x00
+#define REG_DEV_CTL 0x01
+#define REG_STATUS 0x02
+#define REG_DEV_ID 0x03
+#define REG_DIRECT_CTL 0x04
+#define REG_STATUS2 0x05
+#define REG_BRT_12BIT_L 0x10
+#define REG_BRT_12BIT_H 0x11
+#define REG_LED_ENABLE 0x16
+
+/* OTP memory */
+#define REG_OTP_CFG98 0x98
+#define REG_OTP_CFG9E 0x9E
+#define REG_OTP_CFG0 0xA0
+#define REG_OTP_CFG1 0xA1
+#define REG_OTP_CFG2 0xA2
+#define REG_OTP_CFG3 0xA3
+#define REG_OTP_CFG4 0xA4
+#define REG_OTP_CFG5 0xA5
+#define REG_OTP_CFG6 0xA6
+#define REG_OTP_CFG7 0xA7
+#define REG_OTP_CFG9 0xA9
+#define REG_OTP_CFGA 0xAA
+#define REG_OTP_CFGE 0xAE
+
+/* Fields */
+#define BIT_DEV_CTL_FAST BIT(7)
+#define MSK_DEV_CTL_BRT_MODE GENMASK(2, 1)
+#define BIT_DEV_CTL_BL_CTLB BIT(0)
+
+#define BIT_STATUS_OPEN BIT(7)
+#define BIT_STATUS_SHORT BIT(6)
+#define BIT_STATUS_VREF_OK BIT(5)
+#define BIT_STATUS_VBST_OK BIT(4)
+#define BIT_STATUS_OVP BIT(3)
+#define BIT_STATUS_OCP BIT(2)
+#define BIT_STATUS_TSD BIT(1)
+#define BIT_STATUS_UVLO BIT(0)
+
+#define MSK_DIRECT_CTL_OUT GENMASK(5, 0)
+
+#define BIT_STATUS2_OCP50MS_LATCH BIT(0)
+#define BIT_STATUS2_OCP2 BIT(0)
+
+#define MSK_BRT_12BIT_L GENMASK(7, 0)
+#define MSK_BRT_12BIT_H GENMASK(3, 0)
+#define MSK_LED_ENABLE GENMASK(5, 0)
+
+#define BIT_CFG98_IBST_LIM_2X BIT(7)
+#define BIT_CFG98_A0_FSETB BIT(0)
+
+#define BIT_CFG9E_VBST_RANGE BIT(5)
+#define MSK_CFG9E_HEADROOM_OFFSET GENMASK(3, 0)
+
+#define MSK_CFG0_CURRENT_LOW GENMASK(7, 0)
+
+#define BIT_CFG1_PDET_STDBY BIT(7)
+#define MSK_CFG1_CURRENT_MAX GENMASK(6, 4)
+#define MSK_CFG1_CURRENT_HIGH GENMASK(3, 0)
+
+#define BIT_CFG2_UVLO_EN BIT(5)
+#define BIT_CFG2_UVLO_TH BIT(4)
+#define BIT_CFG2_BL_ON BIT(3)
+#define BIT_CFG2_ISET_EN BIT(2)
+#define BIT_CFG2_BST_ESET_EN BIT(1)
+
+#define MSK_CFG3_SLOPE GENMASK(6, 4)
+#define MSK_CFG3_FILTER GENMASK(3, 2)
+#define MSK_CFG3_PWM_INPUT_HYSTERESIS GENMASK(1, 0)
+#define MSK_CFG4_PWM_TO_I_TH GENMASK(7, 4)
+
+#define BIT_CFG5_PWM_DIRECT BIT(7)
+#define MSK_CFG5_PS_MODE GENMASK(6, 4)
+#define MSK_CFG5_PWM_FREQ GENMASK(3, 0)
+
+#define MSK_CFG6_BST_FREQ GENMASK(7, 6)
+#define MSK_CFG6_VBST GENMASK(5, 0)
+
+#define BIT_CFG7_EN_DRV3 BIT(5)
+#define BIT_CFG7_EN_DRV2 BIT(4)
+#define MSK_CFG7_IBST_LIM GENMASK(1, 0)
+
+#define MSK_CFG9_VBST_MAX GENMASK(7, 5)
+#define BIT_CFG9_JUMP_EN BIT(4)
+#define MSK_CFG9_JUMP_TH GENMASK(3, 2)
+#define MSK_CFG9_JUMP_VOLTAGE GENMASK(1, 0)
+
+#define BIT_CFGA_SSCLK_EN BIT(7)
+#define BIT_CFGA_ADAPTIVE BIT(3)
+#define MSK_CFGA_DRIVER_HEADROOM GENMASK(2, 0)
+#define MSK_CFGE_STEP_UP GENMASK(7, 6)
+#define MSK_CFGE_STEP_DN GENMASK(5, 4)
+#define MSK_CFGE_LED_FAULT_TH GENMASK(3, 2)
+#define MSK_CFGE_LED_COMP_HYST GENMASK(1, 0)
+
+struct sy7758 {
+ struct i2c_client *client;
+ struct regmap *regmap;
+ struct gpio_desc *gpio;
+ struct backlight_device *bl;
+};
+
+static const struct regmap_config sy7758_regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+ .max_register = REG_MAX,
+};
+
+static int sy7758_backlight_update_status(struct backlight_device *backlight_dev)
+{
+ struct sy7758 *sydev = bl_get_data(backlight_dev);
+ unsigned int brightness = backlight_get_brightness(backlight_dev);
+ int ret;
+
+ ret = regmap_write(sydev->regmap, REG_BRT_12BIT_L,
+ FIELD_PREP(MSK_BRT_12BIT_L,
+ brightness & 0xff));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_BRT_12BIT_H,
+ FIELD_PREP(MSK_BRT_12BIT_H,
+ (brightness >> 8) & 0xf));
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
+static const struct backlight_ops sy7758_backlight_ops = {
+ .options = BL_CORE_SUSPENDRESUME,
+ .update_status = sy7758_backlight_update_status,
+};
+
+static int sy7758_init(struct sy7758 *sydev)
+{
+ int ret = 0;
+
+ ret = regmap_write(sydev->regmap, REG_DEV_CTL,
+ BIT_DEV_CTL_FAST | BIT_DEV_CTL_BL_CTLB |
+ FIELD_PREP(MSK_DEV_CTL_BRT_MODE, 2));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_BRT_12BIT_L,
+ FIELD_PREP(MSK_BRT_12BIT_L,
+ DEFAULT_BRIGHTNESS & 0xff));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_BRT_12BIT_H,
+ FIELD_PREP(MSK_BRT_12BIT_H,
+ (DEFAULT_BRIGHTNESS >> 8)));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_OTP_CFG5,
+ FIELD_PREP(MSK_CFG5_PS_MODE, 6) |
+ FIELD_PREP(MSK_CFG5_PWM_FREQ, 4));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_OTP_CFG0,
+ FIELD_PREP(MSK_CFG0_CURRENT_LOW, 85));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_OTP_CFG1,
+ BIT_CFG1_PDET_STDBY |
+ FIELD_PREP(MSK_CFG1_CURRENT_MAX, 1) |
+ FIELD_PREP(MSK_CFG1_CURRENT_HIGH, 10));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_OTP_CFG9,
+ FIELD_PREP(MSK_CFG9_VBST_MAX, 4));
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sydev->regmap, REG_OTP_CFG2,
+ BIT_CFG2_BL_ON | BIT_CFG2_UVLO_EN);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
+static int sy7758_probe(struct i2c_client *client)
+{
+ struct backlight_properties props = { };
+ struct device *dev = &client->dev;
+ struct sy7758 *sydev;
+ unsigned int dev_id;
+ int ret;
+
+ sydev = devm_kzalloc(dev, sizeof(*sydev), GFP_KERNEL);
+ if (!sydev)
+ return -ENOMEM;
+
+ i2c_set_clientdata(client, sydev);
+
+ /* Initialize regmap */
+ sydev->client = client;
+ sydev->regmap = devm_regmap_init_i2c(client, &sy7758_regmap_config);
+ if (IS_ERR(sydev->regmap))
+ return dev_err_probe(dev, PTR_ERR(sydev->regmap),
+ "failed to init regmap\n");
+
+ /* Get and enable regulators */
+ ret = devm_regulator_get_enable(dev, "vddio");
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to get regulator\n");
+
+ usleep_range(100, 200);
+
+ /* Get enable GPIO and set to high */
+ sydev->gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
+ if (IS_ERR(sydev->gpio))
+ return dev_err_probe(dev, PTR_ERR(sydev->gpio),
+ "failed to get enable GPIO\n");
+
+ /* Let some time for HW to settle */
+ usleep_range(10000, 11000);
+
+ /* try read and check device id */
+ ret = regmap_read(sydev->regmap, REG_DEV_ID, &dev_id);
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "failed to read device id\n");
+ if (dev_id != 0x63) {
+ dev_err(dev, "unexpected device id: 0x%02x\n", dev_id);
+ return -ENODEV;
+ }
+
+ /* Initialize and set default brightness */
+ ret = sy7758_init(sydev);
+ if (ret)
+ return ret;
+
+ props.type = BACKLIGHT_RAW;
+ props.max_brightness = MAX_BRIGHTNESS;
+ props.brightness = DEFAULT_BRIGHTNESS;
+ props.scale = BACKLIGHT_SCALE_LINEAR;
+
+ sydev->bl = devm_backlight_device_register(dev, "sy7758-backlight",
+ dev, sydev, &sy7758_backlight_ops,
+ &props);
+ if (IS_ERR(sydev->bl))
+ return dev_err_probe(dev, PTR_ERR(sydev->bl),
+ "failed to register backlight device\n");
+
+ return backlight_update_status(sydev->bl);
+}
+
+static void sy7758_remove(struct i2c_client *client)
+{
+ struct sy7758 *sydev = i2c_get_clientdata(client);
+
+ backlight_disable(sydev->bl);
+}
+
+static const struct i2c_device_id sy7758_ids[] = {
+ { "sy7758" },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, sy7758_ids);
+
+static const struct of_device_id sy7758_match_table[] = {
+ { .compatible = "silergy,sy7758", },
+ { },
+};
+MODULE_DEVICE_TABLE(of, sy7758_match_table);
+
+static struct i2c_driver sy7758_driver = {
+ .driver = {
+ .name = "sy7758",
+ .of_match_table = sy7758_match_table,
+ },
+ .probe = sy7758_probe,
+ .remove = sy7758_remove,
+ .id_table = sy7758_ids,
+};
+
+module_i2c_driver(sy7758_driver);
+
+MODULE_DESCRIPTION("Silergy SY7758 Backlight Driver");
+MODULE_AUTHOR("Kancy Joe <kancy2333@outlook.com>");
+MODULE_LICENSE("GPL");
--
2.34.1
^ permalink raw reply related
* [PATCH] staging: fbtft: remove unused function fbtft_write_gpio16_wr_latched
From: Hungyu Lin @ 2026-04-30 10:25 UTC (permalink / raw)
To: gregkh
Cc: andy, dri-devel, linux-fbdev, linux-staging, linux-kernel,
Hungyu Lin
The function fbtft_write_gpio16_wr_latched is not referenced anywhere
in the driver and only contains a stub implementation.
Remove it from the driver.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/fbtft/fbtft-io.c | 7 -------
drivers/staging/fbtft/fbtft.h | 1 -
2 files changed, 8 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c
index de1904a443c2..7d331eba947a 100644
--- a/drivers/staging/fbtft/fbtft-io.c
+++ b/drivers/staging/fbtft/fbtft-io.c
@@ -227,10 +227,3 @@ int fbtft_write_gpio16_wr(struct fbtft_par *par, void *buf, size_t len)
return 0;
}
EXPORT_SYMBOL(fbtft_write_gpio16_wr);
-
-int fbtft_write_gpio16_wr_latched(struct fbtft_par *par, void *buf, size_t len)
-{
- dev_err(par->info->device, "%s: function not implemented\n", __func__);
- return -1;
-}
-EXPORT_SYMBOL(fbtft_write_gpio16_wr_latched);
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 317be17b95c1..c7afb0fd3943 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -262,7 +262,6 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len);
int fbtft_read_spi(struct fbtft_par *par, void *buf, size_t len);
int fbtft_write_gpio8_wr(struct fbtft_par *par, void *buf, size_t len);
int fbtft_write_gpio16_wr(struct fbtft_par *par, void *buf, size_t len);
-int fbtft_write_gpio16_wr_latched(struct fbtft_par *par, void *buf, size_t len);
/* fbtft-bus.c */
int fbtft_write_vmem8_bus8(struct fbtft_par *par, size_t offset, size_t len);
--
2.34.1
^ permalink raw reply related
* [PATCH] fbdev: Consistently define pci_device_ids using named initializers
From: Uwe Kleine-König (The Capable Hub) @ 2026-04-30 11:16 UTC (permalink / raw)
To: Helge Deller
Cc: Benjamin Herrenschmidt, Russell King, Andres Salomon,
Antonino Daplas, linux-fbdev, dri-devel, linux-kernel,
linux-arm-kernel, linux-geode, Markus Schneider-Pargmann
... and PCI device helpers.
The various struct pci_device_id arrays were initialized mostly by list
expressions. This isn't easily readable if you're not into PCI. Using
named initializers is more explicit and thus easier to parse. Also use
PCI_DEVICE* helper macros to assign .vendor, .device, .subvendor and
.subdevice where appropriate and skip explicit assignments of 0 (which
the compiler takes care of).
The secret plan is to make struct pci_device_id::driver_data an
anonymous union (similar to
https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
and that requires named initializers. But it's also a nice cleanup on
its own.
This change doesn't introduce changes to the compiled pci_device_id
array. Tested on x86 and arm64.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
Hello,
There is no benefit for radeon of the mentioned follow up quest as it
doesn't use pointers in .driver_data. Other drivers benefit from
- { PCI_VDEVICE(TTI, 0x3220), .driver_data = (kernel_ulong_t)&hptiop_itl_ops },
+ { PCI_VDEVICE(TTI, 0x3220), .driver_data_ptr = &hptiop_itl_ops },
which gets rid of a bunch of casts and so brings a little bit more type
safety. This patch is a preparation for that.
I assume a single patch for all of drivers/video/fbdev is fine. If not I
can split per driver.
drivers/video/fbdev/arkfb.c | 4 +-
drivers/video/fbdev/aty/aty128fb.c | 143 +++++++------------
drivers/video/fbdev/aty/radeon_base.c | 2 +-
drivers/video/fbdev/carminefb.c | 5 +-
drivers/video/fbdev/cirrusfb.c | 2 +-
drivers/video/fbdev/cyber2000fb.c | 24 ++--
drivers/video/fbdev/geode/gx1fb_core.c | 10 +-
drivers/video/fbdev/kyro/fbdev.c | 5 +-
drivers/video/fbdev/matrox/matroxfb_base.c | 38 ++---
drivers/video/fbdev/neofb.c | 29 ++--
drivers/video/fbdev/nvidia/nvidia.c | 9 +-
drivers/video/fbdev/pm2fb.c | 11 +-
drivers/video/fbdev/pm3fb.c | 5 +-
drivers/video/fbdev/pvr2fb.c | 5 +-
drivers/video/fbdev/riva/fbdev.c | 128 ++++++-----------
drivers/video/fbdev/s3fb.c | 32 ++---
drivers/video/fbdev/savage/savagefb_driver.c | 140 +++++++++---------
drivers/video/fbdev/sis/sis_main.h | 26 ++--
drivers/video/fbdev/tdfxfb.c | 21 +--
drivers/video/fbdev/tridentfb.c | 44 +++---
drivers/video/fbdev/vt8623fb.c | 4 +-
21 files changed, 292 insertions(+), 395 deletions(-)
diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c
index 866c1165704e..195dbf4a5142 100644
--- a/drivers/video/fbdev/arkfb.c
+++ b/drivers/video/fbdev/arkfb.c
@@ -1167,8 +1167,8 @@ static const struct dev_pm_ops ark_pci_pm_ops = {
/* List of boards that we are trying to support */
static const struct pci_device_id ark_devices[] = {
- {PCI_DEVICE(0xEDD8, 0xA099)},
- {0, 0, 0, 0, 0, 0, 0}
+ { PCI_DEVICE(0xEDD8, 0xA099) },
+ { }
};
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
index f55b4c7609a8..bcb10e66221c 100644
--- a/drivers/video/fbdev/aty/aty128fb.c
+++ b/drivers/video/fbdev/aty/aty128fb.c
@@ -180,101 +180,54 @@ static const struct dev_pm_ops aty128_pci_pm_ops = {
/* supported Rage128 chipsets */
static const struct pci_device_id aty128_pci_tbl[] = {
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_LF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M3 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_MF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M4 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_ML,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_M4 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PA,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PB,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PC,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PD,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PG,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PH,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PI,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PJ,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PN,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PQ,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PT,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PU,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PW,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pro },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RG,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_RL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SE,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_pci },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SG,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SH,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_SN,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128 },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TF,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TT,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_TU,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, rage_128_ultra },
- { 0, }
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_LE), .driver_data = rage_M3_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_LF), .driver_data = rage_M3 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_MF), .driver_data = rage_M4 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_ML), .driver_data = rage_M4 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PA), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PB), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PC), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PD), .driver_data = rage_128_pro_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PE), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PF), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PG), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PH), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PI), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PJ), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PK), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PL), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PM), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PN), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PO), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PP), .driver_data = rage_128_pro_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PQ), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PR), .driver_data = rage_128_pro_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PS), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PT), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PU), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PV), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PW), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_PX), .driver_data = rage_128_pro },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RE), .driver_data = rage_128_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RF), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RG), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RK), .driver_data = rage_128_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_RL), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SE), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SF), .driver_data = rage_128_pci },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SG), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SH), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SK), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SL), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SM), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_SN), .driver_data = rage_128 },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TF), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TL), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TR), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TS), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TT), .driver_data = rage_128_ultra },
+ { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_RAGE128_TU), .driver_data = rage_128_ultra },
+ { }
};
MODULE_DEVICE_TABLE(pci, aty128_pci_tbl);
diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c
index cb006484831b..adb03489bedf 100644
--- a/drivers/video/fbdev/aty/radeon_base.c
+++ b/drivers/video/fbdev/aty/radeon_base.c
@@ -95,7 +95,7 @@
#define MIN_MAPPED_VRAM (1024*768*1)
#define CHIP_DEF(id, family, flags) \
- { PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
+ { PCI_DEVICE(PCI_VENDOR_ID_ATI, id), .driver_data = (flags) | (CHIP_FAMILY_##family) }
static const struct pci_device_id radeonfb_pci_table[] = {
/* Radeon Xpress 200m */
diff --git a/drivers/video/fbdev/carminefb.c b/drivers/video/fbdev/carminefb.c
index bd4bff6a2484..5f13f1cc79d3 100644
--- a/drivers/video/fbdev/carminefb.c
+++ b/drivers/video/fbdev/carminefb.c
@@ -753,9 +753,8 @@ static void carminefb_remove(struct pci_dev *dev)
#define PCI_VENDOR_ID_FUJITU_LIMITED 0x10cf
static struct pci_device_id carmine_devices[] = {
-{
- PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b)},
- {0, 0, 0, 0, 0, 0, 0}
+ { PCI_DEVICE(PCI_VENDOR_ID_FUJITU_LIMITED, 0x202b) },
+ { }
};
MODULE_DEVICE_TABLE(pci, carmine_devices);
diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c
index e29217e476ea..2693b5cc053f 100644
--- a/drivers/video/fbdev/cirrusfb.c
+++ b/drivers/video/fbdev/cirrusfb.c
@@ -253,7 +253,7 @@ static const struct cirrusfb_board_info_rec {
#ifdef CONFIG_PCI
#define CHIP(id, btype) \
- { PCI_VENDOR_ID_CIRRUS, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (btype) }
+ { PCI_VDEVICE(CIRRUS, id), .driver_data = (btype) }
static struct pci_device_id cirrusfb_pci_table[] = {
CHIP(PCI_DEVICE_ID_CIRRUS_5436, BT_ALPINE),
diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c
index 2d12f8e96c7e..3daba94c6c13 100644
--- a/drivers/video/fbdev/cyber2000fb.c
+++ b/drivers/video/fbdev/cyber2000fb.c
@@ -1796,16 +1796,22 @@ static int __maybe_unused cyberpro_pci_resume(struct device *dev)
static struct pci_device_id cyberpro_pci_table[] = {
/* Not yet
- * { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682,
- * PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_IGA_1682 },
+ * {
+ * PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_1682),
+ * .driver_data = ID_IGA_1682,
+ * },
*/
- { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_2000 },
- { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2010,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_2010 },
- { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_CYBERPRO_5000 },
- { 0, }
+ {
+ PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_2000),
+ .driver_data = ID_CYBERPRO_2000,
+ }, {
+ PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_2010),
+ .driver_data = ID_CYBERPRO_2010,
+ }, {
+ PCI_VDEVICE(INTERG, PCI_DEVICE_ID_INTERG_5000),
+ .driver_data = ID_CYBERPRO_5000,
+ },
+ { }
};
MODULE_DEVICE_TABLE(pci, cyberpro_pci_table);
diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
index a1919c1934ac..7cca46891aef 100644
--- a/drivers/video/fbdev/geode/gx1fb_core.c
+++ b/drivers/video/fbdev/geode/gx1fb_core.c
@@ -423,10 +423,12 @@ static void __init gx1fb_setup(char *options)
#endif
static struct pci_device_id gx1fb_id_table[] = {
- { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { 0, }
+ {
+ PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_VIDEO),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff0000,
+ },
+ { }
};
MODULE_DEVICE_TABLE(pci, gx1fb_id_table);
diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index c8b1dfa456a3..d756b3603fa6 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -645,9 +645,8 @@ static int kyrofb_ioctl(struct fb_info *info,
}
static const struct pci_device_id kyrofb_pci_tbl[] = {
- { PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, }
+ { PCI_DEVICE(PCI_VENDOR_ID_ST, PCI_DEVICE_ID_STG4000) },
+ { }
};
MODULE_DEVICE_TABLE(pci, kyrofb_pci_tbl);
diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
index e1a4bc7c2318..22774eb1b14c 100644
--- a/drivers/video/fbdev/matrox/matroxfb_base.c
+++ b/drivers/video/fbdev/matrox/matroxfb_base.c
@@ -1642,7 +1642,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b)
int err;
static const struct pci_device_id intel_82437[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) },
+ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82437) },
{ },
};
@@ -2135,35 +2135,23 @@ static void pci_remove_matrox(struct pci_dev* pdev) {
static const struct pci_device_id matroxfb_devices[] = {
#ifdef CONFIG_FB_MATROX_MILLENIUM
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL_2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL_2_AGP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MIL) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MIL_2) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MIL_2_AGP) },
#endif
#ifdef CONFIG_FB_MATROX_MYSTIQUE
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MYS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_MYS) },
#endif
#ifdef CONFIG_FB_MATROX_G
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G100_MM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G100_AGP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_PCI,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, 0x0532,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_AGP,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G400,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G550,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G100_MM) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G100_AGP) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G200_PCI) },
+ { PCI_VDEVICE(MATROX, 0x0532) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G200_AGP) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G400) },
+ { PCI_VDEVICE(MATROX, PCI_DEVICE_ID_MATROX_G550) },
#endif
- {0, 0,
- 0, 0, 0, 0, 0}
+ { }
};
MODULE_DEVICE_TABLE(pci, matroxfb_devices);
diff --git a/drivers/video/fbdev/neofb.c b/drivers/video/fbdev/neofb.c
index c1cd028b8991..e0b8d4d6ce79 100644
--- a/drivers/video/fbdev/neofb.c
+++ b/drivers/video/fbdev/neofb.c
@@ -2126,34 +2126,25 @@ static void neofb_remove(struct pci_dev *dev)
}
static const struct pci_device_id neofb_devices[] = {
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2070), .driver_data = FB_ACCEL_NEOMAGIC_NM2070 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2090,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2090},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2090), .driver_data = FB_ACCEL_NEOMAGIC_NM2090 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2093,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2093},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2093), .driver_data = FB_ACCEL_NEOMAGIC_NM2093 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2097,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2097},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2097), .driver_data = FB_ACCEL_NEOMAGIC_NM2097 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2160,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2160},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2160), .driver_data = FB_ACCEL_NEOMAGIC_NM2160 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2200},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2200), .driver_data = FB_ACCEL_NEOMAGIC_NM2200 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2230,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2230},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2230), .driver_data = FB_ACCEL_NEOMAGIC_NM2230 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2360,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2360},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2360), .driver_data = FB_ACCEL_NEOMAGIC_NM2360 },
- {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2380,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2380},
+ { PCI_VDEVICE(NEOMAGIC, PCI_CHIP_NM2380), .driver_data = FB_ACCEL_NEOMAGIC_NM2380 },
- {0, 0, 0, 0, 0, 0, 0}
+ { }
};
MODULE_DEVICE_TABLE(pci, neofb_devices);
diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c
index 72b85f475605..da2d486022e8 100644
--- a/drivers/video/fbdev/nvidia/nvidia.c
+++ b/drivers/video/fbdev/nvidia/nvidia.c
@@ -58,9 +58,12 @@
#define MAX_CURS 32
static const struct pci_device_id nvidiafb_pci_tbl[] = {
- {PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
- PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0},
- { 0, }
+ {
+ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
+ .class = PCI_BASE_CLASS_DISPLAY << 16,
+ .class_mask = 0xff0000
+ },
+ { }
};
MODULE_DEVICE_TABLE(pci, nvidiafb_pci_tbl);
diff --git a/drivers/video/fbdev/pm2fb.c b/drivers/video/fbdev/pm2fb.c
index f34429829b7d..412ff249b5c7 100644
--- a/drivers/video/fbdev/pm2fb.c
+++ b/drivers/video/fbdev/pm2fb.c
@@ -1748,13 +1748,10 @@ static void pm2fb_remove(struct pci_dev *pdev)
}
static const struct pci_device_id pm2fb_id_table[] = {
- { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TVP4020,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2V,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, }
+ { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_TVP4020) },
+ { PCI_VDEVICE(3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2) },
+ { PCI_VDEVICE(3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2V) },
+ { }
};
static struct pci_driver pm2fb_driver = {
diff --git a/drivers/video/fbdev/pm3fb.c b/drivers/video/fbdev/pm3fb.c
index 6e55e42514d6..6f552ae36219 100644
--- a/drivers/video/fbdev/pm3fb.c
+++ b/drivers/video/fbdev/pm3fb.c
@@ -1486,9 +1486,8 @@ static void pm3fb_remove(struct pci_dev *dev)
}
static const struct pci_device_id pm3fb_id_table[] = {
- { PCI_VENDOR_ID_3DLABS, 0x0a,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, }
+ { PCI_VDEVICE(3DLABS, 0x000a) },
+ { }
};
/* For PCI drivers */
diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
index 3f6384e631b1..06aefad75f46 100644
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -993,9 +993,8 @@ static void pvr2fb_pci_remove(struct pci_dev *pdev)
}
static const struct pci_device_id pvr2fb_pci_tbl[] = {
- { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NEON250,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, },
+ { PCI_VDEVICE(NEC, PCI_DEVICE_ID_NEC_NEON250), },
+ { },
};
MODULE_DEVICE_TABLE(pci, pvr2fb_pci_tbl);
diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c
index 1e377b2ec089..2268fea4d807 100644
--- a/drivers/video/fbdev/riva/fbdev.c
+++ b/drivers/video/fbdev/riva/fbdev.c
@@ -103,92 +103,50 @@ static int rivafb_blank(int blank, struct fb_info *info);
* ------------------------------------------------------------------------- */
static const struct pci_device_id rivafb_pci_tbl[] = {
- { PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UTNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_VTNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UVTNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_ITNT2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_460,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA_SGS, PCI_DEVICE_ID_NVIDIA_SGS_RIVA128) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UTNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_VTNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_UVTNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_ITNT2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_460) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440) },
// NF2/IGP version, GeForce 4 MX, NV18
- { PCI_VENDOR_ID_NVIDIA, 0x01f0,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO_M32,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO_M64,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_550XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500_GOGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_IGEFORCE2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_1,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_2,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_DDC,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4600,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4400,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { 0, } /* terminate list */
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x01f0) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO_M32) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO_M64) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_200) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_550XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_500_GOGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_IGEFORCE2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_1) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE3_2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_DDC) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4600) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4400) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL) },
+ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200) },
+ { } /* terminate list */
};
MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);
diff --git a/drivers/video/fbdev/s3fb.c b/drivers/video/fbdev/s3fb.c
index ba30e5568cab..831e9e6861b1 100644
--- a/drivers/video/fbdev/s3fb.c
+++ b/drivers/video/fbdev/s3fb.c
@@ -1563,24 +1563,24 @@ static const struct dev_pm_ops s3_pci_pm_ops = {
/* List of boards that we are trying to support */
static const struct pci_device_id s3_devices[] = {
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8810), .driver_data = CHIP_XXX_TRIO},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8811), .driver_data = CHIP_XXX_TRIO},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8814), .driver_data = CHIP_767_TRIO64UVP},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8901), .driver_data = CHIP_XXX_TRIO64V2_DXGX},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8902), .driver_data = CHIP_551_PLATO_PX},
+ { PCI_VDEVICE(S3, 0x8810), .driver_data = CHIP_XXX_TRIO },
+ { PCI_VDEVICE(S3, 0x8811), .driver_data = CHIP_XXX_TRIO },
+ { PCI_VDEVICE(S3, 0x8812), .driver_data = CHIP_M65_AURORA64VP },
+ { PCI_VDEVICE(S3, 0x8814), .driver_data = CHIP_767_TRIO64UVP },
+ { PCI_VDEVICE(S3, 0x8901), .driver_data = CHIP_XXX_TRIO64V2_DXGX },
+ { PCI_VDEVICE(S3, 0x8902), .driver_data = CHIP_551_PLATO_PX },
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x5631), .driver_data = CHIP_325_VIRGE},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x883D), .driver_data = CHIP_988_VIRGE_VX},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A01), .driver_data = CHIP_XXX_VIRGE_DXGX},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A10), .driver_data = CHIP_357_VIRGE_GX2},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A11), .driver_data = CHIP_359_VIRGE_GX2P},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A12), .driver_data = CHIP_359_VIRGE_GX2P},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8A13), .driver_data = CHIP_36X_TRIO3D_1X_2X},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8904), .driver_data = CHIP_365_TRIO3D},
- {PCI_DEVICE(PCI_VENDOR_ID_S3, 0x8C01), .driver_data = CHIP_260_VIRGE_MX},
+ { PCI_VDEVICE(S3, 0x5631), .driver_data = CHIP_325_VIRGE },
+ { PCI_VDEVICE(S3, 0x883D), .driver_data = CHIP_988_VIRGE_VX },
+ { PCI_VDEVICE(S3, 0x8A01), .driver_data = CHIP_XXX_VIRGE_DXGX },
+ { PCI_VDEVICE(S3, 0x8A10), .driver_data = CHIP_357_VIRGE_GX2 },
+ { PCI_VDEVICE(S3, 0x8A11), .driver_data = CHIP_359_VIRGE_GX2P },
+ { PCI_VDEVICE(S3, 0x8A12), .driver_data = CHIP_359_VIRGE_GX2P },
+ { PCI_VDEVICE(S3, 0x8A13), .driver_data = CHIP_36X_TRIO3D_1X_2X },
+ { PCI_VDEVICE(S3, 0x8904), .driver_data = CHIP_365_TRIO3D },
+ { PCI_VDEVICE(S3, 0x8C01), .driver_data = CHIP_260_VIRGE_MX },
- {0, 0, 0, 0, 0, 0, 0}
+ { }
};
diff --git a/drivers/video/fbdev/savage/savagefb_driver.c b/drivers/video/fbdev/savage/savagefb_driver.c
index c2f79357c8da..7789196d2eb5 100644
--- a/drivers/video/fbdev/savage/savagefb_driver.c
+++ b/drivers/video/fbdev/savage/savagefb_driver.c
@@ -2449,76 +2449,78 @@ static const struct dev_pm_ops savagefb_pm_ops = {
};
static const struct pci_device_id savagefb_devices[] = {
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX128,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
+ {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_MX128),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_MX64),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_MX64C),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX128SDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX128DDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX64SDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IX64DDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IXCSDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SUPSAV_IXCDDR),
+ .driver_data = FB_ACCEL_SUPERSAVAGE,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE4),
+ .driver_data = FB_ACCEL_SAVAGE4,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE3D),
+ .driver_data = FB_ACCEL_SAVAGE3D,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE3D_MV),
+ .driver_data = FB_ACCEL_SAVAGE3D_MV,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE2000),
+ .driver_data = FB_ACCEL_SAVAGE2000,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_MX_MV),
+ .driver_data = FB_ACCEL_SAVAGE_MX_MV,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_MX),
+ .driver_data = FB_ACCEL_SAVAGE_MX,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_IX_MV),
+ .driver_data = FB_ACCEL_SAVAGE_IX_MV,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_SAVAGE_IX),
+ .driver_data = FB_ACCEL_SAVAGE_IX,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_PM),
+ .driver_data = FB_ACCEL_PROSAVAGE_PM,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_KM),
+ .driver_data = FB_ACCEL_PROSAVAGE_KM,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_S3TWISTER_P),
+ .driver_data = FB_ACCEL_S3TWISTER_P,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_S3TWISTER_K),
+ .driver_data = FB_ACCEL_S3TWISTER_K,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_DDR),
+ .driver_data = FB_ACCEL_PROSAVAGE_DDR,
+ }, {
+ PCI_VDEVICE(S3, PCI_CHIP_PROSAVAGE_DDRK),
+ .driver_data = FB_ACCEL_PROSAVAGE_DDRK,
+ },
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX64,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_MX64C,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX128SDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX128DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX64SDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IX64DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IXCSDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SUPSAV_IXCDDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SUPERSAVAGE},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE4,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE4},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE3D,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE3D},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE3D_MV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE3D_MV},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE2000,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE2000},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_MX_MV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_MX_MV},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_MX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_MX},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_IX_MV,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_IX_MV},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_SAVAGE_IX,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_SAVAGE_IX},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_PM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_PM},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_KM,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_KM},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_S3TWISTER_P,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_S3TWISTER_P},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_S3TWISTER_K,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_S3TWISTER_K},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_DDR,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_DDR},
-
- {PCI_VENDOR_ID_S3, PCI_CHIP_PROSAVAGE_DDRK,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_PROSAVAGE_DDRK},
-
- {0, 0, 0, 0, 0, 0, 0}
+ { }
};
MODULE_DEVICE_TABLE(pci, savagefb_devices);
diff --git a/drivers/video/fbdev/sis/sis_main.h b/drivers/video/fbdev/sis/sis_main.h
index 0965db9fad6a..4ca487f48205 100644
--- a/drivers/video/fbdev/sis/sis_main.h
+++ b/drivers/video/fbdev/sis/sis_main.h
@@ -102,22 +102,22 @@ static struct sisfb_chip_info {
static struct pci_device_id sisfb_pci_table[] = {
#ifdef CONFIG_FB_SIS_300
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_300), .driver_data = 0 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_540_VGA), .driver_data = 1 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_630_VGA), .driver_data = 2 },
#endif
#ifdef CONFIG_FB_SIS_315
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315H, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315PRO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_550_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8},
- { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_660_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
- { PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_20, PCI_ANY_ID, PCI_ANY_ID, 0, 0,10},
- { PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_40, PCI_ANY_ID, PCI_ANY_ID, 0, 0,11},
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_315H), .driver_data = 3 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_315), .driver_data = 4 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_315PRO), .driver_data = 5 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_550_VGA), .driver_data = 6 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_650_VGA), .driver_data = 7 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_330), .driver_data = 8 },
+ { PCI_VDEVICE(SI, PCI_DEVICE_ID_SI_660_VGA), .driver_data = 9 },
+ { PCI_VDEVICE(XGI, PCI_DEVICE_ID_XGI_20), .driver_data = 10 },
+ { PCI_VDEVICE(XGI, PCI_DEVICE_ID_XGI_40), .driver_data = 11 },
#endif
- { 0 }
+ { }
};
MODULE_DEVICE_TABLE(pci, sisfb_pci_table);
diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c
index 4c4e53aaea3a..a6b63c09b48f 100644
--- a/drivers/video/fbdev/tdfxfb.c
+++ b/drivers/video/fbdev/tdfxfb.c
@@ -124,16 +124,17 @@ static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id);
static void tdfxfb_remove(struct pci_dev *pdev);
static const struct pci_device_id tdfxfb_id_table[] = {
- { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO5,
- PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
- 0xff0000, 0 },
- { 0, }
+ {
+ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE),
+ .class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff0000,
+ }, {
+ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3),
+ .class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff0000,
+ }, {
+ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO5),
+ .class = PCI_BASE_CLASS_DISPLAY << 16, .class_mask = 0xff0000,
+ },
+ { }
};
static struct pci_driver tdfxfb_driver = {
diff --git a/drivers/video/fbdev/tridentfb.c b/drivers/video/fbdev/tridentfb.c
index 17b7253b8fbe..a8fdbae83a80 100644
--- a/drivers/video/fbdev/tridentfb.c
+++ b/drivers/video/fbdev/tridentfb.c
@@ -1736,28 +1736,28 @@ static void trident_pci_remove(struct pci_dev *dev)
/* List of boards that we are trying to support */
static const struct pci_device_id trident_devices[] = {
- {PCI_VENDOR_ID_TRIDENT, BLADE3D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi7D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEi1D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEAi1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEAi1D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEE4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, TGUI9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, TGUI9660, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, IMAGE975, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, IMAGE985, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9388, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9520, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9525DVD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9397, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBER9397DVD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEXPAi1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEXPm8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_TRIDENT, CYBERBLADEXPm16, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {0,}
+ { PCI_VDEVICE(TRIDENT, BLADE3D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi7) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi7D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi1) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEi1D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEAi1) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEAi1D) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEE4) },
+ { PCI_VDEVICE(TRIDENT, TGUI9440) },
+ { PCI_VDEVICE(TRIDENT, TGUI9660) },
+ { PCI_VDEVICE(TRIDENT, IMAGE975) },
+ { PCI_VDEVICE(TRIDENT, IMAGE985) },
+ { PCI_VDEVICE(TRIDENT, CYBER9320) },
+ { PCI_VDEVICE(TRIDENT, CYBER9388) },
+ { PCI_VDEVICE(TRIDENT, CYBER9520) },
+ { PCI_VDEVICE(TRIDENT, CYBER9525DVD) },
+ { PCI_VDEVICE(TRIDENT, CYBER9397) },
+ { PCI_VDEVICE(TRIDENT, CYBER9397DVD) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEXPAi1) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEXPm8) },
+ { PCI_VDEVICE(TRIDENT, CYBERBLADEXPm16) },
+ { }
};
MODULE_DEVICE_TABLE(pci, trident_devices);
diff --git a/drivers/video/fbdev/vt8623fb.c b/drivers/video/fbdev/vt8623fb.c
index df984f3a7ff6..9708d968970a 100644
--- a/drivers/video/fbdev/vt8623fb.c
+++ b/drivers/video/fbdev/vt8623fb.c
@@ -900,8 +900,8 @@ static const struct dev_pm_ops vt8623_pci_pm_ops = {
/* List of boards that we are trying to support */
static const struct pci_device_id vt8623_devices[] = {
- {PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122)},
- {0, 0, 0, 0, 0, 0, 0}
+ { PCI_DEVICE(PCI_VENDOR_ID_VIA, 0x3122) },
+ { }
};
MODULE_DEVICE_TABLE(pci, vt8623_devices);
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3
^ permalink raw reply related
* Re: [PATCH] staging: fbtft: remove unused function fbtft_write_gpio16_wr_latched
From: Andy Shevchenko @ 2026-04-30 11:46 UTC (permalink / raw)
To: Hungyu Lin
Cc: gregkh, andy, dri-devel, linux-fbdev, linux-staging, linux-kernel
In-Reply-To: <20260430102529.25019-1-dennylin0707@gmail.com>
On Thu, Apr 30, 2026 at 10:25:29AM +0000, Hungyu Lin wrote:
> The function fbtft_write_gpio16_wr_latched is not referenced anywhere
fbtft_write_gpio16_wr_latched()
> in the driver and only contains a stub implementation.
>
> Remove it from the driver.
Agree, pure code removal is always welcome.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH] fbdev: Consistently define pci_device_ids using named initializers
From: Helge Deller @ 2026-04-30 11:59 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: linux-fbdev, dri-devel, linux-kernel, linux-arm-kernel,
linux-geode, Markus Schneider-Pargmann
In-Reply-To: <20260430111637.211336-2-u.kleine-koenig@baylibre.com>
On 4/30/26 13:16, Uwe Kleine-König (The Capable Hub) wrote:
> ... and PCI device helpers.
>
> The various struct pci_device_id arrays were initialized mostly by list
> expressions. This isn't easily readable if you're not into PCI. Using
> named initializers is more explicit and thus easier to parse. Also use
> PCI_DEVICE* helper macros to assign .vendor, .device, .subvendor and
> .subdevice where appropriate and skip explicit assignments of 0 (which
> the compiler takes care of).
>
> The secret plan is to make struct pci_device_id::driver_data an
> anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
> and that requires named initializers. But it's also a nice cleanup on
> its own.
>
> This change doesn't introduce changes to the compiled pci_device_id
> array. Tested on x86 and arm64.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
>
> drivers/video/fbdev/arkfb.c | 4 +-
> drivers/video/fbdev/aty/aty128fb.c | 143 +++++++------------
> drivers/video/fbdev/aty/radeon_base.c | 2 +-
> drivers/video/fbdev/carminefb.c | 5 +-
> drivers/video/fbdev/cirrusfb.c | 2 +-
> drivers/video/fbdev/cyber2000fb.c | 24 ++--
> drivers/video/fbdev/geode/gx1fb_core.c | 10 +-
> drivers/video/fbdev/kyro/fbdev.c | 5 +-
> drivers/video/fbdev/matrox/matroxfb_base.c | 38 ++---
> drivers/video/fbdev/neofb.c | 29 ++--
> drivers/video/fbdev/nvidia/nvidia.c | 9 +-
> drivers/video/fbdev/pm2fb.c | 11 +-
> drivers/video/fbdev/pm3fb.c | 5 +-
> drivers/video/fbdev/pvr2fb.c | 5 +-
> drivers/video/fbdev/riva/fbdev.c | 128 ++++++-----------
> drivers/video/fbdev/s3fb.c | 32 ++---
> drivers/video/fbdev/savage/savagefb_driver.c | 140 +++++++++---------
> drivers/video/fbdev/sis/sis_main.h | 26 ++--
> drivers/video/fbdev/tdfxfb.c | 21 +--
> drivers/video/fbdev/tridentfb.c | 44 +++---
> drivers/video/fbdev/vt8623fb.c | 4 +-
> 21 files changed, 292 insertions(+), 395 deletions(-)
applied.
Thanks!
Helge
^ permalink raw reply
* Re: (subset) [PATCH] backlight: ktd2801: enable BL_CORE_SUSPENDRESUME
From: Lee Jones @ 2026-04-30 13:35 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Duje Mihanović
Cc: Karel Balej, dri-devel, linux-fbdev, phone-devel,
~postmarketos/upstreaming, linux-kernel, Duje Mihanović,
stable
In-Reply-To: <20260328-ktd2801-pm-fix-v1-1-007cb103faeb@dujemihanovic.xyz>
On Sat, 28 Mar 2026 21:42:16 +0100, Duje Mihanović wrote:
> Boards using this backlight chip do not power the backlight off on
> suspend. Enable BL_CORE_SUSPENDRESUME so the chip gets powered off by
> the backlight core on suspend.
>
> Tested on samsung,coreprimevelte.
>
>
> [...]
Applied, thanks!
[1/1] backlight: ktd2801: enable BL_CORE_SUSPENDRESUME
commit: f37f5a2ac9d3737617c08f0dc7270b42e9cad907
--
Lee Jones [李琼斯]
^ permalink raw reply
* Re: (subset) [PATCH v8 1/4] dt-bindings: backlight: Add max25014 support
From: Lee Jones @ 2026-04-30 13:53 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Liam Girdwood, Mark Brown, Frank Li, Maud Spierings
Cc: dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev, imx,
linux-arm-kernel
In-Reply-To: <20260407-max25014-v8-1-14eac7ed673a@gocontroll.com>
On Tue, 07 Apr 2026 16:41:42 +0200, Maud Spierings wrote:
> The Maxim MAX25014 is a 4-channel automotive grade backlight driver IC
> with integrated boost controller.
Applied, thanks!
[1/4] dt-bindings: backlight: Add max25014 support
commit: 5fcbbedec9dfce78044eee922bf2030e1bd03faa
--
Lee Jones [李琼斯]
^ permalink raw reply
* Re: (subset) [PATCH v8 2/4] backlight: add max25014atg backlight
From: Lee Jones @ 2026-04-30 13:58 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Pavel Machek, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Helge Deller, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Liam Girdwood, Mark Brown, Frank Li, Maud Spierings
Cc: dri-devel, linux-leds, devicetree, linux-kernel, linux-fbdev, imx,
linux-arm-kernel
In-Reply-To: <20260407-max25014-v8-2-14eac7ed673a@gocontroll.com>
On Tue, 07 Apr 2026 16:41:43 +0200, Maud Spierings wrote:
> The Maxim MAX25014 is a 4-channel automotive grade backlight driver IC
> with integrated boost controller.
Applied, thanks!
[2/4] backlight: add max25014atg backlight
commit: 3014ad47cfaf454cb0bbee353272beacd1e7c4bc
--
Lee Jones [李琼斯]
^ permalink raw reply
* [PATCH 1/3] staging: sm750fb: add const qualifier to string pointer arrays
From: Francisco Maestre @ 2026-05-03 0:41 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, linux-staging, linux-kernel, Francisco Maestre
Add 'const' qualifier to 'g_fbmode' and 'g_def_fbmode' pointer
declarations to make them 'static const char * const', as the
pointers themselves are not modified after initialization.
This fixes the following checkpatch.pl warning:
WARNING: static const char * array should probably be
static const char * const
Signed-off-by: Francisco Maestre <francisco@maestretorreblanca.com>
---
drivers/staging/sm750fb/sm750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 62f6e0cdff4d..dc9653ed2108 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -33,8 +33,8 @@
static int g_hwcursor = 1;
static int g_noaccel;
static int g_nomtrr;
-static const char *g_fbmode[] = {NULL, NULL};
-static const char *g_def_fbmode = "1024x768-32@60";
+static const char * const g_fbmode[] = {NULL, NULL};
+static const char * const g_def_fbmode = "1024x768-32@60";
static char *g_settings;
static int g_dualview;
static char *g_option;
--
2.50.1 (Apple Git-155)
^ permalink raw reply related
* [PATCH v2] staging: sm750fb: add const qualifier to string pointer arrays
From: Francisco Maestre @ 2026-05-03 0:57 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, linux-staging, linux-kernel, Francisco Maestre
Add 'const' qualifier to 'g_fbmode' and 'g_def_fbmode' pointer
declarations to make them 'static const char * const', as the
pointers themselves are not modified after initialization.
This fixes the following checkpatch.pl warning:
WARNING: static const char * array should probably be
static const char * const
Signed-off-by: Francisco Maestre <francisco@maestretorreblanca.com>
---
v2: Resend as individual patch, not part of an unrelated series.
drivers/staging/sm750fb/sm750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 62f6e0cdff4d..dc9653ed2108 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -33,8 +33,8 @@
static int g_hwcursor = 1;
static int g_noaccel;
static int g_nomtrr;
-static const char *g_fbmode[] = {NULL, NULL};
-static const char *g_def_fbmode = "1024x768-32@60";
+static const char * const g_fbmode[] = {NULL, NULL};
+static const char * const g_def_fbmode = "1024x768-32@60";
static char *g_settings;
static int g_dualview;
static char *g_option;
--
2.50.1 (Apple Git-155)
^ permalink raw reply related
* Re: [PATCH] staging: sm750fb: fix const pointer array declaration
From: kernel test robot @ 2026-05-03 4:35 UTC (permalink / raw)
To: Ilai Levin, sudipm.mukherjee, teddy.wang
Cc: oe-kbuild-all, gregkh, linux-fbdev, linux-staging, linux-kernel,
Ilai Levin
In-Reply-To: <20260428122501.100696-1-levinilai972@gmail.com>
Hi Ilai,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Ilai-Levin/staging-sm750fb-fix-const-pointer-array-declaration/20260501-103116
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20260428122501.100696-1-levinilai972%40gmail.com
patch subject: [PATCH] staging: sm750fb: fix const pointer array declaration
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260503/202605031219.ZJk8DDJm-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260503/202605031219.ZJk8DDJm-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605031219.ZJk8DDJm-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/staging/sm750fb/sm750.c: In function 'lynxfb_set_fbinfo':
>> drivers/staging/sm750fb/sm750.c:785:33: error: assignment of read-only location 'g_fbmode[index]'
785 | g_fbmode[index] = g_def_fbmode;
| ^
drivers/staging/sm750fb/sm750.c:787:41: error: assignment of read-only location 'g_fbmode[index]'
787 | g_fbmode[index] = g_fbmode[0];
| ^
drivers/staging/sm750fb/sm750.c: In function 'sm750fb_setup':
>> drivers/staging/sm750fb/sm750.c:896:45: error: assignment of read-only location 'g_fbmode[0]'
896 | g_fbmode[0] = opt;
| ^
drivers/staging/sm750fb/sm750.c:900:45: error: assignment of read-only location 'g_fbmode[1]'
900 | g_fbmode[1] = opt;
| ^
vim +785 drivers/staging/sm750fb/sm750.c
81dee67e215b23 Sudip Mukherjee 2015-03-03 719
81dee67e215b23 Sudip Mukherjee 2015-03-03 720 static int lynxfb_set_fbinfo(struct fb_info *info, int index)
81dee67e215b23 Sudip Mukherjee 2015-03-03 721 {
81dee67e215b23 Sudip Mukherjee 2015-03-03 722 int i;
81dee67e215b23 Sudip Mukherjee 2015-03-03 723 struct lynxfb_par *par;
e359b6a863e19f Mike Rapoport 2015-10-26 724 struct sm750_dev *sm750_dev;
81dee67e215b23 Sudip Mukherjee 2015-03-03 725 struct lynxfb_crtc *crtc;
81dee67e215b23 Sudip Mukherjee 2015-03-03 726 struct lynxfb_output *output;
81dee67e215b23 Sudip Mukherjee 2015-03-03 727 struct fb_var_screeninfo *var;
81dee67e215b23 Sudip Mukherjee 2015-03-03 728 struct fb_fix_screeninfo *fix;
81dee67e215b23 Sudip Mukherjee 2015-03-03 729
81dee67e215b23 Sudip Mukherjee 2015-03-03 730 const struct fb_videomode *pdb[] = {
81dee67e215b23 Sudip Mukherjee 2015-03-03 731 lynx750_ext, NULL, vesa_modes,
81dee67e215b23 Sudip Mukherjee 2015-03-03 732 };
81dee67e215b23 Sudip Mukherjee 2015-03-03 733 int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
d0856045f0e9fc Hungyu Lin 2026-04-01 734 static const char * const fix_id[2] = {
81dee67e215b23 Sudip Mukherjee 2015-03-03 735 "sm750_fb1", "sm750_fb2",
81dee67e215b23 Sudip Mukherjee 2015-03-03 736 };
81dee67e215b23 Sudip Mukherjee 2015-03-03 737
81dee67e215b23 Sudip Mukherjee 2015-03-03 738 int ret, line_length;
81dee67e215b23 Sudip Mukherjee 2015-03-03 739
81dee67e215b23 Sudip Mukherjee 2015-03-03 740 ret = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 741 par = (struct lynxfb_par *)info->par;
e359b6a863e19f Mike Rapoport 2015-10-26 742 sm750_dev = par->dev;
81dee67e215b23 Sudip Mukherjee 2015-03-03 743 crtc = &par->crtc;
81dee67e215b23 Sudip Mukherjee 2015-03-03 744 output = &par->output;
81dee67e215b23 Sudip Mukherjee 2015-03-03 745 var = &info->var;
81dee67e215b23 Sudip Mukherjee 2015-03-03 746 fix = &info->fix;
81dee67e215b23 Sudip Mukherjee 2015-03-03 747
81dee67e215b23 Sudip Mukherjee 2015-03-03 748 /* set index */
81dee67e215b23 Sudip Mukherjee 2015-03-03 749 par->index = index;
81dee67e215b23 Sudip Mukherjee 2015-03-03 750 output->channel = &crtc->channel;
81dee67e215b23 Sudip Mukherjee 2015-03-03 751 sm750fb_set_drv(par);
81dee67e215b23 Sudip Mukherjee 2015-03-03 752
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 753 /*
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 754 * set current cursor variable and proc pointer,
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 755 * must be set after crtc member initialized
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 756 */
fdc234d85210d9 Benjamin Philip 2021-07-28 757 crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
e359b6a863e19f Mike Rapoport 2015-10-26 758 crtc->cursor.mmio = sm750_dev->pvReg +
e359b6a863e19f Mike Rapoport 2015-10-26 759 0x800f0 + (int)crtc->channel * 0x140;
81dee67e215b23 Sudip Mukherjee 2015-03-03 760
cd33da26036ea5 Christopher Carbone 2022-08-23 761 crtc->cursor.max_h = 64;
cd33da26036ea5 Christopher Carbone 2022-08-23 762 crtc->cursor.max_w = 64;
39f9137268ee3d Benjamin Philip 2021-07-26 763 crtc->cursor.size = crtc->cursor.max_h * crtc->cursor.max_w * 2 / 8;
e359b6a863e19f Mike Rapoport 2015-10-26 764 crtc->cursor.vstart = sm750_dev->pvMem + crtc->cursor.offset;
81dee67e215b23 Sudip Mukherjee 2015-03-03 765
3de08a2d14ff8c Lorenzo Stoakes 2015-03-20 766 memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
f7c8a046577e09 Thomas Zimmermann 2023-11-27 767 if (!g_hwcursor)
52d0744d751d8f Arnd Bergmann 2016-11-09 768 sm750_hw_cursor_disable(&crtc->cursor);
81dee67e215b23 Sudip Mukherjee 2015-03-03 769
81dee67e215b23 Sudip Mukherjee 2015-03-03 770 /* set info->fbops, must be set before fb_find_mode */
e359b6a863e19f Mike Rapoport 2015-10-26 771 if (!sm750_dev->accel_off) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 772 /* use 2d acceleration */
f7c8a046577e09 Thomas Zimmermann 2023-11-27 773 if (!g_hwcursor)
f7c8a046577e09 Thomas Zimmermann 2023-11-27 774 info->fbops = &lynxfb_ops_accel;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 775 else
f7c8a046577e09 Thomas Zimmermann 2023-11-27 776 info->fbops = &lynxfb_ops_accel_with_cursor;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 777 } else {
f7c8a046577e09 Thomas Zimmermann 2023-11-27 778 if (!g_hwcursor)
81dee67e215b23 Sudip Mukherjee 2015-03-03 779 info->fbops = &lynxfb_ops;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 780 else
f7c8a046577e09 Thomas Zimmermann 2023-11-27 781 info->fbops = &lynxfb_ops_with_cursor;
f7c8a046577e09 Thomas Zimmermann 2023-11-27 782 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 783
81dee67e215b23 Sudip Mukherjee 2015-03-03 784 if (!g_fbmode[index]) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 @785 g_fbmode[index] = g_def_fbmode;
81dee67e215b23 Sudip Mukherjee 2015-03-03 786 if (index)
81dee67e215b23 Sudip Mukherjee 2015-03-03 787 g_fbmode[index] = g_fbmode[0];
81dee67e215b23 Sudip Mukherjee 2015-03-03 788 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 789
81dee67e215b23 Sudip Mukherjee 2015-03-03 790 for (i = 0; i < 3; i++) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 791 ret = fb_find_mode(var, info, g_fbmode[index],
81dee67e215b23 Sudip Mukherjee 2015-03-03 792 pdb[i], cdb[i], NULL, 8);
81dee67e215b23 Sudip Mukherjee 2015-03-03 793
db7fb3588ab492 Artem Lytkin 2026-02-23 794 if (ret == 1 || ret == 2)
81dee67e215b23 Sudip Mukherjee 2015-03-03 795 break;
81dee67e215b23 Sudip Mukherjee 2015-03-03 796 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 797
81dee67e215b23 Sudip Mukherjee 2015-03-03 798 /* set par */
81dee67e215b23 Sudip Mukherjee 2015-03-03 799 par->info = info;
81dee67e215b23 Sudip Mukherjee 2015-03-03 800
81dee67e215b23 Sudip Mukherjee 2015-03-03 801 /* set info */
e3a3f9f5123683 Mike Rapoport 2015-10-26 802 line_length = ALIGN((var->xres_virtual * var->bits_per_pixel / 8),
e3a3f9f5123683 Mike Rapoport 2015-10-26 803 crtc->line_pad);
81dee67e215b23 Sudip Mukherjee 2015-03-03 804
81dee67e215b23 Sudip Mukherjee 2015-03-03 805 info->pseudo_palette = &par->pseudo_palette[0];
cc59bde1c920ab Benjamin Philip 2021-07-28 806 info->screen_base = crtc->v_screen;
81dee67e215b23 Sudip Mukherjee 2015-03-03 807 info->screen_size = line_length * var->yres_virtual;
81dee67e215b23 Sudip Mukherjee 2015-03-03 808
81dee67e215b23 Sudip Mukherjee 2015-03-03 809 /* set info->fix */
81dee67e215b23 Sudip Mukherjee 2015-03-03 810 fix->type = FB_TYPE_PACKED_PIXELS;
81dee67e215b23 Sudip Mukherjee 2015-03-03 811 fix->type_aux = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 812 fix->xpanstep = crtc->xpanstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 813 fix->ypanstep = crtc->ypanstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 814 fix->ywrapstep = crtc->ywrapstep;
81dee67e215b23 Sudip Mukherjee 2015-03-03 815 fix->accel = FB_ACCEL_SMI;
81dee67e215b23 Sudip Mukherjee 2015-03-03 816
8c475735085a7d Tim Wassink 2025-12-21 817 strscpy(fix->id, fix_id[index], sizeof(fix->id));
81dee67e215b23 Sudip Mukherjee 2015-03-03 818
fdc234d85210d9 Benjamin Philip 2021-07-28 819 fix->smem_start = crtc->o_screen + sm750_dev->vidmem_start;
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 820 /*
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 821 * according to mmap experiment from user space application,
81dee67e215b23 Sudip Mukherjee 2015-03-03 822 * fix->mmio_len should not larger than virtual size
81dee67e215b23 Sudip Mukherjee 2015-03-03 823 * (xres_virtual x yres_virtual x ByPP)
81dee67e215b23 Sudip Mukherjee 2015-03-03 824 * Below line maybe buggy when user mmap fb dev node and write
81dee67e215b23 Sudip Mukherjee 2015-03-03 825 * data into the bound over virtual size
d11ac7cbcc266c Sudip Mukherjee 2015-08-07 826 */
81dee67e215b23 Sudip Mukherjee 2015-03-03 827 fix->smem_len = crtc->vidmem_size;
81dee67e215b23 Sudip Mukherjee 2015-03-03 828 info->screen_size = fix->smem_len;
81dee67e215b23 Sudip Mukherjee 2015-03-03 829 fix->line_length = line_length;
e359b6a863e19f Mike Rapoport 2015-10-26 830 fix->mmio_start = sm750_dev->vidreg_start;
e359b6a863e19f Mike Rapoport 2015-10-26 831 fix->mmio_len = sm750_dev->vidreg_size;
b610e1193a917f Matej Dujava 2020-04-30 832
b610e1193a917f Matej Dujava 2020-04-30 833 lynxfb_set_visual_mode(info);
81dee67e215b23 Sudip Mukherjee 2015-03-03 834
81dee67e215b23 Sudip Mukherjee 2015-03-03 835 /* set var */
81dee67e215b23 Sudip Mukherjee 2015-03-03 836 var->activate = FB_ACTIVATE_NOW;
81dee67e215b23 Sudip Mukherjee 2015-03-03 837 var->accel_flags = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 838 var->vmode = FB_VMODE_NONINTERLACED;
81dee67e215b23 Sudip Mukherjee 2015-03-03 839
61c507cf652da1 Michel von Czettritz 2015-03-26 840 ret = fb_alloc_cmap(&info->cmap, 256, 0);
61c507cf652da1 Michel von Czettritz 2015-03-26 841 if (ret < 0) {
fbab250eb51d6d Artem Lytkin 2026-02-07 842 dev_err(info->device, "Could not allocate memory for cmap.\n");
81dee67e215b23 Sudip Mukherjee 2015-03-03 843 goto exit;
81dee67e215b23 Sudip Mukherjee 2015-03-03 844 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 845
81dee67e215b23 Sudip Mukherjee 2015-03-03 846 exit:
81dee67e215b23 Sudip Mukherjee 2015-03-03 847 lynxfb_ops_check_var(var, info);
81dee67e215b23 Sudip Mukherjee 2015-03-03 848 return ret;
81dee67e215b23 Sudip Mukherjee 2015-03-03 849 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 850
81dee67e215b23 Sudip Mukherjee 2015-03-03 851 /* chip specific g_option configuration routine */
700591a9adc8b1 Mike Rapoport 2015-10-26 852 static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
81dee67e215b23 Sudip Mukherjee 2015-03-03 853 {
81dee67e215b23 Sudip Mukherjee 2015-03-03 854 char *opt;
81dee67e215b23 Sudip Mukherjee 2015-03-03 855 int swap;
81dee67e215b23 Sudip Mukherjee 2015-03-03 856
81dee67e215b23 Sudip Mukherjee 2015-03-03 857 swap = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 858
cc34db609ff98c Madhumitha Sundar 2026-01-27 859 sm750_dev->init_parm.chip_clk = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 860 sm750_dev->init_parm.mem_clk = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 861 sm750_dev->init_parm.master_clk = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 862 sm750_dev->init_parm.powerMode = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 863 sm750_dev->init_parm.setAllEngOff = 0;
cc34db609ff98c Madhumitha Sundar 2026-01-27 864 sm750_dev->init_parm.resetMemory = 1;
81dee67e215b23 Sudip Mukherjee 2015-03-03 865
81dee67e215b23 Sudip Mukherjee 2015-03-03 866 /* defaultly turn g_hwcursor on for both view */
81dee67e215b23 Sudip Mukherjee 2015-03-03 867 g_hwcursor = 3;
81dee67e215b23 Sudip Mukherjee 2015-03-03 868
81dee67e215b23 Sudip Mukherjee 2015-03-03 869 if (!src || !*src) {
c56de0967a658c Elise Lennion 2016-10-31 870 dev_warn(&sm750_dev->pdev->dev, "no specific g_option.\n");
81dee67e215b23 Sudip Mukherjee 2015-03-03 871 goto NO_PARAM;
81dee67e215b23 Sudip Mukherjee 2015-03-03 872 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 873
0fa96e39279988 Sudip Mukherjee 2015-03-10 874 while ((opt = strsep(&src, ":")) != NULL && *opt != 0) {
c56de0967a658c Elise Lennion 2016-10-31 875 dev_info(&sm750_dev->pdev->dev, "opt=%s\n", opt);
c56de0967a658c Elise Lennion 2016-10-31 876 dev_info(&sm750_dev->pdev->dev, "src=%s\n", src);
81dee67e215b23 Sudip Mukherjee 2015-03-03 877
144634a6b42146 Katie Dunne 2017-02-19 878 if (!strncmp(opt, "swap", strlen("swap"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 879 swap = 1;
144634a6b42146 Katie Dunne 2017-02-19 880 } else if (!strncmp(opt, "nocrt", strlen("nocrt"))) {
1757d106a9ce8c Mike Rapoport 2015-10-26 881 sm750_dev->nocrt = 1;
144634a6b42146 Katie Dunne 2017-02-19 882 } else if (!strncmp(opt, "36bit", strlen("36bit"))) {
94c938a0c15863 Shubham Chakraborty 2026-04-07 883 sm750_dev->pnltype = SM750_DOUBLE_TFT;
144634a6b42146 Katie Dunne 2017-02-19 884 } else if (!strncmp(opt, "18bit", strlen("18bit"))) {
94c938a0c15863 Shubham Chakraborty 2026-04-07 885 sm750_dev->pnltype = SM750_DUAL_TFT;
144634a6b42146 Katie Dunne 2017-02-19 886 } else if (!strncmp(opt, "24bit", strlen("24bit"))) {
94c938a0c15863 Shubham Chakraborty 2026-04-07 887 sm750_dev->pnltype = SM750_24TFT;
144634a6b42146 Katie Dunne 2017-02-19 888 } else if (!strncmp(opt, "nohwc0", strlen("nohwc0"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 889 g_hwcursor &= ~0x1;
144634a6b42146 Katie Dunne 2017-02-19 890 } else if (!strncmp(opt, "nohwc1", strlen("nohwc1"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 891 g_hwcursor &= ~0x2;
144634a6b42146 Katie Dunne 2017-02-19 892 } else if (!strncmp(opt, "nohwc", strlen("nohwc"))) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 893 g_hwcursor = 0;
144634a6b42146 Katie Dunne 2017-02-19 894 } else {
81dee67e215b23 Sudip Mukherjee 2015-03-03 895 if (!g_fbmode[0]) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 @896 g_fbmode[0] = opt;
cee9ba1c30d051 Abdul Rauf 2017-01-08 897 dev_info(&sm750_dev->pdev->dev,
cee9ba1c30d051 Abdul Rauf 2017-01-08 898 "find fbmode0 : %s\n", g_fbmode[0]);
81dee67e215b23 Sudip Mukherjee 2015-03-03 899 } else if (!g_fbmode[1]) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 900 g_fbmode[1] = opt;
cee9ba1c30d051 Abdul Rauf 2017-01-08 901 dev_info(&sm750_dev->pdev->dev,
cee9ba1c30d051 Abdul Rauf 2017-01-08 902 "find fbmode1 : %s\n", g_fbmode[1]);
81dee67e215b23 Sudip Mukherjee 2015-03-03 903 } else {
c56de0967a658c Elise Lennion 2016-10-31 904 dev_warn(&sm750_dev->pdev->dev, "How many view you wann set?\n");
81dee67e215b23 Sudip Mukherjee 2015-03-03 905 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 906 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 907 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 908
81dee67e215b23 Sudip Mukherjee 2015-03-03 909 NO_PARAM:
e359b6a863e19f Mike Rapoport 2015-10-26 910 if (sm750_dev->revid != SM750LE_REVISION_ID) {
a3f92cc94c6126 Mike Rapoport 2016-01-17 911 if (sm750_dev->fb_count > 1) {
81dee67e215b23 Sudip Mukherjee 2015-03-03 912 if (swap)
1757d106a9ce8c Mike Rapoport 2015-10-26 913 sm750_dev->dataflow = sm750_dual_swap;
81dee67e215b23 Sudip Mukherjee 2015-03-03 914 else
1757d106a9ce8c Mike Rapoport 2015-10-26 915 sm750_dev->dataflow = sm750_dual_normal;
81dee67e215b23 Sudip Mukherjee 2015-03-03 916 } else {
81dee67e215b23 Sudip Mukherjee 2015-03-03 917 if (swap)
1757d106a9ce8c Mike Rapoport 2015-10-26 918 sm750_dev->dataflow = sm750_simul_sec;
81dee67e215b23 Sudip Mukherjee 2015-03-03 919 else
1757d106a9ce8c Mike Rapoport 2015-10-26 920 sm750_dev->dataflow = sm750_simul_pri;
81dee67e215b23 Sudip Mukherjee 2015-03-03 921 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 922 } else {
81dee67e215b23 Sudip Mukherjee 2015-03-03 923 /* SM750LE only have one crt channel */
1757d106a9ce8c Mike Rapoport 2015-10-26 924 sm750_dev->dataflow = sm750_simul_sec;
81dee67e215b23 Sudip Mukherjee 2015-03-03 925 /* sm750le do not have complex attributes */
1757d106a9ce8c Mike Rapoport 2015-10-26 926 sm750_dev->nocrt = 0;
81dee67e215b23 Sudip Mukherjee 2015-03-03 927 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 928 }
81dee67e215b23 Sudip Mukherjee 2015-03-03 929
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* [PATCH] video: fbdev: remove Hercules monochrome ISA graphics adapter driver
From: Ethan Nelson-Moore @ 2026-05-03 4:56 UTC (permalink / raw)
To: linux-fbdev
Cc: Ferenc Bakonyi, Ethan Nelson-Moore, Helge Deller, Jakub Kicinski,
Andrew Morton, Namjae Jeon, Hisam Mehboob,
Martin Kepplinger-Novaković, Diego Viola, Thomas Zimmermann,
Wei Liu, Prasanna Kumar T S M, robgithub, Hardik Phalet
The hgafb supports graphics adapters compatible with the Hercules
adapter from 1984. These were ISA cards or onboard devices that
supported monochrome 720x348 graphics. This driver was created in 1999
by Ferenc Bakonyi. In the entire Git history (since Linux 2.6.12-rc2),
there has only been one commit in 2010 which indicated that the driver
was in use, commit 529ed806d454 ("video: Fix the HGA framebuffer
driver"). The commit message states:
Only tested with fbcon, since most fbdev-based software appears
to only support 12bpp and up. It does not appear that this driver has
worked for at least the entire 2.6.x series, perhaps since 2002.
Given the age and limited capabilities of the hardware and the lack of
users, remove this driver and move the former maintainer to CREDITS.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
CREDITS | 3 +
MAINTAINERS | 7 -
drivers/video/fbdev/Kconfig | 13 -
drivers/video/fbdev/Makefile | 1 -
drivers/video/fbdev/hgafb.c | 685 -----------------------------------
5 files changed, 3 insertions(+), 706 deletions(-)
delete mode 100644 drivers/video/fbdev/hgafb.c
diff --git a/CREDITS b/CREDITS
index 17962bdd6dbd..59d5de3eeb5b 100644
--- a/CREDITS
+++ b/CREDITS
@@ -197,6 +197,9 @@ S: Hauptstrasse 19
S: 79837 St. Blasien
S: Germany
+N: Ferenc Bakonyi
+D: Hercules graphics adapter framebuffer driver
+
N: Krishna Balasubramanian
E: balasub@cis.ohio-state.edu
D: Wrote SYS V IPC (part of standard kernel since 0.99.10)
diff --git a/MAINTAINERS b/MAINTAINERS
index 882214b0e7db..3194befa6a13 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11373,13 +11373,6 @@ F: Documentation/filesystems/hfsplus.rst
F: fs/hfsplus/
F: include/linux/hfs_common.h
-HGA FRAMEBUFFER DRIVER
-M: Ferenc Bakonyi <fero@drama.obuda.kando.hu>
-L: linux-nvidia@lists.surfsouth.com
-S: Maintained
-W: http://drama.obuda.kando.hu/~fero/cgi-bin/hgafb.shtml
-F: drivers/video/fbdev/hgafb.c
-
HIBERNATION (aka Software Suspend, aka swsusp)
M: "Rafael J. Wysocki" <rafael@kernel.org>
R: Pavel Machek <pavel@kernel.org>
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 1c73d560f196..085d3a202148 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -453,19 +453,6 @@ config FB_N411
This enables support for the Apollo display controller in its
Hecuba form using the n411 devkit.
-config FB_HGA
- tristate "Hercules mono graphics support"
- depends on FB && X86
- select FB_IOMEM_FOPS
- help
- Say Y here if you have a Hercules mono graphics card.
-
- To compile this driver as a module, choose M here: the
- module will be called hgafb.
-
- As this card technology is at least 25 years old,
- most people will answer N here.
-
config FB_GBE
bool "SGI Graphics Backend frame buffer support"
depends on (FB = y) && HAS_IOMEM
diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile
index 36a18d958ba0..0b17c878154d 100644
--- a/drivers/video/fbdev/Makefile
+++ b/drivers/video/fbdev/Makefile
@@ -59,7 +59,6 @@ obj-$(CONFIG_FB_ATARI) += atafb.o c2p_iplan2.o atafb_mfb.o \
obj-$(CONFIG_FB_MAC) += macfb.o
obj-$(CONFIG_FB_HECUBA) += hecubafb.o
obj-$(CONFIG_FB_N411) += n411.o
-obj-$(CONFIG_FB_HGA) += hgafb.o
obj-$(CONFIG_FB_XVR500) += sunxvr500.o
obj-$(CONFIG_FB_XVR2500) += sunxvr2500.o
obj-$(CONFIG_FB_XVR1000) += sunxvr1000.o
diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c
deleted file mode 100644
index d32fd1c5217c..000000000000
--- a/drivers/video/fbdev/hgafb.c
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
- * linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device
- *
- * Created 25 Nov 1999 by Ferenc Bakonyi (fero@drama.obuda.kando.hu)
- * Based on skeletonfb.c by Geert Uytterhoeven and
- * mdacon.c by Andrew Apted
- *
- * History:
- *
- * - Revision 0.1.8 (23 Oct 2002): Ported to new framebuffer api.
- *
- * - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
- * being detected as Hercules. (Paul G.)
- * - Revision 0.1.6 (17 Aug 2000): new style structs
- * documentation
- * - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
- * minor fixes
- * - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
- * HGA-only systems
- * - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure
- * screen is cleared after rmmod
- * virtual resolutions
- * module parameter 'nologo={0|1}'
- * the most important: boot logo :)
- * - Revision 0.1.0 (6 Dec 1999): faster scrolling and minor fixes
- * - First release (25 Nov 1999)
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive
- * for more details.
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/spinlock.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/delay.h>
-#include <linux/fb.h>
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/platform_device.h>
-#include <asm/io.h>
-#include <asm/vga.h>
-
-#if 0
-#define DPRINTK(args...) printk(KERN_DEBUG __FILE__": " ##args)
-#else
-#define DPRINTK(args...)
-#endif
-
-#if 0
-#define CHKINFO(ret) if (info != &fb_info) { printk(KERN_DEBUG __FILE__": This should never happen, line:%d \n", __LINE__); return ret; }
-#else
-#define CHKINFO(ret)
-#endif
-
-/* Description of the hardware layout */
-
-static void __iomem *hga_vram; /* Base of video memory */
-static unsigned long hga_vram_len; /* Size of video memory */
-
-#define HGA_ROWADDR(row) ((row%4)*8192 + (row>>2)*90)
-#define HGA_TXT 0
-#define HGA_GFX 1
-
-static inline u8 __iomem * rowaddr(struct fb_info *info, u_int row)
-{
- return info->screen_base + HGA_ROWADDR(row);
-}
-
-static int hga_mode = -1; /* 0 = txt, 1 = gfx mode */
-
-static enum { TYPE_HERC, TYPE_HERCPLUS, TYPE_HERCCOLOR } hga_type;
-static char *hga_type_name;
-
-#define HGA_INDEX_PORT 0x3b4 /* Register select port */
-#define HGA_VALUE_PORT 0x3b5 /* Register value port */
-#define HGA_MODE_PORT 0x3b8 /* Mode control port */
-#define HGA_STATUS_PORT 0x3ba /* Status and Config port */
-#define HGA_GFX_PORT 0x3bf /* Graphics control port */
-
-/* HGA register values */
-
-#define HGA_CURSOR_BLINKING 0x00
-#define HGA_CURSOR_OFF 0x20
-#define HGA_CURSOR_SLOWBLINK 0x60
-
-#define HGA_MODE_GRAPHICS 0x02
-#define HGA_MODE_VIDEO_EN 0x08
-#define HGA_MODE_BLINK_EN 0x20
-#define HGA_MODE_GFX_PAGE1 0x80
-
-#define HGA_STATUS_HSYNC 0x01
-#define HGA_STATUS_VSYNC 0x80
-#define HGA_STATUS_VIDEO 0x08
-
-#define HGA_CONFIG_COL132 0x08
-#define HGA_GFX_MODE_EN 0x01
-#define HGA_GFX_PAGE_EN 0x02
-
-/* Global locks */
-
-static DEFINE_SPINLOCK(hga_reg_lock);
-
-/* Framebuffer driver structures */
-
-static const struct fb_var_screeninfo hga_default_var = {
- .xres = 720,
- .yres = 348,
- .xres_virtual = 720,
- .yres_virtual = 348,
- .bits_per_pixel = 1,
- .red = {0, 1, 0},
- .green = {0, 1, 0},
- .blue = {0, 1, 0},
- .transp = {0, 0, 0},
- .height = -1,
- .width = -1,
-};
-
-static struct fb_fix_screeninfo hga_fix = {
- .id = "HGA",
- .type = FB_TYPE_PACKED_PIXELS, /* (not sure) */
- .visual = FB_VISUAL_MONO10,
- .xpanstep = 8,
- .ypanstep = 8,
- .line_length = 90,
- .accel = FB_ACCEL_NONE
-};
-
-/* Don't assume that tty1 will be the initial current console. */
-static int release_io_port = 0;
-static int release_io_ports = 0;
-static bool nologo = 0;
-
-/* -------------------------------------------------------------------------
- *
- * Low level hardware functions
- *
- * ------------------------------------------------------------------------- */
-
-static void write_hga_b(unsigned int val, unsigned char reg)
-{
- outb_p(reg, HGA_INDEX_PORT);
- outb_p(val, HGA_VALUE_PORT);
-}
-
-static void write_hga_w(unsigned int val, unsigned char reg)
-{
- outb_p(reg, HGA_INDEX_PORT); outb_p(val >> 8, HGA_VALUE_PORT);
- outb_p(reg+1, HGA_INDEX_PORT); outb_p(val & 0xff, HGA_VALUE_PORT);
-}
-
-static int test_hga_b(unsigned char val, unsigned char reg)
-{
- outb_p(reg, HGA_INDEX_PORT);
- outb (val, HGA_VALUE_PORT);
- udelay(20); val = (inb_p(HGA_VALUE_PORT) == val);
- return val;
-}
-
-static void hga_clear_screen(void)
-{
- unsigned char fillchar = 0xbf; /* magic */
- unsigned long flags;
-
- spin_lock_irqsave(&hga_reg_lock, flags);
- if (hga_mode == HGA_TXT)
- fillchar = ' ';
- else if (hga_mode == HGA_GFX)
- fillchar = 0x00;
- spin_unlock_irqrestore(&hga_reg_lock, flags);
- if (fillchar != 0xbf)
- memset_io(hga_vram, fillchar, hga_vram_len);
-}
-
-static void hga_txt_mode(void)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&hga_reg_lock, flags);
- outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_BLINK_EN, HGA_MODE_PORT);
- outb_p(0x00, HGA_GFX_PORT);
- outb_p(0x00, HGA_STATUS_PORT);
-
- write_hga_b(0x61, 0x00); /* horizontal total */
- write_hga_b(0x50, 0x01); /* horizontal displayed */
- write_hga_b(0x52, 0x02); /* horizontal sync pos */
- write_hga_b(0x0f, 0x03); /* horizontal sync width */
-
- write_hga_b(0x19, 0x04); /* vertical total */
- write_hga_b(0x06, 0x05); /* vertical total adjust */
- write_hga_b(0x19, 0x06); /* vertical displayed */
- write_hga_b(0x19, 0x07); /* vertical sync pos */
-
- write_hga_b(0x02, 0x08); /* interlace mode */
- write_hga_b(0x0d, 0x09); /* maximum scanline */
- write_hga_b(0x0c, 0x0a); /* cursor start */
- write_hga_b(0x0d, 0x0b); /* cursor end */
-
- write_hga_w(0x0000, 0x0c); /* start address */
- write_hga_w(0x0000, 0x0e); /* cursor location */
-
- hga_mode = HGA_TXT;
- spin_unlock_irqrestore(&hga_reg_lock, flags);
-}
-
-static void hga_gfx_mode(void)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&hga_reg_lock, flags);
- outb_p(0x00, HGA_STATUS_PORT);
- outb_p(HGA_GFX_MODE_EN, HGA_GFX_PORT);
- outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_GRAPHICS, HGA_MODE_PORT);
-
- write_hga_b(0x35, 0x00); /* horizontal total */
- write_hga_b(0x2d, 0x01); /* horizontal displayed */
- write_hga_b(0x2e, 0x02); /* horizontal sync pos */
- write_hga_b(0x07, 0x03); /* horizontal sync width */
-
- write_hga_b(0x5b, 0x04); /* vertical total */
- write_hga_b(0x02, 0x05); /* vertical total adjust */
- write_hga_b(0x57, 0x06); /* vertical displayed */
- write_hga_b(0x57, 0x07); /* vertical sync pos */
-
- write_hga_b(0x02, 0x08); /* interlace mode */
- write_hga_b(0x03, 0x09); /* maximum scanline */
- write_hga_b(0x00, 0x0a); /* cursor start */
- write_hga_b(0x00, 0x0b); /* cursor end */
-
- write_hga_w(0x0000, 0x0c); /* start address */
- write_hga_w(0x0000, 0x0e); /* cursor location */
-
- hga_mode = HGA_GFX;
- spin_unlock_irqrestore(&hga_reg_lock, flags);
-}
-
-static void hga_show_logo(struct fb_info *info)
-{
-/*
- void __iomem *dest = hga_vram;
- char *logo = linux_logo_bw;
- int x, y;
-
- for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup *
- for (x = 0; x < 10 ; x++)
- writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40));
-*/
-}
-
-static void hga_pan(unsigned int xoffset, unsigned int yoffset)
-{
- unsigned int base;
- unsigned long flags;
-
- base = (yoffset / 8) * 90 + xoffset;
- spin_lock_irqsave(&hga_reg_lock, flags);
- write_hga_w(base, 0x0c); /* start address */
- spin_unlock_irqrestore(&hga_reg_lock, flags);
- DPRINTK("hga_pan: base:%d\n", base);
-}
-
-static void hga_blank(int blank_mode)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&hga_reg_lock, flags);
- if (blank_mode) {
- outb_p(0x00, HGA_MODE_PORT); /* disable video */
- } else {
- outb_p(HGA_MODE_VIDEO_EN | HGA_MODE_GRAPHICS, HGA_MODE_PORT);
- }
- spin_unlock_irqrestore(&hga_reg_lock, flags);
-}
-
-static int hga_card_detect(struct platform_device *pdev)
-{
- int count = 0;
- void __iomem *p, *q;
- unsigned short p_save, q_save;
-
- hga_vram_len = 0x08000;
-
- if (!devm_request_mem_region(&pdev->dev, 0xb0000, hga_vram_len, "hgafb")) {
- dev_err(&pdev->dev, "cannot reserve video memory at 0xb0000\n");
- return -EBUSY;
- }
-
- hga_vram = ioremap(0xb0000, hga_vram_len);
- if (!hga_vram)
- return -ENOMEM;
-
- if (request_region(0x3b0, 12, "hgafb"))
- release_io_ports = 1;
- if (request_region(0x3bf, 1, "hgafb"))
- release_io_port = 1;
-
- /* do a memory check */
-
- p = hga_vram;
- q = hga_vram + 0x01000;
-
- p_save = readw(p); q_save = readw(q);
-
- writew(0xaa55, p); if (readw(p) == 0xaa55) count++;
- writew(0x55aa, p); if (readw(p) == 0x55aa) count++;
- writew(p_save, p);
-
- if (count != 2)
- goto error;
-
- /* Ok, there is definitely a card registering at the correct
- * memory location, so now we do an I/O port test.
- */
-
- if (!test_hga_b(0x66, 0x0f)) /* cursor low register */
- goto error;
-
- if (!test_hga_b(0x99, 0x0f)) /* cursor low register */
- goto error;
-
- /* See if the card is a Hercules, by checking whether the vsync
- * bit of the status register is changing. This test lasts for
- * approximately 1/10th of a second.
- */
-
- p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
-
- for (count=0; count < 50000 && p_save == q_save; count++) {
- q_save = inb(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
- udelay(2);
- }
-
- if (p_save == q_save)
- goto error;
-
- switch (inb_p(HGA_STATUS_PORT) & 0x70) {
- case 0x10:
- hga_type = TYPE_HERCPLUS;
- hga_type_name = "HerculesPlus";
- break;
- case 0x50:
- hga_type = TYPE_HERCCOLOR;
- hga_type_name = "HerculesColor";
- break;
- default:
- hga_type = TYPE_HERC;
- hga_type_name = "Hercules";
- break;
- }
- return 0;
-error:
- if (release_io_ports)
- release_region(0x3b0, 12);
- if (release_io_port)
- release_region(0x3bf, 1);
-
- iounmap(hga_vram);
-
- pr_err("hgafb: HGA card not detected.\n");
-
- return -EINVAL;
-}
-
-/**
- * hgafb_open - open the framebuffer device
- * @info: pointer to fb_info object containing info for current hga board
- * @init: open by console system or userland.
- *
- * Returns: %0
- */
-
-static int hgafb_open(struct fb_info *info, int init)
-{
- hga_gfx_mode();
- hga_clear_screen();
- if (!nologo) hga_show_logo(info);
- return 0;
-}
-
-/**
- * hgafb_release - open the framebuffer device
- * @info: pointer to fb_info object containing info for current hga board
- * @init: open by console system or userland.
- *
- * Returns: %0
- */
-
-static int hgafb_release(struct fb_info *info, int init)
-{
- hga_txt_mode();
- hga_clear_screen();
- return 0;
-}
-
-/**
- * hgafb_setcolreg - set color registers
- * @regno:register index to set
- * @red:red value, unused
- * @green:green value, unused
- * @blue:blue value, unused
- * @transp:transparency value, unused
- * @info:unused
- *
- * This callback function is used to set the color registers of a HGA
- * board. Since we have only two fixed colors only @regno is checked.
- * A zero is returned on success and 1 for failure.
- *
- * Returns: %0
- */
-
-static int hgafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
- u_int transp, struct fb_info *info)
-{
- if (regno > 1)
- return 1;
- return 0;
-}
-
-/**
- * hgafb_pan_display - pan or wrap the display
- * @var:contains new xoffset, yoffset and vmode values
- * @info:pointer to fb_info object containing info for current hga board
- *
- * This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP
- * flag in @var. If input parameters are correct it calls hga_pan() to
- * program the hardware. @info->var is updated to the new values.
- *
- * Returns: %0 on success or %-EINVAL for failure.
- */
-
-static int hgafb_pan_display(struct fb_var_screeninfo *var,
- struct fb_info *info)
-{
- if (var->vmode & FB_VMODE_YWRAP) {
- if (var->yoffset >= info->var.yres_virtual ||
- var->xoffset)
- return -EINVAL;
- } else {
- if (var->xoffset + info->var.xres > info->var.xres_virtual
- || var->yoffset + info->var.yres > info->var.yres_virtual
- || var->yoffset % 8)
- return -EINVAL;
- }
-
- hga_pan(var->xoffset, var->yoffset);
- return 0;
-}
-
-/**
- * hgafb_blank - (un)blank the screen
- * @blank_mode:blanking method to use
- * @info:unused
- *
- * Blank the screen if blank_mode != 0, else unblank.
- * Implements VESA suspend and powerdown modes on hardware that supports
- * disabling hsync/vsync:
- * @blank_mode == 2 means suspend vsync,
- * @blank_mode == 3 means suspend hsync,
- * @blank_mode == 4 means powerdown.
- *
- * Returns: %0
- */
-
-static int hgafb_blank(int blank_mode, struct fb_info *info)
-{
- hga_blank(blank_mode);
- return 0;
-}
-
-/*
- * Accel functions
- */
-static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
-{
- u_int rows, y;
- u8 __iomem *dest;
-
- y = rect->dy;
-
- for (rows = rect->height; rows--; y++) {
- dest = rowaddr(info, y) + (rect->dx >> 3);
- switch (rect->rop) {
- case ROP_COPY:
- memset_io(dest, rect->color, (rect->width >> 3));
- break;
- case ROP_XOR:
- fb_writeb(~(fb_readb(dest)), dest);
- break;
- }
- }
-}
-
-static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
-{
- u_int rows, y1, y2;
- u8 __iomem *src;
- u8 __iomem *dest;
-
- if (area->dy <= area->sy) {
- y1 = area->sy;
- y2 = area->dy;
-
- for (rows = area->height; rows--; ) {
- src = rowaddr(info, y1) + (area->sx >> 3);
- dest = rowaddr(info, y2) + (area->dx >> 3);
- memmove(dest, src, (area->width >> 3));
- y1++;
- y2++;
- }
- } else {
- y1 = area->sy + area->height - 1;
- y2 = area->dy + area->height - 1;
-
- for (rows = area->height; rows--;) {
- src = rowaddr(info, y1) + (area->sx >> 3);
- dest = rowaddr(info, y2) + (area->dx >> 3);
- memmove(dest, src, (area->width >> 3));
- y1--;
- y2--;
- }
- }
-}
-
-static void hgafb_imageblit(struct fb_info *info, const struct fb_image *image)
-{
- u8 __iomem *dest;
- u8 *cdat = (u8 *) image->data;
- u_int rows, y = image->dy;
- u_int x;
- u8 d;
-
- for (rows = image->height; rows--; y++) {
- for (x = 0; x < image->width; x+= 8) {
- d = *cdat++;
- dest = rowaddr(info, y) + ((image->dx + x)>> 3);
- fb_writeb(d, dest);
- }
- }
-}
-
-static const struct fb_ops hgafb_ops = {
- .owner = THIS_MODULE,
- .fb_open = hgafb_open,
- .fb_release = hgafb_release,
- __FB_DEFAULT_IOMEM_OPS_RDWR,
- .fb_setcolreg = hgafb_setcolreg,
- .fb_pan_display = hgafb_pan_display,
- .fb_blank = hgafb_blank,
- .fb_fillrect = hgafb_fillrect,
- .fb_copyarea = hgafb_copyarea,
- .fb_imageblit = hgafb_imageblit,
- __FB_DEFAULT_IOMEM_OPS_MMAP,
-};
-
-/* ------------------------------------------------------------------------- *
- *
- * Functions in fb_info
- *
- * ------------------------------------------------------------------------- */
-
-/* ------------------------------------------------------------------------- */
-
- /*
- * Initialization
- */
-
-static int hgafb_probe(struct platform_device *pdev)
-{
- struct fb_info *info;
- int ret;
-
- ret = hga_card_detect(pdev);
- if (ret)
- return ret;
-
- printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n",
- hga_type_name, hga_vram_len/1024);
-
- info = framebuffer_alloc(0, &pdev->dev);
- if (!info) {
- iounmap(hga_vram);
- return -ENOMEM;
- }
-
- hga_fix.smem_start = (unsigned long)hga_vram;
- hga_fix.smem_len = hga_vram_len;
-
- info->flags = FBINFO_HWACCEL_YPAN;
- info->var = hga_default_var;
- info->fix = hga_fix;
- info->monspecs.hfmin = 0;
- info->monspecs.hfmax = 0;
- info->monspecs.vfmin = 10000;
- info->monspecs.vfmax = 10000;
- info->monspecs.dpms = 0;
- info->fbops = &hgafb_ops;
- info->screen_base = hga_vram;
-
- if (register_framebuffer(info) < 0) {
- framebuffer_release(info);
- iounmap(hga_vram);
- return -EINVAL;
- }
-
- fb_info(info, "%s frame buffer device\n", info->fix.id);
- platform_set_drvdata(pdev, info);
- return 0;
-}
-
-static void hgafb_remove(struct platform_device *pdev)
-{
- struct fb_info *info = platform_get_drvdata(pdev);
-
- hga_txt_mode();
- hga_clear_screen();
-
- if (info) {
- unregister_framebuffer(info);
- framebuffer_release(info);
- }
-
- iounmap(hga_vram);
-
- if (release_io_ports)
- release_region(0x3b0, 12);
-
- if (release_io_port)
- release_region(0x3bf, 1);
-}
-
-static struct platform_driver hgafb_driver = {
- .probe = hgafb_probe,
- .remove = hgafb_remove,
- .driver = {
- .name = "hgafb",
- },
-};
-
-static struct platform_device *hgafb_device;
-
-static int __init hgafb_init(void)
-{
- int ret;
-
- if (fb_get_options("hgafb", NULL))
- return -ENODEV;
-
- ret = platform_driver_register(&hgafb_driver);
-
- if (!ret) {
- hgafb_device = platform_device_register_simple("hgafb", 0, NULL, 0);
-
- if (IS_ERR(hgafb_device)) {
- platform_driver_unregister(&hgafb_driver);
- ret = PTR_ERR(hgafb_device);
- }
- }
-
- return ret;
-}
-
-static void __exit hgafb_exit(void)
-{
- platform_device_unregister(hgafb_device);
- platform_driver_unregister(&hgafb_driver);
-}
-
-/* -------------------------------------------------------------------------
- *
- * Modularization
- *
- * ------------------------------------------------------------------------- */
-
-MODULE_AUTHOR("Ferenc Bakonyi <fero@drama.obuda.kando.hu>");
-MODULE_DESCRIPTION("FBDev driver for Hercules Graphics Adaptor");
-MODULE_LICENSE("GPL");
-
-module_param(nologo, bool, 0);
-MODULE_PARM_DESC(nologo, "Disables startup logo if != 0 (default=0)");
-module_init(hgafb_init);
-module_exit(hgafb_exit);
--
2.43.0
^ permalink raw reply related
* Re: [PATCH] video: fbdev: remove Hercules monochrome ISA graphics adapter driver
From: Ethan Nelson-Moore @ 2026-05-03 5:45 UTC (permalink / raw)
To: linux-fbdev
Cc: Ferenc Bakonyi, Helge Deller, Jakub Kicinski, Andrew Morton,
Namjae Jeon, Hisam Mehboob, Martin Kepplinger-Novaković,
Diego Viola, Thomas Zimmermann, Wei Liu, Prasanna Kumar T S M,
robgithub, Hardik Phalet
In-Reply-To: <20260503045653.33522-1-enelsonmoore@gmail.com>
On Sat, May 2, 2026 at 9:57 PM Ethan Nelson-Moore
<enelsonmoore@gmail.com> wrote:
> The hgafb supports graphics adapters compatible with the Hercules
The hgafb *driver*, of course. Oops. Would whoever merges this please
fix that up?
Ethan
^ permalink raw reply
* Re: [PATCH] sm750fb: fix spelling typo in comment
From: Greg Kroah-Hartman @ 2026-05-04 9:32 UTC (permalink / raw)
To: auth
Cc: Sudip Mukherjee, Teddy Wang,
open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
open list:STAGING SUBSYSTEM, open list
In-Reply-To: <20260429001557.71737-1-skunkolee@gmail.com>
On Tue, Apr 28, 2026 at 06:15:56PM -0600, auth wrote:
> Fixed suspected typo in comment ("programe" -> "program").
>
> Signed-off-by: auth <skunkolee@gmail.com>
> ---
> drivers/staging/sm750fb/ddk750_mode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
> index 7163232c0701..6363a66d5570 100644
> --- a/drivers/staging/sm750fb/ddk750_mode.c
> +++ b/drivers/staging/sm750fb/ddk750_mode.c
> @@ -82,7 +82,7 @@ static void program_mode_registers(struct mode_parameter *mode_param,
> unsigned int tmp, reg;
>
> if (pll->clock_type == SECONDARY_PLL) {
> - /* programe secondary pixel clock */
> + /* program secondary pixel clock */
> poke32(CRT_PLL_CTRL, sm750_format_pll_reg(pll));
>
> tmp = ((mode_param->horizontal_total - 1) <<
> --
> 2.54.0
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- It looks like you did not use your "real" name for the patch on either
the Signed-off-by: line, or the From: line (both of which have to
match). Please read the kernel file,
Documentation/process/submitting-patches.rst for how to do this
correctly.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply
* Re: [PATCH 1/3] staging: sm750fb: add const qualifier to string pointer arrays
From: Greg KH @ 2026-05-04 9:32 UTC (permalink / raw)
To: Francisco Maestre
Cc: sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <20260503004134.66693-1-francisco@maestretorreblanca.com>
On Sat, May 02, 2026 at 07:41:34PM -0500, Francisco Maestre wrote:
> Add 'const' qualifier to 'g_fbmode' and 'g_def_fbmode' pointer
> declarations to make them 'static const char * const', as the
> pointers themselves are not modified after initialization.
>
> This fixes the following checkpatch.pl warning:
> WARNING: static const char * array should probably be
> static const char * const
>
> Signed-off-by: Francisco Maestre <francisco@maestretorreblanca.com>
> ---
> drivers/staging/sm750fb/sm750.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 62f6e0cdff4d..dc9653ed2108 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -33,8 +33,8 @@
> static int g_hwcursor = 1;
> static int g_noaccel;
> static int g_nomtrr;
> -static const char *g_fbmode[] = {NULL, NULL};
> -static const char *g_def_fbmode = "1024x768-32@60";
> +static const char * const g_fbmode[] = {NULL, NULL};
> +static const char * const g_def_fbmode = "1024x768-32@60";
> static char *g_settings;
> static int g_dualview;
> static char *g_option;
> --
> 2.50.1 (Apple Git-155)
>
>
These are not all threaded together, can you please resend them all as a
correct patch series?
thanks,
greg k-h
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox