Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev Add support for the WSDISPLAYIO_GET_EDI...
details: https://anonhg.NetBSD.org/src/rev/57040b0c092d
branches: trunk
changeset: 770728:57040b0c092d
user: jdc <jdc%NetBSD.org@localhost>
date: Mon Oct 31 08:28:46 2011 +0000
description:
Add support for the WSDISPLAYIO_GET_EDID ioctl (requires passing a device_t
to ffb_attach).
diffstat:
sys/arch/sparc64/dev/ffb.c | 19 ++++++++++++++++---
sys/arch/sparc64/dev/ffb_mainbus.c | 6 +++---
sys/arch/sparc64/dev/ffbvar.h | 4 ++--
3 files changed, 21 insertions(+), 8 deletions(-)
diffs (111 lines):
diff -r ab7a67a5399f -r 57040b0c092d sys/arch/sparc64/dev/ffb.c
--- a/sys/arch/sparc64/dev/ffb.c Mon Oct 31 08:14:43 2011 +0000
+++ b/sys/arch/sparc64/dev/ffb.c Mon Oct 31 08:28:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffb.c,v 1.47 2011/10/23 06:06:24 jdc Exp $ */
+/* $NetBSD: ffb.c,v 1.48 2011/10/31 08:28:46 jdc Exp $ */
/* $OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.47 2011/10/23 06:06:24 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.48 2011/10/31 08:28:46 jdc Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -57,6 +57,8 @@
#include <dev/wsfont/wsfont.h>
#include <dev/wscons/wsdisplay_vconsvar.h>
+#include <prop/proplib.h>
+
#include <dev/i2c/i2cvar.h>
#include <dev/i2c/i2c_bitbang.h>
#include <dev/i2c/ddcvar.h>
@@ -188,8 +190,9 @@
void
-ffb_attach(struct ffb_softc *sc)
+ffb_attach(device_t self)
{
+ struct ffb_softc *sc = device_private(self);
struct wsemuldisplaydev_attach_args waa;
struct rasops_info *ri;
long defattr;
@@ -200,6 +203,7 @@
u_int blank = WSDISPLAYIO_VIDEO_ON;
char buf[6+1];
int i, try_edid;
+ prop_data_t data;
printf(":");
@@ -307,6 +311,10 @@
if (ffb_debug)
edid_print(&sc->sc_edid_info);
+ data = prop_data_create_data(sc->sc_edid_data, EDID_DATA_LEN);
+ prop_dictionary_set(device_properties(self), "EDID", data);
+ prop_object_release(data);
+
if (try_edid)
for (i = 0; i < sc->sc_edid_info.edid_nmodes; i++) {
if (ffb_set_vmode(sc,
@@ -493,6 +501,11 @@
case WSDISPLAYIO_GCURSOR:
case WSDISPLAYIO_SCURSOR:
return EIO; /* not supported yet */
+ break;
+ case WSDISPLAYIO_GET_EDID: {
+ struct wsdisplayio_edid_info *d = data;
+ return wsdisplayio_get_edid(sc->sc_dev, d);
+ }
default:
return EPASSTHROUGH;
}
diff -r ab7a67a5399f -r 57040b0c092d sys/arch/sparc64/dev/ffb_mainbus.c
--- a/sys/arch/sparc64/dev/ffb_mainbus.c Mon Oct 31 08:14:43 2011 +0000
+++ b/sys/arch/sparc64/dev/ffb_mainbus.c Mon Oct 31 08:28:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffb_mainbus.c,v 1.11 2011/07/01 18:48:36 dyoung Exp $ */
+/* $NetBSD: ffb_mainbus.c,v 1.12 2011/10/31 08:28:46 jdc Exp $ */
/* $OpenBSD: creator_mainbus.c,v 1.4 2002/07/26 16:39:04 jason Exp $ */
/*
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffb_mainbus.c,v 1.11 2011/07/01 18:48:36 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffb_mainbus.c,v 1.12 2011/10/31 08:28:46 jdc Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -114,7 +114,7 @@
if (strcmp(ma->ma_name, "SUNW,afb") == 0)
sc->sc_type = FFB_AFB;
- ffb_attach(sc);
+ ffb_attach(self);
return;
diff -r ab7a67a5399f -r 57040b0c092d sys/arch/sparc64/dev/ffbvar.h
--- a/sys/arch/sparc64/dev/ffbvar.h Mon Oct 31 08:14:43 2011 +0000
+++ b/sys/arch/sparc64/dev/ffbvar.h Mon Oct 31 08:28:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffbvar.h,v 1.11 2011/06/03 03:20:39 christos Exp $ */
+/* $NetBSD: ffbvar.h,v 1.12 2011/10/31 08:28:46 jdc Exp $ */
/* $OpenBSD: creatorvar.h,v 1.6 2002/07/30 19:48:15 jason Exp $ */
/*
@@ -86,4 +86,4 @@
#define FBC_READ(sc,r) \
bus_space_read_4((sc)->sc_bt, (sc)->sc_fbc_h, (r))
-void ffb_attach(struct ffb_softc *);
+void ffb_attach(device_t);
Home |
Main Index |
Thread Index |
Old Index