[BACK]Return to drmfb.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / external / bsd / drm2 / drm

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

Diff for /src/sys/external/bsd/drm2/drm/drmfb.c between version 1.1 and 1.1.4.4

version 1.1, 2015/03/05 17:50:41 version 1.1.4.4, 2017/02/05 13:40:54
Line 91  drmfb_attach(struct drmfb_softc *sc, con
Line 91  drmfb_attach(struct drmfb_softc *sc, con
         static const struct genfb_ops zero_genfb_ops;          static const struct genfb_ops zero_genfb_ops;
         struct genfb_ops genfb_ops = zero_genfb_ops;          struct genfb_ops genfb_ops = zero_genfb_ops;
         enum { CONS_VGA, CONS_GENFB, CONS_NONE } what_was_cons;          enum { CONS_VGA, CONS_GENFB, CONS_NONE } what_was_cons;
           bool is_console;
         int error;          int error;
   
         /* genfb requires this.  */          /* genfb requires this.  */
Line 102  drmfb_attach(struct drmfb_softc *sc, con
Line 103  drmfb_attach(struct drmfb_softc *sc, con
         prop_dictionary_set_uint32(dict, "width", sizes->surface_width);          prop_dictionary_set_uint32(dict, "width", sizes->surface_width);
         prop_dictionary_set_uint32(dict, "height", sizes->surface_height);          prop_dictionary_set_uint32(dict, "height", sizes->surface_height);
         prop_dictionary_set_uint8(dict, "depth", sizes->surface_bpp);          prop_dictionary_set_uint8(dict, "depth", sizes->surface_bpp);
         prop_dictionary_set_uint16(dict, "linebytes",          prop_dictionary_set_uint16(dict, "linebytes", da->da_fb_linebytes);
             roundup2((sizes->surface_width * howmany(sizes->surface_bpp, 8)),  
                 64));  
         prop_dictionary_set_uint32(dict, "address", 0); /* XXX >32-bit */          prop_dictionary_set_uint32(dict, "address", 0); /* XXX >32-bit */
         CTASSERT(sizeof(uintptr_t) <= sizeof(uint64_t));          CTASSERT(sizeof(uintptr_t) <= sizeof(uint64_t));
         prop_dictionary_set_uint64(dict, "virtual_address",          prop_dictionary_set_uint64(dict, "virtual_address",
Line 113  drmfb_attach(struct drmfb_softc *sc, con
Line 112  drmfb_attach(struct drmfb_softc *sc, con
         prop_dictionary_set_uint64(dict, "mode_callback",          prop_dictionary_set_uint64(dict, "mode_callback",
             (uint64_t)(uintptr_t)&drmfb_genfb_mode_callback);              (uint64_t)(uintptr_t)&drmfb_genfb_mode_callback);
   
         /* XXX Whattakludge!  */          if (!prop_dictionary_get_bool(dict, "is_console", &is_console)) {
                   /* XXX Whattakludge!  */
 #if NVGA > 0  #if NVGA > 0
         if ((da->da_params->dp_is_vga_console != NULL) &&                  if ((da->da_params->dp_is_vga_console != NULL) &&
             (*da->da_params->dp_is_vga_console)(dev)) {                      (*da->da_params->dp_is_vga_console)(dev)) {
                 what_was_cons = CONS_VGA;                          what_was_cons = CONS_VGA;
                 prop_dictionary_set_bool(dict, "is_console", true);                          prop_dictionary_set_bool(dict, "is_console", true);
                 vga_cndetach();                          vga_cndetach();
                 if (da->da_params->dp_disable_vga)                          if (da->da_params->dp_disable_vga)
                         (*da->da_params->dp_disable_vga)(dev);                                  (*da->da_params->dp_disable_vga)(dev);
         } else                  } else
 #endif  #endif
         if (genfb_is_console() && genfb_is_enabled()) {                  if (genfb_is_console() && genfb_is_enabled()) {
                 what_was_cons = CONS_GENFB;                          what_was_cons = CONS_GENFB;
                 prop_dictionary_set_bool(dict, "is_console", true);                          prop_dictionary_set_bool(dict, "is_console", true);
                   } else {
                           what_was_cons = CONS_NONE;
                           prop_dictionary_set_bool(dict, "is_console", false);
                   }
         } else {          } else {
                 what_was_cons = CONS_NONE;                  what_was_cons = CONS_NONE;
                 prop_dictionary_set_bool(dict, "is_console", false);  
         }          }
   
         sc->sc_genfb.sc_dev = sc->sc_da.da_dev;          sc->sc_genfb.sc_dev = sc->sc_da.da_dev;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.4.4

CVSweb <webmaster@jp.NetBSD.org>