rem: case B_CMAP8: max_pclk = si->ps.max_dac1_clock_8; break; case B_RGB15_LITTLE: case B_RGB16_LITTLE: max_pclk = si->ps.max_dac1_clock_16; break; case B_RGB24_LITTLE: max_pclk = si->ps.max_dac1_clock_24; break; case B_RGB32_LITTLE: max_pclk = si->ps.max_dac1_clock_32; break; default:  max_pclk = si->ps.max_dac1_clock_32; break;
add: switch (dm->space) { case B_CMAP8: max_pclk = si->ps.max_dac1_clock_8; break; case B_RGB15_LITTLE: case B_RGB16_LITTLE: max_pclk = si->ps.max_dac1_clock_16; break; case B_RGB24_LITTLE: max_pclk = si->ps.max_dac1_clock_24; break; case B_RGB32_LITTLE: max_pclk = si->ps.max_dac1_clock_32; break; default:  max_pclk = si->ps.max_dac1_clock_32; break; } } else { switch (dm->space) { case B_CMAP8: max_pclk = si->ps.max_dac2_clock_8; break; case B_RGB15_LITTLE: case B_RGB16_LITTLE: max_pclk = si->ps.max_dac2_clock_16; break; case B_RGB24_LITTLE: max_pclk = si->ps.max_dac2_clock_24; break; case B_RGB32_LITTLE: max_pclk = si->ps.max_dac2_clock_32; break; default:  max_pclk = si->ps.max_dac2_clock_32; break; }
context: status_t GET_PIXEL_CLOCK_LIMITS(display_mode *dm, uint32 *low, uint32 *high) {	uint32 max_pclk = 0;	uint32 min_pclk = 0;	/* check for NULL pointers */	if ((dm == NULL) || (low == NULL) || (high == NULL)) return B_ERROR;	/* specify requested info */	if (dm->flags & DUALHEAD_BITS)	{		/* dualhead mode */		/* find min. value */		switch (si->ps.card_type)		{			default:				*low = ((si->ps.min_video_vco * 1000) / 16);				break;		}		/* find max. value */		switch (dm->space)		{			case B_CMAP8:				max_pclk = si->ps.max_dac2_clock_8;				break;			case B_RGB15_LITTLE:			case B_RGB16_LITTLE:				max_pclk = si->ps.max_dac2_clock_16;				break;			case B_RGB24_LITTLE:				max_pclk = si->ps.max_dac2_clock_24;				break;			case B_RGB32_LITTLE:				/* specially noted because of RAM speed constraints! */				max_pclk = si->ps.max_dac2_clock_32dh;				break;			default:				/* use fail-safe value */				max_pclk = si->ps.max_dac2_clock_32dh;				break;		}		/* return values in kHz */		*high = max_pclk * 1000;	}	else	{		/* singlehead mode */		/* find min. value */		switch (si->ps.card_type)		{			default:				*low = ((si->ps.min_pixel_vco * 1000) / 16);				break;		}		/* find max. value */		switch (dm->space)		{			case B_CMAP8:				max_pclk = si->ps.max_dac1_clock_8;				break;			case B_RGB15_LITTLE:			case B_RGB16_LITTLE:				max_pclk = si->ps.max_dac1_clock_16;				break;			case B_RGB24_LITTLE:				max_pclk = si->ps.max_dac1_clock_24;				break;			case B_RGB32_LITTLE:				max_pclk = si->ps.max_dac1_clock_32;				break;			default:				/* use fail-safe value */				max_pclk = si->ps.max_dac1_clock_32;				break;		}		/* return values in kHz */		*high = max_pclk * 1000;	}	/* clamp lower limit to 48Hz vertical refresh for now.	 * Apparantly the BeOS screenprefs app does limit the upper refreshrate to 90Hz,	 * while it does not limit the lower refreshrate. */	min_pclk = ((uint32)dm->timing.h_total * (uint32)dm->timing.v_total * 48) / 1000;	if (min_pclk > *low) *low = min_pclk;	return B_OK;}