From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5820BC47247 for ; Fri, 8 May 2020 08:47:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 306AC207DD for ; Fri, 8 May 2020 08:47:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Vr+Ok3bN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 306AC207DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 769C06EA9F; Fri, 8 May 2020 08:47:24 +0000 (UTC) Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACE156E12A for ; Thu, 7 May 2020 12:29:28 +0000 (UTC) Received: by mail-io1-xd43.google.com with SMTP id f3so718293ioj.1 for ; Thu, 07 May 2020 05:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KKAqwDXJJKqMiF/yYBDk97GTDn2w207sar2RIjugUw4=; b=Vr+Ok3bN976HGKUTGWeQ36LwoNHmU00yXuYOtLuYNpZaCPdQgQtupnHbsqyrEJXHTJ IM1VJ+zgYBUqBcSnvhY/cgPVJtpnya7boXLqqQ88STAFTD2LuVbUneXzz4qUspBG88gm vshdGgD1+tvBEnlMlWwreKbAs7jhCdJzAHJXqt9JwK2GDOhuZI7NiYQUJkS9uXX6mRnY rOVb9MVOAZnh9WE71awYyOuEUGZSix5838T3zFBh9N8JPMcw6U795XdnsHEnhsLqPwcr FeeHdD58pApdW3LHEDtgNhN43zdDTdi+0KC5jMQrzzTI0Wsu3K58O4f9miDSK4KFrVaa /bBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KKAqwDXJJKqMiF/yYBDk97GTDn2w207sar2RIjugUw4=; b=lE3ebTa+v8tDpkZCfmgYHoTPSw4hUHHItFRop0pdk6zzNOYXXcwh3shR/se8dODqNK pdXnmMQSI1ctIQfHcn+s1DxmD/XfmPgKXq/+l9TURGBwiJGxVXFdTG8LRzI18sLg1lf/ o7po+OAHZTaXh5WQV+y8GYFQHMlPCJFo4r6uu7Mdc5TR4HCqzbB2w5+IgEyQJVZHzrkm nSC4hf0sCa5VOBUjXKKrS30W7148DuYeyQVwdEqxtUgOAVmULjgfHvBH/xMyMtaYSvbJ y0jjFz3FKyrL69d4bmoCaLubUmiM6BfKYUtWpV5iaEEXw6C2hdm3vTkERLxMUEkfTUBq pvWA== X-Gm-Message-State: AGi0PubhoZqv4QRNPq5KOhiO34+9UusodudmC+j5aK0yw8PMkAB4l7Kv LTt3RsIT31hXcSzGeWjzOm62JoWJSLERy5xOt44= X-Google-Smtp-Source: APiQypK6QWIdojOiP7s8xqL8vEDc3zkGbnnIUSWTBZFih6Iwrn5meoSJE2t7w2/Zm+TghFtkWq1s9yLVzdivv3xcy0k= X-Received: by 2002:a02:b88e:: with SMTP id p14mr13107966jam.36.1588854567978; Thu, 07 May 2020 05:29:27 -0700 (PDT) MIME-Version: 1.0 References: <20200505160329.2976059-1-emil.l.velikov@gmail.com> <20200505160329.2976059-3-emil.l.velikov@gmail.com> In-Reply-To: <20200505160329.2976059-3-emil.l.velikov@gmail.com> From: Vinay Simha B N Date: Thu, 7 May 2020 17:59:16 +0530 Message-ID: Subject: Re: [PATCH 3/3] drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline To: Emil Velikov X-Mailman-Approved-At: Fri, 08 May 2020 08:47:23 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jani Nikula , Robert Chiras , Thierry Reding , dri-devel@lists.freedesktop.org Content-Type: multipart/mixed; boundary="===============0712547524==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============0712547524== Content-Type: multipart/alternative; boundary="0000000000001fcb2605a50e081d" --0000000000001fcb2605a50e081d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Emil, Reply inline On Tue, 5 May 2020 at 9:35 PM, Emil Velikov wrote: > From: Emil Velikov > > The helper uses the MIPI_DCS_SET_TEAR_SCANLINE, although it's currently > using the generic write. This does not look right. > > Perhaps some platforms don't distinguish between the two writers? > > Cc: Robert Chiras > Cc: Vinay Simha BN > Cc: Jani Nikula > Cc: Thierry Reding > Fixes: e83950816367 ("drm/dsi: Implement set tear scanline") > Signed-off-by: Emil Velikov > --- > Robert, can you please test this against the only user - the Raydium > RM67191 panel driver that you introduced. > > Thanks > > Vinay, can you confirm if this is a genuine typo or there's something > really subtle happening. this has been tested on nexus 7 with jdi panel. I did not understand what is the typo here? We need to use DC=E2=80=99s write instead of generic write? > > --- > drivers/gpu/drm/drm_mipi_dsi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_mipi_dsi.c > b/drivers/gpu/drm/drm_mipi_dsi.c > index b96d5b4629d7..07102d8da58f 100644 > --- a/drivers/gpu/drm/drm_mipi_dsi.c > +++ b/drivers/gpu/drm/drm_mipi_dsi.c > @@ -1082,11 +1082,11 @@ EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format); > */ > int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 > scanline) > { > - u8 payload[3] =3D { MIPI_DCS_SET_TEAR_SCANLINE, scanline >> 8, > - scanline & 0xff }; > + u8 payload[2] =3D { scanline >> 8, scanline & 0xff }; > ssize_t err; > > - err =3D mipi_dsi_generic_write(dsi, payload, sizeof(payload)); > + err =3D mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_TEAR_SCANLINE, paylo= ad, > + sizeof(payload)); > if (err < 0) > return err; > > -- > 2.25.1 > > -- regards, vinaysimha --0000000000001fcb2605a50e081d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Emil,

