drm: Centralize format information
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 17 Oct 2016 22:41:09 +0000 (01:41 +0300)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 15 Aug 2018 02:02:52 +0000 (19:02 -0700)
commit9dc0813343cb0778775044c66a3ab1e93b95fb3a
treed65f543b2a7812ae227dfce6efc399750335eb29
parent2313328ba4abe94493a06f3b16b5674639777983
drm: Centralize format information

PD#170175: 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.

Change-Id: I25dc415450c89e5eb69726b3dda521c5800c4d68
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