From patchwork Thu Jan 21 23:33:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 367882 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1001377jam; Thu, 21 Jan 2021 15:34:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmtdb+UaEemcC+nM/mFs2OwpVQ9u6n3YqqsT+AK2f0wi9wn3wLiG7uKLnJHWqDbG5k7EJA X-Received: by 2002:a17:906:aec1:: with SMTP id me1mr1292647ejb.114.1611272092734; Thu, 21 Jan 2021 15:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611272092; cv=none; d=google.com; s=arc-20160816; b=YhNEpplX5Qo/pYUuiC8wA7jBHllz2MxjKSKrkM0G3vjytgXqkbOcrSYbL6VrpLo+8R F7W0A4AT8Yh4DB0/NqYiKF3HG7d3OkamXTlkerDYArZ0Z0yiQzKvAw/B1oSXzP92F7ov U+xuCZZ1FFScZWKKEseJ7qpthE/eeOfc6gwMiOFpHncBNCYykozWLAl4GH6eq3dk8GCk 7zRMHUH3B7YmRFbMpwhzI7z8pMAiMv2IXcLSl0CCW3fo5hx1XDAlhbJaemLXdSwW0XM0 O7apbSnzaDBhPFRX+uBgnd7iBMFMSaa2nrrO8ICamgTTydiYJVl1gIWqg5vW3iMAiaa3 nesA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nLR41DXLpX01EFGGqYnK9wGC2B/eZfRvF8CSAXF0+wM=; b=JjzPVSYlEps04cKjCWVijB8YAgf8nCU8nHswP0PULYxvYAChEQL4A5xGGVZ/8POpv7 PhSKSNLFVvFHBBcYsPaL3vCB6+OYRMmcPCxYUbLBOINmHoaLH99+pKmM9n8G1DNF1REl SXfPL3ZsZYC2oN4tLfCgaxAmBFS+PqsncegLmvumt/WkArJnOh/WOZ67b85qT4Skk+TO /o9uIZPKQ31h2zM08EyRdLqC81phceZL6iHqc3vq0z4tq8KPUL/WohSRW+Iimf/zBnV5 YpFjBwvBa8Ig1K43yMeOoZxxDpMe4F+/iewxUynOum97NkbsGt4KEpRKdoUw0VJjL/Zm rRzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uW5eW3TZ; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id go33si2315156ejc.40.2021.01.21.15.34.52; Thu, 21 Jan 2021 15:34:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uW5eW3TZ; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725779AbhAUXeB (ORCPT + 15 others); Thu, 21 Jan 2021 18:34:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726202AbhAUXdu (ORCPT ); Thu, 21 Jan 2021 18:33:50 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47B49C0613D6 for ; Thu, 21 Jan 2021 15:33:10 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id f11so4466705ljm.8 for ; Thu, 21 Jan 2021 15:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nLR41DXLpX01EFGGqYnK9wGC2B/eZfRvF8CSAXF0+wM=; b=uW5eW3TZasEXRCDWT0TKkUuPWqXEULz2GdydhJeniRJoiM1zBePlAtNcnqi376CPhm gWC58dX5F0i+Vs0WgL2uoQFc416FPZKpX3cvmoq6j0O+biInsJYOfjCT9N6WVrJnjxoS 6onjhcbX0HZDdS3PsjiC1cUvSpoY5zyYIkt3QBYC6TrTTD5NwcfHJ+25qD7BBE6dtbED 1HYkhlHQiXPL1LaC1ZLBga9KzL7UO72SHgcynsqU/ZPyoyujvV9nFSQWz9uEQ6J2BIEX Cv10xXwNRVrXMetW0r8CtvnQDLWUe38sfIxvwxTLGep7Bk8WXnzxIs0K2xMIeLgXpA0+ ldwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nLR41DXLpX01EFGGqYnK9wGC2B/eZfRvF8CSAXF0+wM=; b=BS3LPC/B0yXqL9ZNn1iyhrNhnUvd1eekxwgQOO+PB+WdUzXdnDKLvmpNf1E330/Yx2 vjOAykNO7hj+TB9jWC+4gzpYQBFPsrXmKXCw09XEmDfEq9YmdpUq3kQJkenwVhdMXIU4 7CU9JoGz62k23jR1kB3HI5n+QFswanX/3ESIEyP7e8guQQQT5+pmL3/h92bdrT+QLvkT WeKlM/LSEsKdJk8RXsEn0A2MjlxI90FYffiq+4+ufuaje9tbFhxGxaf6opTmgMFceNCR /eHyJcYvxKugp0pROdUcBMEJYf1c7ox5rZ2tinFfGSGfa3+VKzkGMY7TbTybPuTjaPYa bGCg== X-Gm-Message-State: AOAM530Fm32wFEvyyEOqJZbb6G4jxpuGdsafQd+E72nKZG2Is7q4x5sA s4IZ4IWKRwILDHcLG7J6YIAMpQ== X-Received: by 2002:a2e:b4d1:: with SMTP id r17mr871501ljm.466.1611271988840; Thu, 21 Jan 2021 15:33:08 -0800 (PST) Received: from eriador.lan ([188.162.64.145]) by smtp.gmail.com with ESMTPSA id l28sm726969ljb.42.2021.01.21.15.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 15:33:08 -0800 (PST) From: Dmitry Baryshkov To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Daniel Vetter , David Airlie , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Vinod Koul , Sam Ravnborg , Manivannan Sadhasivam , Bjorn Andersson Subject: [PATCH v4 1/3] drm/bridge/lontium-lt9611uxc: fix waiting for EDID to become available Date: Fri, 22 Jan 2021 02:33:01 +0300 Message-Id: <20210121233303.1221784-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210121233303.1221784-1-dmitry.baryshkov@linaro.org> References: <20210121233303.1221784-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org - Call wake_up() when EDID ready event is received to wake wait_event_interruptible_timeout() - Increase waiting timeout, reading EDID can take longer than 100ms, so let's be on a safe side. Signed-off-by: Dmitry Baryshkov Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.29.2 Reviewed-by: Andrzej Hajda diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c index 0c98d27f84ac..a59e811f1705 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -145,8 +145,10 @@ static irqreturn_t lt9611uxc_irq_thread_handler(int irq, void *dev_id) lt9611uxc_unlock(lt9611uxc); - if (irq_status & BIT(0)) + if (irq_status & BIT(0)) { lt9611uxc->edid_read = !!(hpd_status & BIT(0)); + wake_up_all(<9611uxc->wq); + } if (irq_status & BIT(1)) { if (lt9611uxc->connector.dev) @@ -465,7 +467,7 @@ static enum drm_connector_status lt9611uxc_bridge_detect(struct drm_bridge *brid static int lt9611uxc_wait_for_edid(struct lt9611uxc *lt9611uxc) { return wait_event_interruptible_timeout(lt9611uxc->wq, lt9611uxc->edid_read, - msecs_to_jiffies(100)); + msecs_to_jiffies(500)); } static int lt9611uxc_get_edid_block(void *data, u8 *buf, unsigned int block, size_t len)