From patchwork Thu Nov 22 01:52:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 10693375 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 9C1CF16B1 for ; Thu, 22 Nov 2018 01:55:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 864E42BB18 for ; Thu, 22 Nov 2018 01:55:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A1AF2BBB3; Thu, 22 Nov 2018 01:55:49 +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 26B9A2BB18 for ; Thu, 22 Nov 2018 01:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403926AbeKVMcf (ORCPT ); Thu, 22 Nov 2018 07:32:35 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43971 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730718AbeKVMce (ORCPT ); Thu, 22 Nov 2018 07:32:34 -0500 Received: by mail-qt1-f196.google.com with SMTP id i7so5985738qtj.10 for ; Wed, 21 Nov 2018 17:55:31 -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=M146U05dS1W6ab8p8FDpjUuW0Ac4Aorm6XQ++Q5OVr7OJQlUp1lbc0zcFb/qxQkz8d BVQbs3X02FtoSSqwxPpvMvqvZwfOu06dNSw4XvBevfL46sewRDBROTt6flHinaxtzP2w 5MfKDcmm0Ano5yghyFoK3IngdmCS+lE1EwW3b4EcRbaExXn6QpnNFp6AeGF/xMzDdH/o BXsKl/xHNFrauOV9QiHUViWgJsrVeYam4PxOTy9PH16IGRuN6fXFuOElkzuy+yWoAMPq 5W+n8HB1V5b2EXaIovtVxGRaK7N3uv/NTV+MEM4FqI5RTpVUYtWuawfNPG43kDs0H3Vh K+wg== 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=rChA9etvgrWgVuPz7x01CvcK7bv+XCYMDGoGqmyLuE7KxqbNJpxToe98EdXJlXdhRR LJuW2idI4cKgM2IX34MSWN6Wc+4Gol/mBVDMPdkHTz2evfsjsn7NBnLsWQFU6LFNTBXh BemhPQC+RJHzPLM110JtBGQTPMOCoX7xd8yzNPlikrDA2YezM626wknjKBfr7xL77nxN EeaUI3vjnKyZOonVVbdQ7LDLca5+3iYEJzHArDGvenya4bnZXDSeqB+ZVF3sS59nyFBl sBEyDjkX5Yp1+sA0OaWelhnW5zn9o5JM6SJGymJpe7CtFBKWg8HgNjFBnKCJf9oHNveg mINA== X-Gm-Message-State: AGRZ1gLeNApodMzMPQKSIJZrojvJKDmBr87BS91YIbkm2YxYqdJGpFyW zUApvwC3SuN6gW6S1B1wyHw86w== X-Google-Smtp-Source: AJdET5eTZPpxllvlX0XVv9Hpc0qkwc5gdo2s3QZT6jQRlk3pdjFcpjOwZe+qLRee5/pUL+wobqLpHg== X-Received: by 2002:ac8:231a:: with SMTP id a26mr8604020qta.40.1542851730793; Wed, 21 Nov 2018 17:55:30 -0800 (PST) Received: from localhost.localdomain (modemcable014.247-57-74.mc.videotron.ca. [74.57.247.14]) by smtp.gmail.com with ESMTPSA id q15sm25297721qkl.81.2018.11.21.17.55.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Nov 2018 17:55:30 -0800 (PST) From: Jonathan Marek To: freedreno@lists.freedesktop.org Cc: Chris.Healy@zii.aero, festevam@gmail.com, Rob Clark , David Airlie , Boris Brezillon , Thierry Reding , Sean Paul , 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 v2 3/9] drm/msm/mdp4: add lcdc-align-lsb flag to control lane alignment Date: Wed, 21 Nov 2018 20:52:29 -0500 Message-Id: <20181122015237.14534-3-jonathan@marek.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181122015237.14534-1-jonathan@marek.ca> References: <20181122015237.14534-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);