-
Notifications
You must be signed in to change notification settings - Fork 38
/
i915_private.h
57 lines (42 loc) · 1.9 KB
/
i915_private.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Copyright 2017 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef I915_PRIVATE
#define I915_PRIVATE
#include <stdint.h>
#include "i915_private_types.h"
struct driver;
/*
* 2 plane YCbCr MSB aligned
* index 0 = Y plane, [15:0] Y:x [10:6] little endian
* index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [10:6:10:6] little endian
*/
#ifndef DRM_FORMAT_P010
#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel */
#endif
/*
* 2 plane YCbCr MSB aligned
* index 0 = Y plane, [15:0] Y:x [12:4] little endian
* index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [12:4:12:4] little endian
*/
#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cr:Cb plane 12 bits per channel */
/*
* 2 plane YCbCr MSB aligned
* index 0 = Y plane, [15:0] Y little endian
* index 1 = Cr:Cb plane, [31:0] Cr:Cb [16:16] little endian
*/
#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
/* 64 bpp RGB */
#define DRM_FORMAT_XRGB161616 fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */
#define DRM_FORMAT_XBGR161616 fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */
int i915_private_init(struct driver *drv, uint64_t *cursor_width, uint64_t *cursor_height);
int i915_private_add_combinations(struct driver *drv);
void i915_private_align_dimensions(uint32_t format, uint32_t *vertical_alignment);
uint32_t i915_private_bpp_from_format(uint32_t format, size_t plane);
void i915_private_vertical_subsampling_from_format(uint32_t *vertical_subsampling, uint32_t format,
size_t plane);
size_t i915_private_num_planes_from_format(uint32_t format);
uint32_t i915_private_resolve_format(uint32_t format, uint64_t usage, uint32_t *resolved_format);
#endif