The size variable in fbdev_update is used to set the amount of mapped RAM
needed for the framebuffer. Thus, it is not just the number of pixels
times the bpp; it could be significantly more due to line length cache
alignment and other padding.
Thus, get the size from the gem object itself instead of computing it.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=splash screen displays correctly w/ no HDMI
TEST=splash screen displays correctly w/ HDMI
Change-Id: I7df74770d49931f98ebd62d71178755a83d6db57
Reviewed-on: https://gerrit.chromium.org/gerrit/40445
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
struct fb_info *fbi = helper->fbdev;
struct drm_device *dev = helper->dev;
struct exynos_drm_gem_buf *buffer = exynos_gem_obj->buffer;
- unsigned int size = fb->width * fb->height * (fb->bits_per_pixel >> 3);
+ struct drm_gem_object *drm_gem_object = &exynos_gem_obj->base;
+ size_t size = drm_gem_object->size;
DRM_DEBUG_KMS("%s\n", __FILE__);