Lines Matching +full:pixel +full:- +full:format

4  * DRM core format related functions
34 * drm_mode_legacy_fb_format - compute drm fourcc code from legacy description
36 * @depth: bit depth per pixel
38 * Computes a drm fourcc pixel format code for the given @bpp/@depth values.
109 * drm_driver_legacy_fb_format - compute drm fourcc code from legacy description
112 * @depth: bit depth per pixel
114 * Computes a drm fourcc pixel format code for the given @bpp/@depth values.
124 if (dev->mode_config.quirk_addfb_prefer_host_byte_order) { in drm_driver_legacy_fb_format()
135 if (dev->mode_config.quirk_addfb_prefer_xbgr_30bpp && in drm_driver_legacy_fb_format()
144 * Internal function to query information for a given format. See
147 const struct drm_format_info *__drm_format_info(u32 format) in __drm_format_info() argument
150 { .format = DRM_FORMAT_C1, .depth = 1, .num_planes = 1, in __drm_format_info()
152 { .format = DRM_FORMAT_C2, .depth = 2, .num_planes = 1, in __drm_format_info()
154 { .format = DRM_FORMAT_C4, .depth = 4, .num_planes = 1, in __drm_format_info()
156 …{ .format = DRM_FORMAT_C8, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1… in __drm_format_info()
157 { .format = DRM_FORMAT_D1, .depth = 1, .num_planes = 1, in __drm_format_info()
159 { .format = DRM_FORMAT_D2, .depth = 2, .num_planes = 1, in __drm_format_info()
161 { .format = DRM_FORMAT_D4, .depth = 4, .num_planes = 1, in __drm_format_info()
163 …{ .format = DRM_FORMAT_D8, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1… in __drm_format_info()
164 { .format = DRM_FORMAT_R1, .depth = 1, .num_planes = 1, in __drm_format_info()
166 { .format = DRM_FORMAT_R2, .depth = 2, .num_planes = 1, in __drm_format_info()
168 { .format = DRM_FORMAT_R4, .depth = 4, .num_planes = 1, in __drm_format_info()
170 …{ .format = DRM_FORMAT_R8, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1… in __drm_format_info()
171 …{ .format = DRM_FORMAT_R10, .depth = 10, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = … in __drm_format_info()
172 …{ .format = DRM_FORMAT_R12, .depth = 12, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = … in __drm_format_info()
173 …{ .format = DRM_FORMAT_RGB332, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub… in __drm_format_info()
174 …{ .format = DRM_FORMAT_BGR233, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub… in __drm_format_info()
175 …{ .format = DRM_FORMAT_XRGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
176 …{ .format = DRM_FORMAT_XBGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
177 …{ .format = DRM_FORMAT_RGBX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
178 …{ .format = DRM_FORMAT_BGRX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
179 …{ .format = DRM_FORMAT_ARGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
180 …{ .format = DRM_FORMAT_ABGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
181 …{ .format = DRM_FORMAT_RGBA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
182 …{ .format = DRM_FORMAT_BGRA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
183 …{ .format = DRM_FORMAT_XRGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
184 …{ .format = DRM_FORMAT_XBGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
185 …{ .format = DRM_FORMAT_RGBX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
186 …{ .format = DRM_FORMAT_BGRX5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
187 …{ .format = DRM_FORMAT_ARGB1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
188 …{ .format = DRM_FORMAT_ABGR1555, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
189 …{ .format = DRM_FORMAT_RGBA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
190 …{ .format = DRM_FORMAT_BGRA5551, .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
191 …{ .format = DRM_FORMAT_RGB565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub… in __drm_format_info()
192 …{ .format = DRM_FORMAT_BGR565, .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub… in __drm_format_info()
194 …{ .format = DRM_FORMAT_XRGB1555 | DRM_FORMAT_BIG_ENDIAN, .depth = 15, .num_planes = 1, .cpp = { 2,… in __drm_format_info()
195 …{ .format = DRM_FORMAT_RGB565 | DRM_FORMAT_BIG_ENDIAN, .depth = 16, .num_planes = 1, .cpp = { 2, 0… in __drm_format_info()
197 …{ .format = DRM_FORMAT_RGB888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub… in __drm_format_info()
198 …{ .format = DRM_FORMAT_BGR888, .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub… in __drm_format_info()
199 …{ .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
200 …{ .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
201 …{ .format = DRM_FORMAT_RGBX8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
202 …{ .format = DRM_FORMAT_BGRX8888, .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
203 …{ .format = DRM_FORMAT_RGB565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .hsub = 1, .vs… in __drm_format_info()
204 …{ .format = DRM_FORMAT_BGR565_A8, .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .hsub = 1, .vs… in __drm_format_info()
205 …{ .format = DRM_FORMAT_XRGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
206 …{ .format = DRM_FORMAT_XBGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
207 …{ .format = DRM_FORMAT_RGBX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
208 …{ .format = DRM_FORMAT_BGRX1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
209 …{ .format = DRM_FORMAT_ARGB2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
210 …{ .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
211 …{ .format = DRM_FORMAT_RGBA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
212 …{ .format = DRM_FORMAT_BGRA1010102, .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
213 …{ .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
214 …{ .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
215 …{ .format = DRM_FORMAT_RGBA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
216 …{ .format = DRM_FORMAT_BGRA8888, .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
217 …{ .format = DRM_FORMAT_XRGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1,… in __drm_format_info()
218 …{ .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1,… in __drm_format_info()
219 …{ .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1,… in __drm_format_info()
220 …{ .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1,… in __drm_format_info()
221 …{ .format = DRM_FORMAT_AXBXGXRX106106106106, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsu… in __drm_format_info()
222 …{ .format = DRM_FORMAT_XRGB16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, … in __drm_format_info()
223 …{ .format = DRM_FORMAT_XBGR16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, … in __drm_format_info()
224 …{ .format = DRM_FORMAT_ARGB16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, … in __drm_format_info()
225 …{ .format = DRM_FORMAT_ABGR16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, … in __drm_format_info()
226 …{ .format = DRM_FORMAT_RGB888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vs… in __drm_format_info()
227 …{ .format = DRM_FORMAT_BGR888_A8, .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vs… in __drm_format_info()
228 …{ .format = DRM_FORMAT_XRGB8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .… in __drm_format_info()
229 …{ .format = DRM_FORMAT_XBGR8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .… in __drm_format_info()
230 …{ .format = DRM_FORMAT_RGBX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .… in __drm_format_info()
231 …{ .format = DRM_FORMAT_BGRX8888_A8, .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .… in __drm_format_info()
232 …{ .format = DRM_FORMAT_YUV410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub… in __drm_format_info()
233 …{ .format = DRM_FORMAT_YVU410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub… in __drm_format_info()
234 …{ .format = DRM_FORMAT_YUV411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub… in __drm_format_info()
235 …{ .format = DRM_FORMAT_YVU411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub… in __drm_format_info()
236 …{ .format = DRM_FORMAT_YUV420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub… in __drm_format_info()
237 …{ .format = DRM_FORMAT_YVU420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub… in __drm_format_info()
238 …{ .format = DRM_FORMAT_YUV422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub… in __drm_format_info()
239 …{ .format = DRM_FORMAT_YVU422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub… in __drm_format_info()
240 …{ .format = DRM_FORMAT_YUV444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 1, .vsub… in __drm_format_info()
241 …{ .format = DRM_FORMAT_YVU444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 1, .vsub… in __drm_format_info()
242 …{ .format = DRM_FORMAT_NV12, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
243 …{ .format = DRM_FORMAT_NV21, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
244 …{ .format = DRM_FORMAT_NV16, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
245 …{ .format = DRM_FORMAT_NV61, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
246 …{ .format = DRM_FORMAT_NV24, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 1, .vsub =… in __drm_format_info()
247 …{ .format = DRM_FORMAT_NV42, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 1, .vsub =… in __drm_format_info()
248 …{ .format = DRM_FORMAT_YUYV, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
249 …{ .format = DRM_FORMAT_YVYU, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
250 …{ .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
251 …{ .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub =… in __drm_format_info()
252 …{ .format = DRM_FORMAT_XYUV8888, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsu… in __drm_format_info()
253 …{ .format = DRM_FORMAT_VUY888, .depth = 0, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = … in __drm_format_info()
254 …{ .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub =… in __drm_format_info()
255 …{ .format = DRM_FORMAT_Y210, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = … in __drm_format_info()
256 …{ .format = DRM_FORMAT_Y212, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = … in __drm_format_info()
257 …{ .format = DRM_FORMAT_Y216, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = … in __drm_format_info()
258 …{ .format = DRM_FORMAT_Y410, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = … in __drm_format_info()
259 …{ .format = DRM_FORMAT_Y412, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = … in __drm_format_info()
260 …{ .format = DRM_FORMAT_Y416, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = … in __drm_format_info()
261 …{ .format = DRM_FORMAT_XVYU2101010, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .… in __drm_format_info()
262 …{ .format = DRM_FORMAT_XVYU12_16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = … in __drm_format_info()
263 …{ .format = DRM_FORMAT_XVYU16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, … in __drm_format_info()
264 { .format = DRM_FORMAT_Y0L0, .depth = 0, .num_planes = 1, in __drm_format_info()
267 { .format = DRM_FORMAT_X0L0, .depth = 0, .num_planes = 1, in __drm_format_info()
270 { .format = DRM_FORMAT_Y0L2, .depth = 0, .num_planes = 1, in __drm_format_info()
273 { .format = DRM_FORMAT_X0L2, .depth = 0, .num_planes = 1, in __drm_format_info()
276 { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, in __drm_format_info()
279 { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, in __drm_format_info()
282 { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, in __drm_format_info()
285 { .format = DRM_FORMAT_P210, .depth = 0, in __drm_format_info()
289 { .format = DRM_FORMAT_VUY101010, .depth = 0, in __drm_format_info()
292 { .format = DRM_FORMAT_YUV420_8BIT, .depth = 0, in __drm_format_info()
295 { .format = DRM_FORMAT_YUV420_10BIT, .depth = 0, in __drm_format_info()
298 { .format = DRM_FORMAT_NV15, .depth = 0, in __drm_format_info()
302 { .format = DRM_FORMAT_NV20, .depth = 0, in __drm_format_info()
306 { .format = DRM_FORMAT_NV30, .depth = 0, in __drm_format_info()
310 { .format = DRM_FORMAT_Q410, .depth = 0, in __drm_format_info()
314 { .format = DRM_FORMAT_Q401, .depth = 0, in __drm_format_info()
318 { .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2, in __drm_format_info()
326 if (formats[i].format == format) in __drm_format_info()
334 * drm_format_info - query information for a given format
335 * @format: pixel format (DRM_FORMAT_*)
337 * The caller should only pass a supported pixel format to this function.
338 * Unsupported pixel formats will generate a warning in the kernel log.
341 * The instance of struct drm_format_info that describes the pixel format, or
342 * NULL if the format is unsupported.
344 const struct drm_format_info *drm_format_info(u32 format) in drm_format_info() argument
348 info = __drm_format_info(format); in drm_format_info()
355 * drm_get_format_info - query information for a given framebuffer configuration
360 * The instance of struct drm_format_info that describes the pixel format, or
361 * NULL if the format is unsupported.
369 if (dev->mode_config.funcs->get_format_info) in drm_get_format_info()
370 info = dev->mode_config.funcs->get_format_info(mode_cmd); in drm_get_format_info()
373 info = drm_format_info(mode_cmd->pixel_format); in drm_get_format_info()
380 * drm_format_info_block_width - width in pixels of block.
381 * @info: pixel format info
390 if (!info || plane < 0 || plane >= info->num_planes) in drm_format_info_block_width()
393 if (!info->block_w[plane]) in drm_format_info_block_width()
395 return info->block_w[plane]; in drm_format_info_block_width()
400 * drm_format_info_block_height - height in pixels of a block
401 * @info: pixel format info
410 if (!info || plane < 0 || plane >= info->num_planes) in drm_format_info_block_height()
413 if (!info->block_h[plane]) in drm_format_info_block_height()
415 return info->block_h[plane]; in drm_format_info_block_height()
420 * drm_format_info_bpp - number of bits per pixel
421 * @info: pixel format info
425 * The actual number of bits per pixel, depending on the plane index.
429 if (!info || plane < 0 || plane >= info->num_planes) in drm_format_info_bpp()
432 return info->char_per_block[plane] * 8 / in drm_format_info_bpp()
439 * drm_format_info_min_pitch - computes the minimum required pitch in bytes
440 * @info: pixel format info
446 * the pixel format information and the buffer width.
451 if (!info || plane < 0 || plane >= info->num_planes) in drm_format_info_min_pitch()
454 return DIV_ROUND_UP_ULL((u64)buffer_width * info->char_per_block[plane], in drm_format_info_min_pitch()