mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Collins <bcollins@ubuntu.com>
To: linux-kernel@vger.kernel.org
Cc: Bernie Thompson <bernie@plugable.com>,
	libdlo <libdlo@lists.freedesktop.org>
Subject: UDLFB:  Make sure to get correct endian keys from vendor descriptor
Date: Thu, 16 Feb 2012 16:58:11 -0500	[thread overview]
Message-ID: <09CD7791-DCBE-45BC-96D3-DFE60971D067@ubuntu.com> (raw)

The driver was not using le16_to_cpu when reading keys from the vendor
descriptor, causing incorrect parsing. Mainly, sku_pixel_limit was not
being parsed on big-endian systems. This left udlfb most certainly
broken on low level chips as the driver allows modes that are too
high for the chip by default.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>

diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
index a197731..0319593 100644
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -1537,7 +1537,7 @@ static int dlfb_parse_vendor_descriptor(struct dlfb_data *dev,
 			u8 length;
 			u16 key;
 
-			key = *((u16 *) desc);
+			key = le16_to_cpu(*((u16 *) desc));
 			desc += sizeof(u16);
 			length = *desc;
 			desc++;

--
Bluecherry: http://www.bluecherrydvr.com/
SwissDisk : http://www.swissdisk.com/
Ubuntu    : http://www.ubuntu.com/
My Blog   : http://ben-collins.blogspot.com/


                 reply	other threads:[~2012-02-16 21:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=09CD7791-DCBE-45BC-96D3-DFE60971D067@ubuntu.com \
    --to=bcollins@ubuntu.com \
    --cc=bernie@plugable.com \
    --cc=libdlo@lists.freedesktop.org \
    --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

all inboxes | Powered by JetHome®