From patchwork Sat Sep 21 08:17:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13808802 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4763CF9C5B for ; Sat, 21 Sep 2024 08:17:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2959C10E1C3; Sat, 21 Sep 2024 08:17:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="TTPrqwjo"; dkim-atps=neutral Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4547B10E15F for ; Sat, 21 Sep 2024 08:17:39 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-535be093a43so3573833e87.3 for ; Sat, 21 Sep 2024 01:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726906657; x=1727511457; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=wmjLhN45ALPPiR+iRXWQ3K4t8AHpJus0NbAIqkjIKHc=; b=TTPrqwjojreSxotP7PjlLhdGAb4wWGuKCrg/XVgrRc67TlzymP4LwPXd1J7v9ZTN+B 2a6CthtpmYysKrGNzfKcH4hRfgr4UYm6bNScdryRMMxOpSg7OH5y8VEptlvAE+9g62bD b4SOFxfS8PRWyva5ZU5FqBYeT+fg7dpo9V1oasmzd0hq8B8vD3iY9NMj86vZIjSFrhex k4pFolxWrY4xdUb706q0EhA67260XShXW2NiPtLDJFjeDFYXC/Bp/q+yh4t5ST9gto75 cBeygErouWlHwmguywWdOy/YI9UBco+Yy4MSTz0Zdkov+/4QrsOvXpMiSEmkLMkENBt1 GJZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726906657; x=1727511457; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wmjLhN45ALPPiR+iRXWQ3K4t8AHpJus0NbAIqkjIKHc=; b=ZhrAjuhU4az1bvuQ//VJPzT/o8yYi2v7iemLVK0zbHReQIcNSe2zNTt2q4SucDVxqY E7syIcbJfe2DqgG7FLWQNtTKgsMgg2MmhmyxwOrptGZ2fK+vl9C9jssNXcDB0bKdbEXN Ya62oYzBL4s05kWpM+ILE6+s54bIuQkS79H6EoM69RkHb/QJcvoTDNltDn2f0FtfD2WA EAJKXYKt1JhBtY04p78BPyA8OXtXvFCM/lfrUWq773KB6y67BdYQKTMrI+TsYhoyTXEa DPp/A9VOwNLhBsTTS64fVU9LSBLEXQu5mozBKIkhWYJQ9Z+VsmEHpifYLh+NkhRUYEaE SfJQ== X-Forwarded-Encrypted: i=1; AJvYcCXZs39hfrq6JjSoQeZjJGMRtV6wM1zZNCUGEJlM+DREz4ySQOtH8jjYORwLCT3GZthzRdavDdRGXXQ=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyYou0omfLowdXZgbkhbCEx9EhboDRcPJI2HouqOQ8QssLX32x8 eP2uKtZafWdW2brGwKIk0eLUG4Nz62nWh1YF1S144MO6355MB+kG6+CuGVL0Zy0= X-Google-Smtp-Source: AGHT+IGxbdLlaIHZI3XMOG8yIZU4pHHubytur/pR5AgxpylOBi198gvBqPuSta56H37+ZeQhmJjWRQ== X-Received: by 2002:a05:6512:12c4:b0:535:6cef:ffb8 with SMTP id 2adb3069b0e04-536ac338a9amr3458360e87.54.1726906657229; Sat, 21 Sep 2024 01:17:37 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-536870968d1sm2466380e87.175.2024.09.21.01.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2024 01:17:36 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 21 Sep 2024 11:17:29 +0300 Subject: [PATCH 1/4] drm/msm: move MDSS registers to separate header file MIME-Version: 1.0 Message-Id: <20240921-msm-mdss-ubwc-v1-1-411dcf309d05@linaro.org> References: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> In-Reply-To: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3169; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=xLM1ISnVwa/GRZKkuzfezgSM5E3kbR2k0DPUIeRVKCA=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ9q7RvmrvSzz6qY77lq3Y239d6FM0cAjy46E/LzRb+T8l 7k7xzuyk9GYhYGRi0FWTJHFp6Blasym5LAPO6bWwwxiZQKZwsDFKQATWfKD/X/tKw3dxFsN4Ym3 YpXVTZRYN9jL5NXWnOlYHOdqu9t9jWvgkaZ1dg9d/m195H6t7pqhXHZW3vPbCv1xiybfcZVc++V Dpt+F+mzlxzUmP1ofvWll2bBo4S+FXC9uy0ym9lCl9w8LbgucNHoix1W5a5bYwzKbPX9L3Jju2H VOve4vPsk2Y7K33OLwstK9t2LUFy5huLT0oIqVwgV7nT+v7z49EbNsq2WfFa/VM9tb7TvDfvJ7L 1N3WOb5/1ebqSTvlijxz65FZ2y09hxzSJ88tYmxLs6zoXjeeTGFJYWhLsvepWpK/85wCVr12z3W jc9xzuuo6wzS9luXBKZYamvWSKsfZvv+tPuFQRuf9rY8AA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In preparation of adding more registers, move MDSS-related headers to the separate top-level file. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/registers/display/mdp5.xml | 16 ---------------- drivers/gpu/drm/msm/registers/display/mdss.xml | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile index 13110fcc46a8..db2174e2efa8 100644 --- a/drivers/gpu/drm/msm/Makefile +++ b/drivers/gpu/drm/msm/Makefile @@ -210,6 +210,7 @@ DISPLAY_HEADERS = \ generated/mdp4.xml.h \ generated/mdp5.xml.h \ generated/mdp_common.xml.h \ + generated/mdss.xml.h \ generated/sfpb.xml.h $(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS)) diff --git a/drivers/gpu/drm/msm/registers/display/mdp5.xml b/drivers/gpu/drm/msm/registers/display/mdp5.xml index 92f3263af170..8c9c4af350aa 100644 --- a/drivers/gpu/drm/msm/registers/display/mdp5.xml +++ b/drivers/gpu/drm/msm/registers/display/mdp5.xml @@ -9,22 +9,6 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd"> - - - - - - - - - - - - - - - - diff --git a/drivers/gpu/drm/msm/registers/display/mdss.xml b/drivers/gpu/drm/msm/registers/display/mdss.xml new file mode 100644 index 000000000000..9354cfffb730 --- /dev/null +++ b/drivers/gpu/drm/msm/registers/display/mdss.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + From patchwork Sat Sep 21 08:17:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13808803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6851CF9C6B for ; Sat, 21 Sep 2024 08:17:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E320710E27F; Sat, 21 Sep 2024 08:17:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="k5palarg"; dkim-atps=neutral Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 126BB10E15F for ; Sat, 21 Sep 2024 08:17:40 +0000 (UTC) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-536a2759f0eso3644242e87.3 for ; Sat, 21 Sep 2024 01:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726906658; x=1727511458; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Od53nvDeJ6X0bdgIyj/l8ko1IVye/qAo8uvg9IuTxGE=; b=k5palarg7HBuVQwmZt+mO383HRijbI0z1qm39ZRt9uECyWtqZ1u7VJtRO8mn1Vq/BP NMQl/3Vtj/urGMd0qmA25AH8NXTyN/RTHuHGkG7WtjA/Dd75jkjP4Tm7P4Wn4eaRwgXn KcgoixwnAokzPllFgXG2bA+efSiKl+V0soVftqxbfudog6oxMWJpuILj2wHkbdpv0NAS PzfeEN50DTzR01j3lHl/nwUpoD860VvZMIi8cO1Puoa8guFS99cDl/JAXuqgjZYrVekX oJUs/BKGvlB11pzd1InHwWbtUcmkbMqpMEPECK81WHNGIGeq7jj49ZFJEoWEJ34STdmV 6XCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726906658; x=1727511458; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Od53nvDeJ6X0bdgIyj/l8ko1IVye/qAo8uvg9IuTxGE=; b=N2ABAYb8+0dZgY5PMLqFf5KJ9CSfLlNjGXaEb7Z6mCVlWVlxiF8kxbOJM7N6aBIevu yAPZtOWqpAMViWwjMGmfDdys2nK2UsrFruK/TOZ9AB/dh2AP4eAlSIfJtoxAZWTwGcwK m1bguRk7lKJsSqqUenl9/3HWItHIt7PsfoQOI3bp4IOegD+zhPtuWmr+HsjVSB9EuT3c VIn8P3Wq4UyZaBwffgZ+nXsH25XQKXPscvioeGWuZP7qMK61Q+N6uyO2CDgQk8m+ARQh Y6vZsu5rMZoDrSMQutJpJOb5mc5vB9NjzC1PbGdrz+GkjtD79uSMUeILyhzxS6aUKOF/ 95KA== X-Forwarded-Encrypted: i=1; AJvYcCU6Ajl+HzhOurzK5Z3d9o/DuDsvNEgad4jPYcf/l+ktqVIQtyMPtn9QY/vZjq8lOaSviGGp3CG98YM=@lists.freedesktop.org X-Gm-Message-State: AOJu0YxKsl612sJlDWbUKKHrY/JJWrpEker6rcyEZ0tABmo/E4Y246Yg klNaOnEwXihVzrxzyGVHsc2UDiuF3jOxGDROKoIMdbx0lingiczSmR3FPMcJ2Po= X-Google-Smtp-Source: AGHT+IETJ3Ky8mWo/JLPiPgVUT28m25lTztokOWEmapijuMHe9ti1rkaEQDPEbL5hoAyCuOwe3QvXQ== X-Received: by 2002:a05:6512:2208:b0:536:14a1:d645 with SMTP id 2adb3069b0e04-536ad3c9aefmr2997424e87.44.1726906658018; Sat, 21 Sep 2024 01:17:38 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-536870968d1sm2466380e87.175.2024.09.21.01.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2024 01:17:37 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 21 Sep 2024 11:17:30 +0300 Subject: [PATCH 2/4] drm/msm/mdss: use register definitions instead of hand-coding them MIME-Version: 1.0 Message-Id: <20240921-msm-mdss-ubwc-v1-2-411dcf309d05@linaro.org> References: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> In-Reply-To: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4880; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=G6PowQr5FW3NdBDRADRSrKvw2U+ewXo5XcoYzvoJ6Pw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBm7oEf05dbGt5Lc6aHVGnCmSnC98kTf0qX6d9UE NnCD/w7AaqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZu6BHwAKCRCLPIo+Aiko 1dcDCACg5ArOXMPZTRiJhXhrpweO8bTOXVhdYdh/WLR70YN5xSIeKiL6XFSJMwK2Sf/5QdIPwit nyF2N7SRgIbtc5i6+CPjY1UnAd4jC3KbAJYj5xXbEvcse3JL7J69jyo9EjN+3fkdRpGdaebVPtJ gvge8Of9xdqhu4ruDUrXLtOhly39eJNgQuZp4IaSLE+7uSWXfPbUXte0KdBVEwvLKobTzVjBfn0 xA5B6HQSvB6Jazb6SxWSGLE+lYFDlPIQdF79sOxj2e10qYxDDVY3te0rhlXJ96j6aAtZHe4z5x7 Xu2D+JHnnr5aRg2XxLNx2zE4tc/6TsbAe2E3UD2sKbf10bkE X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move existing register definitions to mdss.xml and use generated defines for registers access instead of hand-coding everything in the source file. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/msm_mdss.c | 35 +++++++++++--------------- drivers/gpu/drm/msm/registers/display/mdss.xml | 6 +++++ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index faa88fd6eb4d..ca9b7f953ac4 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -19,13 +19,7 @@ #include "msm_mdss.h" #include "msm_kms.h" -#define HW_REV 0x0 -#define HW_INTR_STATUS 0x0010 - -#define UBWC_DEC_HW_VERSION 0x58 -#define UBWC_STATIC 0x144 -#define UBWC_CTRL_2 0x150 -#define UBWC_PREDICTION_MODE 0x154 +#include #define MIN_IB_BW 400000000UL /* Min ib vote 400MB */ @@ -83,7 +77,7 @@ static void msm_mdss_irq(struct irq_desc *desc) chained_irq_enter(chip, desc); - interrupts = readl_relaxed(msm_mdss->mmio + HW_INTR_STATUS); + interrupts = readl_relaxed(msm_mdss->mmio + REG_MDSS_HW_INTR_STATUS); while (interrupts) { irq_hw_number_t hwirq = fls(interrupts) - 1; @@ -173,7 +167,7 @@ static void msm_mdss_setup_ubwc_dec_20(struct msm_mdss *msm_mdss) { const struct msm_mdss_data *data = msm_mdss->mdss_data; - writel_relaxed(data->ubwc_static, msm_mdss->mmio + UBWC_STATIC); + writel_relaxed(data->ubwc_static, msm_mdss->mmio + REG_MDSS_UBWC_STATIC); } static void msm_mdss_setup_ubwc_dec_30(struct msm_mdss *msm_mdss) @@ -189,7 +183,7 @@ static void msm_mdss_setup_ubwc_dec_30(struct msm_mdss *msm_mdss) if (data->ubwc_enc_version == UBWC_1_0) value |= BIT(8); - writel_relaxed(value, msm_mdss->mmio + UBWC_STATIC); + writel_relaxed(value, msm_mdss->mmio + REG_MDSS_UBWC_STATIC); } static void msm_mdss_setup_ubwc_dec_40(struct msm_mdss *msm_mdss) @@ -200,21 +194,22 @@ static void msm_mdss_setup_ubwc_dec_40(struct msm_mdss *msm_mdss) (data->highest_bank_bit & 0x7) << 4 | (data->macrotile_mode & 0x1) << 12; - writel_relaxed(value, msm_mdss->mmio + UBWC_STATIC); + writel_relaxed(value, msm_mdss->mmio + REG_MDSS_UBWC_STATIC); if (data->ubwc_enc_version == UBWC_3_0) { - writel_relaxed(1, msm_mdss->mmio + UBWC_CTRL_2); - writel_relaxed(0, msm_mdss->mmio + UBWC_PREDICTION_MODE); + writel_relaxed(1, msm_mdss->mmio + REG_MDSS_UBWC_CTRL_2); + writel_relaxed(0, msm_mdss->mmio + REG_MDSS_UBWC_PREDICTION_MODE); } else { if (data->ubwc_dec_version == UBWC_4_3) - writel_relaxed(3, msm_mdss->mmio + UBWC_CTRL_2); + writel_relaxed(3, msm_mdss->mmio + REG_MDSS_UBWC_CTRL_2); else - writel_relaxed(2, msm_mdss->mmio + UBWC_CTRL_2); - writel_relaxed(1, msm_mdss->mmio + UBWC_PREDICTION_MODE); + writel_relaxed(2, msm_mdss->mmio + REG_MDSS_UBWC_CTRL_2); + writel_relaxed(1, msm_mdss->mmio + REG_MDSS_UBWC_PREDICTION_MODE); } } -#define MDSS_HW_MAJ_MIN GENMASK(31, 16) +#define MDSS_HW_MAJ_MIN \ + (MDSS_HW_VERSION_MAJOR__MASK | MDSS_HW_VERSION_MINOR__MASK) #define MDSS_HW_MSM8996 0x1007 #define MDSS_HW_MSM8937 0x100e @@ -235,7 +230,7 @@ static const struct msm_mdss_data *msm_mdss_generate_mdp5_mdss_data(struct msm_m if (!data) return NULL; - hw_rev = readl_relaxed(mdss->mmio + HW_REV); + hw_rev = readl_relaxed(mdss->mmio + REG_MDSS_HW_VERSION); hw_rev = FIELD_GET(MDSS_HW_MAJ_MIN, hw_rev); if (hw_rev == MDSS_HW_MSM8996 || @@ -334,9 +329,9 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss) dev_err(msm_mdss->dev, "Unsupported UBWC decoder version %x\n", msm_mdss->mdss_data->ubwc_dec_version); dev_err(msm_mdss->dev, "HW_REV: 0x%x\n", - readl_relaxed(msm_mdss->mmio + HW_REV)); + readl_relaxed(msm_mdss->mmio + REG_MDSS_HW_VERSION)); dev_err(msm_mdss->dev, "UBWC_DEC_HW_VERSION: 0x%x\n", - readl_relaxed(msm_mdss->mmio + UBWC_DEC_HW_VERSION)); + readl_relaxed(msm_mdss->mmio + REG_MDSS_UBWC_DEC_HW_VERSION)); break; } diff --git a/drivers/gpu/drm/msm/registers/display/mdss.xml b/drivers/gpu/drm/msm/registers/display/mdss.xml index 9354cfffb730..ac85caf1575c 100644 --- a/drivers/gpu/drm/msm/registers/display/mdss.xml +++ b/drivers/gpu/drm/msm/registers/display/mdss.xml @@ -18,6 +18,12 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd"> + + + + + + From patchwork Sat Sep 21 08:17:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13808804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4DC6FCF9C68 for ; Sat, 21 Sep 2024 08:17:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5473510E2E1; Sat, 21 Sep 2024 08:17:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="zjAPzMnD"; dkim-atps=neutral Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0B54010E27F for ; Sat, 21 Sep 2024 08:17:43 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5365cf5de24so3579434e87.1 for ; Sat, 21 Sep 2024 01:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726906661; x=1727511461; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ixfycQ+OhOhX9IuLXKX0B+HAxSW+VAgfI+FMAgQa7F8=; b=zjAPzMnDK1PXwFctwI2aujAIjQGiQRyG1PlHn0lkw4KNq5I7oQLRXz88eVDtFb0CIv RveiT4xEaKIE2FbLZ8tB5GqK5huKDNzi0NbAWE+Dlew0hsY/XyN17JqDLf0BHfFEqOoY 6cQ5xSZOOh4Qaa6YQn+cQGPKMTmSEkCIhovKqMmNFdgugomx15XGcpibeAO6K3CR5Blj o63E+yY87aVUGPJwbCaIitsm5sdgJp0gtAJcD6fhjrl1XZtnRXrirFUxMcpM2VTV5U5C yRsVwVu9HEJ1nIeV84eFHzpfPzYGHRMUaqt3abqjwFivTKfNlWZLGiLuMYPxvX7VYxfV HSFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726906661; x=1727511461; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ixfycQ+OhOhX9IuLXKX0B+HAxSW+VAgfI+FMAgQa7F8=; b=JB+HwkZZ1YArObFtcSuu41/K0zgH//Grf25MW687QEPyS6XDSbPgW/ovzVIvXS12hL hqidYQGnXNkPpsqmQ2EzLTqC14FbbUh2xSGxvP2w4Mkkx4gtckIzZ+RkoZ0MKOLKLtCH mbkZAA9u9WNRJg8xcSYRUyYvjtievi5iuR6wRe7O+IezTotDfCE8G6iJpxHQmp77b7WH 2ANq/JDO+gFrKs2UdaAMs9MLw4gaqggnKUMuAGRhn7pG1FIWLqa0sHcYuxWdDqIwDEBy L3O+miMn6WjsJVaBXhmH+GP/S2AaufghpEAGlpnWz0V2/8HYN4JYIB1PXIsh5LPGNE7D i5TQ== X-Forwarded-Encrypted: i=1; AJvYcCVw/oXzYx/ewE53i2dr470RWxB5CpgmbCvGhY2j9d3oVVp3lZLaq0dopEBHW7O6SkmWLpchshg+gGk=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyCm0OTtlZw1O0qjq7n5G7eAOdQ3PmjpZRgEhQoM1I3CAWn9UTp 36+pMPVIj/SS0Iybq+2kVTqbLw6/QUogY3bLX/wl+d32B0+45T2EcCHgPdxemzY= X-Google-Smtp-Source: AGHT+IEp2IVp8R8KzUBL8pFZ6IqlRNTBR0iIOqCUIF+8/lDk/lTF27LBao01hpKd+T+aKhAGMpWpcw== X-Received: by 2002:a05:6512:31cc:b0:536:5364:bc7 with SMTP id 2adb3069b0e04-536ad3f1ef3mr2941827e87.60.1726906661068; Sat, 21 Sep 2024 01:17:41 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-536870968d1sm2466380e87.175.2024.09.21.01.17.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2024 01:17:39 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 21 Sep 2024 11:17:31 +0300 Subject: [PATCH 3/4] drm/msm/mdss: define bitfields for the UBWC_STATIC register MIME-Version: 1.0 Message-Id: <20240921-msm-mdss-ubwc-v1-3-411dcf309d05@linaro.org> References: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> In-Reply-To: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5389; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=utH3zMLcvKLREFFdRj1W6cb06ULAA1VlL6GfopIfnMQ=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBm7oEfpeo0nvjCbwL2dXM/STLppUW5swOrto7k9 XdHqOo7RduJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZu6BHwAKCRCLPIo+Aiko 1VCqB/9LxaTlULqdwKDcuNwoJVeE49D/XErOIzKSH73pAJu7Mpe32GRuPRCDmOlTPEkxRsso+i9 l45NWc0w56sxH4PhPj7k7kb0enJOA+mF/4csROdGXG1mey2JkQ91evsX+gAdUUDJATv5tyYtKzM fclXMaHCMl8iadQpu2K9zV8c0sC7UNmbZWe5jKzuSAMeHk0kSGSt8qL2k7tKzMYIU+9slUTgemN CijIzfNW8lFkY7Ozx/N1qhjw5pX/BV2DBKRhlzyRhPJHkBPUmT9mSSbq87sQGaNNXSm6GPsz2ZS bj4qTK+Ar4E7IToM2yyfb/NxaA1DtYwZAlR7ZT1CLTc9cG0U X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Rather than hand-coding UBWC_STATIC value calculation, define corresponding bitfields and use them to setup the register value. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 36 +++++++++++++++----------- drivers/gpu/drm/msm/msm_mdss.h | 3 ++- drivers/gpu/drm/msm/registers/display/mdss.xml | 11 +++++++- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index ca9b7f953ac4..7704e1c9eb2a 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -173,15 +173,17 @@ static void msm_mdss_setup_ubwc_dec_20(struct msm_mdss *msm_mdss) static void msm_mdss_setup_ubwc_dec_30(struct msm_mdss *msm_mdss) { const struct msm_mdss_data *data = msm_mdss->mdss_data; - u32 value = (data->ubwc_swizzle & 0x1) | - (data->highest_bank_bit & 0x3) << 4 | - (data->macrotile_mode & 0x1) << 12; + u32 value = MDSS_UBWC_STATIC_UBWC_SWIZZLE(data->ubwc_swizzle & 0x1) | + MDSS_UBWC_STATIC_HIGHEST_BANK_BIT(data->highest_bank_bit); + + if (data->macrotile_mode) + value |= MDSS_UBWC_STATIC_MACROTILE_MODE; if (data->ubwc_enc_version == UBWC_3_0) - value |= BIT(10); + value |= MDSS_UBWC_STATIC_UNKNOWN_10; if (data->ubwc_enc_version == UBWC_1_0) - value |= BIT(8); + value |= MDSS_UBWC_STATIC_UNKNOWN_8; writel_relaxed(value, msm_mdss->mmio + REG_MDSS_UBWC_STATIC); } @@ -189,10 +191,14 @@ static void msm_mdss_setup_ubwc_dec_30(struct msm_mdss *msm_mdss) static void msm_mdss_setup_ubwc_dec_40(struct msm_mdss *msm_mdss) { const struct msm_mdss_data *data = msm_mdss->mdss_data; - u32 value = (data->ubwc_swizzle & 0x7) | - (data->ubwc_static & 0x1) << 3 | - (data->highest_bank_bit & 0x7) << 4 | - (data->macrotile_mode & 0x1) << 12; + u32 value = MDSS_UBWC_STATIC_UBWC_SWIZZLE(data->ubwc_swizzle) | + MDSS_UBWC_STATIC_HIGHEST_BANK_BIT(data->highest_bank_bit); + + if (data->unknown_3) + value |= MDSS_UBWC_STATIC_UNKNOWN_3; + + if (data->macrotile_mode) + value |= MDSS_UBWC_STATIC_MACROTILE_MODE; writel_relaxed(value, msm_mdss->mmio + REG_MDSS_UBWC_STATIC); @@ -580,7 +586,7 @@ static const struct msm_mdss_data sc7280_data = { .ubwc_enc_version = UBWC_3_0, .ubwc_dec_version = UBWC_4_0, .ubwc_swizzle = 6, - .ubwc_static = 1, + .unknown_3 = true, .highest_bank_bit = 1, .macrotile_mode = 1, .reg_bus_bw = 74000, @@ -598,7 +604,7 @@ static const struct msm_mdss_data sc8280xp_data = { .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_0, .ubwc_swizzle = 6, - .ubwc_static = 1, + .unknown_3 = true, .highest_bank_bit = 3, .macrotile_mode = 1, .reg_bus_bw = 76800, @@ -661,7 +667,7 @@ static const struct msm_mdss_data sm8250_data = { .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_0, .ubwc_swizzle = 6, - .ubwc_static = 1, + .unknown_3 = true, /* TODO: highest_bank_bit = 2 for LP_DDR4 */ .highest_bank_bit = 3, .macrotile_mode = 1, @@ -672,7 +678,7 @@ static const struct msm_mdss_data sm8350_data = { .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_0, .ubwc_swizzle = 6, - .ubwc_static = 1, + .unknown_3 = true, /* TODO: highest_bank_bit = 2 for LP_DDR4 */ .highest_bank_bit = 3, .macrotile_mode = 1, @@ -683,7 +689,7 @@ static const struct msm_mdss_data sm8550_data = { .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_3, .ubwc_swizzle = 6, - .ubwc_static = 1, + .unknown_3 = true, /* TODO: highest_bank_bit = 2 for LP_DDR4 */ .highest_bank_bit = 3, .macrotile_mode = 1, @@ -694,7 +700,7 @@ static const struct msm_mdss_data x1e80100_data = { .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_3, .ubwc_swizzle = 6, - .ubwc_static = 1, + .unknown_3 = true, /* TODO: highest_bank_bit = 2 for LP_DDR4 */ .highest_bank_bit = 3, .macrotile_mode = 1, diff --git a/drivers/gpu/drm/msm/msm_mdss.h b/drivers/gpu/drm/msm/msm_mdss.h index 3afef4b1786d..69095c18ab4a 100644 --- a/drivers/gpu/drm/msm/msm_mdss.h +++ b/drivers/gpu/drm/msm/msm_mdss.h @@ -13,7 +13,8 @@ struct msm_mdss_data { u32 ubwc_swizzle; u32 ubwc_static; u32 highest_bank_bit; - u32 macrotile_mode; + bool unknown_3; + bool macrotile_mode; u32 reg_bus_bw; }; diff --git a/drivers/gpu/drm/msm/registers/display/mdss.xml b/drivers/gpu/drm/msm/registers/display/mdss.xml index ac85caf1575c..57c0bdf2ef65 100644 --- a/drivers/gpu/drm/msm/registers/display/mdss.xml +++ b/drivers/gpu/drm/msm/registers/display/mdss.xml @@ -21,7 +21,16 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd"> - + + + + + + + + + + From patchwork Sat Sep 21 08:17:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13808805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD365CF9C6B for ; Sat, 21 Sep 2024 08:17:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E84310E21D; Sat, 21 Sep 2024 08:17:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tJNTEvUx"; dkim-atps=neutral Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5DF8110E882 for ; Sat, 21 Sep 2024 08:17:45 +0000 (UTC) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2f761461150so35001991fa.0 for ; Sat, 21 Sep 2024 01:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726906663; x=1727511463; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SVsyILzzvjiOy2yaVn/07EEy8eWz3i45ZaANjyZGvio=; b=tJNTEvUxx9FMUGp2w8QVryBnEfNC0Mlf0RYucEB5jlH0CrI2oE20pYULnfepyh8rgt 8bciJPWPpiB9FPenIB9sxd6syhCf7ka7CYqvQqp24WMqO6bV0K+Cma4S/N6VsAKBCL48 ScfSGg1frhDOpgC6nXLZiKtuNC5Y9LMojiGCZS8EzZdS9mc6ldd67JEuaw6on0ehuS2v T1C0anLYfQucILcA7ypoqpvl6XgM2HO64QfaE7aaJn1VoVBD4E+BwzaBKyHZZk/iBnul sF+/++kYwgsnauOdKckLPtTxv+9q0bpsjrV1JxQr96iLXbr3yWe3vtLBLS3IDc2yQQf4 u4YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726906663; x=1727511463; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SVsyILzzvjiOy2yaVn/07EEy8eWz3i45ZaANjyZGvio=; b=R2evHIz+ZzUNIXtu5g5Rd/pQzOzv1IlW5fY0lMJbGzTxu2p7VU8KdIzEyQtZWrRbH9 lHOTfyvcVT3wvBNX9GbBjrdw0NotFxTQiHC7pDqztxeLA6e0n1NUmd2TJxYfYtCy/xo6 /eSHpscTZ39WEpFa/07Iea+9WJanlSDY4l9ROfw2+/9pSHl9fMKXtp1/6aapiyFEyTA/ mxBlfksh0UuYcE4DC/6fG15IdsD+r4yJttWqixits2TVtHBZ/Qn8cJjL8R+B7wpX19F9 HdIl6s8UiiUX0PdmocWUr4F0X/NcU0wPN0X44GNWLn9zui0wxrYUK6JG8I9GbF7Hdgk4 +PCw== X-Forwarded-Encrypted: i=1; AJvYcCWgif9BerNveYnBtiJoFr0Cft6mUA74HGIJczYgEMTgjbZLLme9bfAFifX+4aSPxynhFlzwZyGeNF4=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyQtwOsfzjEXv1f0IDVmkn4nTy9cxhs28sbKp/LswHTOdwnTpVT 7QU8GJ0vs9MIy9GCWJ+XQdi8jGig8H6GjjCexTGdttcR94LGqYEMHtw8gFqNPSI= X-Google-Smtp-Source: AGHT+IFPY/W2L+v0opGRZsevBEm6pIXjNTUdy2RRjJsvIyR13eOixR1PdLXWb9cbd5UYsG/wDpqcXg== X-Received: by 2002:a05:6512:1095:b0:530:e0fd:4a97 with SMTP id 2adb3069b0e04-536ac17ba54mr4389006e87.0.1726906663478; Sat, 21 Sep 2024 01:17:43 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-536870968d1sm2466380e87.175.2024.09.21.01.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2024 01:17:42 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 21 Sep 2024 11:17:32 +0300 Subject: [PATCH 4/4] drm/msm/mdss: reuse defined bitfields for UBWC 2.0 MIME-Version: 1.0 Message-Id: <20240921-msm-mdss-ubwc-v1-4-411dcf309d05@linaro.org> References: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> In-Reply-To: <20240921-msm-mdss-ubwc-v1-0-411dcf309d05@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2564; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ScCRd7+z7cwAGX0LzQnkBaj1sUTBN7g+ylhI1wBf8No=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBm7oEfFUNz63SZIIIv4PSfaBvDuI15ysOw/396a 6UffauUniqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZu6BHwAKCRCLPIo+Aiko 1dLUCACLFFbWklq276VM0/8R0H4sDEzmkz4gKnwfDpRPWAfsBCwUuuo+yznN+gqcNrh5FQKRyJq 4a6Lq5j9qgRAt92C9N3elKB+wQXyIy8k06pGS/gL/eWnx/2YpQJ1seTn0GcN9iEOEHyv2petgEK uT1h8YyflDQfylQpRjWCdItA7GaFNpShxp4W2cqcCf5LyFC7c3I1Pcvquel4wv1n15N8mc5xtvt PuSQ22r/G0Mlmt8BKBd0jpa/dGfK6YwDmSPZsYy0whHFOajAVpZXDaQBoGunDeJyGmpA0tRhLGr BQfl+po4ZAG2aTUqjR8nNkWJlMSoXHaIS+8hTXCMv7Qr31zK X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Follow other msm_mdss_setup_ubwc_dec_nn functions and use individual bits instead of just specifying the value to be programmed to the UBWC_STATIC register. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 17 +++++++++++++---- drivers/gpu/drm/msm/msm_mdss.h | 1 - 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index 7704e1c9eb2a..0b49187c52de 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -166,8 +166,16 @@ static int _msm_mdss_irq_domain_add(struct msm_mdss *msm_mdss) static void msm_mdss_setup_ubwc_dec_20(struct msm_mdss *msm_mdss) { const struct msm_mdss_data *data = msm_mdss->mdss_data; + u32 value = MDSS_UBWC_STATIC_UBWC_SWIZZLE(data->ubwc_swizzle) | + MDSS_UBWC_STATIC_HIGHEST_BANK_BIT(data->highest_bank_bit); - writel_relaxed(data->ubwc_static, msm_mdss->mmio + REG_MDSS_UBWC_STATIC); + if (data->unknown_3) + value |= MDSS_UBWC_STATIC_UNKNOWN_3; + + if (data->ubwc_enc_version == UBWC_1_0) + value |= MDSS_UBWC_STATIC_UNKNOWN_8; + + writel_relaxed(value, msm_mdss->mmio + REG_MDSS_UBWC_STATIC); } static void msm_mdss_setup_ubwc_dec_30(struct msm_mdss *msm_mdss) @@ -577,7 +585,8 @@ static const struct msm_mdss_data qcm2290_data = { static const struct msm_mdss_data sc7180_data = { .ubwc_enc_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0, - .ubwc_static = 0x1e, + .ubwc_swizzle = 6, + .unknown_3 = true, .highest_bank_bit = 0x1, .reg_bus_bw = 76800, }; @@ -628,7 +637,7 @@ static const struct msm_mdss_data sm6350_data = { .ubwc_enc_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0, .ubwc_swizzle = 6, - .ubwc_static = 0x1e, + .unknown_3 = true, .highest_bank_bit = 1, .reg_bus_bw = 76800, }; @@ -651,7 +660,7 @@ static const struct msm_mdss_data sm6115_data = { .ubwc_enc_version = UBWC_1_0, .ubwc_dec_version = UBWC_2_0, .ubwc_swizzle = 7, - .ubwc_static = 0x11f, + .unknown_3 = true, .highest_bank_bit = 0x1, .reg_bus_bw = 76800, }; diff --git a/drivers/gpu/drm/msm/msm_mdss.h b/drivers/gpu/drm/msm/msm_mdss.h index 69095c18ab4a..521d4e6b8043 100644 --- a/drivers/gpu/drm/msm/msm_mdss.h +++ b/drivers/gpu/drm/msm/msm_mdss.h @@ -11,7 +11,6 @@ struct msm_mdss_data { /* can be read from register 0x58 */ u32 ubwc_dec_version; u32 ubwc_swizzle; - u32 ubwc_static; u32 highest_bank_bit; bool unknown_3; bool macrotile_mode;