From patchwork Thu Sep 27 11:48:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10618415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D663214BD for ; Thu, 27 Sep 2018 18:27:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C02942BAA1 for ; Thu, 27 Sep 2018 18:27:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B44C62BAB8; Thu, 27 Sep 2018 18:27:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 743262BAA1 for ; Thu, 27 Sep 2018 18:27:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 599316E610; Thu, 27 Sep 2018 18:27:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 06E6A6E597 for ; Thu, 27 Sep 2018 11:49:50 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id z3-v6so1773885pgv.8 for ; Thu, 27 Sep 2018 04:49:50 -0700 (PDT) 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=zrFpat5SwIdegq1NOT/FqyMYxxQkp+FdL7Qi1lHha3A=; b=b+36ndjQ0MymhcZrz8g+xdwVqYPuVMUDVvO4cRnXB8OslkY5pUFP/nMVP5g8Cc6V3q 3jzm5z8fhHmYe6G4z5KSJyHLVDxgcNZV1u5MpXNhgvTomIF2sh/TyNdGy5CeTPfL6BfV fDPoM6KXNvLNFGfzcpSXygEE4z6/0KUV5nAGXg5rl23kDUt7zYiUNMYKr7eWbeMp5FI/ 966ykuNvJw9MvJkdkEsWuH0GWIQBA0fH8YVzZouHGNr+7rIyVw42VaWV2AaFA2BqfuVm i+GRw927YjuGlt1wVHi6LOqTlh12wHbyGVIQhW8lUhUdOxHef+uV8Md+B0tEUKDOIYZj l/Rw== X-Gm-Message-State: ABuFfog7GQbxYjcN/AEt1v1YFgYbel9GRaQ6A2s8h4U9icqpk+fu0+Uh TYQQ57k95htyhfoQJc5TjA9LGg== X-Google-Smtp-Source: ACcGV626P/nIK+nl+dkDoqQjr+hcyM7N1R7kYzYQ5ARGgoyJI2iLlyCEw7XW8Yt5xZz+B6o7DvvjKQ== X-Received: by 2002:a65:5304:: with SMTP id m4-v6mr10083218pgq.250.1538048990484; Thu, 27 Sep 2018 04:49:50 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.49.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:49:49 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 05/12] drm/sun4i: sun6i_mipi_dsi: Add DSI Generic short write 2 param transfer Date: Thu, 27 Sep 2018 17:18:43 +0530 Message-Id: <20180927114850.24565-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Sep 2018 18:27:00 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Short transfer write support for DCS and Generic transfer types share similar way to process command sequence in DSI block so add generic write 2 param transfer type macro so-that the panels which are requesting similar transfer type may process properly. Also added error check for unsupporting transfer types this make debugging easy for new transfer types. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 156b371243c6..1c7e42015645 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -869,6 +869,7 @@ static ssize_t sun6i_dsi_transfer(struct mipi_dsi_host *host, SUN6I_DSI_CMD_CTL_TX_FLAG); switch (msg->type) { + case MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM: case MIPI_DSI_DCS_SHORT_WRITE: case MIPI_DSI_DCS_SHORT_WRITE_PARAM: ret = sun6i_dsi_dcs_write_short(dsi, msg); @@ -885,6 +886,8 @@ static ssize_t sun6i_dsi_transfer(struct mipi_dsi_host *host, } default: + dev_err(dsi->dev, "unsupported message type 0x%02x\n", + msg->type); ret = -EINVAL; }