All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: linux-samsung-soc@vger.kernel.org
Cc: tjakobi@math.uni-bielefeld.de,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH v2 02/23] drm/exynos: calculate vrefresh instead of use a fixed value
Date: Mon,  6 Jul 2015 11:20:03 -0300	[thread overview]
Message-ID: <1436192424-18194-3-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1436192424-18194-1-git-send-email-gustavo@padovan.org>

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.

v2: fix comment by Joonyoung
	- assign vrefresh directly without checking for zero

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 794e56c..51b6a27 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.*/
@@ -379,8 +378,9 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc,
 		const struct drm_display_mode *mode,
 		struct drm_display_mode *adjusted_mode)
 {
+	adjusted_mode->vrefresh = drm_mode_vrefresh(mode);
 	if (adjusted_mode->vrefresh == 0)
-		adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
+		return false;
 
 	return true;
 }
-- 
2.1.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-07-06 14:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 14:20 [PATCH v2 00/23] drm/exynos: atomic improvements + exynos_encoder removal Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 01/23] drm/exynos: pass the correct pipe number Gustavo Padovan
2015-07-06 14:20 ` Gustavo Padovan [this message]
2015-07-06 14:20 ` [PATCH v2 03/23] drm/exynos: use KMS version of DRM vblanks functions Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 04/23] drm/exynos: remove duplicated check for suspend Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 05/23] drm/exynos: add atomic asynchronous commit Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 06/23] drm/exynos: rename win_commit/disable to atomic-like names Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 07/23] drm/exynos: pass struct exynos_drm_plane in update/enable Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 08/23] drm/exynos: use drm atomic state directly Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 09/23] drm/exynos: remove unused fields from struct exynos_drm_plane Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 10/23] drm/exynos: unify exynos_drm_plane names with drm core Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 11/23] drm/exynos: return return value of exynos_crtc->enable_vblank Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 12/23] drm/exynos: don't track enabled state at exynos_crtc Gustavo Padovan
2015-07-06 17:41   ` Daniel Vetter
2015-07-09  8:09     ` Joonyoung Shim
2015-07-09 22:56       ` Gustavo Padovan
2015-07-10  0:47         ` Joonyoung Shim
2015-07-06 14:20 ` [PATCH v2 13/23] drm/exynos: split display's .dpms() into .enable() and .disable() Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 14/23] drm/exynos: remove wrappers for phy_power_{on,off} Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 15/23] drm/exynos: remove unused .remove() and .check_mode() ops from display Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 16/23] drm/exynos: simplify calculation of possible CRTCs Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 17/23] drm/exynos: remove struct exynos_drm_display Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 18/23] drm/exynos: remove extra call to hdmi_commit() Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 19/23] drm/exynos: remove extra call to exynos_dp_commit() Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 20/23] drm/exynos: remove exynos_encoder's .commit() op Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 21/23] drm/exynos: remove exynos_drm_create_enc_conn() Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 22/23] drm/exynos: fold encoder setup into exynos_drm_load() Gustavo Padovan
2015-07-06 14:20 ` [PATCH v2 23/23] drm/exynos: remove struct exynos_drm_encoder layer Gustavo Padovan
2015-07-14  7:34 ` [PATCH v2 00/23] drm/exynos: atomic improvements + exynos_encoder removal Joonyoung Shim
2015-07-16 15:26   ` Gustavo Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436192424-18194-3-git-send-email-gustavo@padovan.org \
    --to=gustavo@padovan.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tjakobi@math.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.