83f1fdca90f6fa3e4fe881a291e0bdd5b2d8f696
[openwrt/staging/blocktrron.git] /
1 From 30f0c2f0da952655da949c2af36bf53138092ba5 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 6 Jun 2022 14:53:56 +0100
4 Subject: [PATCH] drm: vc4: Add comments for which HVS_PIXEL_ORDER_xxx
5 defines apply
6
7 The HVS_PIXEL_ORDER_xxx defines apply to specific HVS_PIXEL_FORMAT_xxx
8 modes, so add comments to make this obvious.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12 drivers/gpu/drm/vc4/vc4_regs.h | 3 +++
13 1 file changed, 3 insertions(+)
14
15 --- a/drivers/gpu/drm/vc4/vc4_regs.h
16 +++ b/drivers/gpu/drm/vc4/vc4_regs.h
17 @@ -870,16 +870,19 @@ enum hvs_pixel_format {
18 /* Note: the LSB is the rightmost character shown. Only valid for
19 * HVS_PIXEL_FORMAT_RGB8888, not RGB888.
20 */
21 +/* For modes 332, 4444, 555, 5551, 6666, 8888, 10:10:10:2 */
22 #define HVS_PIXEL_ORDER_RGBA 0
23 #define HVS_PIXEL_ORDER_BGRA 1
24 #define HVS_PIXEL_ORDER_ARGB 2
25 #define HVS_PIXEL_ORDER_ABGR 3
26
27 +/* For modes 666 and 888 (4 & 5) */
28 #define HVS_PIXEL_ORDER_XBRG 0
29 #define HVS_PIXEL_ORDER_XRBG 1
30 #define HVS_PIXEL_ORDER_XRGB 2
31 #define HVS_PIXEL_ORDER_XBGR 3
32
33 +/* For YCbCr modes (8-12, and 17) */
34 #define HVS_PIXEL_ORDER_XYCBCR 0
35 #define HVS_PIXEL_ORDER_XYCRCB 1
36 #define HVS_PIXEL_ORDER_YXCBCR 2