Received: by 10.213.65.68 with SMTP id h4csp782217imn; Tue, 13 Mar 2018 23:01:27 -0700 (PDT) X-Google-Smtp-Source: AG47ELtG2lxBz0yGYvm+sEpmbz3bwdHATsRdahIPP4Kucd6kt7ZnsT64NnCOnafAQLWzA4S3VrnC X-Received: by 10.101.102.79 with SMTP id z15mr2626027pgv.181.1521007287355; Tue, 13 Mar 2018 23:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521007287; cv=none; d=google.com; s=arc-20160816; b=wG0Yp54I7BLBSrhDX4F++y0FUT47B6vOVo2Eh0cJXgqzbLDEdjb57vjM0o4TV55iPu v2mlzYmkgH/2smJ2qo/5BRdpqGPL3HDwHJVhQfNymt4AknTyjG5z6EjzGn1adOh88YgO gRKgASpBmT0Jh4MMXo74hAouvvAjwfS61CtPq8EQYT+qtTe9zp1j3092p1Dfdtt7OeKP +kKev0734yCHG0O55VJclx1adwx5CJoFiGXPaUg1vg2Cq9mwoOPJINpWa2uYOmFanZvL TOF7oDC1iNUJ8I5FiZZ17enc2kLREf0wORHDXH1cDlf86KDIbDIhaJqaur6OAkwmHCDK AM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=wAKFZAWuBZPJp4UDfJR0YNuMR0jkq0ep8iiYooflREE=; b=kXtcmj3T2JsRyTucLXvTs9jGWmaIIK3l1rBpnCLy4+mkHuS8KF5isI9UM/Vfwtmbv0 N6iynSeW4aLDr2awm74LRSoL67wz3fMike/6rGWux+OR62qFQJlCnNampODXpcR6g5RL IVu7i3NBZwWgTNE2RNCstm1YZsTcLd3Bq9r2q9yV7deJ0yfg9EOoUDJIchD3Lj4z9A17 3vcnwciG67Q8XLlAFuZUt/Lmto9vBc2+KTRk/2SLUD/sfGnYOarhn2yUQh7bkW9HwllX IH498Wielsigz69J+GzhMQEwqI6qVE/y7tMuum6o4rJDfwZne8bxqruqxXdWxcHwmr7w rIeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=BE39nS+u; dkim=pass header.i=@codeaurora.org header.s=default header.b=mcu6MQA5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h193si1303165pgc.591.2018.03.13.23.01.12; Tue, 13 Mar 2018 23:01:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=BE39nS+u; dkim=pass header.i=@codeaurora.org header.s=default header.b=mcu6MQA5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbeCNGAS (ORCPT + 99 others); Wed, 14 Mar 2018 02:00:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49954 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbeCNGAP (ORCPT ); Wed, 14 Mar 2018 02:00:15 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 58DC660851; Wed, 14 Mar 2018 06:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521007215; bh=Cf48o5XZAl9ikgSzBEdzP0LCPkSEwJd5EQefm9MpJvY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=BE39nS+umUrs1TBcK8FW6yCwPHMKTPuQ5+HJIhmANbHu/58cyme9sqL7tEdowmncv a/32/4vDuJW8tnXfI+F29pTXbJ9inoLMvem7IvWgb6VxVNy/T766J81g6jlWq1fslm Pi9y+wJxYsW+PfauSRNPrNrdO099QQsb8+NdeLuk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.84] (unknown [182.71.117.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 96C3360314; Wed, 14 Mar 2018 06:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521007214; bh=Cf48o5XZAl9ikgSzBEdzP0LCPkSEwJd5EQefm9MpJvY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=mcu6MQA5qQ7OYEsbErvm3DLyHqzjQqH8p2WX+ZQ6XfbFHVFGqRj4NFSYIcCMlA3Ze v8dm7ROGTtnRe8tvyqAzq9m4O81yCOL490cXVOGM6N3Fq25iZ8gIyX9U+Muz2TpK5z ekzsWNuttPq4THlhUwyjxIeLMe3EPSelPlGOzNLY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 96C3360314 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH v5 07/36] drm/bridge: analogix_dp: Move enable video into config_video() To: Enric Balletbo i Serra , inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, =?UTF-8?Q?St=c3=a9phane_Marchesin?= References: <20180309222327.18689-1-enric.balletbo@collabora.com> <20180309222327.18689-8-enric.balletbo@collabora.com> From: Archit Taneja Message-ID: <79009f48-d677-ccc0-4d61-3b379d8448a8@codeaurora.org> Date: Wed, 14 Mar 2018 11:29:59 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180309222327.18689-8-enric.balletbo@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 10 March 2018 03:52 AM, Enric Balletbo i Serra wrote: > From: Lin Huang > > We need to enable video before analogix_dp_is_video_stream_on(), so > we can get the right video stream status. > > Cc: 征增 王 > Cc: Stéphane Marchesin > Signed-off-by: Lin Huang > Signed-off-by: Sean Paul > Signed-off-by: Thierry Escande > Reviewed-by: Andrzej Hajda > Signed-off-by: Enric Balletbo i Serra > Tested-by: Marek Szyprowski > --- > > drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 5a2e35dc41e3..f9661b410cb9 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -819,11 +819,10 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp) > if (analogix_dp_is_slave_video_stream_clock_on(dp) == 0) > break; > if (timeout_loop > DP_TIMEOUT_LOOP_COUNT) { > - dev_err(dp->dev, "Timeout of video streamclk ok\n"); > + dev_err(dp->dev, "Timeout of slave video streamclk ok\n"); > return -ETIMEDOUT; > } > - > - usleep_range(1, 2); > + usleep_range(1000, 1001); Could we briefly explain in the commit message why we need to increase the delay in the timeout loop? Is it a consequence of calling analogix_dp_start_video() earlier, or is this the preferred time mentioned in the specs? Thanks, Archit > } > > /* Set to use the register calculated M/N video */ > @@ -838,6 +837,9 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp) > /* Configure video slave mode */ > analogix_dp_enable_video_master(dp, 0); > > + /* Enable video */ > + analogix_dp_start_video(dp); > + > timeout_loop = 0; > > for (;;) { > @@ -948,9 +950,6 @@ static void analogix_dp_commit(struct analogix_dp_device *dp) > DRM_ERROR("failed to enable the panel\n"); > } > > - /* Enable video */ > - analogix_dp_start_video(dp); > - > dp->psr_enable = analogix_dp_detect_sink_psr(dp); > if (dp->psr_enable) > analogix_dp_enable_sink_psr(dp); >