From: Jon Medhurst (Tixy) Date: Wed, 20 Aug 2014 12:41:04 +0000 (+0100) Subject: video: ARM CLCD: Fix calculation of bits-per-pixel X-Git-Tag: fix-v3.17-io-chain-v3~15^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b6c53b1504865728a6dfad3e720918a2f89f3a5;p=pandora-kernel.git video: ARM CLCD: Fix calculation of bits-per-pixel If the device-tree specifies a max-memory-bandwidth property then the CLCD driver uses that to calculate the bits-per-pixel supported, however, this calculation is faulty for two reasons. 1. It doesn't ensure that the result is a sane value, i.e. a power of 2 and <= 32 as the rest of the code assumes. 2. It uses the displayed resolution and calculates the average bandwidth across the whole frame. It should instead calculate the peak bandwidth based on the pixel clock. This patch fixes both the above. Signed-off-by: Jon Medhurst Acked-by: Pawel Moll Signed-off-by: Tomi Valkeinen --- Reading git-diff-tree failed