public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	<dri-devel@lists.freedesktop.org>
Cc: David Airlie <airlied@linux.ie>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm: panel: simple-panel: set appropriate mode type
Date: Thu, 30 Apr 2015 16:46:47 +0200	[thread overview]
Message-ID: <55424057.60707@atmel.com> (raw)
In-Reply-To: <1430404770-29704-1-git-send-email-boris.brezillon@free-electrons.com>

Le 30/04/2015 16:39, Boris Brezillon a écrit :
> All modes exposed by simple panels should be tagged as driver defined
> modes.
> Moreover, if a panel supports only one mode, this mode is obviously the
> preferred one.
> 
> Doing this also fix a problem occurring when a 'video=' parameter is passed
> on the kernel cmdline. In some cases the user provided mode is preferred
> over the simple panel ones, which might result in unpredictable behavior.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
On Atmel sama5d3xek board.

> ---
>  drivers/gpu/drm/panel/panel-simple.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index d14b904..95ae390 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -111,6 +111,10 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
>  			continue;
>  		}
>  
> +		mode->type |= DRM_MODE_TYPE_DRIVER;
> +		if (panel->desc->num_modes == 1)
> +			mode->type |= DRM_MODE_TYPE_PREFERRED;
> +
>  		drm_display_mode_from_videomode(&vm, mode);
>  
>  		drm_mode_probed_add(connector, mode);
> @@ -127,6 +131,10 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
>  			continue;
>  		}
>  
> +		mode->type |= DRM_MODE_TYPE_DRIVER;
> +		if (panel->desc->num_modes == 1)
> +			mode->type |= DRM_MODE_TYPE_PREFERRED;
> +
>  		drm_mode_set_name(mode);
>  
>  		drm_mode_probed_add(connector, mode);
> 


-- 
Nicolas Ferre

  reply	other threads:[~2015-04-30 14:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 14:39 [PATCH] drm: panel: simple-panel: set appropriate mode type Boris Brezillon
2015-04-30 14:46 ` Nicolas Ferre [this message]
2015-05-28 14:25 ` Boris Brezillon
2016-04-15 16:04   ` Nicolas Ferre
2016-04-15 16:23 ` [RESEND PATCH] drm/panel: " Nicolas Ferre
2016-04-18  7:05   ` Thierry Reding

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=55424057.60707@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=thierry.reding@gmail.com \
    /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