From patchwork Fri Jul 20 20:42:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538285 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 7D970604D3 for ; Fri, 20 Jul 2018 20:43:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B75E28E91 for ; Fri, 20 Jul 2018 20:43:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F00228ECC; Fri, 20 Jul 2018 20:43:40 +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 F389628E91 for ; Fri, 20 Jul 2018 20:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728262AbeGTVd3 (ORCPT ); Fri, 20 Jul 2018 17:33:29 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:40007 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728242AbeGTVd2 (ORCPT ); Fri, 20 Jul 2018 17:33:28 -0400 Received: by mail-yw0-f193.google.com with SMTP id p129-v6so4811066ywg.7 for ; Fri, 20 Jul 2018 13:43:33 -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=9/MsawOHQLPrgqHNmYuxB6NQ2v1q/U889Lmn9RF2P9c=; b=nWLQzpllj9NNn2XB9Xp+PYTWNfEXmhJf3WlWmeD5Y4RziLKFtnujKK09UrlqlUaDhj Agu31GUBgl87lDCBmxi99qElDQCRs3kqnMVI2sYinhc7k8z05+Jb4srceo1tV2hdfqEV 520pyrDF86AHbxGPuti/3d0pKj+z6+fqmAFu0= 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=9/MsawOHQLPrgqHNmYuxB6NQ2v1q/U889Lmn9RF2P9c=; b=tvF/k/rFVLitfFJ77YYTrJkm6XaS4jlytDfWunk7s9oBEWNkrqG0079uLCOsI6fkAw mILIBF1C27viIE138W5/Ij96Q7SxEtzGW8wd49/XULb5lvqShel/EnKcbdursopmOGV7 flG9jCp5HHZKPENDwtIuePA7DrxFHnHVGq6hw2YCoFSwfHmJlXJckhW6mCeTKYDKXvlP s4Rci/pSYyVpfcV7ITL9/ub1wNhbG/j17+lt4grskVqVjT6i1NAXJ3Fq5y9SxgG+G3Rk SamorBPsLC5zAmlotNGUU9vwmOmST+5Ua7QUAzNsLJ7LhTu4iMtRYVZHR4Mn6QdP9eig mKGA== X-Gm-Message-State: AOUpUlG715fZPJops1hIqjv4OLSY19ogracM1Psjae3CblF2ivrishGR UfEsasfSLhMkZIOE7h2xGAQlJA== X-Google-Smtp-Source: AAOMgpd8KPw6M1CROsI/Ql90w4o1DinRn+zASycFcEu5FdulBT9ipEUdbwxZ9aFPVGKCDTflNl72bw== X-Received: by 2002:a0d:e742:: with SMTP id q63-v6mr1808188ywe.432.1532119411974; Fri, 20 Jul 2018 13:43:31 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id a2-v6sm2453831ywm.7.2018.07.20.13.43.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:43:31 -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 v3 02/19] drm: Add support for pps and compression mode command packet Date: Fri, 20 Jul 2018 16:42:53 -0400 Message-Id: <20180720204315.19054-3-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog In-Reply-To: <20180720204315.19054-1-seanpaul@chromium.org> References: <20180720204315.19054-1-seanpaul@chromium.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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 Changes in v3: - None 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,