This is taken care inside fimd and mixer with the clearing windows in dpms off patch itself.<div><br></div><div>I've added a check inside win_disable function (for both fimd/mixer) where we set the 'resume' flag to zero and return.</div>
<div><br></div><div>So the "<span style="font-family:arial,sans-serif;font-size:13px">drm/exynos: do not disable crtc if already off" patch is not required.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Regards,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Prathyush</span></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Dec 7, 2012 at 9:43 AM, Inki Dae <span dir="ltr"><<a href="mailto:inki.dae@samsung.com" target="_blank">inki.dae@samsung.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div><div class="h5">2012/12/6 Prathyush K <span dir="ltr"><<a href="mailto:prathyush.k@samsung.com" target="_blank">prathyush.k@samsung.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This patchset fixes the various issues which result in getting a PAGE FAULT<br>
while using fimd and hdmi in exynos drm.<br>
<br>
Changelog v2:<br>
Seperated patches into drm framework and fimd/mixer patches.<br>
Not using patch drm/exynos: do not disable crtc if already off<br>
Added two new patches for clearing windows during dpms off<br>
<br>
Patch 1: make wait_for_vblank a manager op<br>
Patch 2: move hdmi's wait_for_vblank to manager_ops<br>
Patch 3: move fimd wait_for_vblank to manager_ops<br>
Currently, we do not call wait for vblank if encoder is in DPMS_OFF<br>
state inside exynos_drm_encoder_complete_scanout function. This is<br>
because wait for vblank is treated as an overlay op. This can be<br>
modified to a manager_op thus removing the above check for DPMS_OFF.<br>
This ensures that the hardware overlay actually gets disabled while<br>
removing the current framebuffer.<br>
<br>
Patch 4: modify wait_for_vblank of mixer<br>
Patch 5: modify wait_for_vblank of fimd<br>
This modifies the wait_for_vblank functions to use wait queues<br>
thus ensuring that the current task goes to sleep without taking<br>
up CPU while waiting. Also, if crtc is off, then it returns<br>
without waiting.<br>
<br>
Patch 6: clear windows in mixer dpms off<br>
Patch 7: clear windows in fimd dpms off<br>
When a crtc is turned off, we disable the clocks which will stop<br>
the dma. Now if we remove the current framebuffer, we cannot<br>
disable the overlay but the current framebuffer will still be freed.<br>
When fimd/mixer resumes, the dma will continue from where it left off<br>
and will throw a PAGE FAULT since the memory was freed.<br>
This can be fixed by disabling the windows before disabling the clocks.<br>
We should also keep track of which windows were active. This is done by setting<br>
the resume flag in the window properties.<br>
Now if a current fb is removed when the crtc is off, win_disable<br>
will set the 'resume' flag of that window to zero and return.<br>
So when fimd/mixer resumes, that window will not be resumed.<br></blockquote></div></div><div><br>And "drm/exynos: do not disable crtc if already off"? otherwise isn't there any problem without this patch?<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Prathyush K (7):<br>
drm/exynos: make wait_for_vblank a manager op<br>
drm/exynos: move hdmi's wait_for_vblank to manager_ops<br>
drm/exynos: move fimd wait_for_vblank to manager_ops<br>
drm/exynos: modify wait_for_vblank of mixer<br>
drm/exynos: modify wait_for_vblank of fimd<br>
drm/exynos: clear windows in mixer dpms off<br>
drm/exynos: clear windows in fimd dpms off<br>
<br>
drivers/gpu/drm/exynos/exynos_drm_drv.h | 6 +-<br>
drivers/gpu/drm/exynos/exynos_drm_encoder.c | 15 +--<br>
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 81 ++++++++--<br>
drivers/gpu/drm/exynos/exynos_drm_hdmi.c | 22 ++--<br>
drivers/gpu/drm/exynos/exynos_drm_hdmi.h | 2 +-<br>
drivers/gpu/drm/exynos/exynos_mixer.c | 240 +++++++++++++++++----------<br>
6 files changed, 239 insertions(+), 127 deletions(-)<br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</blockquote></div></div><br>
<br>_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
<br></blockquote></div><br></div>