From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: kernel@pengutronix.de, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm_modes: calculate nominal vrefresh in drm_display_mode_from_videomode
Date: Thu, 3 Dec 2015 11:22:50 +0100 [thread overview]
Message-ID: <20151203102250.GA22213@ulmo.nvidia.com> (raw)
In-Reply-To: <20151203095007.GO10243@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 1276 bytes --]
On Thu, Dec 03, 2015 at 10:50:07AM +0100, Daniel Vetter wrote:
> On Thu, Dec 03, 2015 at 09:55:44AM +0100, Philipp Zabel wrote:
> > Use drm_mode_vrefresh to update the vrefresh field after changing the
> > modes' timings and flags.
> >
> > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> > ---
> > drivers/gpu/drm/drm_modes.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > index cd74a09..b624be8 100644
> > --- a/drivers/gpu/drm/drm_modes.c
> > +++ b/drivers/gpu/drm/drm_modes.c
> > @@ -611,6 +611,8 @@ void drm_display_mode_from_videomode(const struct videomode *vm,
> > dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
> > if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
> > dmode->flags |= DRM_MODE_FLAG_DBLCLK;
> > + dmode->vrefresh = 0;
>
> Rendundant. Or I'm blind.
Unfortunately it isn't. drm_mode_vrefresh() is somewhat odd in that
it'll return the existing mode->vrefresh if it is > 0. I'm thinking that
perhaps it'd be useful to factor out the computation code into a
separate function, say drm_mode_calc_vrefresh(), and use that where you
really want to compute the value and at the same time use it to simplify
drm_mode_vrefresh() as well.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-12-03 10:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 8:55 [PATCH] drm_modes: calculate nominal vrefresh in drm_display_mode_from_videomode Philipp Zabel
2015-12-03 9:50 ` Daniel Vetter
2015-12-03 10:22 ` Thierry Reding [this message]
2015-12-03 11:09 ` Philipp Zabel
2015-12-04 7:57 ` Daniel Vetter
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=20151203102250.GA22213@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.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