From patchwork Tue May 5 16:03:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11529581 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4291D1392 for ; Tue, 5 May 2020 16:06:08 +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 2057D206A4 for ; Tue, 5 May 2020 16:06:08 +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="JaWXAoJk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2057D206A4 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 A73DB6E7DB; Tue, 5 May 2020 16:06:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id D918A6E5D5 for ; Tue, 5 May 2020 16:05:59 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id u16so2942458wmc.5 for ; Tue, 05 May 2020 09:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9Lg+gPF2P0MEgQL05rDAB/dXUVq400Yz6N4qXpQCO5A=; b=JaWXAoJklRiuF6MmIYIEcwbZXJDKW70vF6webo/ITMZsjhUqm7mJ088PRDxFkBMZ3y Hcqos8s0cCR+TD1Y/rj3q5vZRzw8B3e9208JOfeRKTWlPuXBzcZasoFgRCRcqERw39PC DiT9iJwBUU91azVyqJi+QNpCvexIMwQIXbnqQ6qWoS4RgJSoHX0BpREqoAY6zl0XOf9P TsywwlOlanP9r0nJJjvxXEYiN8Zh6qwhvmDkJEBhsJV7QWbPT+GqJZ1HIPu21tMrbHqu H+U/t72+8yJC+kzt3nJlOujhLNi/olkLLmQBugciQtZFU9TbkCiIMcMc6eIoZTrqR+ql YgZg== 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=9Lg+gPF2P0MEgQL05rDAB/dXUVq400Yz6N4qXpQCO5A=; b=dJDBpjWabzb4mXnhKv28GTOyeIPdo0sDyYMpkr59etx4mavqXlJbmgvQHzbzlNReSL kx/5h2mAIsJb6ZaKUilzh9+itMa4VTznY6RU+JEsuSBS589T58jN8mxY/362qeIQZK86 Q9l6BNDQPbFbcGF46/PtuT7sBJCf9qbW5SfbKi/okjMdiZXI/YMkz8h+VueaqiOD9sxn VawEBtkYy2GpgCiB/r4CInJNPvlrvDzJpPnsomOo/xd/5uLnolYej0d/gp4YWmLbL/C2 J+Ge/EHqzA8D1lGDH1d/PZvx7k55aGV267eWPlXcEvPi/Wu6R2GWDnLoYAJSY78xfmNz ZSew== X-Gm-Message-State: AGi0PuZHHz35vFiz9qTSCY7nd1byP66b2hxJbz5LaaZgU1cm3DBJ9nXB iG2ZRWY2xFZyLsXCTL4Yc42zd/XX X-Google-Smtp-Source: APiQypJ7UwzrgmnXlJhm0jvdrh9RmtJzGL3bWRqKRdVT29OlrJgJA3xb8VTYnHYpSOuST12xPz25Vg== X-Received: by 2002:a1c:80c3:: with SMTP id b186mr4404910wmd.117.1588694758238; Tue, 05 May 2020 09:05:58 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id w18sm3803621wrn.55.2020.05.05.09.05.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 09:05:57 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline Date: Tue, 5 May 2020 17:03:29 +0100 Message-Id: <20200505160329.2976059-3-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200505160329.2976059-1-emil.l.velikov@gmail.com> References: <20200505160329.2976059-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 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: Robert Chiras , Vinay Simha BN , Jani Nikula , Thierry Reding , emil.l.velikov@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Thierry Reding --- 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. --- 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] = { MIPI_DCS_SET_TEAR_SCANLINE, scanline >> 8, - scanline & 0xff }; + u8 payload[2] = { scanline >> 8, scanline & 0xff }; ssize_t err; - err = mipi_dsi_generic_write(dsi, payload, sizeof(payload)); + err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_TEAR_SCANLINE, payload, + sizeof(payload)); if (err < 0) return err;