From patchwork Mon Nov 3 09:13:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5215231 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 30D31C11AC for ; Mon, 3 Nov 2014 09:14:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 735442015E for ; Mon, 3 Nov 2014 09:14:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 93B672012B for ; Mon, 3 Nov 2014 09:14:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B04F36E400; Mon, 3 Nov 2014 01:14:18 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 9320D6E400 for ; Mon, 3 Nov 2014 01:14:17 -0800 (PST) Received: by mail-pa0-f46.google.com with SMTP id lf10so11823157pab.33 for ; Mon, 03 Nov 2014 01:14:17 -0800 (PST) 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=nD+EHS3UGlemEcjG/qXOw4lIi3zE4VMJq+cwK941pyU=; b=juSmVXErtVs9kOXFch5sfrBMtYb8s5qzKrvuFS9vrmywLrxz1evFm+6LIOLuzJlgwN wtfU6N7VhF2WN6QEKAdBE2JRyNfu8GwOmAVPN4orSSL7uU3R6t6by/1HknchZRojxv0i kjbLh11VzlTl+dHwmpRjGDpYJ1a63uiLWnUNIux9fPlQ2cKRyQZQiz3vFXyGfVhLykJc N4TBEjjDxg13UqtGMx7z2uVdpnLOs+lojkTnaZmbFnzO2v/JKpBnNw5Te8xLrTCabWjN cNM9wuSn1XhgFxbAxWTzgwx4NnvXFKXsWXQipV42Sj0MHURDt5a0Le3vjXAjSfbWSwct Bq7w== X-Received: by 10.68.129.69 with SMTP id nu5mr40800609pbb.51.1415006057498; Mon, 03 Nov 2014 01:14:17 -0800 (PST) Received: from localhost ([216.228.120.20]) by mx.google.com with ESMTPSA id b1sm3066744pdj.76.2014.11.03.01.14.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2014 01:14:16 -0800 (PST) From: Thierry Reding To: Thierry Reding Subject: [PATCH v4 06/16] drm/panel: s6e8aa0: Use standard MIPI DSI function Date: Mon, 3 Nov 2014 10:13:31 +0100 Message-Id: <1415006021-29313-6-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1415006021-29313-1-git-send-email-thierry.reding@gmail.com> References: <1415006021-29313-1-git-send-email-thierry.reding@gmail.com> Cc: Andrzej Hajda , dri-devel@lists.freedesktop.org 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=-4.7 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 From: Thierry Reding Use the newly introduced mipi_dsi_set_maximum_return_packet_size() function to replace an open-coded version. Signed-off-by: Thierry Reding --- drivers/gpu/drm/panel/panel-s6e8aa0.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c index 0f85a7c37687..c31e2953f290 100644 --- a/drivers/gpu/drm/panel/panel-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c @@ -800,27 +800,15 @@ static void s6e8aa0_panel_init(struct s6e8aa0 *ctx) } static void s6e8aa0_set_maximum_return_packet_size(struct s6e8aa0 *ctx, - int size) + u16 size) { struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); - const struct mipi_dsi_host_ops *ops = dsi->host->ops; - u8 buf[] = {size, 0}; - struct mipi_dsi_msg msg = { - .channel = dsi->channel, - .type = MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, - .tx_len = sizeof(buf), - .tx_buf = buf - }; int ret; if (ctx->error < 0) return; - if (!ops || !ops->transfer) - ret = -EIO; - else - ret = ops->transfer(dsi->host, &msg); - + ret = mipi_dsi_set_maximum_return_packet_size(dsi, size); if (ret < 0) { dev_err(ctx->dev, "error %d setting maximum return packet size to %d\n",