int main() { #ifdef CONFIG_DRM_I915 i915_driver_load(); #endif return 0; }
static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { struct intel_device_info *intel_info = (struct intel_device_info *) ent->driver_data; if (IS_ALPHA_SUPPORT(intel_info) && !i915.alpha_support) { DRM_INFO("The driver support for your hardware in this kernel version is alpha quality\n" "See CONFIG_DRM_I915_ALPHA_SUPPORT or i915.alpha_support module parameter\n" "to enable support in this kernel version, or check for kernel updates.\n"); return -ENODEV; } /* Only bind to function 0 of the device. Early generations * used function 1 as a placeholder for multi-head. This causes * us confusion instead, especially on the systems where both * functions have the same PCI-ID! */ if (PCI_FUNC(pdev->devfn)) return -ENODEV; /* * apple-gmux is needed on dual GPU MacBook Pro * to probe the panel if we're the inactive GPU. */ if (vga_switcheroo_client_probe_defer(pdev)) return -EPROBE_DEFER; return i915_driver_load(pdev, ent); }
static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { struct intel_device_info *intel_info = (struct intel_device_info *) ent->driver_data; if (IS_PRELIMINARY_HW(intel_info) && !i915.preliminary_hw_support) { DRM_INFO("This hardware requires preliminary hardware support.\n" "See CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT, and/or modparam preliminary_hw_support\n"); return -ENODEV; } /* Only bind to function 0 of the device. Early generations * used function 1 as a placeholder for multi-head. This causes * us confusion instead, especially on the systems where both * functions have the same PCI-ID! */ if (PCI_FUNC(pdev->devfn)) return -ENODEV; /* * apple-gmux is needed on dual GPU MacBook Pro * to probe the panel if we're the inactive GPU. */ if (vga_switcheroo_client_probe_defer(pdev)) return -EPROBE_DEFER; return i915_driver_load(pdev, ent); }
int main(int argc, char *argv[]) { struct drm_i915_private *dp; init(&argc, &argv); devinit(); intel_setup_bios(i915); if (i915->bios_bin) intel_parse_bios(i915); #if defined(VERSION) && VERSION == 36 intel_panel_enable_backlight(i915, 0); #else intel_panel_enable_backlight(i915); #endif i915_driver_load(i915, (unsigned long)i915->dev_private->info); /* now walk the connector list, dumping connector type * and EDID */ dp = i915->dev_private; if (dp->int_lvds_connector) { if (verbose){ fprintf(stderr, "We have an lvds: \n"); } } if (dp->int_edp_connector) { if (verbose) fprintf(stderr, "We have an edp: \n"); } u32 pwm = intel_panel_get_backlight(i915); printf("pwm %d\n", pwm); if (argc) pwm = strtol(argv[0], 0, 0); printf("new pwm %d\n", pwm); #if defined(VERSION) && VERSION == 36 intel_panel_enable_backlight(i915, 0); #else intel_panel_enable_backlight(i915); #endif intel_panel_set_backlight(i915, pwm); pwm = intel_panel_get_backlight(i915); printf("pwm at end is %d\n", pwm); }
int main(int argc, char *argv[]) { struct drm_i915_private *dp; bool dpd_is_edp = false; init(&argc, &argv); devinit(); intel_setup_bios(i915); if (i915->bios_bin) intel_parse_bios(i915); #if defined(VERSION) && VERSION == 36 intel_panel_enable_backlight(i915, 0); #else intel_panel_enable_backlight(i915); #endif i915_driver_load(i915, (unsigned long)i915->dev_private->info); dp = i915->dev_private; dpd_is_edp = intel_dpd_is_edp(i915); if (has_edp_a(i915)) printf("DP_A,"); if (dp->int_lvds_connector) printf("LVDS,"); if (I915_READ(HDMIC) & PORT_DETECTED) printf("HDMIC,"); if (I915_READ(HDMID) & PORT_DETECTED) printf("HDMID,"); if (I915_READ(PCH_DP_C) & DP_DETECTED) printf("DPC,"); if (!dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED)) printf("DPD,"); printf("\n"); }