From patchwork Mon Jul 9 17:31:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10515341 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5000F600CA for ; Mon, 9 Jul 2018 17:33:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 376B128DC4 for ; Mon, 9 Jul 2018 17:33:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B47128DD2; Mon, 9 Jul 2018 17:33:04 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C371828DC4 for ; Mon, 9 Jul 2018 17:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933634AbeGIRct (ORCPT ); Mon, 9 Jul 2018 13:32:49 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:34040 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933574AbeGIRcr (ORCPT ); Mon, 9 Jul 2018 13:32:47 -0400 Received: by mail-yb0-f196.google.com with SMTP id e9-v6so7499110ybq.1 for ; Mon, 09 Jul 2018 10:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q3/Dfl26JmFTMhRSLOf8HmACWIUALpACFyoE5/iMMSs=; b=gw3upmrzXxvv8fOBmKHyxk38P/fcWfVNoCMsbayUHWGHd9ZK/YxCU6tdEMizPWB/BV 2C/CbMiSR9Me5NX9GX1BhqkaE9uQbS63U2++0MNG5quTzZTfCXqK3k8OQvZWJpbtWVXO N0lNbStByMnLQK053D6wqGdPQieriuJxe8vaY= 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; bh=q3/Dfl26JmFTMhRSLOf8HmACWIUALpACFyoE5/iMMSs=; b=M6gNTzq6YH2GzClp4D9JCysNDjRAiQ59Wf+aeMsWaGL+TZkrBwx7zC373HVc+HI95O UMZV/J7CJTnJnxr/evJRBpJxFvXBGZFmKrhQeOcS+Tncdd3ngpJPKGgbqlx8ppMVPREo 09YEfsQywAgXm97kCs7ni1peZj/qG+/Vak8SEt24eA7E+NKjqPGC8K7q5gM6JnX9iFmW aRKFippAMZPwhOiA2aBV41orvgXRHT/yxXEGUc4l7dwkX8jDNSVOpCzRCE74L7k0Nnga eB70Xs0i7nNq43B33FuIpHlpchBnUHuFKkEDP07uY+SrfVzyMXUd8fctVKJMVGQYcV9W 9nKw== X-Gm-Message-State: APt69E1Iz1SDmIO1bdDPDNYvsZ6TaP28dZkvY8FRm0fxXj4Ca/RwF2gg Bw2oSLheawYkHmucQylIWrXyhOWUmYY= X-Google-Smtp-Source: AAOMgpciWIP+cABmyIFcVNbcnTDtgRpV4uO+AXlIBzj0hkg/WctYrhLgVFwv1gnOfc12RZSg+h75uw== X-Received: by 2002:a25:a08a:: with SMTP id y10-v6mr11075599ybh.219.1531157566525; Mon, 09 Jul 2018 10:32:46 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id s206-v6sm5885495ywc.55.2018.07.09.10.32.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 10:32:45 -0700 (PDT) From: Sean Paul To: abhinavk@codeaurora.org, architt@codeaurora.org, chandanu@codeaurora.org, jsanka@codeaurora.org, jcrouse@codeaurora.org, ryadav@codeaurora.org, seanpaul@chromium.org, skolluku@codeaurora.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, airlied@linux.ie, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, nganji@codeaurora.org, hoegsberg@chromium.org, dovizu@chromium.org, robh+dt@kernel.org Cc: vkorjani , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, Gustavo Padovan , Maarten Lankhorst , Bartlomiej Zolnierkiewicz Subject: [PATCH 03/21] drm: Add support for pps and compression mode command packet Date: Mon, 9 Jul 2018 13:31:39 -0400 Message-Id: <20180709173200.238457-4-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog In-Reply-To: <20180709173200.238457-1-seanpaul@chromium.org> References: <20180709173200.238457-1-seanpaul@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: vkorjani After enabling DSC we need to send compression mode command packet and pps data packet, for which 2 new data types are added 07h Compression Mode Data Type Write , short write, 2 parameters 0Ah PPS Long Write (word count determines number of bytes) This patch adds support to send these packets. Cc: David Airlie Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: vkorjani [seanpaul removed pps_write_buffer fn, added types to packet_format helpers] Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_mipi_dsi.c | 2 ++ include/video/mipi_display.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index bc73b7f5b9fc..80b75501f5c6 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -392,6 +392,7 @@ bool mipi_dsi_packet_format_is_short(u8 type) case MIPI_DSI_DCS_SHORT_WRITE: case MIPI_DSI_DCS_SHORT_WRITE_PARAM: case MIPI_DSI_DCS_READ: + case MIPI_DSI_DCS_COMPRESSION_MODE: case MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE: return true; } @@ -410,6 +411,7 @@ EXPORT_SYMBOL(mipi_dsi_packet_format_is_short); bool mipi_dsi_packet_format_is_long(u8 type) { switch (type) { + case MIPI_DSI_PPS_LONG_WRITE: case MIPI_DSI_NULL_PACKET: case MIPI_DSI_BLANKING_PACKET: case MIPI_DSI_GENERIC_LONG_WRITE: diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h index 19aa65a35546..49a53ef8da96 100644 --- a/include/video/mipi_display.h +++ b/include/video/mipi_display.h @@ -38,6 +38,9 @@ enum { MIPI_DSI_DCS_READ = 0x06, + MIPI_DSI_DCS_COMPRESSION_MODE = 0x07, + MIPI_DSI_PPS_LONG_WRITE = 0x0A, + MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE = 0x37, MIPI_DSI_END_OF_TRANSMISSION = 0x08,