Current-Users archive

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

re: Major number for dri missing?



On Mon, 27 Jul 2009, matthew green wrote:

> no, this patch is wrong.  drm major is not 195.  it is 180.  eg:
>
> sys/conf/majors:device-major drm             char 180                drmbase
>
> the problem is that ew call it "drm" and use "dri", and this confuses
> the MAKEDEV* code.  but patching MAKEDEV.tmpl to know about this still
> gives me errors and i haven't gotten around to solving it.
>
> the patch below is what i have so far, but doesn't work, if anyone
> really wants to figure it out for me...
>
> .mrg.
>
> Index: MAKEDEV.tmpl
> ===================================================================
> RCS file: /cvsroot/src/etc/MAKEDEV.tmpl,v
> retrieving revision 1.127
> diff -p -r1.127 MAKEDEV.tmpl
> *** MAKEDEV.tmpl      5 Jul 2009 21:35:16 -0000       1.127
> --- MAKEDEV.tmpl      26 Jul 2009 20:59:55 -0000
> ***************
> *** 233,238 ****
> --- 233,239 ----
>   #   dmoverio hardware-assisted data movers
>   #   dpt*    DPT/Adaptec EATA RAID management interface
>   #   dpti*   DPT/Adaptec I2O RAID management interface
> + #   drm*    Direct Rendering Manager interface
>   #   fb*     PMAX generic framebuffer pseudo-device
>   #   fd      file descriptors
>   #   grf*    graphics frame buffer device
> *************** all)
> *** 741,747 ****
>       makedev putter
>       makedev drvctl
>       makedev video
> !     makedev dri0
>       makedev altmem
>       makedev zfs
>       makedev local # do this last
> --- 742,748 ----
>       makedev putter
>       makedev drvctl
>       makedev video
> !     makedev drm0
>       makedev altmem
>       makedev zfs
>       makedev local # do this last
> *************** atabus*)
> *** 1902,1908 ****
>       mkdev atabus$unit c %atabus_chr% $unit 644
>       ;;
>
> ! dri*)
>       makedir dri 755
>       mkdev dri/card$unit c %dri_chr% $unit 660
>       ;;
> --- 1903,1909 ----
>       mkdev atabus$unit c %atabus_chr% $unit 644
>       ;;
>
> ! drm*)
>       makedir dri 755
>       mkdev dri/card$unit c %dri_chr% $unit 660
>       ;;
>

I think the only thing you need to do is to change %dri_chr% to %drm_chr%
as the former cannot exist..

Index: MAKEDEV.tmpl
===================================================================
RCS file: /cvsroot/src/etc/MAKEDEV.tmpl,v
retrieving revision 1.127
diff -u -r1.127 MAKEDEV.tmpl
--- MAKEDEV.tmpl        5 Jul 2009 21:35:16 -0000       1.127
+++ MAKEDEV.tmpl        27 Jul 2009 06:59:56 -0000
@@ -233,6 +233,7 @@
 #      dmoverio hardware-assisted data movers
 #      dpt*    DPT/Adaptec EATA RAID management interface
 #      dpti*   DPT/Adaptec I2O RAID management interface
+#      dri*    Direct Rendering Interface
 #      fb*     PMAX generic framebuffer pseudo-device
 #      fd      file descriptors
 #      grf*    graphics frame buffer device
@@ -1904,7 +1905,7 @@

 dri*)
        makedir dri 755
-       mkdev dri/card$unit c %dri_chr% $unit 660
+       mkdev dri/card$unit c %drm_chr% $unit 660
        ;;

 drvctl)


Are there reasons for using "dri" and the subdir rather than just having
/dev/drmN, is that upstream nonsense?

iain



Home | Main Index | Thread Index | Old Index