]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: s, fb->bits_per_pixel/8, pixel_size, in primary plane code
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 27 Aug 2014 13:51:22 +0000 (16:51 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Sep 2014 09:04:47 +0000 (11:04 +0200)
commitfbe5d0b4ca47bb8e5929b37682550362aaf48cbe
tree363146e2481c436fb77e7a780448b6d8fb9eeaf0
parent30fe93c38e0888569e687c10e442965052dbd046
drm/i915: s, fb->bits_per_pixel/8, pixel_size, in primary plane code

Use the pixel_size we got from drm_format_plane_cpp() instead of
fb->bits_per_pixel/8 when computing the primary plane page/linear
offsets. Avoids a few divs and makes the code more future proof
against funky pixel formats where bits_per_pixel isn't well defined.
This is what we already did in the sprite code.

Note that the relevant sprite patch was

commit 66d2fdd7160e35b236b2d877155e442726163bcf
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Dec 19 12:14:22 2012 +0000

    drm/i915: Use pixel size for computing linear offsets into a sprite

This change was required on sprites because they support yuv formats
which have fb->bits_per_pixel undefined.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Add Chris' software archeology as a note to the commit
message.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c