drm/exynos: make overlay data to be updated to valid hw
Subsystems (3)
Inki Dae
maintainerThis patch makes sure that overlay data are updated to real hardware enabled when framebuffer is released. For this, this patch checks if crtc and encoder are valid or not, and then makes it waiting for signal synchroniztion to only valid encoder.
--- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 9 ++++++--- drivers/gpu/drm/exynos/exynos_drm_encoder.h | 2 +- drivers/gpu/drm/exynos/exynos_drm_fb.c | 13 +++++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_encoder.c +6 -3
@@ -220,18 +220,21 @@ static void exynos_drm_encoder_commit(struct drm_encoder *encoder) exynos_encoder->dpms =DRM_MODE_DPMS_ON ; } -void exynos_drm_encoder_complete_scanout (struct drm_framebuffer *fb) +void exynos_drm_encoder_complete_scanout (struct drm_crtc *crtc) {struct exynos_drm_encoder *exynos_encoder;struct exynos_drm_manager_ops *ops; -struct drm_device *dev = fb->dev; +struct drm_device *dev = crtc->dev;struct drm_encoder *encoder;/* * make sure that overlay data are updated to real hardware -* for all encoders. +* for valid encoders. */ list_for_each_entry (encoder, &dev->mode_config.encoder_list, head) { +if (encoder->crtc != crtc) +continue ; + exynos_encoder =to_exynos_encoder (encoder); ops = exynos_encoder->manager->ops;
drivers/gpu/drm/exynos/exynos_drm_encoder.h +1 -1
@@ -32,6 +32,6 @@ void exynos_drm_encoder_plane_mode_set(struct drm_encoder *encoder, void *data);void exynos_drm_encoder_plane_commit (struct drm_encoder *encoder,void *data);void exynos_drm_encoder_plane_enable (struct drm_encoder *encoder,void *data);void exynos_drm_encoder_plane_disable (struct drm_encoder *encoder,void *data); -void exynos_drm_encoder_complete_scanout (struct drm_framebuffer *fb); +void exynos_drm_encoder_complete_scanout (struct drm_crtc *crtc);#endif
drivers/gpu/drm/exynos/exynos_drm_fb.c +11 -2
@@ -68,12 +68,21 @@ static int check_fb_gem_memory_type(struct drm_device *drm_dev,static void exynos_drm_fb_destroy (struct drm_framebuffer *fb) {struct exynos_drm_fb *exynos_fb =to_exynos_fb (fb); +struct drm_device *dev = fb->dev; +struct drm_crtc *crtc;unsigned int i;DRM_DEBUG_KMS ("%s\n" , __FILE__); -/* make sure that overlay data are updated before relesing fb. */ -exynos_drm_encoder_complete_scanout (fb); +list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { +if (crtc->fb == fb) { +/* +* make sure that overlay data are updated before +* relesing fb. +*/ +exynos_drm_encoder_complete_scanout (crtc); + } + }drm_framebuffer_cleanup (fb);
Signature · 1 line
1.7.5.4
Inki Dae
maintainer2013/5/28 Inki Dae <[email protected]>
Quoted 74 lines
This patch makes sure that overlay data are updated to real hardware enabled when framebuffer is released. For this, this patch checks if crtc and encoder are valid or not, and then makes it waiting for signal synchroniztion to only valid encoder.
Signed-off-by Inki Dae <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 9 ++++++--- drivers/gpu/drm/exynos/exynos_drm_encoder.h | 2 +- drivers/gpu/drm/exynos/exynos_drm_fb.c | 13 +++++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-)drivers/gpu/drm/exynos/exynos_drm_encoder.c +6
-3@@ -220,18 +220,21 @@ static void exynos_drm_encoder_commit(struct drm_encoder *encoder) exynos_encoder->dpms = DRM_MODE_DPMS_ON; } -void exynos_drm_encoder_complete_scanout (struct drm_framebuffer *fb) +void exynos_drm_encoder_complete_scanout (struct drm_crtc *crtc) {struct exynos_drm_encoder *exynos_encoder;struct exynos_drm_manager_ops *ops; -struct drm_device *dev = fb->dev; +struct drm_device *dev = crtc->dev;struct drm_encoder *encoder;/* * make sure that overlay data are updated to real hardware -* for all encoders. +* for valid encoders. */ list_for_each_entry (encoder, &dev->mode_config.encoder_list, head) { +if (encoder->crtc != crtc) +continue ; + exynos_encoder =to_exynos_encoder (encoder);ops = exynos_encoder->manager->ops;drivers/gpu/drm/exynos/exynos_drm_encoder.h +0
-0@@ -32,6 +32,6 @@ void exynos_drm_encoder_plane_mode_set(struct drm_encoder *encoder, void *data);void exynos_drm_encoder_plane_commit (struct drm_encoder *encoder,void *data);void exynos_drm_encoder_plane_enable (struct drm_encoder *encoder,void *data); void exynos_drm_encoder_plane_disable(struct drm_encoder *encoder, void*data);
drivers/gpu/drm/exynos/exynos_drm_encoder.h +1
-1-void exynos_drm_encoder_complete_scanout (struct drm_framebuffer *fb); +void exynos_drm_encoder_complete_scanout (struct drm_crtc *crtc);#endif drivers/gpu/drm/exynos/exynos_drm_fb.c +1
-0@@ -68,12 +68,21 @@ static int check_fb_gem_memory_type(struct drm_device *drm_dev, static void exynos_drm_fb_destroy(struct drm_framebuffer *fb) {struct exynos_drm_fb *exynos_fb =to_exynos_fb (fb); +struct drm_device *dev = fb->dev;
drivers/gpu/drm/exynos/exynos_drm_fb.c static int check_fb_gem_memory_type(struct drm_device · line 80
Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_fb.c +3
-2+struct drm_crtc *crtc;unsigned int i;DRM_DEBUG_KMS ("%s\n" , __FILE__); -/* make sure that overlay data are updated before relesing fb. */ -exynos_drm_encoder_complete_scanout (fb); +list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { +if (crtc->fb == fb) {
Sorry, crtc->fb could be new fb so in this case, this condition will always be failed. This patch will be posted again after fixed.
Thanks,
Inki Dae
+ /*
Quoted 12 lines
drivers/gpu/drm/exynos/exynos_drm_fb.c +6
-1+* make sure that overlay data are updated before +* relesing fb. +*/ +exynos_drm_encoder_complete_scanout (crtc); + } + }drm_framebuffer_cleanup (fb); --1.7.5.4
Quoted 5 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel