Thread (4 messages) 4 messages, 3 authors, 2010-06-15

Re: [PATCH v3 10/11] [ARM] tegra: Add framebuffer driver

flat view

From: Colin Cross <hidden>
Date: 2010-06-15 00:43:34
Also in: linux-arm-kernel

On Mon, Jun 14, 2010 at 5:16 PM, Jaya Kumar [off-list ref] wrote:
On Tue, Jun 15, 2010 at 7:59 AM, Jaya Kumar [off-list ref] wrote:
quoted
On Tue, Jun 15, 2010 at 5:10 AM, Erik Gilling [off-list ref] wrote:
quoted
+               if (tegra_fb_wait_for_event(tegra_fb, HZ/10, DC_INT_FRAME_END))
I still didn't follow how tegra_fb_activate is using the -ETIMEDOUT
return value from the wait, it seems like it is just ignored. You are
also doing stuff like HZ/10 and you might prefer to use
msecs_to_jiffies.
I was unclear above. I mean the following code:

+       while (tegra_fb_readl(tegra_fb, DC_CMD_STATE_CONTROL) & 3) {
+               vsync_count++;
+               if (tegra_fb_wait_for_event(tegra_fb, HZ/10, DC_INT_FRAME_END))
+                       break;
+       }
+       if (unlikely(vsync_count > 1))
+               pr_warning("%s: waited for %d vsyncs\n", __func__, vsync_count);

It seems to me like the timeout from wait_for_event isn't propagated
back upwards. Maybe it isn't needed but the way the code handles this
seems confusing to me.
ETIMEDOUT in tegra_fb_wait_for_event is detecting waiting on an
interrupt that is not firing, and the loop in tegra_fb_activate is
checking for the double-buffering bits to clear in a reasonable amount
of time.  The if check in the loop makes sure that if the frame
interrupt is not occuring, the driver doesn't loop forever on the
double-buffering bits.

I'll modify tegra_fb_activate to propagate the error code and use
msecs_to_jiffies.

Thanks,
Colin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help