All of lore.kernel.org
 help / color / mirror / Atom feed
* nouveau page_flip function implement not wait vblank, which cause screen garbage
@ 2011-10-24  6:30 chris
  2011-10-25  3:20 ` chris
  0 siblings, 1 reply; 10+ messages in thread
From: chris @ 2011-10-24  6:30 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1909 bytes --]

Dear,

I use NVidia Geforce 7300GT graphics card in my PC, and Linux 3.1rc4 kernel code, git drm 2.4.36. 
  When I run the vbltest program, it prints  "60HZ"  which indicated the implementation of drmWaitVBlank() and drm_vblank_wait()  is correct.
  But when I run modetest with option " -v -s 12:1280x1024" , it prints high fresh rate up to "150 HZ" .  I examing the code , and found that no waiting vblank operation is processed in nouveau_crtc_page_flip() function. The screen  produced lots of garbage and blink very much.
 int
nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
               struct drm_pending_vblank_event *event)
{
......
}
I study the i915 intel_crtc_page_flip implementation.
static int intel_crtc_page_flip(struct drm_crtc *crtc,
                struct drm_framebuffer *fb,
                struct drm_pending_vblank_event *event)
{
......

    ret = drm_vblank_get(dev, intel_crtc->pipe);
    if (ret)
        goto cleanup_objs;

    work->pending_flip_obj = obj;

    work->enable_stall_check = true;

    /* Block clients from rendering to the new back buffer until
     * the flip occurs and the object is no longer visible.
     */
    atomic_add(1 << intel_crtc->plane, &work->old_fb_obj->pending_flip);

    ret = dev_priv->display.queue_flip(dev, crtc, fb, obj);
    if (ret)
        goto cleanup_pending;
......
}

after vblank irq acquired, the interrupt isr will wakup the runqueue.
6159 static void do_intel_finish_page_flip(struct drm_device *dev,
6160                       struct drm_crtc *crtc)
6161 {
......
6211         list_add_tail(&e->base.link,
6212                   &e->base.file_priv->event_list);
6213         wake_up_interruptible(&e->base.file_priv->event_wait);
6214     }
6215
6216     drm_vblank_put(dev, intel_crtc->pipe);
6217


Is there anyone use the same  driver and found this issues can tell me "is it a bug"?

Thanks!



[-- Attachment #1.2: Type: text/html, Size: 3134 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-10-27 11:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24  6:30 nouveau page_flip function implement not wait vblank, which cause screen garbage chris
2011-10-25  3:20 ` chris
2011-10-25  5:45   ` nouveau " Maarten Maathuis
2011-10-25  7:27     ` chris
2011-10-25 12:15     ` Francisco Jerez
2011-10-25 12:30       ` Ben Skeggs
2011-10-27  8:00         ` chris
2011-10-27  8:44           ` Thomas Hellstrom
2011-10-27 10:49             ` Francisco Jerez
2011-10-27 11:17               ` Thomas Hellstrom

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.