* Make sure that the bytes per scanline is always a multiple of 64. This fixes

1680x1050 with 16 bit on i865+ (still need to check the restrictions of
  older chips).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31277 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-06-27 18:07:37 +00:00
parent e455799925
commit 10f01c97ec
1 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2006-2008, Haiku, Inc. All Rights Reserved.
* Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Support for i915 chipset and up based on the X driver,
@ -475,6 +475,11 @@ get_color_space_format(const display_mode &mode, uint32 &colorMode,
}
bytesPerRow = mode.virtual_width * bytesPerPixel;
// Make sure bytesPerRow is a multiple of 64
// TODO: check if the older chips have the same restriction!
if ((bytesPerRow & 63) != 0)
bytesPerRow = (bytesPerRow + 63) & ~63;
}