[PATCH 53/77] drm/amd/display: Use DRM provided page flip flag.

Harry Wentland harry.wentland at amd.com
Fri Sep 1 01:20:32 UTC 2017


Patch incoming.

Harry

On 2017-08-31 09:10 PM, andrey wrote:
> 
> 
> On 2017-08-31 08:55 PM, Michel Dänzer wrote:
>> On 01/09/17 03:08 AM, Harry Wentland wrote:
>>> From: Andrey Grodzovsky <Andrey.Grodzovsky at amd.com>
>>>
>>> Starting with 4.12 kernel DRM provides page flip flags so we
>>> don't need to have our own copy.
>>>
>>> Change-Id: I15d8db215001f887c47d16be82df04216f9265c3
>>> Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky at amd.com>
>>> Reviewed-by: Harry Wentland <Harry.Wentland at amd.com>
>>> ---
>>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++-------
>>>   1 file changed, 2 insertions(+), 7 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 e24c44f6720b..2f2592d8e7d5 100644
>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> @@ -3882,7 +3882,7 @@ static void amdgpu_dm_do_flip(
>>>       struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
>>>       struct amdgpu_bo *abo = gem_to_amdgpu_bo(afb->obj);
>>>       struct amdgpu_device *adev = crtc->dev->dev_private;
>>> -    bool async_flip = (acrtc->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC)
>>> != 0;
>>> +    bool async_flip = (crtc->state->pageflip_flags &
>>> DRM_MODE_PAGE_FLIP_ASYNC) != 0;
>>>       struct dc_flip_addrs addr = { {0} };
>>>       /* TODO eliminate or rename surface_update */
>>>       struct dc_surface_update surface_updates[1] = { {0} };
>>> @@ -4014,7 +4014,7 @@ static void amdgpu_dm_commit_planes(struct
>>> drm_atomic_state *state,
>>>                * TODO Check if it's correct
>>>                */
>>>               *wait_for_vblank =
>>> -                acrtc_attach->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC ?
>>> +                    pcrtc->state->pageflip_flags &
>>> DRM_MODE_PAGE_FLIP_ASYNC ?
>>>                   false : true;
>>>                 /* TODO: Needs rework for multiplane flip */
>>> @@ -4025,11 +4025,6 @@ static void amdgpu_dm_commit_planes(struct
>>> drm_atomic_state *state,
>>>                   crtc,
>>>                   fb,
>>>                   drm_crtc_vblank_count(crtc) + *wait_for_vblank);
>>> -
>>> -            /*TODO BUG remove ASAP in 4.12 to avoid race between
>>> worker and flip IOCTL */
>>> -
>>> -            /*clean up the flags for next usage*/
>>> -            acrtc_attach->flip_flags = 0;
>>>           }
>>>         }
>>>
>> Can the acrtc->flip_flags field be removed now? If so, with that,
> 
> It was, I guess we missed that change on our private kernel branch,
> Harry can you please check in emails to see a patch about that
>>
>> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
>>
>>
> 


More information about the amd-gfx mailing list