From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv6 4/7] staging: imx-drm: Use de-active and pixelclk-active display-timings.
Date: Wed, 22 Jan 2014 17:45:05 +0300 [thread overview]
Message-ID: <20140122144505.GA7444@mwanda> (raw)
In-Reply-To: <1390398511-8041-4-git-send-email-denis@eukrea.com>
On Wed, Jan 22, 2014 at 02:48:28PM +0100, Denis Carikli wrote:
> If de-active and/or pixelclk-active properties were set in the
> display-timings DT node, they were not used.
>
> Instead the data-enable and the pixel data clock polarity
> were hardcoded.
>
> This change is needed for making the eukrea-cpuimx51
> QVGA display work.
>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Eric B?nard <eric@eukrea.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: dri-devel at lists.freedesktop.org
> Cc: driverdev-devel at linuxdriverproject.org
> Cc: linux-arm-kernel at lists.infradead.org
These CC blocks are massive... What's the point of them?
> if (np) {
> struct drm_display_mode *mode = drm_mode_create(connector->dev);
> + struct device_node *timings_np;
> + struct device_node *mode_np;
> + u32 val;
> +
> of_get_drm_display_mode(np, &imxpd->mode, 0);
> +
> + timings_np = of_get_child_by_name(np, "display-timings");
> + if (timings_np) {
> + /* get the display mode node */
> + mode_np = of_parse_phandle(timings_np,
> + "native-mode", 0);
> + if (!mode_np)
> + mode_np = of_get_next_child(timings_np, NULL);
> +
> + /* set de-active to 1 if not set */
> + of_property_read_u32(mode_np, "de-active", &val);
> + if (val) {
If of_property_read_u32() fails then val is uninitialized.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Denis Carikli <denis@eukrea.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
driverdev-devel@linuxdriverproject.org,
dri-devel@lists.freedesktop.org, "Eric Bénard" <eric@eukrea.com>,
"Sascha Hauer" <kernel@pengutronix.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv6 4/7] staging: imx-drm: Use de-active and pixelclk-active display-timings.
Date: Wed, 22 Jan 2014 17:45:05 +0300 [thread overview]
Message-ID: <20140122144505.GA7444@mwanda> (raw)
In-Reply-To: <1390398511-8041-4-git-send-email-denis@eukrea.com>
On Wed, Jan 22, 2014 at 02:48:28PM +0100, Denis Carikli wrote:
> If de-active and/or pixelclk-active properties were set in the
> display-timings DT node, they were not used.
>
> Instead the data-enable and the pixel data clock polarity
> were hardcoded.
>
> This change is needed for making the eukrea-cpuimx51
> QVGA display work.
>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Eric Bénard <eric@eukrea.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: dri-devel@lists.freedesktop.org
> Cc: driverdev-devel@linuxdriverproject.org
> Cc: linux-arm-kernel@lists.infradead.org
These CC blocks are massive... What's the point of them?
> if (np) {
> struct drm_display_mode *mode = drm_mode_create(connector->dev);
> + struct device_node *timings_np;
> + struct device_node *mode_np;
> + u32 val;
> +
> of_get_drm_display_mode(np, &imxpd->mode, 0);
> +
> + timings_np = of_get_child_by_name(np, "display-timings");
> + if (timings_np) {
> + /* get the display mode node */
> + mode_np = of_parse_phandle(timings_np,
> + "native-mode", 0);
> + if (!mode_np)
> + mode_np = of_get_next_child(timings_np, NULL);
> +
> + /* set de-active to 1 if not set */
> + of_property_read_u32(mode_np, "de-active", &val);
> + if (val) {
If of_property_read_u32() fails then val is uninitialized.
regards,
dan carpenter
next prev parent reply other threads:[~2014-01-22 14:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 13:48 [PATCHv6 1/7] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format Denis Carikli
2014-01-22 13:48 ` [PATCHv6 4/7] staging: imx-drm: Use de-active and pixelclk-active display-timings Denis Carikli
2014-01-22 13:48 ` Denis Carikli
2014-01-22 14:45 ` Dan Carpenter [this message]
2014-01-22 14:45 ` Dan Carpenter
2014-01-22 13:48 ` [PATCHv6 6/7] ARM: dts: mbimx51sd: Add display support Denis Carikli
2014-01-22 13:48 ` [PATCHv6 7/7] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support Denis Carikli
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=20140122144505.GA7444@mwanda \
--to=dan.carpenter@oracle.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.