All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/exynos: calculate vrefresh instead of use a fixed value
@ 2015-05-20 14:33 Gustavo Padovan
  2015-05-20 14:33 ` [PATCH 2/2] drm/exynos: WARN_ON if ideal_clk is zero Gustavo Padovan
  2015-05-20 16:58 ` [PATCH 1/2] drm/exynos: calculate vrefresh instead of use a fixed value Tobias Jakobi
  0 siblings, 2 replies; 10+ messages in thread
From: Gustavo Padovan @ 2015-05-20 14:33 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: dri-devel, inki.dae, jy0922.shim, daniel, tjakobi,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

When mode's vrefresh is zero we should ask DRM core to calculate vrefresh
for us so we can get the correct value instead of relying on fixed value
defined in a macro.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9819fa6..08f7197 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -42,7 +42,6 @@
  * CPU Interface.
  */
 
-#define FIMD_DEFAULT_FRAMERATE 60
 #define MIN_FB_WIDTH_FOR_16WORD_BURST 128
 
 /* position control register for hardware window 0, 2 ~ 4.*/
@@ -329,7 +328,7 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc,
 		struct drm_display_mode *adjusted_mode)
 {
 	if (adjusted_mode->vrefresh == 0)
-		adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
+		adjusted_mode->vrefresh = drm_mode_vrefresh(mode);
 
 	return true;
 }
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH 1/2] drm/exynos: calculate vrefresh instead of use a fixed value
@ 2015-06-18 20:50 Gustavo Padovan
  0 siblings, 0 replies; 10+ messages in thread
From: Gustavo Padovan @ 2015-06-18 20:50 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: dri-devel, inki.dae, jy0922.shim, tjakobi, Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

When mode's vrefresh is zero we should ask DRM core to calculate vrefresh
for us so we can get the correct value instead of relying on fixed value
defined in a macro. But if vrefresh is still zero we should fail the
update.

Suggested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 1e3bb72..7ba348e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -41,7 +41,6 @@
  * CPU Interface.
  */
 
-#define FIMD_DEFAULT_FRAMERATE 60
 #define MIN_FB_WIDTH_FOR_16WORD_BURST 128
 
 /* position control register for hardware window 0, 2 ~ 4.*/
@@ -403,7 +402,9 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc,
 		struct drm_display_mode *adjusted_mode)
 {
 	if (adjusted_mode->vrefresh == 0)
-		adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
+		adjusted_mode->vrefresh = drm_mode_vrefresh(mode);
+	if (adjusted_mode->vrefresh == 0)
+		return false;
 
 	return true;
 }
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-18 20:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 14:33 [PATCH 1/2] drm/exynos: calculate vrefresh instead of use a fixed value Gustavo Padovan
2015-05-20 14:33 ` [PATCH 2/2] drm/exynos: WARN_ON if ideal_clk is zero Gustavo Padovan
2015-05-20 16:04   ` Tobias Jakobi
2015-05-20 16:14     ` Daniel Stone
2015-05-20 16:31       ` Tobias Jakobi
2015-05-20 17:14         ` Daniel Stone
2015-05-20 16:58 ` [PATCH 1/2] drm/exynos: calculate vrefresh instead of use a fixed value Tobias Jakobi
2015-05-20 17:16   ` Daniel Stone
2015-05-20 18:46     ` Gustavo Padovan
  -- strict thread matches above, loose matches on Subject: below --
2015-06-18 20:50 Gustavo Padovan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.