From patchwork Thu Nov 12 13:11:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 7601991 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F2AB29F392 for ; Thu, 12 Nov 2015 13:11:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35A3D207A2 for ; Thu, 12 Nov 2015 13:11:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57509205E4 for ; Thu, 12 Nov 2015 13:11:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752589AbbKLNLa (ORCPT ); Thu, 12 Nov 2015 08:11:30 -0500 Received: from mail-yk0-f170.google.com ([209.85.160.170]:36240 "EHLO mail-yk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752497AbbKLNL0 (ORCPT ); Thu, 12 Nov 2015 08:11:26 -0500 Received: by ykdr82 with SMTP id r82so93498156ykd.3 for ; Thu, 12 Nov 2015 05:11:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id; bh=I8aygrNadNePLn+P51MBp65odH0NDAf7dHlE0LCDQX0=; b=fDeLwEkcO3l19IkKrqbAticXc1yM56zyQrAYSMuvE1d0oUsm7z5MDu7ew8BupShi7A 2ClypSm1356YApMO+imniw2kuQ7iLSuy59Im/hU3BwFYS5SQ95H+z16g0mg5WgEbJepv GmJb5FikAa4rTChB/wm+CmkAisyx57A1zTeluHPx3KUw0afiYsmsM0nYv3pWIUuOvuvr ttVghZ1TYnNgW/B2xeuQupgW7TcFxKa+i+uV69KwQx2O9S1HVwJqyqlQnDW8dr4jvxXM ob89MKyIidPW09OaYUcTfvqi94gmqd3gzzaRTZZeLKkCywXG76Tvi/ZJa5j7PfitXMa7 BJMw== X-Received: by 10.13.242.196 with SMTP id b187mr16026057ywf.241.1447333885497; Thu, 12 Nov 2015 05:11:25 -0800 (PST) Received: from jade.localdomain ([187.64.235.140]) by smtp.gmail.com with ESMTPSA id o5sm6670090ywd.46.2015.11.12.05.11.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 05:11:24 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, inki.dae@samsung.com, jy0922.shim@samsung.com, tjakobi@math.uni-bielefeld.de, Gustavo Padovan Subject: [PATCH] drm/exynos: only run atomic_check() if crtc is active Date: Thu, 12 Nov 2015 11:11:20 -0200 Message-Id: <1447333880-16555-1-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Fixes an regression added by 3ae2436 (drm/exynos/mixer: replace direct cross-driver call with drm mode). The whole atomic update was failing if the hdmi display is not present/active. Add a test to only run atomic_check() if the CRTC is active. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index b3ba27f..1d3ca0a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -55,6 +55,9 @@ static int exynos_crtc_atomic_check(struct drm_crtc *crtc, { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); + if (!state->active) + return 0; + if (exynos_crtc->ops->atomic_check) return exynos_crtc->ops->atomic_check(exynos_crtc, state);