static void acpi_video_caps_check(void)
{
	/*
	 * We must check whether the ACPI graphics device is physically plugged
	 * in. Therefore this must be called after binding PCI and ACPI devices
	 */
	if (!acpi_video_caps_checked)
		acpi_video_get_capabilities(NULL);
}
Example #2
0
/*
 * Returns true if video.ko can do display output switching.
 * This does not work well/at all with binary graphics drivers
 * which disable system io ranges and do it on their own.
 */
int acpi_video_display_switch_support(void)
{
    if (!acpi_video_caps_checked)
        acpi_video_get_capabilities(NULL);

    if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR)
        return 0;
    else if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO)
        return 1;

    if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR)
        return 0;
    else if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO)
        return 1;

    return acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING;
}
Example #3
0
int acpi_video_backlight_support(void)
{
	
	if (!acpi_video_caps_checked)
		acpi_video_get_capabilities(NULL);

	
	if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR)
		return 0;
	else if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO)
		return 1;

	
	if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_DMI_VENDOR)
		return 0;
	else if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_DMI_VIDEO)
		return 1;

	
	return acpi_video_support & ACPI_VIDEO_BACKLIGHT;
}
Example #4
0
/* Returns true if video.ko can do backlight switching */
int acpi_video_backlight_support(void)
{
    /*
     * We must check whether the ACPI graphics device is physically plugged
     * in. Therefore this must be called after binding PCI and ACPI devices
     */
    if (!acpi_video_caps_checked)
        acpi_video_get_capabilities(NULL);

    /* First check for boot param -> highest prio */
    if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR)
        return 0;
    else if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO)
        return 1;

    /* Then check for DMI blacklist -> second highest prio */
    if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_DMI_VENDOR)
        return 0;
    else if (acpi_video_support & ACPI_VIDEO_BACKLIGHT_DMI_VIDEO)
        return 1;

    /* Then go the default way */
    return acpi_video_support & ACPI_VIDEO_BACKLIGHT;
}