Skip to content

Commit

Permalink
drm/udl: Make sure to get correct endian keys from vendor descriptor
Browse files Browse the repository at this point in the history
This is a port of
commit b49f184
Author: Ben Collins <bcollins@ubuntu.com>
from udlfb to udl kms driver.

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 would result in a blank screen
on big-endian CPUs where the DL chips's max mode was smaller than the
monitor's native mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Jun 25, 2012
1 parent 6b16351 commit d42f034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/udl/udl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int udl_parse_vendor_descriptor(struct drm_device *dev,
u8 length;
u16 key;

key = *((u16 *) desc);
key = le16_to_cpu(*((u16 *) desc));
desc += sizeof(u16);
length = *desc;
desc++;
Expand Down

0 comments on commit d42f034

Please sign in to comment.