public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@kernel.org>
To: airlied@linux.ie, C.Emde@osadl.org
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-kernel@lists.codethink.co.uk,
	Javi Merino <javi.merino@kernel.org>
Subject: [PATCH 1/2] drm: use .hword to represent 16-bit numbers
Date: Mon,  6 Mar 2017 14:27:35 +0000	[thread overview]
Message-ID: <1488810456-4583-2-git-send-email-javi.merino@kernel.org> (raw)
In-Reply-To: <1488810456-4583-1-git-send-email-javi.merino@kernel.org>

The size of .word is the size of a word in the given platform, which
for intel systems is 16-bits but other architectures use different
sizes.  However, .hword emits 16-bit numbers regardless of the
platform (and despite the name).  The quantities specified in EDID are
platform independent, so they should work in spite of the default
target of the cc you are using, so use .hword where EDID specifies
16-bit numbers.

Cc: Carsten Emde <C.Emde@osadl.org>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Javi Merino <javi.merino@kernel.org>
---
 Documentation/EDID/edid.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/EDID/edid.S b/Documentation/EDID/edid.S
index 7ac0327..ef082dc 100644
--- a/Documentation/EDID/edid.S
+++ b/Documentation/EDID/edid.S
@@ -59,9 +59,9 @@
 /* Fixed header pattern */
 header:		.byte	0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00
 
-mfg_id:		.word	swap16(mfgname2id(MFG_LNX1, MFG_LNX2, MFG_LNX3))
+mfg_id:		.hword	swap16(mfgname2id(MFG_LNX1, MFG_LNX2, MFG_LNX3))
 
-prod_code:	.word	0
+prod_code:	.hword	0
 
 /* Serial number. 32 bits, little endian. */
 serial_number:	.long	SERIAL
@@ -177,7 +177,7 @@ std_vres:	.byte	(XY_RATIO<<6)+VFREQ-60
 
 descriptor1:
 /* Pixel clock in 10 kHz units. (0.-655.35 MHz, little-endian) */
-clock:		.word	CLOCK/10
+clock:		.hword	CLOCK/10
 
 /* Horizontal active pixels 8 lsbits (0-4095) */
 x_act_lsb:	.byte	XPIX&0xff
-- 
2.1.4

  reply	other threads:[~2017-03-06 14:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 14:27 [PATCH 0/2] Documentation/EDID fixes Javi Merino
2017-03-06 14:27 ` Javi Merino [this message]
2017-03-06 14:27 ` [PATCH 2/2] drm: Add O= support Javi Merino
2017-03-07 16:16 ` [PATCH 0/2] Documentation/EDID fixes Jani Nikula
2017-03-07 16:33   ` Javi Merino
2017-03-08  8:11     ` Jani Nikula

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=1488810456-4583-2-git-send-email-javi.merino@kernel.org \
    --to=javi.merino@kernel.org \
    --cc=C.Emde@osadl.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-kernel@vger.kernel.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