linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking
Date: Tue, 09 Apr 2013 17:04:26 +0200	[thread overview]
Message-ID: <1365519866.4023.47.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <1365516452-1287-1-git-send-email-rogerio.pimentel@freescale.com>

Hi Rogerio,

Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
> It fixes the logic of valid_mode checking, it's now
> in accordance with drm_mode_status enumeration.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> ---
> Changes since v1:
> Removed the "if(np)" block and now using the existent functions to get
> the modes by fixing the mode_valid logic test 
>  drivers/staging/imx-drm/parallel-display.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
> index a8064fc..49c90c3 100644
> --- a/drivers/staging/imx-drm/parallel-display.c
> +++ b/drivers/staging/imx-drm/parallel-display.c
> @@ -64,7 +64,7 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
>  		num_modes = drm_add_edid_modes(connector, imxpd->edid);
>  	}
>  
> -	if (imxpd->mode_valid) {
> +	if (imxpd->mode_valid == MODE_OK) {

It's a bit unfortunate that the imxpd->mode_valid variable is named the
same as the imx_pd_connector_helper_funcs.mode_valid callback, but it is
not the same. imxpd->mode_valid seems to be used as a bool here, and I
don't think that should stay the same.

>  		struct drm_display_mode *mode = drm_mode_create(connector->dev);
>  		drm_mode_copy(mode, &imxpd->mode);
>  		mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
> @@ -78,7 +78,7 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
>  static int imx_pd_connector_mode_valid(struct drm_connector *connector,
>  			  struct drm_display_mode *mode)
>  {
> -	return 0;
> +	return MODE_OK;

This hunk is correct.

Eventually, we should check available display interface clock
frequencies here.

regards
Philipp

      parent reply	other threads:[~2013-04-09 15:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 14:07 [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Rogerio Pimentel
2013-04-09 14:07 ` [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings Rogerio Pimentel
2013-04-09 15:05   ` Philipp Zabel
2013-04-09 15:19     ` Philipp Zabel
2013-04-09 14:07 ` [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
2013-04-09 15:17   ` Philipp Zabel
2013-04-12 18:49     ` Rogerio Pimentel
2013-04-13 17:09       ` Sascha Hauer
2013-04-16  0:18         ` Fabio Estevam
2013-04-16  6:32           ` Sascha Hauer
2013-04-15  8:05       ` Philipp Zabel
2013-04-09 14:07 ` [PATCH v2 4/4] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
2013-04-09 15:04 ` Philipp Zabel [this message]

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=1365519866.4023.47.camel@pizza.hi.pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).