diff options
author | Stylon Wang <stylon.wang@amd.com> | 2020-04-21 20:47:41 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-05-05 13:11:42 -0400 |
commit | 492548dcb045e1bd3a7424fb75a8fbe7dbd09ec4 (patch) | |
tree | 669f25b62f42f1df268bffd155d07ee798b961a3 | |
parent | b130cc4eec04d2cedf1af9e630530859c8a60d7c (diff) | |
download | linux-stable-492548dcb045e1bd3a7424fb75a8fbe7dbd09ec4.tar.gz linux-stable-492548dcb045e1bd3a7424fb75a8fbe7dbd09ec4.tar.bz2 linux-stable-492548dcb045e1bd3a7424fb75a8fbe7dbd09ec4.zip |
drm/amd/display: Support FP16 pixel format
[Why]
FP16 pixel format is not declared to DRM in Linux DM.
[How]
Add FP16 format to the support list presented to DRM from Linux DM.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 6c314dbd4b75..c332e858ea4a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3660,6 +3660,10 @@ fill_dc_plane_info_and_addr(struct amdgpu_device *adev, case DRM_FORMAT_P010: plane_info->format = SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb; break; + case DRM_FORMAT_XRGB16161616F: + case DRM_FORMAT_ARGB16161616F: + plane_info->format = SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F; + break; default: DRM_ERROR( "Unsupported screen format %s\n", @@ -5576,6 +5580,10 @@ static int get_plane_formats(const struct drm_plane *plane, formats[num_formats++] = DRM_FORMAT_NV12; if (plane_cap && plane_cap->pixel_format_support.p010) formats[num_formats++] = DRM_FORMAT_P010; + if (plane_cap && plane_cap->pixel_format_support.fp16) { + formats[num_formats++] = DRM_FORMAT_XRGB16161616F; + formats[num_formats++] = DRM_FORMAT_ARGB16161616F; + } break; case DRM_PLANE_TYPE_OVERLAY: |