From patchwork Fri Jan 15 11:02:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 363545 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp184599jap; Fri, 15 Jan 2021 03:04:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgKzHHyxEyH1uIiZJEDKeAIfnIZN5cQ5eOfTFKpiJ0VvFhmEypIGE6aaHGz8C6DuaxZOja X-Received: by 2002:aa7:cd15:: with SMTP id b21mr9254851edw.114.1610708669047; Fri, 15 Jan 2021 03:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610708669; cv=none; d=google.com; s=arc-20160816; b=e53P7I37kdFMaJogbVMk98V8OhKLwd4jvHlfscHlC059S3vZMb6c8k8pgpe3+X2S54 Cv2E2/LXGBEpIdkG2vE7KQrCXOkqwDexhcrIYEdq2+yHHcqX0x9J9sfqX6KDrenwPcbT UCl6e+KL9UOqffY0qR3dR9YBAyL1ltf/C/Hss/2PhCErZzn3Bi3ojhaP8R7fsYPLbJcP 4XOg+pw9TzCANiLFLvv69fGH/tVYs20FSf5B2ngu5gRNP7QZtp7sNRMzsLSPykqsLtGT DJoVLl1mo+GRJL4spUEesvHIp82YP9MdkpHvDQ0g+WPVCwGsJ22us1fB/ydDaRSzc2Uo aQnA== 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=gHRQ0xxynPvZxQkJ0XwkKO8LykVQgvPwVrEG9Eu8CIA=; b=jSChnRbVL3LIpHlZ71yiNTdT7EdTTbSBxAIEKIyjKkddXFaXg5iDyQDNzscFUi9vUm 4DCqdKGz7nyJPOAZ2aJxAO8Diqhcq0F26Um+/HNNpD+i2ORQJyWmfVrZ4a6o4jWqrU0q Ccu3ILOALxrrZagD3riH2jQ+IpqmKAgBPFRtF1ncHuWHc2LHgknulJ3RY6s7BvR2njdA MU5BNKidhhKrS4cgtjJ4mqijUKL/+YjnjTXmKLY1wJwmY5GPugS69zb39lBnduLUBN0S hF5Wf5sWoVechb26Nl1QRBFHF8suon74womKBLJvLuy1EhTO4HIQOqqGGY3i+kbh/yRn BS1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q6OSfsKH; 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 m10si3877144eda.139.2021.01.15.03.04.28; Fri, 15 Jan 2021 03:04:29 -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=Q6OSfsKH; 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 S1726455AbhAOLDN (ORCPT + 15 others); Fri, 15 Jan 2021 06:03:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbhAOLDN (ORCPT ); Fri, 15 Jan 2021 06:03:13 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C16DC061757 for ; Fri, 15 Jan 2021 03:02:32 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id x20so12501106lfe.12 for ; Fri, 15 Jan 2021 03:02:32 -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=gHRQ0xxynPvZxQkJ0XwkKO8LykVQgvPwVrEG9Eu8CIA=; b=Q6OSfsKHIRau6OEp7U8C5Y+6jgIDFkbJL5vZk91Nuv0NpTmw5qQ5axByZ0pzivn+Si owKkBlxjCDFJSDxUZFD1Ehqk9+kxyKCa260yDW+BtNDdqS4QyCv0hAypajTGyz+UGXgH INO1yAMhbBbZ6ju1YmkaWYKJjix5mvZP6dTrZa/lro9WUF6ykREP9qqiOFZVPv9vOPT1 N999vz7F0m/nUByMdKPhktsyjnCkqSnJr1hKKMJvSJCEgJgNXS7gJQMTlEPqOt3krd4y 0aP7+OAYAsWeLdhAFW6Yoi+DM4Q7vZA/lb5hM2kkxB9+eEold3C44pOIVRXBc5tvoxng v7ww== 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=gHRQ0xxynPvZxQkJ0XwkKO8LykVQgvPwVrEG9Eu8CIA=; b=sN2wX/BlHsjm/4qgolsuTV2EKyg3VGliDlZrssMiA0980C6nSNozBGdvjx5ecAXUVC Wr1js9crF7vCIle96vaVFqk0agByAc3EfJUfgGl6B0vkT6O8R4luuw37CUcywvIklKE7 sgk3RiHeainLDidPLQY6f+6tEIcxfeJZGrDvdKkKa+e1fm9dRSgfEKfUV05lnbl/VLt3 XEhHV24n17ylaR3KS7idQuntd017m0FqGLhmi2+9r0tz4KoDpFxqC1D/chbDhor2nJHL 9nHBQ+sXzcHSNw/bEon/Ee4EKOgeeDeaJom5hsYEqxlCBLTNPYowa/Kpj9H4RNP4sRW2 eE+w== X-Gm-Message-State: AOAM532c7NiB7JScitpmRlGd/ezPYCXIcZq6gdAHd11UqQfcfeGDqImw odC4ZjD2xlQZEhlZ8jOtTrVELQ== X-Received: by 2002:a19:c711:: with SMTP id x17mr5344738lff.56.1610708551013; Fri, 15 Jan 2021 03:02:31 -0800 (PST) Received: from eriador.lumag.spb.ru ([188.162.64.106]) by smtp.gmail.com with ESMTPSA id s8sm862020lfi.21.2021.01.15.03.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 03:02:30 -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 Subject: [PATCH v2 1/3] drm/bridge/lontium-lt9611uxc: fix waiting for EDID to become available Date: Fri, 15 Jan 2021 14:02:23 +0300 Message-Id: <20210115110225.127075-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210115110225.127075-1-dmitry.baryshkov@linaro.org> References: <20210115110225.127075-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") --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.29.2 Reviewed-by: Bjorn Andersson 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)