drm: Centralize format information
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 17 Oct 2016 22:41:09 +0000 (01:41 +0300)
committerArchit Taneja <architt@codeaurora.org>
Tue, 18 Oct 2016 09:50:34 +0000 (15:20 +0530)
commit71a02701b3eb87aefdd292aca0bd5dea27259a3f
treee702589d25858bac9929de994199609143871391
parent927233cf72d122cbf17996afb7d58dfaf8a837f3
drm: Centralize format information

Various pieces of information about DRM formats (number of planes, color
depth, chroma subsampling, ...) are scattered across different helper
functions in the DRM core. Callers of those functions often need to
access more than a single parameter of the format, leading to
inefficiencies due to multiple lookups.

Centralize all format information in a data structure and create a
function to look up information based on the format 4CC.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-2-git-send-email-laurent.pinchart@ideasonboard.com
Documentation/gpu/drm-kms.rst
drivers/gpu/drm/drm_fourcc.c
include/drm/drm_fourcc.h