Lines Matching full:depth

308 xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad)  in xf86AddPixFormat()  argument
316 if (depth == 1) in xf86AddPixFormat()
318 else if (depth <= 8) in xf86AddPixFormat()
320 else if (depth <= 16) in xf86AddPixFormat()
322 else if (depth <= 32) in xf86AddPixFormat()
331 pScrn->formats[i].depth = depth; in xf86AddPixFormat()
338 * Set the depth we are using based on (in the following order of preference):
344 * Also find a Display subsection matching the depth/bpp found.
347 * bitsPerPixel, depth, display, imageByteOrder,
361 xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, in xf86SetDepthBpp() argument
368 scrp->depth = -1; in xf86SetDepthBpp()
380 scrp->depth = xf86Depth; in xf86SetDepthBpp()
390 scrp->depth = scrp->confScreen->defaultdepth; in xf86SetDepthBpp()
408 scrp->depth = xf86SetIntOption(device->options, in xf86SetDepthBpp()
428 if (scrp->bitsPerPixel < 0 && scrp->depth < 0) { in xf86SetDepthBpp()
429 if (fbbpp > 0 || depth > 0) { in xf86SetDepthBpp()
432 if (depth > 0) in xf86SetDepthBpp()
433 scrp->depth = depth; in xf86SetDepthBpp()
436 scrp->depth = GLOBAL_DEFAULT_DEPTH; in xf86SetDepthBpp()
443 /* The depth must be set */ in xf86SetDepthBpp()
444 if (scrp->depth > -1) { in xf86SetDepthBpp()
445 if (scrp->depth == 1) in xf86SetDepthBpp()
447 else if (scrp->depth <= 4) in xf86SetDepthBpp()
449 else if (scrp->depth <= 8) in xf86SetDepthBpp()
451 else if (scrp->depth <= 16) in xf86SetDepthBpp()
453 else if (scrp->depth <= 24 && DO_PIX32(depth24flags)) { in xf86SetDepthBpp()
456 else if (scrp->depth <= 32) in xf86SetDepthBpp()
460 "No bpp for depth (%d)\n", scrp->depth); in xf86SetDepthBpp()
466 "xf86SetDepthBpp: internal error: depth and fbbpp" in xf86SetDepthBpp()
474 "Driver can't support depth 24\n"); in xf86SetDepthBpp()
477 "Can't find fbbpp for depth 24\n"); in xf86SetDepthBpp()
483 if (scrp->depth <= 0) { in xf86SetDepthBpp()
487 scrp->depth = 24; in xf86SetDepthBpp()
491 scrp->depth = scrp->bitsPerPixel; in xf86SetDepthBpp()
498 if (scrp->depth < 1 || scrp->depth > 32) { in xf86SetDepthBpp()
500 "Specified depth (%d) is not in the range 1-32\n", in xf86SetDepthBpp()
501 scrp->depth); in xf86SetDepthBpp()
517 if (scrp->depth > scrp->bitsPerPixel) { in xf86SetDepthBpp()
519 "Specified depth (%d) is greater than the fbbpp (%d)\n", in xf86SetDepthBpp()
520 scrp->depth, scrp->bitsPerPixel); in xf86SetDepthBpp()
525 * Find the Display subsection matching the depth/fbbpp and initialise in xf86SetDepthBpp()
530 if ((disp->depth == scrp->depth && disp->fbbpp == scrp->bitsPerPixel) in xf86SetDepthBpp()
531 || (disp->depth == scrp->depth && disp->fbbpp <= 0) in xf86SetDepthBpp()
532 || (disp->fbbpp == scrp->bitsPerPixel && disp->depth <= 0)) { in xf86SetDepthBpp()
540 * depth or fbbpp specified. in xf86SetDepthBpp()
545 if (disp->depth <= 0 && disp->fbbpp <= 0) { in xf86SetDepthBpp()
570 "\t\"%s\" for depth/fbbpp %d/%d\n", in xf86SetDepthBpp()
571 scrp->confScreen->id, scrp->depth, scrp->bitsPerPixel); in xf86SetDepthBpp()
582 scrp->confScreen->displays[i].depth = depth; in xf86SetDepthBpp()
594 if (scrp->depth < 8) { in xf86SetDepthBpp()
605 * If an unusual depth is required, add it to scrp->formats. The formats in xf86SetDepthBpp()
608 switch (scrp->depth) { in xf86SetDepthBpp()
618 if (!xf86AddPixFormat(scrp, scrp->depth, 0, 0)) { in xf86SetDepthBpp()
620 "Can't add pixmap format for depth %d\n", scrp->depth); in xf86SetDepthBpp()
626 scrp->fbFormat.depth = scrp->depth; in xf86SetDepthBpp()
634 * Print out the selected depth and bpp.
639 xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth); in xf86PrintDepthBpp()
669 switch (scrp->depth) { in xf86SetWeight()
700 if (scrp->depth > MAX_PSEUDO_DEPTH && in xf86SetWeight()
701 (scrp->depth != scrp->weight.red + scrp->weight.green + in xf86SetWeight()
705 "depth (%d)\n", in xf86SetWeight()
707 (int) scrp->weight.blue, scrp->depth); in xf86SetWeight()
710 if (scrp->depth > MAX_PSEUDO_DEPTH && scrp->weight.red) { in xf86SetWeight()
763 if (scrp->depth == 1) in xf86SetDefaultVisual()
765 else if (scrp->depth == 4) in xf86SetDefaultVisual()
767 else if (scrp->depth <= MAX_PSEUDO_DEPTH) in xf86SetDefaultVisual()