Skip to content

Commit

Permalink
[WIP] drm/starfive: Support DRM_FORMAT_XRGB8888
Browse files Browse the repository at this point in the history
When creating dumb buffers with 32bpp and 24bit colour depth this is
default mode return by drm_mode_legacy_fb_format. So we need to support
this for common dumb buffers to just work.

Signed-off-by: Emil Renner Berthing <[email protected]>
  • Loading branch information
esmil committed Dec 27, 2021
1 parent 99a0ff5 commit dab9495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/starfive/starfive_drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static int ddrfmt_to_ppfmt(struct starfive_crtc *sf_crtc)
case DRM_FORMAT_NV12:
sf_crtc->vpp_format = COLOR_YUV420_NV12;
break;
case DRM_FORMAT_XRGB8888:
case DRM_FORMAT_ARGB8888:
sf_crtc->vpp_format = COLOR_RGB888_ARGB;
break;
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/starfive/starfive_drm_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ static const u32 formats[] = {
DRM_FORMAT_NV21,
DRM_FORMAT_NV12,

DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
DRM_FORMAT_ABGR8888,
};
Expand Down

0 comments on commit dab9495

Please sign in to comment.