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)
commit84770cc24f3a51c05055665feeac1dcf22119d69
treee702589d25858bac9929de994199609143871391
parentcff52e5fc4cfc978b7df898dc14a0492c7ef0ae8
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