Re: New DRM driver model - gets rid of DRM() macros!

From: Eric Anholt (eta_at_lclark.edu)
Date: 09/30/04

  • Next message: Hanna Linder: "[PATCH 2.6.9-rc2-mm4 cmipci.c] [8/8] Replace pci_find_device with pci_dev_present"
    To: Keith Whitwell <keith@tungstengraphics.com>
    Date:	Wed, 29 Sep 2004 17:00:40 -0700
    
    

    On Wed, 2004-09-29 at 07:25, Keith Whitwell wrote:
    > Jon Smirl wrote:
    > >
    > > Drivers provide these callbacks......
    > >
    > > struct drm_driver_fn {
    > > u32 driver_features;
    > > int dev_priv_size;
    > > int permanent_maps;
    > > drm_ioctl_desc_t *ioctls;
    > > int num_ioctls;
    >
    > > int (*preinit)(struct drm_device *, unsigned long flags);
    > > void (*prerelease)(struct drm_device *, struct file *filp);
    > > void (*pretakedown)(struct drm_device *);
    > > int (*postcleanup)(struct drm_device *);
    > > int (*presetup)(struct drm_device *);
    > > int (*postsetup)(struct drm_device *);
    > > int (*dma_ioctl)( DRM_IOCTL_ARGS );
    > > /* these are opposites at the moment */
    > > int (*open_helper)(struct drm_device *, drm_file_t *);
    > > void (*free_filp_priv)(struct drm_device *, drm_file_t *);
    >
    > > void (*release)(struct drm_device *, struct file *filp);
    > > void (*dma_ready)(struct drm_device *);
    >
    > Is this used by any driver?
    >
    > > int (*dma_quiescent)(struct drm_device *);
    >
    > > int (*context_ctor)(struct drm_device *dev, int context);
    > > int (*context_dtor)(struct drm_device *dev, int context);
    > > int (*kernel_context_switch)(struct drm_device *dev, int old, int new);
    > > int (*kernel_context_switch_unlock)(struct drm_device *dev);
    >
    > The whole context thing in the kernel is pretty much cruft. The gamma module
    > used to rely on it, maybe the ffb module if that still exists? It would be
    > good to see this disappear.
    >
    > Though the drivers don't rely on it, I don't know if the server-side code
    > persists in setting it up regardless, which might make it hard to get rid of.

    SiS relies on context ctor/dtor (dtor only, when I'm done) for its
    kernel memory manager.

    -- 
    Eric Anholt                                eta@lclark.edu          
    http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Hanna Linder: "[PATCH 2.6.9-rc2-mm4 cmipci.c] [8/8] Replace pci_find_device with pci_dev_present"

    Relevant Pages

    • Re: 2.4 in-kernel file opening
      ... > There is no way to open files within the kernel. ... It doesn't have a context. ... mmap() is actually what i wanted to do automatically without the need to ... things within the driver before the mmap- I guess that should be ...
      (Linux-Kernel)
    • Re: HW registers shared by OAL and user-mode device driver
      ... Windows Mobile 6 which is based on Windows CE 5.0 kernel. ... A Kernel mode driver is a driver that is loaded by the device manager ... context of a user mode process and are therefore, with some exceptions, ...
      (microsoft.public.windowsce.platbuilder)
    • Re: Linux GPL and binary module exception clause?
      ... If company A writes a driver which is not GPL it doesn't concern the ... If company B offered the modified driver for kernel inclusion, ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: Contribute - How to
      ... > kernel. ... around for which the 2.6 driver is marked broken, ... Can I suggest new features? ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: sata_promise KERNEL_BUG on 2.6.12
      ... tried with the controller) ... Could the driver "remap" it? ... drives in another way than the kernel do. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)