From patchwork Thu Apr 21 04:28:52 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: 8896801 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 31C3E9F1C1 for ; Thu, 21 Apr 2016 07:49:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60B66202EC for ; Thu, 21 Apr 2016 07:49:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 78C3E20145 for ; Thu, 21 Apr 2016 07:49:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C495E6EBFC; Thu, 21 Apr 2016 07:48:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4175D6E1B6 for ; Thu, 21 Apr 2016 04:29:33 +0000 (UTC) Received: by mail-pa0-x233.google.com with SMTP id er2so24754026pad.3 for ; Wed, 20 Apr 2016 21:29:33 -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; bh=deBcrUJsQWL7zu38GAWbBCZcB7ccvF/XSsIS0HvmgH8=; b=Uaa6P1qZOLioc2zxbJ3XawqvzWyGIi4dFZzyAFx8/70ZzBDj7jNxwFWJT2KLTG/2Xx +qJZ47Eb3Wkg65TuAuwYUAuZJZN00h3cPMVXVLEm945vCq3mLO6i7GDLRcHT+RqplHD1 T8sHs98HEW/KM56LeJ2ySqGHvuW9NMLc+fLMrCzD08wQoZsWmmXcBaRBlNdwA3ZYdWcY 32uShrNDIREEpdXGe9UKvtGKG8RPCFu1mtaFSWVTlVAPsLjob65SBv6ZSyRIybf0isPH G7OEX65GUzJudl06E9DaVMuHfeG+WP4MqNnArEBQHuxTxHymAvgLuywMEcwcUFiz6Bq2 6LqQ== 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; bh=deBcrUJsQWL7zu38GAWbBCZcB7ccvF/XSsIS0HvmgH8=; b=EWnbV96x+aQA6xIkxTE+n7YsIDSP52Re/Pa3pAjSw59RLug/ieyzuuL0huHdCHvwfO c780XKkpF7PL1wsnZ/h58TVas358NBErsfvmIT9c603lO7+ODDsreoBYpLwh1EtXFoyC u3Vc6kj4mkzAxlZj9L3NF1HqMTJpxnlzBqptRxXLy+BBqBNEYnsTkXoSrXpXLrcZWiz0 AD+GVm3IB1C1iiE1/3jEpH4CG9GE7BlnuB1s7RPADDS+2ihkTib64hLndisP/b4LGmVd VyHUfkbfc4p77MIDFtZ9r+ar+smDHNlzEvxZJcBmnj1ZQAJK3Y8X/hTr1YJ4Kmg8e7VW 4vFg== X-Gm-Message-State: AOPr4FUDUolNQxdHqKMow3dsSinYl0ldVAMxejfBlRKzpq82muX+5Yqc/fBZW3t9TcJS0Q== X-Received: by 10.66.232.226 with SMTP id tr2mr17630764pac.44.1461212972561; Wed, 20 Apr 2016 21:29:32 -0700 (PDT) Received: from localhost.localdomain ([202.83.17.75]) by smtp.gmail.com with ESMTPSA id w20sm896557pfi.31.2016.04.20.21.29.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Apr 2016 21:29:31 -0700 (PDT) From: Vinay Simha BN To: Subject: [PATCH v2] drm/dsi: Implement set tear scanline compile fix Date: Thu, 21 Apr 2016 09:58:52 +0530 Message-Id: <1461212932-4664-1-git-send-email-simhavcs@gmail.com> X-Mailer: git-send-email 2.1.2 X-Mailman-Approved-At: Thu, 21 Apr 2016 07:48:56 +0000 Cc: open list , "open list:DRM DRIVERS" , Vinay Simha BN , Archit Taneja 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. Cc: Archit Taneja Cc: Sumit Semwal Cc: John Stultz Cc: Thierry Reding Signed-off-by: Vinay Simha BN --- drivers/gpu/drm/drm_mipi_dsi.c | 23 +++++++++++++++++++++++ include/drm/drm_mipi_dsi.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index f5d8083..2f0b85c 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -983,6 +983,29 @@ 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_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..2788dbe 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);