]> git.baikalelectronics.ru Git - kernel.git/commit
drm/fb-helper: fixup set_config semantics
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 21 Jan 2013 09:52:17 +0000 (10:52 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 13 Feb 2013 23:07:55 +0000 (00:07 +0100)
commit2c1e76b2b71fbcf21f42be7e409049e09b20000c
treeae842901c15126d09ceade149e8c1c72a6766a46
parentf4f78794b4b30d43945d20c2c217d333a76ba9dd
drm/fb-helper: fixup set_config semantics

While doing the modeset rework for drm/i915 I've noticed that the fb
helper is very liberal with the semantics of the ->set_config
interface:
- It doesn't bother clearing stale modes (e.g. when unplugging a
  screen).
- It unconditionally sets the fb, even if no mode will be set on a
  given crtc.
- The initial setup is a bit fun since we need to pick crtcs to decide
  the desired fb size, but also should set the modeset->fb pointer.
  Explain what's going on in the fixup code after the fb is allocated.

The crtc helper didn't really care, but the new i915 modeset
infrastructure did, so I've had to add a bunch of special-cases to
catch this.

Fix this all up and enforce the interface by converting the checks in
drm/i915/intel_display.c to BUG_ONs.

v2: Fix commit message spell fail spotted by Rob Clark.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/i915/intel_display.c