Changeset bdfd3cdd in mainline
- Timestamp:
- 2010-06-02T21:59:48Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c992538a
- Parents:
- f8d07859
- Location:
- kernel/arch/sparc64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/drivers/scr.h
rf8d07859 rbdfd3cdd 44 44 SCR_FFB, 45 45 SCR_CGSIX, 46 SCR_XVR 46 SCR_XVR, 47 SCR_QEMU_VGA 47 48 } scr_type_t; 48 49 -
kernel/arch/sparc64/src/drivers/scr.c
rf8d07859 rbdfd3cdd 77 77 else if (str_cmp(name, "cgsix") == 0) 78 78 scr_type = SCR_CGSIX; 79 else if (str_cmp(name, "QEMU,VGA") == 0) 80 scr_type = SCR_QEMU_VGA; 79 81 80 82 if (scr_type == SCR_UNKNOWN) { … … 228 230 229 231 break; 232 233 case SCR_QEMU_VGA: 234 if (prop->size / sizeof(ofw_pci_reg_t) < 2) { 235 printf("Too few screen registers.\n"); 236 return; 237 } 238 239 pci_reg = &((ofw_pci_reg_t *) prop->value)[1]; 240 241 if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) { 242 printf("Failed to absolutize fb register.\n"); 243 return; 244 } 245 246 if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg, 247 &fb_addr)) { 248 printf("Failed to determine screen address.\n"); 249 return; 250 } 251 252 switch (fb_depth) { 253 case 8: 254 fb_scanline = fb_linebytes * (fb_depth >> 3); 255 visual = VISUAL_INDIRECT_8; 256 break; 257 case 16: 258 fb_scanline = fb_linebytes * (fb_depth >> 3); 259 visual = VISUAL_RGB_5_6_5_BE; 260 break; 261 case 24: 262 fb_scanline = fb_linebytes * 4; 263 visual = VISUAL_BGR_8_8_8_0; 264 break; 265 case 32: 266 fb_scanline = fb_linebytes * (fb_depth >> 3); 267 visual = VISUAL_RGB_0_8_8_8; 268 break; 269 default: 270 printf("Unsupported bits per pixel.\n"); 271 return; 272 } 273 break; 274 230 275 default: 231 276 panic("Unexpected type.");
Note:
See TracChangeset
for help on using the changeset viewer.