Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177540071
D60038.1794666777.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D60038.1794666777.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -45,6 +45,7 @@
#include <sys/sysctl.h>
#include <sys/lock.h>
#include <sys/mutex.h>
+#include <sys/fbio.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/filio.h>
@@ -83,6 +84,7 @@
#include <linux/backlight.h>
#include "backlight_if.h"
+#include "fb_if.h"
#include "pcib_if.h"
/* Undef the linux function macro defined in linux/pci.h */
@@ -110,6 +112,7 @@
static int linux_backlight_get_info(device_t dev, struct backlight_info *info);
static void lkpi_pcim_iomap_table_release(struct device *, void *);
static void lkpinew_pci_dev_release(struct device *);
+static struct fb_info * lkpi_fb_helper_getinfo(device_t dev);
static device_method_t pci_methods[] = {
DEVMETHOD(device_probe, linux_pci_probe),
@@ -129,6 +132,10 @@
DEVMETHOD(backlight_update_status, linux_backlight_update_status),
DEVMETHOD(backlight_get_status, linux_backlight_get_status),
DEVMETHOD(backlight_get_info, linux_backlight_get_info),
+
+ /* Framebuffer service methods */
+ DEVMETHOD(fb_getinfo, lkpi_fb_helper_getinfo),
+
DEVMETHOD_END
};
@@ -2453,3 +2460,20 @@
free(bd->name, M_DEVBUF);
free(bd, M_DEVBUF);
}
+
+static struct fb_info *
+lkpi_fb_helper_getinfo(device_t dev)
+{
+ struct pci_dev *pdev;
+ device_t fbd;
+
+ pdev = device_get_softc(dev);
+ if (!pdev->pdrv->isdrm)
+ return (NULL);
+
+ fbd = device_find_child(dev, "fbd", -1);
+ if (fbd == NULL)
+ return (NULL);
+
+ return (device_get_ivars(fbd));
+}
diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile
--- a/sys/modules/linuxkpi/Makefile
+++ b/sys/modules/linuxkpi/Makefile
@@ -50,7 +50,7 @@
SRCS+= opt_apic.h
.endif
-SRCS+= opt_ddb.h
+SRCS+= fb_if.h opt_ddb.h
SRCS+= ${LINUXKPI_GENSRCS}
CFLAGS+= ${LINUXKPI_INCLUDES}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 2:32 PM (9 h, 39 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41725345
Default Alt Text
D60038.1794666777.diff (1 KB)
Attached To
Mode
D60038: LinuxKPI: Add PCI method for transferring framebuffer parameters
Attached
Detach File
Event Timeline