diff options
author | Martin Kaiser <martin@kaiser.cx> | 2017-01-11 17:09:50 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-01-11 17:09:50 +0100 |
commit | dc312120b771fe6e4c4e753a73fd61e10de6d7b3 (patch) | |
tree | 1d99c3da4b80533f05d1db346f025272b27d5fb6 /include/drm/drm_agpsupport.h | |
parent | d67fa87de05ff11758d505aa5b5143ae978f4d16 (diff) | |
download | blackbird-op-linux-dc312120b771fe6e4c4e753a73fd61e10de6d7b3.tar.gz blackbird-op-linux-dc312120b771fe6e4c4e753a73fd61e10de6d7b3.zip |
video: fbdev: imxfb: always allocate 256 entries for the color map
The current code calculates the number of color map entries as
1 << info->var.bits_per_pixel. For 32bpp modes, 1 << 32 is 0 when
written to an int variable. As a consequence, the subsequent copying
of the default (non-empty) color map into our newly allocated color map
fails and imxfb's probe function returns an error.
On both imx1 and imx21 platforms, the color map is used only for modes
with <= 8bpp. By allocating 256 entries for the color map, we're on the
safe side.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'include/drm/drm_agpsupport.h')
0 files changed, 0 insertions, 0 deletions