Merge tag 'linux-watchdog-5.6-rc1' of git://www.linux-watchdog.org/linux-watchdog
[linux-2.6-microblaze.git] / drivers / staging / media / meson / vdec / vdec_platform.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2018 BayLibre, SAS
4  * Author: Maxime Jourdan <mjourdan@baylibre.com>
5  */
6
7 #include "vdec_platform.h"
8 #include "vdec.h"
9
10 #include "vdec_1.h"
11 #include "codec_mpeg12.h"
12
13 static const struct amvdec_format vdec_formats_gxbb[] = {
14         {
15                 .pixfmt = V4L2_PIX_FMT_MPEG1,
16                 .min_buffers = 8,
17                 .max_buffers = 8,
18                 .max_width = 1920,
19                 .max_height = 1080,
20                 .vdec_ops = &vdec_1_ops,
21                 .codec_ops = &codec_mpeg12_ops,
22                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
23                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
24         }, {
25                 .pixfmt = V4L2_PIX_FMT_MPEG2,
26                 .min_buffers = 8,
27                 .max_buffers = 8,
28                 .max_width = 1920,
29                 .max_height = 1080,
30                 .vdec_ops = &vdec_1_ops,
31                 .codec_ops = &codec_mpeg12_ops,
32                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
33                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
34         },
35 };
36
37 static const struct amvdec_format vdec_formats_gxl[] = {
38         {
39                 .pixfmt = V4L2_PIX_FMT_MPEG1,
40                 .min_buffers = 8,
41                 .max_buffers = 8,
42                 .max_width = 1920,
43                 .max_height = 1080,
44                 .vdec_ops = &vdec_1_ops,
45                 .codec_ops = &codec_mpeg12_ops,
46                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
47                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
48         }, {
49                 .pixfmt = V4L2_PIX_FMT_MPEG2,
50                 .min_buffers = 8,
51                 .max_buffers = 8,
52                 .max_width = 1920,
53                 .max_height = 1080,
54                 .vdec_ops = &vdec_1_ops,
55                 .codec_ops = &codec_mpeg12_ops,
56                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
57                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
58         },
59 };
60
61 static const struct amvdec_format vdec_formats_gxm[] = {
62         {
63                 .pixfmt = V4L2_PIX_FMT_MPEG1,
64                 .min_buffers = 8,
65                 .max_buffers = 8,
66                 .max_width = 1920,
67                 .max_height = 1080,
68                 .vdec_ops = &vdec_1_ops,
69                 .codec_ops = &codec_mpeg12_ops,
70                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
71                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
72         }, {
73                 .pixfmt = V4L2_PIX_FMT_MPEG2,
74                 .min_buffers = 8,
75                 .max_buffers = 8,
76                 .max_width = 1920,
77                 .max_height = 1080,
78                 .vdec_ops = &vdec_1_ops,
79                 .codec_ops = &codec_mpeg12_ops,
80                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
81                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
82         },
83 };
84
85 static const struct amvdec_format vdec_formats_g12a[] = {
86         {
87                 .pixfmt = V4L2_PIX_FMT_MPEG1,
88                 .min_buffers = 8,
89                 .max_buffers = 8,
90                 .max_width = 1920,
91                 .max_height = 1080,
92                 .vdec_ops = &vdec_1_ops,
93                 .codec_ops = &codec_mpeg12_ops,
94                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
95                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
96         }, {
97                 .pixfmt = V4L2_PIX_FMT_MPEG2,
98                 .min_buffers = 8,
99                 .max_buffers = 8,
100                 .max_width = 1920,
101                 .max_height = 1080,
102                 .vdec_ops = &vdec_1_ops,
103                 .codec_ops = &codec_mpeg12_ops,
104                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
105                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
106         },
107 };
108
109 static const struct amvdec_format vdec_formats_sm1[] = {
110         {
111                 .pixfmt = V4L2_PIX_FMT_MPEG1,
112                 .min_buffers = 8,
113                 .max_buffers = 8,
114                 .max_width = 1920,
115                 .max_height = 1080,
116                 .vdec_ops = &vdec_1_ops,
117                 .codec_ops = &codec_mpeg12_ops,
118                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
119                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
120         }, {
121                 .pixfmt = V4L2_PIX_FMT_MPEG2,
122                 .min_buffers = 8,
123                 .max_buffers = 8,
124                 .max_width = 1920,
125                 .max_height = 1080,
126                 .vdec_ops = &vdec_1_ops,
127                 .codec_ops = &codec_mpeg12_ops,
128                 .firmware_path = "meson/vdec/gxl_mpeg12.bin",
129                 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
130         },
131 };
132
133 const struct vdec_platform vdec_platform_gxbb = {
134         .formats = vdec_formats_gxbb,
135         .num_formats = ARRAY_SIZE(vdec_formats_gxbb),
136         .revision = VDEC_REVISION_GXBB,
137 };
138
139 const struct vdec_platform vdec_platform_gxl = {
140         .formats = vdec_formats_gxl,
141         .num_formats = ARRAY_SIZE(vdec_formats_gxl),
142         .revision = VDEC_REVISION_GXL,
143 };
144
145 const struct vdec_platform vdec_platform_gxm = {
146         .formats = vdec_formats_gxm,
147         .num_formats = ARRAY_SIZE(vdec_formats_gxm),
148         .revision = VDEC_REVISION_GXM,
149 };
150
151 const struct vdec_platform vdec_platform_g12a = {
152         .formats = vdec_formats_g12a,
153         .num_formats = ARRAY_SIZE(vdec_formats_g12a),
154         .revision = VDEC_REVISION_G12A,
155 };
156
157 const struct vdec_platform vdec_platform_sm1 = {
158         .formats = vdec_formats_sm1,
159         .num_formats = ARRAY_SIZE(vdec_formats_sm1),
160         .revision = VDEC_REVISION_SM1,
161 };