[PATCH] drm/amd/display: Fix external display detection with overlay
Harry Wentland
harry.wentland at amd.com
Thu Oct 1 13:49:31 UTC 2020
On 2020-10-01 9:06 a.m., Kazlauskas, Nicholas wrote:
> On 2020-10-01 5:06 a.m., Pratik Vishwakarma wrote:
>> [Why]
>> When overlay plane is in use and external display
>> is connected, atomic check will fail.
>>
>> [How]
>> Disable overlay plane on multi-monitor scenario
>> by tying it to single crtc.
>>
>> Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma at amd.com>
>
> This will break overlay usage on any other CRTC other than index 1. That
> index is arbitrary and can vary based on board configuration. As-is this
> patch breaks a number of our existing IGT tests that were previously
> passing.
>
> Userspace should really be made aware if possible to understand that
> overlays can't be left enabled after major hardware configurations - eg.
> enabling extra planes and CRTCs.
>
To elaborate a bit further on this, I suggest userspace first disables
any overlay before enabling new crtcs. It may then try to re-enable the
overlay afterwards (if atomic_check allows it at that point).
Harry
> Regards,
> Nicholas Kazlauskas
>
>> ---
>> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> 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 e8177656e083..e45c1176048a 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -3149,7 +3149,7 @@ static int initialize_plane(struct
>> amdgpu_display_manager *dm,
>> */
>> possible_crtcs = 1 << plane_id;
>> if (plane_id >= dm->dc->caps.max_streams)
>> - possible_crtcs = 0xff;
>> + possible_crtcs = 0x01;
>> ret = amdgpu_dm_plane_init(dm, plane, possible_crtcs, plane_cap);
>>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CHARRY.WENTLAND%40amd.com%7Cc140f86a8edc48fab35a08d8660b999b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637371547300674341&sdata=Q%2FGpKbjXKprDVYFqyuN62URgfLzvlG1TMiplLwqbuoA%3D&reserved=0
>
More information about the amd-gfx
mailing list