From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 1/3] tools/intel_bios_reader: Print the child dev handle
Date: Fri, 11 Sep 2015 16:14:30 +0300 [thread overview]
Message-ID: <1441977272-1263-1-git-send-email-ville.syrjala@linux.intel.com> (raw)
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tools/intel_bios.h | 8 ++++++++
tools/intel_bios_reader.c | 28 ++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/tools/intel_bios.h b/tools/intel_bios.h
index 64e723d..cd6abf9 100644
--- a/tools/intel_bios.h
+++ b/tools/intel_bios.h
@@ -134,6 +134,14 @@ struct bdb_general_features {
#define GPIO_PIN_ADD_DDC 0x04 /* "ADDCARD DDC GPIO pins" */
#define GPIO_PIN_ADD_DDC_I2C 0x06 /* "ADDCARD DDC/I2C GPIO pins" */
+#define DEVICE_HANDLE_CRT 0x01
+#define DEVICE_HANDLE_EFP1 0x04
+#define DEVICE_HANDLE_EFP2 0x40
+#define DEVICE_HANDLE_EFP3 0x20
+#define DEVICE_HANDLE_EFP4 0x10
+#define DEVICE_HANDLE_LPF1 0x08
+#define DEVICE_HANDLE_LFP2 0x80
+
/* Pre 915 */
#define DEVICE_TYPE_NONE 0x00
#define DEVICE_TYPE_CRT 0x01
diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index bb6139e..19c988b 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -255,6 +255,32 @@ static const char *child_device_type(unsigned short type)
}
static const struct {
+ unsigned char handle;
+ const char *name;
+} child_device_handles[] = {
+ { DEVICE_HANDLE_CRT, "CRT" },
+ { DEVICE_HANDLE_EFP1, "EFP 1 (HDMI/DVI/DP)" },
+ { DEVICE_HANDLE_EFP2, "EFP 2 (HDMI/DVI/DP)" },
+ { DEVICE_HANDLE_EFP3, "EFP 3 (HDMI/DVI/DP)" },
+ { DEVICE_HANDLE_EFP4, "EFP 4 (HDMI/DVI/DP)" },
+ { DEVICE_HANDLE_LPF1, "LFP 1 (eDP)" },
+ { DEVICE_HANDLE_LFP2, "LFP 2 (eDP)" },
+};
+static const int num_child_device_handles =
+ sizeof(child_device_handles) / sizeof(child_device_handles[0]);
+
+static const char *child_device_handle(unsigned char handle)
+{
+ int i;
+
+ for (i = 0; i < num_child_device_handles; i++)
+ if (child_device_handles[i].handle == handle)
+ return child_device_handles[i].name;
+
+ return "unknown";
+}
+
+static const struct {
unsigned short type;
const char *name;
} efp_ports[] = {
@@ -324,6 +350,8 @@ static void dump_child_device(struct child_device_config *child)
struct efp_child_device_config *efp =
(struct efp_child_device_config *)child;
printf("\tEFP device info:\n");
+ printf("\t\tDevice handle: 0x%04x (%s)\n", efp->handle,
+ child_device_handle(efp->handle));
printf("\t\tDevice type: 0x%04x (%s)\n", efp->device_type,
child_device_type(efp->device_type));
printf("\t\tPort: 0x%02x (%s)\n", efp->port,
--
2.4.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2015-09-11 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 13:14 ville.syrjala [this message]
2015-09-11 13:14 ` [PATCH i-g-t 2/3] tools/intel_bios_reader: Decode the device type bits ville.syrjala
2015-09-11 13:14 ` [PATCH i-g-t 3/3] tools/intel_bios_reader: Add MIPI device type ville.syrjala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441977272-1263-1-git-send-email-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.