From patchwork Wed Nov 14 22:24:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 10683657 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 DBF1513B5 for ; Thu, 15 Nov 2018 08:14:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF4EC2C342 for ; Thu, 15 Nov 2018 08:14:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C38012C35E; Thu, 15 Nov 2018 08:14:03 +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 730592C342 for ; Thu, 15 Nov 2018 08:14:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A60526E5EF; Thu, 15 Nov 2018 08:13:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by gabe.freedesktop.org (Postfix) with ESMTPS id D21AE6E5DC for ; Wed, 14 Nov 2018 22:27:38 +0000 (UTC) Received: by mail-qk1-x741.google.com with SMTP id 131so28781800qkd.4 for ; Wed, 14 Nov 2018 14:27:38 -0800 (PST) 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=bMwKQsPkRI/cPJXwXm3wYhKIDjDUhHJjXHdcgorxaAU=; b=mNB4TvW83g67QMCCpgRKPxvWvlDtAQxxpuz7JDSD4VjnIw7Mc7MBRMR/EZe6RLUJ/h sznmq0tI/bQzoQWMwdKv7KKTOEwfZfIIobsN2gz768HpGPdX18BX/tLb8ZIbkepjMHVM FTkZP1vNCDEeZjuXD3fJzBzVsOaJlG2b5V4yVzJo8pXwzEN7V32Igt/XTERxDqKo8FEo slbnbaqiRk50/niQKC9rdkpqQBLyfnWMBSFCvzdo2hzjTNVCwmIjL2Xu0Uv7iFIU7Wer bfWTODP3ngCVnm+ibqcC0j+Bmdl4pcK0u7AaeTheQ907Fc8ehugf1u0k2KjaV6cCudpl wOMQ== X-Gm-Message-State: AGRZ1gJNvBAghAoZMC3ugWofYTT66+yVK049uC9lZVJRW2ULO3LjIo8u ahclUpWywARWjp+Fbm7U9ZJ2Eg== X-Google-Smtp-Source: AJdET5d5yihjjUfneVTMijFa7FNO3l571/RFRF51vW5ETLfr+D1ibIltQyG1eXHB+Y9wfekbdMG2og== X-Received: by 2002:ac8:3518:: with SMTP id y24mr3600014qtb.241.1542234458110; Wed, 14 Nov 2018 14:27:38 -0800 (PST) Received: from localhost.localdomain (modemcable014.247-57-74.mc.videotron.ca. [74.57.247.14]) by smtp.gmail.com with ESMTPSA id 24sm24067595qkp.65.2018.11.14.14.27.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 14:27:37 -0800 (PST) From: Jonathan Marek To: freedreno@lists.freedesktop.org Subject: [PATCH 3/9] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment Date: Wed, 14 Nov 2018 17:24:10 -0500 Message-Id: <20181114222418.15960-3-jonathan@marek.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222418.15960-1-jonathan@marek.ca> References: <20181114222418.15960-1-jonathan@marek.ca> X-Mailman-Approved-At: Thu, 15 Nov 2018 08:13:45 +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: David Airlie , "open list:DRM DRIVER FOR MSM ADRENO GPU" , open list , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Boris Brezillon , Sean Paul , Thierry Reding MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Controls which of the 8 lanes are used for 6 bit color. Signed-off-by: Jonathan Marek --- .../gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c index e19ab2ab63f7..7d8d11c8150a 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c @@ -377,20 +377,26 @@ static void mdp4_lcdc_encoder_enable(struct drm_encoder *encoder) unsigned long pc = mdp4_lcdc_encoder->pixclock; struct mdp4_kms *mdp4_kms = get_kms(encoder); struct drm_panel *panel; + uint32_t config; int i, ret; if (WARN_ON(mdp4_lcdc_encoder->enabled)) return; /* TODO: hard-coded for 18bpp: */ - mdp4_crtc_set_config(encoder->crtc, - MDP4_DMA_CONFIG_R_BPC(BPC6) | - MDP4_DMA_CONFIG_G_BPC(BPC6) | - MDP4_DMA_CONFIG_B_BPC(BPC6) | - MDP4_DMA_CONFIG_PACK_ALIGN_MSB | - MDP4_DMA_CONFIG_PACK(0x21) | - MDP4_DMA_CONFIG_DEFLKR_EN | - MDP4_DMA_CONFIG_DITHER_EN); + config = + MDP4_DMA_CONFIG_R_BPC(BPC6) | + MDP4_DMA_CONFIG_G_BPC(BPC6) | + MDP4_DMA_CONFIG_B_BPC(BPC6) | + MDP4_DMA_CONFIG_PACK(0x21) | + MDP4_DMA_CONFIG_DEFLKR_EN | + MDP4_DMA_CONFIG_DITHER_EN; + + if (!of_find_property(dev->dev->of_node, "lcdc-align-lsb", NULL)) + config |= MDP4_DMA_CONFIG_PACK_ALIGN_MSB; + + + mdp4_crtc_set_config(encoder->crtc, config); mdp4_crtc_set_intf(encoder->crtc, INTF_LCDC_DTV, 0); bs_set(mdp4_lcdc_encoder, 1);