From patchwork Mon Oct 13 10:16:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5074911 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1528A9F387 for ; Mon, 13 Oct 2014 10:16:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C209201EC for ; Mon, 13 Oct 2014 10:16:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 682CD201C7 for ; Mon, 13 Oct 2014 10:16:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A75889CF5; Mon, 13 Oct 2014 03:16:45 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 2081B89CD8 for ; Mon, 13 Oct 2014 03:16:43 -0700 (PDT) Received: by mail-wg0-f42.google.com with SMTP id z12so8154030wgg.13 for ; Mon, 13 Oct 2014 03:16:43 -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=nD+EHS3UGlemEcjG/qXOw4lIi3zE4VMJq+cwK941pyU=; b=BHKxVUpHI0AH3LLvZiI3nU8XENJotT0v793c0nsFGfAHEMcOziuebY52sSaiJGKsmn +ojQFmeV0obMvLrQrOshwLrlw+fyKqCfyPl6vRhRNa8YqfGUTSsy1Oi3N9nq05m9bqVi ogA4/0XsX6LHzd+7JkthwRLe030il2tEvN8Cng0PrHTuDlWQ5zNa7w3/ujs6kWHg22Oq 7n/M/C8OHFWj2ghkrxAKO9S+Ry2sV983QF/eKdSLhg3/BCieOA9ssH0W9pPzS05Lr9RL FqvDGhheueSi1uJF7wCESjz+xIapcrHZmoAcrpymN9MBvxDkFAj4v3S8FfL1npB8ii4n 5P2g== X-Received: by 10.180.96.71 with SMTP id dq7mr19436827wib.66.1413195403305; Mon, 13 Oct 2014 03:16:43 -0700 (PDT) Received: from localhost (port-4359.pppoe.wtnet.de. [84.46.17.24]) by mx.google.com with ESMTPSA id ew4sm3298242wid.19.2014.10.13.03.16.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 03:16:42 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH 04/15] drm/panel: s6e8aa0: Use standard MIPI DSI function Date: Mon, 13 Oct 2014 12:16:24 +0200 Message-Id: <1413195395-3355-4-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1413195395-3355-1-git-send-email-thierry.reding@gmail.com> References: <1413195395-3355-1-git-send-email-thierry.reding@gmail.com> Cc: Andrzej Hajda X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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",