From: Pawel Moll <pawel.moll@arm.com>
To: Arun Ramamurthy <arun.ramamurthy@broadcom.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <Mark.Rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Russell King <linux@arm.linux.org.uk>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
Dmitry Torokhov <dtor@google.com>,
Anatol Pomazau <anatol@google.com>,
Jonathan Richardson <jonathar@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Ray Jui <rjui@broadcom.com>,
"bcm-kernel-feedback-list@broadcom.com"
<bcm-kernel-feedback-list@broadcom.com>
Subject: Re: [PATCH] video: ARM CLCD: Added support for FBIO_WAITFORVSYNC
Date: Tue, 03 Mar 2015 10:01:26 +0000 [thread overview]
Message-ID: <1425376886.3092.25.camel@arm.com> (raw)
In-Reply-To: <54F4B576.5030702@broadcom.com>
On Mon, 2015-03-02 at 19:09 +0000, Arun Ramamurthy wrote:
> On 15-03-02 08:00 AM, Pawel Moll wrote:
> > On Wed, 2015-02-25 at 21:01 +0000, Arun Ramamurthy wrote:
> >> Added ioctl and interrupt handler functions to support FBIO_WAITFORVSYNC
> >> Also corrected documentation to make interrupts and interrupt-names
> >> optional as they are not required properties.
> >
> > You may not be aware of this fact, but its the "documentation" what
> > defines what properties are required...
> >
> Pawel, I was not aware of that. Since the driver code did not require
> the interrupts or interrupt-names bindings to load properly, I moved it
> out of the required properties. I can remove that change.
Cool. Drivers don't have to use all available properties :-) The
interrupt names are required because CLCD can be wired up with a single,
combined interrupt or with 4 separate interrupt lines (see "A.4. On-chip
signals", in the TRM) and the binding has to provide ways of describing
this. Yes, one could say "1 number == combined, 4 numbers == split", but
I personally prefer to be explicit than implicit.
Just request the interrupt by name and you'll be fine.
> Any other comments on this change? Thanks
I have no experience with the vsync ioctl, so can't really comment on
it. One minor thing I did spot is your use of curly brackets in one of
the switch cases:
On Wed, 2015-02-25 at 21:01 +0000, Arun Ramamurthy wrote:
@@ -466,6 +468,73 @@ static int clcdfb_pan_display(struct fb_var_screeninfo *var,
> return 0;
> }
>
> +static int clcdfb_ioctl(struct fb_info *info,
> + unsigned int cmd, unsigned long args)
> +{
> + struct clcd_fb *fb = to_clcd(info);
> + int retval = 0;
> + u32 val, ienb_val;
> +
> + switch (cmd) {
> + case FBIO_WAITFORVSYNC:{
In the line above...
> + if (fb->lcd_irq <= 0) {
> + retval = -EINVAL;
> + break;
> + }
> + /* disable Vcomp interrupts */
> + ienb_val = readl(fb->regs + fb->off_ienb);
> + ienb_val &= ~CLCD_PL111_IENB_VCOMP;
> + writel(ienb_val, fb->regs + fb->off_ienb);
> +
> + /* clear Vcomp interrupt */
> + writel(CLCD_PL111_IENB_VCOMP, fb->regs + CLCD_PL111_ICR);
> +
> + /* Generate Interrupt at the start of Vsync */
> + reinit_completion(&fb->wait);
> + val = readl(fb->regs + fb->off_cntl);
> + val &= ~(CNTL_LCDVCOMP(3));
> + writel(val, fb->regs + fb->off_cntl);
> +
> + /* enable Vcomp interrupt */
> + ienb_val = readl(fb->regs + fb->off_ienb);
> + ienb_val |= CLCD_PL111_IENB_VCOMP;
> + writel(ienb_val, fb->regs + fb->off_ienb);
> + if (!wait_for_completion_interruptible_timeout
> + (&fb->wait, HZ/10))
> + retval = -ETIMEDOUT;
> + break;
> + }
... and here.
Not sure it's needed?
Pawel
next prev parent reply other threads:[~2015-03-03 10:01 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 21:01 [PATCH] video: ARM CLCD: Added dt support to set tim2 register Arun Ramamurthy
2015-02-25 21:01 ` [PATCH] video: ARM CLCD: Added support for FBIOPAN_DISPLAY and virtual y resolution Arun Ramamurthy
2015-03-02 16:08 ` Pawel Moll
2015-03-02 16:11 ` Russell King - ARM Linux
2015-03-02 19:09 ` Arun Ramamurthy
2015-03-02 19:12 ` Russell King - ARM Linux
2015-03-02 23:22 ` Rob Herring
2015-03-04 0:31 ` Arun Ramamurthy
2015-02-25 21:01 ` [PATCH] video: ARM CLCD: Added support for FBIO_WAITFORVSYNC Arun Ramamurthy
2015-03-02 16:00 ` Pawel Moll
2015-03-02 19:09 ` Arun Ramamurthy
2015-03-03 10:01 ` Pawel Moll [this message]
2015-03-04 0:35 ` Arun Ramamurthy
2015-03-02 23:27 ` Rob Herring
2015-03-04 0:31 ` Arun Ramamurthy
2015-03-02 23:29 ` Rob Herring
2015-03-04 0:33 ` Arun Ramamurthy
2015-02-25 21:01 ` [PATCH] video: ARM CLCD: Correcting timing checks for STN and TFT dispalys Arun Ramamurthy
2015-03-02 16:11 ` [PATCH] video: ARM CLCD: Added dt support to set tim2 register Pawel Moll
2015-03-02 19:09 ` Arun Ramamurthy
2015-03-03 10:02 ` Pawel Moll
2015-03-03 10:22 ` Pawel Moll
2015-03-04 0:37 ` Arun Ramamurthy
2015-03-05 10:59 ` Pawel Moll
2015-03-09 16:16 ` Russell King - ARM Linux
2016-02-10 13:58 ` Linus Walleij
2016-02-10 17:48 ` Ray Jui
2016-02-15 13:25 ` Linus Walleij
[not found] ` <CAE_wzQ-s4-T8wDJjwtLkr73_1j8JpRVxBaBJRfskMeACdUxPig@mail.gmail.com>
2016-02-17 17:42 ` Ray Jui
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=1425376886.3092.25.camel@arm.com \
--to=pawel.moll@arm.com \
--cc=Mark.Rutland@arm.com \
--cc=anatol@google.com \
--cc=arun.ramamurthy@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=dtor@google.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jonathar@broadcom.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=plagnioj@jcrosoft.com \
--cc=rjui@broadcom.com \
--cc=robh+dt@kernel.org \
--cc=sbranden@broadcom.com \
--cc=tomi.valkeinen@ti.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
Powered by JetHome