From patchwork Tue Nov 22 20:50:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9442137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D975860235 for ; Tue, 22 Nov 2016 20:51:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB6F51FEC1 for ; Tue, 22 Nov 2016 20:51:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFCE61FF60; Tue, 22 Nov 2016 20:51:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C1E01FEC1 for ; Tue, 22 Nov 2016 20:51:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D979C6E68D; Tue, 22 Nov 2016 20:51:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 491936E68D for ; Tue, 22 Nov 2016 20:51:05 +0000 (UTC) Received: by mail-qk0-x235.google.com with SMTP id q130so42669218qke.1 for ; Tue, 22 Nov 2016 12:51:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HcI+UhTVrC2A1yk2ixnKZjeMt/vooXPnMdAWcgTnR18=; b=OCm+V8lqLc2T/6e8iQ2K7KK6sM+xFFynYxjah00UL/ZUwPKQv/fiabw+2GJNwCoCtw WSaInIWs8W4KeUkFXFK3CMRN4IC23hWnloIvACxUZ2bO4MAPXNM98myUAft8fQitBrcT Q1EWK5VZ+/uWz2zIdLS2NSn0yUfR2b/IAcjM0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HcI+UhTVrC2A1yk2ixnKZjeMt/vooXPnMdAWcgTnR18=; b=BXL1zjJHqi/oopBou0GFGhHr4Jf7ibRKwg36sYG+qY9Xfc/4a8Qvbg0uGj3fteYiGU /ewudTZIgK1XtweCySWWUAoCeQ3uuqPz/2njXXM2kazm1yh6NjKvGQsctzoD/MwXt9GK 36tSp1h30k1hwZ/iUcxiRx5YBsRmcbMgxS2HSa4Ipz5p7A/Aj63pHV7nHpU6keP94Z9v vG2jq/rh3wbrix/igcalmDKtVGRr4h6r3i9HtfBEgM8kWL6lr5bvpX9YtQ14CtJKbUDb kl7kFZ4sSjJsmk4PzA2T4voer8AmYhaZZsLPOa+NCPcVSbwZ0Bxif2CFyZHSc17kdYBj 3tfw== X-Gm-Message-State: AKaTC03h5YtBFV1uJ13c0mIf9EUrdkUHz2BdDI1qcHAa/AczXxdbUGADmrh3dl8Z3ya7VMD0 X-Received: by 10.55.135.69 with SMTP id j66mr24587685qkd.31.1479847864414; Tue, 22 Nov 2016 12:51:04 -0800 (PST) Received: from boxwood.roam.corp.google.com (cpe-75-189-128-87.nc.res.rr.com. [75.189.128.87]) by smtp.gmail.com with ESMTPSA id r8sm14618010qtc.32.2016.11.22.12.51.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Nov 2016 12:51:03 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH 2/3] drm/rockchip: cdn-dp: Load firmware if no monitor connected Date: Tue, 22 Nov 2016 15:50:06 -0500 Message-Id: <1479847815-30750-3-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1479847815-30750-1-git-send-email-seanpaul@chromium.org> References: <1479847815-30750-1-git-send-email-seanpaul@chromium.org> Cc: zyw@rock-chips.com, groeck@chromium.org, linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Guenter Roeck If no monitor is connected, suspend/resume cycles result in firmware load errors because the driver attempts to load the firmware while the system is in suspend state. This results in a kernel warning and traceback. Loading the firmware during boot fixes the problem. Note that we can not just call schedule_work conditionally in cdn_dp_pd_event() if the insertion status changed. The problem would still be seen if a monitor is connected for the first time during suspend. Signed-off-by: Guenter Roeck Signed-off-by: Sean Paul --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 8644fd0..f78cdaf 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -1021,7 +1021,6 @@ static int cdn_dp_bind(struct device *dev, struct device *master, void *data) struct cdn_dp_port *port; struct drm_device *drm_dev = data; int ret, i; - bool schedule_event = false; ret = cdn_dp_parse_dt(dp); if (ret < 0) @@ -1083,15 +1082,11 @@ static int cdn_dp_bind(struct device *dev, struct device *master, void *data) "register EXTCON_DISP_DP notifier err\n"); goto err_free_connector; } - - if (extcon_get_state(port->extcon, EXTCON_DISP_DP)) - schedule_event = true; } pm_runtime_enable(dev); - if (schedule_event) - schedule_work(&dp->event_work); + schedule_work(&dp->event_work); return 0;