From: Gustavo Padovan <gustavo@padovan.org>
To: Daniel Stone <daniel@fooishbar.org>
Cc: linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH 1/2] drm/exynos: calculate vrefresh instead of use a fixed value
Date: Wed, 20 May 2015 15:46:44 -0300 [thread overview]
Message-ID: <20150520184644.GA4438@joana> (raw)
In-Reply-To: <CAPj87rOTp48jTi=67Zt3nyOyiqtiV7f-pueqNBrC6RVnB9r59Q@mail.gmail.com>
Hi,
2015-05-20 Daniel Stone <daniel@fooishbar.org>:
> Hi,
>
> On 20 May 2015 at 17:58, Tobias Jakobi <tjakobi@math.uni-bielefeld.de> wrote:
> > On 2015-05-20 16:33, Gustavo Padovan wrote:
> >> 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)
> >
> > Well, I'm not completly sure how this all works, but shouldn't we check
> > 'mode' here, and not 'adjusted_mode'?
>
> adjusted_mode is fine; it is pre-populated with the value from mode.
> 'mode' itself _must not_ be modified.
>
> Mind you, this is missing a hunk to reject entirely invalid modes, i.e.:
> if (adjusted_mode->vrefresh == 0)
> adjusted_mode->vrefresh = drm_mode_vrefresh(adjusted_mode);
> if (adjusted_mode->vrefresh == 0)
> return false;
I have sent a v2 with the proposed change. I can't really test this here
as I don't have the hardware where it fails. So in v1 I was just
guessing that it would fix the issue.
Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-05-20 18:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-06-18 20:50 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=20150520184644.GA4438@joana \
--to=gustavo@padovan.org \
--cc=daniel@fooishbar.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox