6 #include <linux/module.h>
7 #include <linux/kernel.h>
47 static int s3d_setcolreg(
unsigned regno,
58 value = (blue << 24) | (green << 16) | (red << 8);
65 static struct fb_ops s3d_ops = {
67 .fb_setcolreg = s3d_setcolreg,
79 info->
fbops = &s3d_ops;
103 var->
green.offset = 16;
104 var->
green.length = 8;
105 var->
blue.offset = 24;
106 var->
blue.length = 8;
142 sp->
of_node = pci_device_to_OF_node(pdev);
154 printk(
"s3d: Cannot request region 1 for %s\n",
159 err = s3d_get_props(sp);
161 goto err_release_pci;
172 info->
fix.line_length = sp->
width * 2;
175 info->
fix.line_length = sp->
width * 3;
178 info->
fix.line_length = sp->
width * 4;
186 goto err_release_pci;
189 err = s3d_set_fbinfo(sp);
193 pci_set_drvdata(pdev, info);
195 printk(
"s3d: Found device at %s\n", pci_name(pdev));
224 struct fb_info *info = pci_get_drvdata(pdev);
252 .id_table = s3d_pci_table,
253 .probe = s3d_pci_register,
257 static int __init s3d_init(
void)
262 return pci_register_driver(&s3d_driver);
265 static void __exit s3d_exit(
void)