Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14411169rwb; Mon, 28 Nov 2022 00:04:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6e9O0T5nQZuvb4suk0318Ob7Lcg1lkXm8UegvlMOF/pv2f/ZoPKgC8At6MLQhJiS/LwNIK X-Received: by 2002:aa7:c719:0:b0:46a:bfd0:f816 with SMTP id i25-20020aa7c719000000b0046abfd0f816mr13150443edq.277.1669622687432; Mon, 28 Nov 2022 00:04:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669622687; cv=none; d=google.com; s=arc-20160816; b=MnZPchLOU4tsV2hhuyRaAJgMepHefSlfgRZ32xqKN2GgtLDSHUaEkmlqzBkNiq8f5j 1FTXz6Fa93svPl86GNGh4L5yTDVZZr6Z4yMERm0iwu8GmtlguBtw9JeyOuTmPMg8KsTg aeqEepW2t+bgdNYCdgxr6LY5D3VYQoMDI0ADqt6C9OBtisr/rSyzrNQz89Lt0Sh+UIAF skSaYnsPJiEKDPIUJL1YeIcxsrkPJh+hAFfnsaltqkl+ZCQbVjC9JV+lTiOCK8UsmhfY zlc3ZMuEonJkeJuLoJurZ7lc+8rag1jha57sROopeFGI0GzfsiW5wTKtMsNxmiTFv+J1 wo4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KZMquymBVmGLUg0H+4NXFAXJtsgJJ5+TBa5+E5IoTOk=; b=qOjfpYPyHhawEKjAWNCmed5FPYm0bPuFMe/c8/inr/XSxRZvIWFsuFfxt0+ah3YsDV jonDt9ITbIkChmB4MCIovaPGBuCjS2S7rooCPI0ll+og5+D6jvzq1o5SK6pjgJxE7X/J U9BiXL64qqkdg8LP/LjZU46JXB/XjXYfifbhwXnBnnsW14o1TDHspIeK8bauG8RVymHK GlT3FZl+ZrbzPw8aRNqrhFlmqpslfpbUhIUzAcn2A49HtjgF10dIVfJc1GqhxJ6LyOPm /l+v9gd5izWca4xJ08hJE0y/H9eYbISoKXglZiH5N3iKW141o1zDINi0wzzKwBj6AyUN aURg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=bFl87EvA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020a50e701000000b0045bfaaab6d1si7566426edn.48.2022.11.28.00.04.27; Mon, 28 Nov 2022 00:04:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=bFl87EvA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbiK1Hnl (ORCPT + 83 others); Mon, 28 Nov 2022 02:43:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbiK1Hnk (ORCPT ); Mon, 28 Nov 2022 02:43:40 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 475232BF for ; Sun, 27 Nov 2022 23:43:38 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1ECCA501; Mon, 28 Nov 2022 08:43:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1669621416; bh=JKQPHHZZhD4m5jviZGkXGPGW3MyixyKT0ajEkDv2CwA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bFl87EvA7iIADwK67gz+MgxF7h/Wsng0UHQJnieoVmQlIcvuTAiuxDGgIjyfWR/JX +lNBQlwGuKt+fRrmXkWbGj+0jSQnKx9q4By9NIXlct1+9sXBuEFDMa7o4NWwGj3BLb INq51KxtmbbnQPtbh0Dukz1LFhCfEo/mb1XDY6hw= Date: Mon, 28 Nov 2022 09:43:21 +0200 From: Laurent Pinchart To: Qiqi Zhang Cc: dianders@chromium.org, andrzej.hajda@intel.com, neil.armstrong@linaro.org, robert.foss@linaro.org, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: Fix output polarity setting bug Message-ID: References: <20221125104558.84616-1-eddy.zhang@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221125104558.84616-1-eddy.zhang@rock-chips.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding Tomi to the CC list. Tomi, would you be able to test this ? On Fri, Nov 25, 2022 at 06:45:58PM +0800, Qiqi Zhang wrote: > According to the description in ti-sn65dsi86's datasheet: > > CHA_HSYNC_POLARITY: > 0 = Active High Pulse. Synchronization signal is high for the sync > pulse width. (default) > 1 = Active Low Pulse. Synchronization signal is low for the sync > pulse width. > > CHA_VSYNC_POLARITY: > 0 = Active High Pulse. Synchronization signal is high for the sync > pulse width. (Default) > 1 = Active Low Pulse. Synchronization signal is low for the sync > pulse width. > > We should only set these bits when the polarity is negative. > Signed-off-by: Qiqi Zhang > --- > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > index 3c3561942eb6..eb24322df721 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > @@ -931,9 +931,9 @@ static void ti_sn_bridge_set_video_timings(struct ti_sn65dsi86 *pdata) > &pdata->bridge.encoder->crtc->state->adjusted_mode; > u8 hsync_polarity = 0, vsync_polarity = 0; > > - if (mode->flags & DRM_MODE_FLAG_PHSYNC) > + if (mode->flags & DRM_MODE_FLAG_NHSYNC) > hsync_polarity = CHA_HSYNC_POLARITY; > - if (mode->flags & DRM_MODE_FLAG_PVSYNC) > + if (mode->flags & DRM_MODE_FLAG_NVSYNC) > vsync_polarity = CHA_VSYNC_POLARITY; > > ti_sn65dsi86_write_u16(pdata, SN_CHA_ACTIVE_LINE_LENGTH_LOW_REG, -- Regards, Laurent Pinchart