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: 10683193 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 6D10613B5 for ; Wed, 14 Nov 2018 22:27:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ECC027F85 for ; Wed, 14 Nov 2018 22:27:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 504CE2BE9E; Wed, 14 Nov 2018 22:27:57 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 F054827F85 for ; Wed, 14 Nov 2018 22:27:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389488AbeKOIco (ORCPT ); Thu, 15 Nov 2018 03:32:44 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:41382 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388981AbeKOIco (ORCPT ); Thu, 15 Nov 2018 03:32:44 -0500 Received: by mail-qk1-f194.google.com with SMTP id 189so28785225qkj.8 for ; Wed, 14 Nov 2018 14:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bMwKQsPkRI/cPJXwXm3wYhKIDjDUhHJjXHdcgorxaAU=; b=wYq++P+rujYBelKPFYYC++T7Z6ch3IIEFz2abpJ5VUGwrQRVEL9/5ZHVcwOFhb5C6I VDMBj4w0r6wrfROFagWSWVqGpatx/MYynJDJCh6YHW0aQqheF7xWKbl89iVWQllRb2gz 6H3110zPKYJj9hRqRQQW4CtotlgMNSDW/80hvyLeSOmtxvihYHMn0f6rAKaU4CVou5nc fWKr1K2fnDEHElvAF1OsgHQ7FsDW7RSPEQLz1nVieE+2KgPIOdpWoTdlkBXwK8ttHp5i 67uMUFa8yVF2pCzGjGTryZpBtaItUB4ljmgArcQ2YGf/VvG5oaRog57gLyVYFrjJN2Ms TurQ== 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=jeeg3R1tAk02gcxoX9NAGiCC6rgeWxZ4HI4qaml808f0PktFG1I6I5VFZD66OzWVd6 yIXl6U5JiEt2I7Gh6w+05wppMV3gJodwlq9rub/EYO8ySPQW7FuQOPgNMsAHGeVFlT/U Kq6vTJAKlGkW4dxXhtgZP9kc8LHcC1p0j0CUaaSwR/7aciZ5TaCvrVWLDKuEx8brcom2 Mr/LT5+4sNw0VT5+Ftm3n4tBfeI73KvXBtCJhERtCM5sXjA0WRUZLKIzy3YaG6MMhzRJ O8r1b2otl0n04oqkHvmwvAr1Kw1m0bdW+BNXc53PcwmwduqatT0mXJGMpWZBVpF0psoF 7N4g== X-Gm-Message-State: AGRZ1gLdMFiMs7emoF/upGI/zFsnKdRXqErYMNLYMdQ5/mSyuRONKylO aI2+g0d4iKP73LofMK7aHDayWw== 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 Cc: Rob Clark , David Airlie , Sean Paul , Boris Brezillon , Thierry Reding , linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM ADRENO GPU), dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-kernel@vger.kernel.org (open list) 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> 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 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);