Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
cf5086d3
Commit
cf5086d3
authored
Feb 24, 2022
by
Thierry Reding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/tegra: Support YVYU, VYUY and YU24 formats
Signed-off-by:
Thierry Reding
<
treding@nvidia.com
>
parent
a649b133
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/tegra/dc.c
+5
-2
drivers/gpu/drm/tegra/dc.h
drivers/gpu/drm/tegra/dc.h
+1
-0
drivers/gpu/drm/tegra/plane.c
drivers/gpu/drm/tegra/plane.c
+21
-0
No files found.
drivers/gpu/drm/tegra/dc.c
View file @
cf5086d3
...
...
@@ -1232,8 +1232,11 @@ static const u32 tegra124_overlay_formats[] = {
/* planar formats */
DRM_FORMAT_UYVY
,
DRM_FORMAT_YUYV
,
DRM_FORMAT_YUV420
,
DRM_FORMAT_YUV422
,
DRM_FORMAT_YVYU
,
DRM_FORMAT_VYUY
,
DRM_FORMAT_YUV420
,
/* YU12 */
DRM_FORMAT_YUV422
,
/* YU16 */
DRM_FORMAT_YUV444
,
/* YU24 */
/* semi-planar formats */
DRM_FORMAT_NV12
,
DRM_FORMAT_NV21
,
...
...
drivers/gpu/drm/tegra/dc.h
View file @
cf5086d3
...
...
@@ -637,6 +637,7 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc);
#define WIN_COLOR_DEPTH_A8B8G8R8 36
#define WIN_COLOR_DEPTH_B8G8R8X8 37
#define WIN_COLOR_DEPTH_R8G8B8X8 38
#define WIN_COLOR_DEPTH_YCbCr444P 41
#define WIN_COLOR_DEPTH_YCrCb420SP 42
#define WIN_COLOR_DEPTH_YCbCr420SP 43
#define WIN_COLOR_DEPTH_YCrCb422SP 44
...
...
drivers/gpu/drm/tegra/plane.c
View file @
cf5086d3
...
...
@@ -413,6 +413,22 @@ int tegra_plane_format(u32 fourcc, u32 *format, u32 *swap)
*
swap
=
BYTE_SWAP_SWAP2
;
break
;
case
DRM_FORMAT_YVYU
:
if
(
!
swap
)
return
-
EINVAL
;
*
format
=
WIN_COLOR_DEPTH_YCbCr422
;
*
swap
=
BYTE_SWAP_SWAP4
;
break
;
case
DRM_FORMAT_VYUY
:
if
(
!
swap
)
return
-
EINVAL
;
*
format
=
WIN_COLOR_DEPTH_YCbCr422
;
*
swap
=
BYTE_SWAP_SWAP4HW
;
break
;
case
DRM_FORMAT_YUV420
:
*
format
=
WIN_COLOR_DEPTH_YCbCr420P
;
break
;
...
...
@@ -421,6 +437,10 @@ int tegra_plane_format(u32 fourcc, u32 *format, u32 *swap)
*
format
=
WIN_COLOR_DEPTH_YCbCr422P
;
break
;
case
DRM_FORMAT_YUV444
:
*
format
=
WIN_COLOR_DEPTH_YCbCr444P
;
break
;
case
DRM_FORMAT_NV12
:
*
format
=
WIN_COLOR_DEPTH_YCbCr420SP
;
break
;
...
...
@@ -486,6 +506,7 @@ bool tegra_plane_format_is_yuv(unsigned int format, unsigned int *planes, unsign
case
WIN_COLOR_DEPTH_YUV422R
:
case
WIN_COLOR_DEPTH_YCbCr422RA
:
case
WIN_COLOR_DEPTH_YUV422RA
:
case
WIN_COLOR_DEPTH_YCbCr444P
:
if
(
planes
)
*
planes
=
3
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment