From patchwork Thu Jul 26 18:49:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1245151 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 79869DFFCE for ; Thu, 26 Jul 2012 20:38:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EDBBA0EC4 for ; Thu, 26 Jul 2012 13:38:01 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 75ADE9ED88 for ; Thu, 26 Jul 2012 12:57:12 -0700 (PDT) Received: by mail-wg0-f41.google.com with SMTP id ds1so69885wgb.0 for ; Thu, 26 Jul 2012 12:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=wPi1ua6lr4MMOBruIglov2fPbUeBtBce0Pbz/8RLlbA=; b=NYf3FHMZ5zZfsJIQqIDg3Sdp0evtJPmbh5xmFXZBXUYwIw3h6ND4yautfDGBCTUMK4 tJukmE4JZxg63Kj+Nr25BR/bvxKCRrXuiFvlHME2iTd0uIN/m5baDYLlkJiH6gUvPCKq QFmE9Ab4aOSR54KEORlCelpLOivaHCxn0hB+c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=wPi1ua6lr4MMOBruIglov2fPbUeBtBce0Pbz/8RLlbA=; b=DNsotubj1yLJa8Dnds5aNpbYXcKKkcbHm7X5ZWfqLyBkH/ljdADW7/fo8RNs4ZgEeX hlIJdkjKwvB6hj0QZdoa9wsR1zSWl1zb/Lu+9okWqngxxyjTP0nwnZL3leb0Gy+2QrHL 6pvgDvvGVBUIIzeMwYrVV9bTJfeKYg5tDukbeupPowCbq87uku4cxSUyIccwF1w2v/so yXs/SBqbeFueF1vie7Bf6ZGLepev1S+eyKy64l1ChUIzYV8X+d8+5xs41ZRr7FaHcMW/ RX0x5ENmqVW+Ddu48k4OJuwKaw7vY8r1wgQ+VUE/G4wAi8Fn4QqgRcK00f2qkeZEJz0L aDFg== Received: by 10.180.94.226 with SMTP id df2mr5509946wib.16.1343332632237; Thu, 26 Jul 2012 12:57:12 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id fr4sm391403wib.8.2012.07.26.12.57.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 12:57:11 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 26 Jul 2012 20:49:12 +0200 Message-Id: <1343328581-2324-48-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1343328581-2324-1-git-send-email-daniel.vetter@ffwll.ch> References: <1343328581-2324-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQkczcxrU9ICD31b0nrub/0J4na2EedqkhxHsOpYXttihLPlEflxQGS9x8vl5Z4sPslJXHC8 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 47/76] drm/i915: implement crtc helper semantics relied upon by the fb helper X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org 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. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d11d866..c38d503 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6860,6 +6860,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,