Skip to content

Commit

Permalink
drm/sun4i: frontend: Add support for the BGRX8888 output format
Browse files Browse the repository at this point in the history
This introduces support for the BGRX8888 output format for the frontend,
with its associated output format value definition.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-23-paul.kocialkowski@bootlin.com
  • Loading branch information
Paul Kocialkowski authored and Maxime Ripard committed Nov 27, 2018
1 parent 31cf282 commit b36d958
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/sun4i/sun4i_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ static int sun4i_frontend_drm_format_to_input_sequence(uint32_t fmt, u32 *val)
static int sun4i_frontend_drm_format_to_output_fmt(uint32_t fmt, u32 *val)
{
switch (fmt) {
case DRM_FORMAT_BGRX8888:
*val = SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888;
return 0;

case DRM_FORMAT_XRGB8888:
*val = SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888;
return 0;
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/sun4i/sun4i_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define SUN4I_FRONTEND_INPUT_FMT_DATA_PS_XRGB 1

#define SUN4I_FRONTEND_OUTPUT_FMT_REG 0x05c
#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888 1
#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888 2

#define SUN4I_FRONTEND_CH0_INSIZE_REG 0x100
Expand Down

0 comments on commit b36d958

Please sign in to comment.