]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
drm: fourcc: Add drm_format_plane_width_bytes()
authorHyun Kwon <hyun.kwon@xilinx.com>
Wed, 14 Feb 2018 23:10:21 +0000 (15:10 -0800)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 1 Mar 2018 08:20:21 +0000 (09:20 +0100)
commit6f59a1e50a57df4fd1c1cfbe7f8d13d7b26d5e42
tree1356c7861f339c346064900303ba199a9d09dacd
parent292386744a361300d32542d8e4032ab9f3e8d2ec
drm: fourcc: Add drm_format_plane_width_bytes()

drm_format_plane_width_bytes() calculates and returns the number of bytes
for given width of specified format. The calculation uses @cpp
in drm format info for byte-aligned formats. If the format isn't
byte-aligned, @cpp should 0, and the macro pixel information is used.
This avoids bit level rounding.

Use this drm_fb_cma_get_gem_addr() for offset calculation.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpu/drm/drm_fb_cma_helper.c
drivers/gpu/drm/drm_fourcc.c
include/drm/drm_fourcc.h