]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/i915: implement crtc helper semantics relied upon by the fb helper
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 10 Jul 2012 15:53:42 +0000 (17:53 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Sep 2012 06:01:31 +0000 (08:01 +0200)
Yikes!

But yeah, we have to do this until someone volunteers to clean up the
fb helper and rid it of its incetious relationship with the crtc
helper code.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index c10fb2e57af26861a0d80fdce1ef1013b560f14f..71cb90d763bd9492499149737e5cd7bf1d9a66a7 100644 (file)
@@ -6934,6 +6934,12 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
        if (!set->mode)
                set->fb = NULL;
 
+       /* The fb helper likes to play gross jokes with ->mode_set_config.
+        * Unfortunately the crtc helper doesn't do much at all for this case,
+        * so we have to cope with this madness until the fb helper is fixed up. */
+       if (set->fb && set->num_connectors == 0)
+               return 0;
+
        if (set->fb) {
                DRM_DEBUG_KMS("[CRTC:%d] [FB:%d] #connectors=%d (x y) (%i %i)\n",
                                set->crtc->base.id, set->fb->base.id,