3/3 Add I2C/DDC support to radeonfb
PATCH 1/1 3/3 Add I2C/DDC support to radeonfb
Export EDID data through sysfs.
drivers/video/radeonfb.c +32 -0
@@ -434,6 +434,36 @@ };/* +* Sysfs +*/ + +ssize_t radeonfb_show_edid (struct kobject *kobj,char *buf,loff_t off,size_t count) { + struct device *dev = container_of(kobj, struct device, kobj); +struct pci_dev *pdev =to_pci_dev (dev); +struct radeonfb_info *rinfo =pci_get_drvdata (pdev); + +if (off >EDID_LENGTH ) +return 0 ; + +if (off + count >EDID_LENGTH ) + count =EDID_LENGTH - off; + +memcpy (buf, rinfo->EDID + off, count); + +return count; +} + +static struct bin_attribute edid_attr = { + .attr = { + .name ="edid" , + .owner =THIS_MODULE , + .mode =0444 , + }, + .size =EDID_LENGTH , + .read = radeonfb_show_edid, +}; + +/* * IO macros */
@@ -3275,6 +3305,8 @@ rinfo->modedb = db; rinfo->dbsize = i; } + +sysfs_create_bin_file (&rinfo->pdev->dev.kobj, &edid_attr); }show_edid (rinfo->EDID);
Signature · 11 lines
Reply-To: [email protected] Home: http://kronoz.cjb.net Non capisco tutta questa eccitazione per il Multitasking: io sono anni che leggo in bagno. ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
Quoted 1 line · Kronos
Export EDID data through sysfs.
nice! hopefully fbdev drivers follow the same schema.
-solca
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0