From patchwork Sun Aug 19 19:12:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1345121 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 C9680DF264 for ; Sun, 19 Aug 2012 20:46:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CCB1DA1024 for ; Sun, 19 Aug 2012 13:46:42 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id E8DE6A1030 for ; Sun, 19 Aug 2012 13:21:06 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id r3so3851112wey.36 for ; Sun, 19 Aug 2012 13:21:06 -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=38SgGRU6+WiJc1BgpoWKb1fkeOmmsx46SsmKcl00Buo=; b=MC2bLaf/t96fgnvW8GEFAWbZEcJx9KNIZLX8plX03ljJR0eXiqmZIWZVeuPtFQVLLR 2K7Oft5xax1Cw0vCtihs9wBV5QaVqm+X2Q1/5Lyg7gNvKtdUJtzbUkNn8PlrMxRoe66o EWvg2nAcoJj9q2w3b0eDWVjiLjwBi7itxaTgc= 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=38SgGRU6+WiJc1BgpoWKb1fkeOmmsx46SsmKcl00Buo=; b=lIV5ZmAWjGau9CRZ1Bc4m3O3qB5Eddesth+fMl8+Ae4+1DE/w3O2TUvhs5Ev+Wcojp /Hk31JmSJA69Wj5wVWvbU3ItRngOkVVE4Jxo04Tlf7Py2IxZnuqdq4OJPUgLXuMIr6ZI o2XA3S+rvxsF5KICIcheR659tvJQsmgKSuASFnlRGsXP3PGfdU/V4l2ZjYErqTJG5xrC 5E4Ul3h2j9BFs6fCRbHv5Xma9+iGT87EG2PMsKfQsbXjwzqIB7VlriAIit/zfnn5GExl XxgQYIM5gBn7vjfGv72UnTYl7TM+Byk5OoT3iGeSNBL/uO2RbSd1cSiH1JSBlFSTWIfq FtpA== Received: by 10.216.255.18 with SMTP id i18mr5978058wes.45.1345407666626; Sun, 19 Aug 2012 13:21:06 -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 fu8sm24194367wib.5.2012.08.19.13.21.05 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 13:21:05 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 19 Aug 2012 21:12:56 +0200 Message-Id: <1345403595-9678-40-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> References: <1345403595-9678-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQmksjSavdCT+1aJ8aBF1DmaW2Lf3LFhLEmLQbZ9DN2/lgXpOXaMZRCMv+wnR0Z0qa1as1Rv Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 39/58] 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 Reviewed-by: Jesse Barnes --- 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 3cedc89..4b2b17f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6933,6 +6933,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,