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: 10695117 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 3CAE01750 for ; Fri, 23 Nov 2018 07:41:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E5E52BCA5 for ; Fri, 23 Nov 2018 07:41:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21BA62BCAB; Fri, 23 Nov 2018 07:41:38 +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 B77DE2BCA5 for ; Fri, 23 Nov 2018 07:41:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D7746E310; Fri, 23 Nov 2018 07:41:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 957D46E321 for ; Thu, 22 Nov 2018 01:55:31 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id i7so5985739qtj.10 for ; Wed, 21 Nov 2018 17:55:31 -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=ksmTSP7WSZ0bzDggJj3V6lQqN42D+zRbTS5iSHN65D3AmmQnwWhtlRqfnpzYi4Z0r+ ttjLdSryOvtrEw8QSrBrRInLlymx+Imd981yuF4g5W0cjkL+gNOwCUX1UAaiGyiSidKv TZl9YvCT/F7M3q6/Jydcpn4RgP8+qY3lN6px5WkPF+G0SEMvfww+kFG4Oz6QCQaSemi8 OgqieqBz5gGr/Uksl0DcN9cBZGfDuGlDUVocCVOc3hGnMcDMWGeGC2iHtCubeHZ2kXJB HXRBexm8c00hAoG47dvf3ciKjCfwjsn7NIwGEHNLYTd9HTXIRft8MPk0y96dIEGd7cD1 v1jA== X-Gm-Message-State: AGRZ1gIlzVCf0Nn8Y7GkuKEYXLdc7ku4wPi1ySYymzW6QREqk4gmtDLW DtMOjw7AibryxX/OBllLfoDQlw== 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 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> X-Mailman-Approved-At: Fri, 23 Nov 2018 07:41:29 +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 , Chris.Healy@zii.aero, 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);