From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH i-g-t 4/8] tools/intel_vbt_decode: abstract DSI bridge type dump
Date: Thu, 19 Oct 2017 18:22:55 +0300 [thread overview]
Message-ID: <20171019152259.31615-5-jani.nikula@intel.com> (raw)
In-Reply-To: <20171019152259.31615-1-jani.nikula@intel.com>
Cleaner than having it inline.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
tools/intel_vbt_decode.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 0f7e2dafc762..69cf1e4c6cc6 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -384,6 +384,20 @@ static const char *dvo_port(uint8_t type)
return "unknown";
}
+static const char *mipi_bridge_type(uint8_t type)
+{
+ switch (type) {
+ case 1:
+ return "ASUS";
+ case 2:
+ return "Toshiba";
+ case 3:
+ return "Renesas";
+ default:
+ return "unknown";
+ }
+}
+
static void dump_child_device(struct context *context,
const struct child_device_config *child)
{
@@ -440,21 +454,8 @@ static void dump_child_device(struct context *context,
printf("\t\tSDVO stall signal available: %s\n", YESNO(efp->sdvo_stall));
printf("\t\tPipe capabilities: 0x%02x\n", efp->pipe_cap);
printf("\t\tDVO wiring: 0x%02x\n", efp->dvo_wiring);
- printf("\t\tMIPI bridge type:");
- switch (efp->mipi_bridge_type) {
- case 1:
- printf("ASUS\n");
- break;
- case 2:
- printf("Toshiba\n");
- break;
- case 3:
- printf("Renesas\n");
- break;
- default:
- printf("(unknown value %d)\n", efp->mipi_bridge_type);
- break;
- }
+ printf("\t\tMIPI bridge type: %02x (%s)\n", efp->mipi_bridge_type,
+ mipi_bridge_type(efp->mipi_bridge_type));
printf("\t\tDevice class extendsion: 0x%02x\n", efp->extended_type);
printf("\t\tDVO function: 0x%02x\n", efp->dvo_function);
}
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-19 15:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 15:22 [PATCH i-g-t 0/8] tools/intel_vbt_decode: refactoring and cleanups Jani Nikula
2017-10-19 15:22 ` [PATCH i-g-t 1/8] tools/intel_vbt_decode: make a copy of child devices before dumping Jani Nikula
2017-10-19 15:22 ` [PATCH i-g-t 2/8] tools/intel_vbt_decode: update dvo port name dumping Jani Nikula
2017-10-19 15:22 ` [PATCH i-g-t 3/8] tools/intel_vbt_decode: use %.*s instead of duplicating a string Jani Nikula
2017-10-19 15:22 ` Jani Nikula [this message]
2017-10-19 15:22 ` [PATCH i-g-t 5/8] tools/intel_vbt_decode: unify child device printing across versions Jani Nikula
2017-10-19 17:24 ` Ville Syrjälä
2017-10-20 10:56 ` Jani Nikula
2017-10-20 11:33 ` Ville Syrjälä
2017-10-20 13:17 ` Jani Nikula
2017-10-20 13:49 ` Ville Syrjälä
2017-10-19 15:22 ` [PATCH i-g-t 6/8] tools/intel_vbt_decode: unify legacy child device block dumping Jani Nikula
2017-10-19 15:22 ` [PATCH i-g-t 7/8] tools/intel_vbt_decode: dump more child device data for version < 152 Jani Nikula
2017-10-19 15:22 ` [PATCH i-g-t 8/8] tools/intel_vbt_decode: abstract child devices printing more Jani Nikula
2017-10-19 16:52 ` ✗ Fi.CI.BAT: failure for tools/intel_vbt_decode: refactoring and cleanups Patchwork
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=20171019152259.31615-5-jani.nikula@intel.com \
--to=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox