diff options
author | Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> | 2020-11-11 03:48:39 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-11-13 17:29:47 -0500 |
commit | 816853f9dc4057b6c7ee3c45ca9bd5905649092e (patch) | |
tree | 80e512fe6f088cf51aeef87a308f34b4e3777f43 /drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | |
parent | 3505b2ff53cdb5bda3d28bc21867deb7f78cdc96 (diff) |
drm/amd/display: Set new format info for converted metadata.
If we use DCC modifiers this can increase the number of planes from
the initial 1 plane with metadata, so that we get a valid modifier
from getfb2.
Since the code didn't update the format_info getfb2 would only ever
return 1 plane with a modifier for which userspace expects > 1.
This moves the format lookup to amdgpu_display.c so we do not have
issues when DC is not compiled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.h index 3620b24785e1..dc7b7d116549 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.h @@ -44,5 +44,7 @@ struct drm_framebuffer * amdgpu_display_user_framebuffer_create(struct drm_device *dev, struct drm_file *file_priv, const struct drm_mode_fb_cmd2 *mode_cmd); +const struct drm_format_info * +amdgpu_lookup_format_info(u32 format, uint64_t modifier); #endif |