From patchwork Wed Apr 20 09:32:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinay Simha B N X-Patchwork-Id: 8888091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 340099F1C1 for ; Wed, 20 Apr 2016 10:46:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6AB320122 for ; Wed, 20 Apr 2016 10:46:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 071F72024C for ; Wed, 20 Apr 2016 10:46:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44C796E93C; Wed, 20 Apr 2016 10:46:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com [IPv6:2607:f8b0:400e:c03::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 579A36E93A for ; Wed, 20 Apr 2016 09:33:22 +0000 (UTC) Received: by mail-pa0-x229.google.com with SMTP id r5so14722444pag.1 for ; Wed, 20 Apr 2016 02:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ty3t8qif5JNjhiwVL486uLIUKVihb7ZYM9tw4MZSaTE=; b=kwPW+rMvXmYI0U+OXz/cTSMSFgueT1zwX6EFsKkyEzDhbhvt9WuS3drZtN4RBguxpE knpz56g7Ayh6CITzmV+lQ7GVdwc1AKf8WPeDT5f2K1JDg4R5Fmqa4RLCGaNQTPZNNVq1 7Co2DmBgKmP2HVSM8KoKc9gK1FcEddcnSuPj45LGZkuUCifPUGdYunW5/vH5AU+ZUBnQ YEvuPqI+wO/nojcGo0/BJEt5YeqsHoDPOODxuyUi4014sXUqPxKFF0HsPn57si53lTiB ydx8S50MBUneN3KXNaAbcS6nOh4vVZKi4i1UqpD8goFnzTvH//6d5ENWFW4u+GVROE5J IWXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ty3t8qif5JNjhiwVL486uLIUKVihb7ZYM9tw4MZSaTE=; b=ZeBttYQxIUd708FErMhRFgDDZ2mMTQcWghk+4hS8cvWV3sEWMiuYiAT9OeyyYK0lYn 3qulXsGSQZPeRHotf0727SqTFjKAoun6OXCmLxd2XOZMg5O13p3OB7pUFIhOcJZirkl/ WUaBkNVJVOFtYmqyntQBhwdZ2CMT6VPVpwKDacPFnuLxW914LlbofpwXpWGP3yb0+MLG v3uWBqdrvZfk0v+PBawbIk27dd3Z0S73dsnXiBzbVt/YNrzYeErOR74T2+ip9NjB08Eh O/4b8pI7O3a50gD6PdwhKVLLaIcBsBnnhBfrFHnOQTCO84UH6fgPS1bd5cBwhEpcGHsh DxdQ== X-Gm-Message-State: AOPr4FXzbD/F4jGEKVt7iRcDoQtcLalf1isP8tdrUgElgyRFr9BPgYgAkHSsGfPfzNLfmQ== X-Received: by 10.66.190.131 with SMTP id gq3mr10752284pac.42.1461144801721; Wed, 20 Apr 2016 02:33:21 -0700 (PDT) Received: from localhost.localdomain ([202.83.17.75]) by smtp.gmail.com with ESMTPSA id 187sm18973348pff.66.2016.04.20.02.33.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Apr 2016 02:33:21 -0700 (PDT) From: Vinay Simha BN To: Subject: [PATCH v2 3/4] drm/dsi: Implement set tear scanline Date: Wed, 20 Apr 2016 15:02:32 +0530 Message-Id: <1461144755-10633-3-git-send-email-simhavcs@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1461144755-10633-1-git-send-email-simhavcs@gmail.com> References: <20160414171500.GA11505@rob-hp-laptop> <1461144755-10633-1-git-send-email-simhavcs@gmail.com> X-Mailman-Approved-At: Wed, 20 Apr 2016 10:46:20 +0000 Cc: Vinay Simha BN , open list , "open list:DRM DRIVERS" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Provide a small convenience wrapper that transmits a set_tear_scanline command. Signed-off-by: Vinay Simha BN --- drivers/gpu/drm/drm_mipi_dsi.c | 22 ++++++++++++++++++++++ include/drm/drm_mipi_dsi.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index f5d8083..26aba75 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -983,6 +983,28 @@ int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi, EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_on); /** + * mipi_dsi_set_tear_scanline() - turn on the display module's Tearing Effect + * output signal on the TE signal line when display module reaches line N + * defined by STS[n:0]. + * @dsi: DSI peripheral device + * @param1: STS[10:8] + * @param2: STS[7:0] + * Return: 0 on success or a negative error code on failure + */ +int mipi_dsi_set_tear_scanline(struct mipi_dsi_device *dsi, + u8 param1, u8 param2) +{ + u8 payload[3] = { MIPI_DCS_SET_TEAR_SCANLINE, param1 , param2}; + ssize_t err; + + err = mipi_dsi_generic_write(dsi, &payload, sizeof(payload)); + if (err < 0) + return err; + + return 0; +} +EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_scanline); +/** * mipi_dsi_dcs_set_pixel_format() - sets the pixel format for the RGB image * data used by the interface * @dsi: DSI peripheral device diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 7a9840f..37bd75d 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -263,6 +263,8 @@ int mipi_dsi_dcs_set_column_address(struct mipi_dsi_device *dsi, u16 start, u16 end); int mipi_dsi_dcs_set_page_address(struct mipi_dsi_device *dsi, u16 start, u16 end); +int mipi_dsi_set_tear_scanline(struct mipi_dsi_device *dsi, u8 param1, + u8 param2); int mipi_dsi_dcs_set_tear_off(struct mipi_dsi_device *dsi); int mipi_dsi_dcs_set_tear_on(struct mipi_dsi_device *dsi, enum mipi_dsi_dcs_tear_mode mode);