Hi, On Mon, 2009-08-03 at 22:29 +0300, Ville Syrjälä wrote:
> > > >> The check for the mmio length should move into the driver. > > > > > > > > Which drivers should have this check added? > > > > > > I think ATI and/or nVidia, but basically all with MMIO. > > > > As far as I can see no extra code should be needed. The drivers that I > > checked call dfb_gfxcard_map_mmio() from driver_init_driver(). They pass > > -1 as length argument. In system_map_mmio() in fbdev.c this value is > > then replaced by dfb_fbdev->shared->fix.mmio_len. In case this is zero, > > mmap() will be called with a size of zero and according to the manual > > page, this is supposed to fail. > > My manual page says linux < 2.6.12 will return addr if length == 0. But > since system_map_mmio() will return NULL on failure too it shouldn't > matter assuming that mmio_start is page aligned, but I guess it should > generally be 0 if mmio_len is 0. > > > A failure will cause > > driver_init_driver() to return DFB_IO. > > I think failure at that point will terminate the core init. So the user > would be forced to use disable-module to get DFB up and running. So how would a gfx driver properly implement such a check? Sven _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev