drm/i915: allow re-use BIOS connector config for initial fbdev config v3 10/22210/3
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 12 Feb 2014 20:26:25 +0000 (12:26 -0800)
committerJin Song <jin.kyu.song@linux.intel.com>
Fri, 30 May 2014 03:15:43 +0000 (20:15 -0700)
commitc00cc35d2f4398bafb749c46c5b2cc6dd383dfc4
tree3e5f766e9132927b231c22bb7a43f15a30ca6c26
parentbc865ec261c3692d52f0918db911af738669bc59
drm/i915: allow re-use BIOS connector config for initial fbdev config v3

The BIOS or boot loader will generally create an initial display
configuration for us that includes some set of active pipes and
displays.  This routine tries to figure out which pipes and connectors
are active and stuffs them into the crtcs and modes array given to us by
the drm_fb_helper code.

The overall sequence is:
  intel_fbdev_init - from driver load
    intel_fbdev_init_bios - initialize the intel_fbdev using BIOS data
    drm_fb_helper_init - build fb helper structs
    drm_fb_helper_single_add_all_connectors - more fb helper structs
  intel_fbdev_initial_config - apply the config
    drm_fb_helper_initial_config - call ->probe then register_framebuffer()
        drm_setup_crtcs - build crtc config for fbdev
          intel_fb_initial_config - find active connectors etc
        drm_fb_helper_single_fb_probe - set up fbdev
          intelfb_create - re-use or alloc fb, build out fbdev structs

v2: use BIOS connector config unconditionally if possible (Daniel)
    check for crtc cloning and reject (Daniel)
    fix up comments (Daniel)
v3: use command line args and preferred modes first (Ville)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[danvet: Re-add the WARN_ON for a missing encoder crtc - the state
sanitizer should take care of this. And spell-ocd the comments.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jin Song <jin.kyu.song@linux.intel.com>
Conflicts:
drivers/gpu/drm/i915/intel_display.c
Change-Id: I95094252d1f5baf4c43bc4aa867d8d3567b8aabb
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fbdev.c