From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/displayid: Enhance version reporting
Date: Wed, 4 May 2016 12:10:43 +0300 [thread overview]
Message-ID: <20160504091043.GK4329@intel.com> (raw)
In-Reply-To: <1462307812-3341-2-git-send-email-airlied@gmail.com>
On Wed, May 04, 2016 at 06:36:48AM +1000, Dave Airlie wrote:
> From: Tomas Bzatek <tomas@bzatek.net>
>
> Cosmetic change, let's report more precise revisions and IDs.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=95207
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/gpu/drm/drm_edid.c | 6 +++---
> include/drm/drm_displayid.h | 6 ++++--
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 9a9be9a..c8a3a55 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -4168,8 +4168,8 @@ static int drm_parse_display_id(struct drm_connector *connector,
>
> base = (struct displayid_hdr *)&displayid[idx];
>
> - DRM_DEBUG_KMS("base revision 0x%x, length %d, %d %d\n",
> - base->rev, base->bytes, base->prod_id, base->ext_count);
> + DRM_DEBUG_KMS("base revision v%d.%d, edid length %d, bytes %d, prod_id %d ext_count %d\n",
> + base->ver, base->rev, length, base->bytes, base->prod_id, base->ext_count);
>
> if (base->bytes + 5 > length - idx)
> return -EINVAL;
> @@ -4183,7 +4183,7 @@ static int drm_parse_display_id(struct drm_connector *connector,
> }
>
> block = (struct displayid_block *)&displayid[idx + 4];
> - DRM_DEBUG_KMS("block id %d, rev %d, len %d\n",
> + DRM_DEBUG_KMS("block id 0x%x, rev %d, len %d\n",
> block->tag, block->rev, block->num_bytes);
>
> switch (block->tag) {
> diff --git a/include/drm/drm_displayid.h b/include/drm/drm_displayid.h
> index 623b4e9..042f9fc 100644
> --- a/include/drm/drm_displayid.h
> +++ b/include/drm/drm_displayid.h
> @@ -52,7 +52,8 @@
> #define PRODUCT_TYPE_DIRECT_DRIVE 6
>
> struct displayid_hdr {
> - u8 rev;
> + u8 rev:4;
> + u8 ver:4;
> u8 bytes;
> u8 prod_id;
> u8 ext_count;
> @@ -60,7 +61,8 @@ struct displayid_hdr {
>
> struct displayid_block {
> u8 tag;
> - u8 rev;
> + u8 rev:3;
> + u8 reserved:5;
> u8 num_bytes;
> } __packed;
Using bitfields in an architecture independent structure doesn't
feel like an entirely good idea to me.
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-05-04 9:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 20:36 [rfc] drm/edid: add support for displayid timings Dave Airlie
2016-05-03 20:36 ` [PATCH 1/5] drm/displayid: Enhance version reporting Dave Airlie
2016-05-04 9:10 ` Ville Syrjälä [this message]
2016-05-09 9:52 ` Michel Dänzer
2016-05-10 1:16 ` Dave Airlie
2016-05-03 20:36 ` [PATCH 2/5] drm/displayid: Iterate over all DisplayID blocks Dave Airlie
2016-05-03 20:36 ` [PATCH 3/5] drm/edid: move displayid tiled block parsing into separate function Dave Airlie
2016-05-04 8:04 ` Jani Nikula
2016-05-03 20:36 ` [PATCH 4/5] drm/edid: move displayid validation to it's own function Dave Airlie
2016-05-03 20:36 ` [PATCH 5/5] drm/edid: add displayid detailed 1 timings to the modelist Dave Airlie
2016-05-04 8:10 ` Jani Nikula
2016-05-10 1:18 ` Dave Airlie
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=20160504091043.GK4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@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