Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/drm

Module Name:    src
Committed By:   bjs
Date:           Tue May  6 01:26:14 UTC 2008

Modified Files:
        src/sys/dev/drm: drmP.h drm_irq.c drm_memory.c drm_pci.c

Log Message:
  A few steps down the yellow brick road toward bus_dma-ification:

 - Add drm_dmamem_alloc/drm_dmamem_free to drm_memory.c to nicely wrap up
   the bus_dma API.

 - Start using the above in drm_pci.c.



 - Use IPL_NONE for all locks except the IRQ lock, which runs at IPL_VM.

 - Use IPL_VM instead of IPL_TTY with pci_intr_establish() for consistency's
   sake. These two changes seem to eliminate the presistent lockups I was
   having (NetBSD-current/amd64 r300).

   DRM_SPINUNLOCK ... these annoy me to no end--not to mention that they
   locks may or may not be spinlocks!  It's a linux frob, really.
   We're way beyond merging any useful bsd-core code on a large scale, which
   was the only good reason to keep them around.

 Memory allocation:

  - Change drm_memory.c so that it contains generally useful, memory
    allocation functions using kmem(9) (mostly used by the drivers
    themselves).  However, I expect to use this more in the future
    in the "bsd core".  These functions always use KM_NOSLEEP.
    The new drm_dmamem_alloc function has a wait argument which
    takes DRM_DMA_WAIT/DRM_DMA_NOWAIT (defined as their bus_dma
    counterparts), and honors this hint in its calls to kmem(9)
    and bus_dma(9) functions.

  - Got rid of these functions' "area" argument--it's been deprecated for
    ages.  Provide macros in drmP.h to deal with the os-independent code.

  - Declare these functions inline -- I believe they're used enough
    by the i915 and radeon drivers to justify it.  Please let me know
    if I am mistaken.

    NOTE: With these changes, a glxgears score which was previously
    ~3900fps is now ~4400fps (same setup as mentioned above).  I realize
    that using kmem(9) could cause problems, but I can't seem to run into
    any with my test setup.  If anyone smells regression, please let me

To generate a diff of this commit:
cvs rdiff -r1.20 -r1.21 src/sys/dev/drm/drmP.h
cvs rdiff -r1.8 -r1.9 src/sys/dev/drm/drm_irq.c src/sys/dev/drm/drm_memory.c \

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index