Reply inline

On Tue, 5 May 2020 at 9:35 PM, Emil Velikov &= lt;emil.l.velikov@gmail.com= > wrote:
From: Emil Velikov <= emil.veliko= v@collabora.com>

The helper uses the MIPI_DCS_SET_TEAR_SCANLINE, although it's currently=
using the generic write. This does not look right.

Perhaps some platforms don't distinguish between the two writers?

Cc: Robert Chiras <robert.chiras@nxp.com>
Cc: Vinay Simha BN <simhavcs@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Thierry Reding <treding@nvidia.com>
Fixes: e83950816367 ("drm/dsi: Implement set tear scanline")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
Robert, can you please test this against the only user - the Raydium
RM67191 panel driver that you introduced.

Thanks

Vinay, can you confirm if this is a genuine typo or there's something really subtle happening.
this has been tested= on nexus 7 with jdi panel. I did not understand what is the typo here?
We need to use DC=E2=80=99s write instead of generic wr= ite?

---
=C2=A0drivers/gpu/drm/drm_mipi_dsi.c | 6 +++---
=C2=A01 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.= c
index b96d5b4629d7..07102d8da58f 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -1082,11 +1082,11 @@ EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format);
=C2=A0 */
=C2=A0int mipi_dsi_dcs_set_tear_scanline(struct mipi_dsi_device *dsi, u16 s= canline)
=C2=A0{
-=C2=A0 =C2=A0 =C2=A0 =C2=A0u8 payload[3] =3D { MIPI_DCS_SET_TEAR_SCANLINE,= scanline >> 8,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0scanline & 0xff };
+=C2=A0 =C2=A0 =C2=A0 =C2=A0u8 payload[2] =3D { scanline >> 8, scanli= ne & 0xff };
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ssize_t err;

-=C2=A0 =C2=A0 =C2=A0 =C2=A0err =3D mipi_dsi_generic_write(dsi, payload, si= zeof(payload));
+=C2=A0 =C2=A0 =C2=A0 =C2=A0err =3D mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_TE= AR_SCANLINE, payload,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(payload));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (err < 0)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return err;

--
2.25.1

--
regards,
vinaysimha
--0000000000001fcb2605a50e081d-- --===============0712547524== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0712547524==--