public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH] drm_fb_helper: fix regression in pixclock check
Date: Fri, 18 Dec 2009 08:20:39 +0100	[thread overview]
Message-ID: <4B2B2D47.8050700@ladisch.de> (raw)
In-Reply-To: <1261092303-4570-1-git-send-email-jason.wessel@windriver.com>

Jason Wessel wrote:
> Commit 5349ef3127c77075ff70b2014f17ae0fbcaaf199 changed pixclock to be
> initialized to zero instead of -1.

Zero meaning "there is no pixel clock value".  When I wrote the patch,
the FB (helper) code did not use this value at all, so zero was the only
value that could possibly be used.

> The validation routine always returns -EINVAL for a valid pixclock

It declares that the only valid pixclock value is "none".  This was
required to make the userspace API work, since the GET ioctls return
this value, and all programs expect to be able to PUT this value back.

> which prevents atomic kernel mode setting from working correctly.
> ...
> @@ -602,7 +602,7 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
>  
> -	if (var->pixclock != 0)
> +	if (!var->pixclock)
>  		return -EINVAL;

This change breaks the userspace API again, unless the other parts of
the code have been changed to always return a valid pixclock value when
reading the current mode settings.

If we want to accept both zero and non-zero values for pixclock, this
check should be dropped altogether.

In drm_fb_helper_set_par(), there is a corresponding check that must be
kept in sync with this one.


Best regards,
Clemens

  reply	other threads:[~2009-12-18  7:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17 23:25 [PATCH] drm_fb_helper: fix regression in pixclock check Jason Wessel
2009-12-18  7:20 ` Clemens Ladisch [this message]
2009-12-23 19:04   ` Jason Wessel

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=4B2B2D47.8050700@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=airlied@linux.ie \
    --cc=jason.wessel@windriver.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    /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