[PATCH v2 0/7] drm/exynos: modify wait_for_vblank and clear windows in dpms off

Prathyush K prathyush at chromium.org
Thu Dec 6 22:42:47 PST 2012


This is taken care inside fimd and mixer with the clearing windows in dpms
off patch itself.

I've added a check inside win_disable function (for both fimd/mixer) where
we set the 'resume' flag to zero and return.

So the "drm/exynos: do not disable crtc if already off" patch is not
required.

Regards,
Prathyush


On Fri, Dec 7, 2012 at 9:43 AM, Inki Dae <inki.dae at samsung.com> wrote:

>
>
> 2012/12/6 Prathyush K <prathyush.k at samsung.com>
>
>> This patchset fixes the various issues which result in getting a PAGE
>> FAULT
>> while using fimd and hdmi in exynos drm.
>>
>> Changelog v2:
>> Seperated patches into drm framework and fimd/mixer patches.
>> Not using patch drm/exynos: do not disable crtc if already off
>> Added two new patches for clearing windows during dpms off
>>
>> Patch 1: make wait_for_vblank a manager op
>> Patch 2: move hdmi's wait_for_vblank to manager_ops
>> Patch 3: move fimd wait_for_vblank to manager_ops
>> Currently, we do not call wait for vblank if encoder is in DPMS_OFF
>> state inside exynos_drm_encoder_complete_scanout function. This is
>> because wait for vblank is treated as an overlay op. This can be
>> modified to a manager_op thus removing the above check for DPMS_OFF.
>> This ensures that the hardware overlay actually gets disabled while
>> removing the current framebuffer.
>>
>> Patch 4: modify wait_for_vblank of mixer
>> Patch 5: modify wait_for_vblank of fimd
>> This modifies the wait_for_vblank functions to use wait queues
>> thus ensuring that the current task goes to sleep without taking
>> up CPU while waiting. Also, if crtc is off, then it returns
>> without waiting.
>>
>> Patch 6: clear windows in mixer dpms off
>> Patch 7: clear windows in fimd dpms off
>> When a crtc is turned off, we disable the clocks which will stop
>> the dma. Now if we remove the current framebuffer, we cannot
>> disable the overlay but the current framebuffer will still be freed.
>> When fimd/mixer resumes, the dma will continue from where it left off
>> and will throw a PAGE FAULT since the memory was freed.
>> This can be fixed by disabling the windows before disabling the clocks.
>> We should also keep track of which windows were active. This is done by
>> setting
>> the resume flag in the window properties.
>> Now if a current fb is removed when the crtc is off, win_disable
>> will set the 'resume' flag of that window to zero and return.
>> So when fimd/mixer resumes, that window will not be resumed.
>>
>
> And "drm/exynos: do not disable crtc if already off"? otherwise isn't
> there any problem without this patch?
>
>
>>
>> Prathyush K (7):
>>   drm/exynos: make wait_for_vblank a manager op
>>   drm/exynos: move hdmi's wait_for_vblank to manager_ops
>>   drm/exynos: move fimd wait_for_vblank to manager_ops
>>   drm/exynos: modify wait_for_vblank of mixer
>>   drm/exynos: modify wait_for_vblank of fimd
>>   drm/exynos: clear windows in mixer dpms off
>>   drm/exynos: clear windows in fimd dpms off
>>
>>  drivers/gpu/drm/exynos/exynos_drm_drv.h     |    6 +-
>>  drivers/gpu/drm/exynos/exynos_drm_encoder.c |   15 +--
>>  drivers/gpu/drm/exynos/exynos_drm_fimd.c    |   81 ++++++++--
>>  drivers/gpu/drm/exynos/exynos_drm_hdmi.c    |   22 ++--
>>  drivers/gpu/drm/exynos/exynos_drm_hdmi.h    |    2 +-
>>  drivers/gpu/drm/exynos/exynos_mixer.c       |  240
>> +++++++++++++++++----------
>>  6 files changed, 239 insertions(+), 127 deletions(-)
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20121207/42b711a5/attachment.html>


More information about the dri-devel mailing list