drm/amd/display: Set new format info for converted metadata.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 11 Nov 2020 02:48:39 +0000 (03:48 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Nov 2020 22:29:47 +0000 (17:29 -0500)
commit816853f9dc4057b6c7ee3c45ca9bd5905649092e
tree80e512fe6f088cf51aeef87a308f34b4e3777f43
parent3505b2ff53cdb5bda3d28bc21867deb7f78cdc96
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
drivers/gpu/drm/amd/amdgpu/amdgpu_display.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c