From: tomi.valkeinen@ti•com (Tomi Valkeinen)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 3/7 v2] video: ARM CLCD: support DT signal inversion flags
Date: Fri, 26 Feb 2016 12:34:34 +0200 [thread overview]
Message-ID: <56D02A3A.6010701@ti.com> (raw)
In-Reply-To: <1456221704-5792-4-git-send-email-linus.walleij@linaro.org>
On 23/02/16 12:01, Linus Walleij wrote:
> The device tree bindings from display-timing.txt allows us to
> specify if data enable, hsync, vsync or the pixed clock should be
> inverted on the way to the display. The driver does not currently
> handle this so add support for those flags as it is needed for
> the Versatile Sanyo LCD display.
>
> Note that the previous behaviour was to invert the pixel clock
> for all displays, so unless the pixel clock polarity is
> explicitly defined in the device tree (i.e. the timings node
> has the "pixelclk-active" property) we fall back to inverting
> the pixel clock. This needs some extra compatibility code.
>
> Since the timing flags have to be set up inside the struct
> clcd_panel, we need to refactor the code a bit to pass around
> the panel rather than just the mode.
>
> Cc: Pawel Moll <pawel.moll@arm•com>
> Cc: Rob Herring <robh@kernel•org>
> Cc: Russell King <linux@arm•linux.org.uk>
> Signed-off-by: Linus Walleij <linus.walleij@linaro•org>
> ---
> ChangeLog v1->v2:
> - No changes. Just reposting.
> ---
> drivers/video/fbdev/amba-clcd.c | 41 ++++++++++++++++++++++++++++++++++-------
> 1 file changed, 34 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
> index c5d1e9ca81ab..8903a42c4122 100644
> --- a/drivers/video/fbdev/amba-clcd.c
> +++ b/drivers/video/fbdev/amba-clcd.c
> @@ -567,10 +567,11 @@ static int clcdfb_register(struct clcd_fb *fb)
>
> #ifdef CONFIG_OF
> static int clcdfb_of_get_dpi_panel_mode(struct device_node *node,
> - struct fb_videomode *mode)
> + struct clcd_panel *clcd_panel)
> {
> int err;
> struct display_timing timing;
> + struct device_node *timnp;
> struct videomode video;
>
> err = of_get_display_timing(node, "panel-timing", &timing);
> @@ -579,10 +580,34 @@ static int clcdfb_of_get_dpi_panel_mode(struct device_node *node,
>
> videomode_from_timing(&timing, &video);
>
> - err = fb_videomode_from_videomode(&video, mode);
> + err = fb_videomode_from_videomode(&video, &clcd_panel->mode);
> if (err)
> return err;
>
> + /* Set up some inversion flags */
> + timnp = of_get_child_by_name(node, "panel-timing");
> + if (timnp && of_property_read_bool(timnp, "pixelclk-active")) {
Hmm, why are you poking in the videomode DT properties directly? If the
pixelclk-active was not defined in the DT, you should see it in the
videomode struct as neither DISPLAY_FLAGS_PIXDATA_POSEDGE nor
DISPLAY_FLAGS_PIXDATA_NEGEDGE being set (I think, I didn't go through
the code in detail).
Tomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160226/de0044c5/attachment.sig>
next prev parent reply other threads:[~2016-02-26 10:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 10:01 [PATCH 0/7] video: ARM CLCD: non-controversial parts Linus Walleij
2016-02-23 10:01 ` [PATCH 1/7 RESEND] video: ARM CLCD: runtime check for Versatile Linus Walleij
2016-04-15 11:47 ` Linus Walleij
2016-04-18 9:10 ` Tomi Valkeinen
2016-02-23 10:01 ` [PATCH 2/7 v2] video: ARM CLCD: backlight support for OF Linus Walleij
2016-02-23 10:01 ` [PATCH 3/7 v2] video: ARM CLCD: support DT signal inversion flags Linus Walleij
2016-02-26 10:34 ` Tomi Valkeinen [this message]
2016-03-07 4:45 ` Linus Walleij
2016-02-23 10:01 ` [PATCH 4/7 v2] video: ARM CLCD: support pads connected in reverse order Linus Walleij
2016-02-23 10:35 ` Russell King - ARM Linux
2016-02-23 10:01 ` [PATCH 5/7 v2] video: ARM CLCD: support Nomadik variant Linus Walleij
2016-02-23 10:01 ` [PATCH 6/7 v2] video: ARM CLCD: add special board and panel hooks for Nomadik Linus Walleij
2016-02-23 10:01 ` [PATCH 7/7 v2] video: ARM CLCD: add special panel hook for Versatiles Linus Walleij
2016-02-25 19:35 ` [PATCH 0/7] video: ARM CLCD: non-controversial parts Linus Walleij
2016-02-26 10:20 ` Tomi Valkeinen
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=56D02A3A.6010701@ti.com \
--to=tomi.valkeinen@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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