From patchwork Fri Jul 28 21:33:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 707559 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0306C001DE for ; Fri, 28 Jul 2023 21:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232542AbjG1Vdm (ORCPT ); Fri, 28 Jul 2023 17:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234196AbjG1Vdj (ORCPT ); Fri, 28 Jul 2023 17:33:39 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C75D3C3C for ; Fri, 28 Jul 2023 14:33:25 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fe216edaf7so1208922e87.0 for ; Fri, 28 Jul 2023 14:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690580003; x=1691184803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9zcAphDeKoBf44cILmkXzAz8LYKbM2dUINvXgyHkOno=; b=PzNH5JjcwsULrZmp1QgeVLoLKdpncwBMQEFDd8vytFritMAgt8s9df0B18Zf5B80uC 7asHgeKVEEd0NQZKV5cEtKpfXOTTPP0MnWGZrbgPSd77yhu2pO26FHsdI1a+MXXrBjn5 oAvfjPxyl31ziB7KFuOP4y60ebZW9TVAxNyeIvI4sTSd3dMBmS/aBA7Y6XFb/JA3JWCb YOldYi2vCYLajI1zRAT4MwNjSF90rC8c70+40rtbfMy1bM7SSSaGA8kmdnoB5OlLzG4Q dX3Bcu7ocJ1xlgnxbZwG/Bm3xvYoOFEc+l1a7o7yxr59BZM20oQsUhnPgdS8l3jK9DbQ RKuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580003; x=1691184803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9zcAphDeKoBf44cILmkXzAz8LYKbM2dUINvXgyHkOno=; b=N1c9yr0T1jTAhaU8u1wIJPSb/3C8IOP7/EtyRzCDflawL91QBV9LMam0A4fJhKHYum dDzW+A/RfO/ouxA5pGDHB8953GZ++//ZF5meXGGX7fnrM087M/rcxBfvwmTWX7yrfi7N CkM5dodWHPM5J8KjKMJSu+O2ci6tdUBjoqkmOPjAx1g2VNabRmEoZKhl7WMyvYnPpLQj dkAwqkXey3KN7uOe4N4G9FPcGoge8NgptnYNWUGET/bMiHFqzbQwj/4nQWBW8L+/5vsR jMWntYmsfBlK7m47uFX1a8jaH/hbIkNMKbICayC3hb5PyROkgsJcZUbtY0Jth25YJOpd kpAA== X-Gm-Message-State: ABy/qLYelnsrJiCAuNUwSDfxWt8CysMmqHQvPb+OG13U1lb46KKmIIej cz5ytL9NnZjeMgD9M7f0IOk0/Q== X-Google-Smtp-Source: APBJJlFTuKxTMRNFHRgf3sybkewhB/TD8XOUojhCxu29lMlmBvO4HvY0H6VtlEyeuLyHKNUA8hhauQ== X-Received: by 2002:ac2:5598:0:b0:4f8:6253:540 with SMTP id v24-20020ac25598000000b004f862530540mr1242553lfg.19.1690580003752; Fri, 28 Jul 2023 14:33:23 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n16-20020a056512389000b004fe13318aeesm956832lft.166.2023.07.28.14.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:33:23 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 1/7] drm/msm/mdss: correct UBWC programming for SM8550 Date: Sat, 29 Jul 2023 00:33:14 +0300 Message-Id: <20230728213320.97309-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> References: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The SM8550 platform employs newer UBWC decoder, which requires slightly different programming. Fixes: a2f33995c19d ("drm/msm: mdss: add support for SM8550") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index bf68bae23264..e38929205134 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -189,6 +189,7 @@ static int _msm_mdss_irq_domain_add(struct msm_mdss *msm_mdss) #define UBWC_2_0 0x20000000 #define UBWC_3_0 0x30000000 #define UBWC_4_0 0x40000000 +#define UBWC_4_3 0x40030000 static void msm_mdss_setup_ubwc_dec_20(struct msm_mdss *msm_mdss) { @@ -227,7 +228,10 @@ static void msm_mdss_setup_ubwc_dec_40(struct msm_mdss *msm_mdss) writel_relaxed(1, msm_mdss->mmio + UBWC_CTRL_2); writel_relaxed(0, msm_mdss->mmio + UBWC_PREDICTION_MODE); } else { - writel_relaxed(2, msm_mdss->mmio + UBWC_CTRL_2); + if (data->ubwc_dec_version == UBWC_4_3) + writel_relaxed(3, msm_mdss->mmio + UBWC_CTRL_2); + else + writel_relaxed(2, msm_mdss->mmio + UBWC_CTRL_2); writel_relaxed(1, msm_mdss->mmio + UBWC_PREDICTION_MODE); } } @@ -271,6 +275,7 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss) msm_mdss_setup_ubwc_dec_30(msm_mdss); break; case UBWC_4_0: + case UBWC_4_3: msm_mdss_setup_ubwc_dec_40(msm_mdss); break; default: @@ -576,6 +581,16 @@ static const struct msm_mdss_data sm8250_data = { .macrotile_mode = 1, }; +static const struct msm_mdss_data sm8550_data = { + .ubwc_version = UBWC_4_0, + .ubwc_dec_version = UBWC_4_3, + .ubwc_swizzle = 6, + .ubwc_static = 1, + /* TODO: highest_bank_bit = 2 for LP_DDR4 */ + .highest_bank_bit = 3, + .macrotile_mode = 1, +}; + static const struct of_device_id mdss_dt_match[] = { { .compatible = "qcom,mdss" }, { .compatible = "qcom,msm8998-mdss" }, @@ -593,7 +608,7 @@ static const struct of_device_id mdss_dt_match[] = { { .compatible = "qcom,sm8250-mdss", .data = &sm8250_data }, { .compatible = "qcom,sm8350-mdss", .data = &sm8250_data }, { .compatible = "qcom,sm8450-mdss", .data = &sm8250_data }, - { .compatible = "qcom,sm8550-mdss", .data = &sm8250_data }, + { .compatible = "qcom,sm8550-mdss", .data = &sm8550_data }, {} }; MODULE_DEVICE_TABLE(of, mdss_dt_match); From patchwork Fri Jul 28 21:33:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 708543 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57BE7C41513 for ; Fri, 28 Jul 2023 21:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232597AbjG1Vdl (ORCPT ); Fri, 28 Jul 2023 17:33:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234279AbjG1Vdk (ORCPT ); Fri, 28 Jul 2023 17:33:40 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED5A144A7 for ; Fri, 28 Jul 2023 14:33:27 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4fe0d5f719dso4426892e87.2 for ; Fri, 28 Jul 2023 14:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690580006; x=1691184806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Fq4BsQ2n3v4yrWlc5gMVHf5q5uxQavIrNzukx+hQcbg=; b=SuOgeAwCl5UFgYI1zwafXHwKmUs5tX9+KclAvcCwMbqbo53sQgQkSLlmcZZiIsg6/7 nG6EBN3byXNUmYQh0mtG5J3zSYYW8Q8LrqketcvEDrKwwlMLrqyKGAVfQ3kIA8bqXyzC enGg4a3fBhv4mFIknxuLzEQthggIgjuaF2fF4pibrjxigfsvDbkNWSOtulkUxKIcB9ll 0yst9T3+wKBaxKgjB1toIncKCUzKDwHbD3OlSejqL8aaH3Val9IrNm+s05FNDbK6Nv1P QbWlDZRT1A3KWvfhaJByQrvAk1PB46DmKpH9xUXXnxlenooEa8EA6lqTumbWvgQbAe91 ayPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580006; x=1691184806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fq4BsQ2n3v4yrWlc5gMVHf5q5uxQavIrNzukx+hQcbg=; b=TUHHqEz/7FJz4pDrGnF5NHaIILryKJzH03kr40hQ4GhnhkQb3beht5KI6nrXOu3kg0 UrFPzRKqOoZS1R4KN+15oSpKAQEs4PoogHC8UyaT2XRiXYjtDZFB+Hv6CFcZomX6S5Mg VKG1YdhqddVAnH+tW/TitLSOyWZoAEZjLgVTHF0AoKsuapOFuw9Od+AhyERYfduhfGp5 sMs7na5p/ui3sI89sw1963WH7yGvdS/qz+CuWyqX3qIvhTjGJXrlNaFIrk1mPaDJRiYO eYoqMxngqRUDvBJCEZYoIC0kjzMlVuo8zkpPrTjSviJLyYVrzQ6qdv1CD0wMtOxVlqt1 w+BA== X-Gm-Message-State: ABy/qLY5fjfcQ1f6Y022J6NUPsud271KjEsvb0fRDqVvXG2IUF6O3JIu SpObfme7gQnva9THxzZu8i2Epg== X-Google-Smtp-Source: APBJJlG0jWCkBUs/qSW+BdPHzdvTVHlr/ObZOV4IBCRNvXKCqc5nMZR+B+dFyaKNqaQYf2RjYRrssg== X-Received: by 2002:ac2:4ec5:0:b0:4fb:9772:6639 with SMTP id p5-20020ac24ec5000000b004fb97726639mr2719718lfr.6.1690580006246; Fri, 28 Jul 2023 14:33:26 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n16-20020a056512389000b004fe13318aeesm956832lft.166.2023.07.28.14.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:33:24 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 2/7] drm/msm/mdss: rename ubwc_version to ubwc_enc_version Date: Sat, 29 Jul 2023 00:33:15 +0300 Message-Id: <20230728213320.97309-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> References: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Rename the ubwc_version field to ubwc_enc_version, it denotes the version of the UBWC encoder, not the "UBWC version". Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index e38929205134..67436a5a8cf1 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -27,7 +27,7 @@ #define MIN_IB_BW 400000000UL /* Min ib vote 400MB */ struct msm_mdss_data { - u32 ubwc_version; + u32 ubwc_enc_version; /* can be read from register 0x58 */ u32 ubwc_dec_version; u32 ubwc_swizzle; @@ -205,10 +205,10 @@ static void msm_mdss_setup_ubwc_dec_30(struct msm_mdss *msm_mdss) (data->highest_bank_bit & 0x3) << 4 | (data->macrotile_mode & 0x1) << 12; - if (data->ubwc_version == UBWC_3_0) + if (data->ubwc_enc_version == UBWC_3_0) value |= BIT(10); - if (data->ubwc_version == UBWC_1_0) + if (data->ubwc_enc_version == UBWC_1_0) value |= BIT(8); writel_relaxed(value, msm_mdss->mmio + UBWC_STATIC); @@ -224,7 +224,7 @@ static void msm_mdss_setup_ubwc_dec_40(struct msm_mdss *msm_mdss) writel_relaxed(value, msm_mdss->mmio + UBWC_STATIC); - if (data->ubwc_version == UBWC_3_0) { + 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); } else { @@ -507,13 +507,13 @@ static int mdss_remove(struct platform_device *pdev) } static const struct msm_mdss_data sc7180_data = { - .ubwc_version = UBWC_2_0, + .ubwc_enc_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0, .ubwc_static = 0x1e, }; static const struct msm_mdss_data sc7280_data = { - .ubwc_version = UBWC_3_0, + .ubwc_enc_version = UBWC_3_0, .ubwc_dec_version = UBWC_4_0, .ubwc_swizzle = 6, .ubwc_static = 1, @@ -522,14 +522,14 @@ static const struct msm_mdss_data sc7280_data = { }; static const struct msm_mdss_data sc8180x_data = { - .ubwc_version = UBWC_3_0, + .ubwc_enc_version = UBWC_3_0, .ubwc_dec_version = UBWC_3_0, .highest_bank_bit = 3, .macrotile_mode = 1, }; static const struct msm_mdss_data sc8280xp_data = { - .ubwc_version = UBWC_4_0, + .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_0, .ubwc_swizzle = 6, .ubwc_static = 1, @@ -538,13 +538,13 @@ static const struct msm_mdss_data sc8280xp_data = { }; static const struct msm_mdss_data sdm845_data = { - .ubwc_version = UBWC_2_0, + .ubwc_enc_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0, .highest_bank_bit = 2, }; static const struct msm_mdss_data sm6350_data = { - .ubwc_version = UBWC_2_0, + .ubwc_enc_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0, .ubwc_swizzle = 6, .ubwc_static = 0x1e, @@ -552,27 +552,27 @@ static const struct msm_mdss_data sm6350_data = { }; static const struct msm_mdss_data sm8150_data = { - .ubwc_version = UBWC_3_0, + .ubwc_enc_version = UBWC_3_0, .ubwc_dec_version = UBWC_3_0, .highest_bank_bit = 2, }; static const struct msm_mdss_data sm6115_data = { - .ubwc_version = UBWC_1_0, + .ubwc_enc_version = UBWC_1_0, .ubwc_dec_version = UBWC_2_0, .ubwc_swizzle = 7, .ubwc_static = 0x11f, }; static const struct msm_mdss_data sm6125_data = { - .ubwc_version = UBWC_1_0, + .ubwc_enc_version = UBWC_1_0, .ubwc_dec_version = UBWC_3_0, .ubwc_swizzle = 1, .highest_bank_bit = 1, }; static const struct msm_mdss_data sm8250_data = { - .ubwc_version = UBWC_4_0, + .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_0, .ubwc_swizzle = 6, .ubwc_static = 1, @@ -582,7 +582,7 @@ static const struct msm_mdss_data sm8250_data = { }; static const struct msm_mdss_data sm8550_data = { - .ubwc_version = UBWC_4_0, + .ubwc_enc_version = UBWC_4_0, .ubwc_dec_version = UBWC_4_3, .ubwc_swizzle = 6, .ubwc_static = 1, From patchwork Fri Jul 28 21:33:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 708544 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60097C001E0 for ; Fri, 28 Jul 2023 21:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234196AbjG1Vdm (ORCPT ); Fri, 28 Jul 2023 17:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234420AbjG1Vdk (ORCPT ); Fri, 28 Jul 2023 17:33:40 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C7BD44BC for ; Fri, 28 Jul 2023 14:33:29 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4fe11652b64so4528321e87.0 for ; Fri, 28 Jul 2023 14:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690580007; x=1691184807; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zfE1L2H8AJhwbvwdI3x7uxXE4yUvRsy3KKDO7xKa8+8=; b=oPCh/MnViaN0eJIQ9zVxch8uKF324MPV/COzPKKr29yzx7GX4rBFlYGZ/tLCshFjei 2suiFGWvUIyn3cYrGMxgqpDmzX0lKnlSXNVFKIM2K/8m11AGtfDdJJ2iYIMCqU5z0K6U HtTEhnJroBJ+8pcZpiH19ToDliE08V8Z80yOO1kXA6oTfo74MY4aGNkpaIJU1NvdVYKK rKpwXAWVa05fnUIsUpoqYm6Nf1uykk9TrbdxthrNP21X5a3+4gWdxvoOVFPQZT1RtsTX ifL79RkNJlrYyfFA+XsnB4cfssmwVdb7UiOxgMZYNCHJeMiDDbMZ55EojC91VYraOK53 MwOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580007; x=1691184807; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zfE1L2H8AJhwbvwdI3x7uxXE4yUvRsy3KKDO7xKa8+8=; b=QRYGsPVuBP2a7fUTiWyzB6bV1VRQcBiVUEcGZf/zR/yNS2dyVOmMr8eWcsLIPMQAKC hvny8ktDiTalrnCW4FIA8r1OFTKBeL9LAdUdHp8Co9M8U3fKAxgeFtFhBJaVOofrUDf5 K132iiiTNi5564myyydpzV+tX2YPuNIw9uTZ2H2Gdj2Y/Ki9HycCvFcAGjzjtvKKBG8V qPpWvkgoH6rVS5rVifirhiOjQmkBEbnvvxM/+nkTmBU3X+fq8yazeHOlvF5rKwRzFSAU 7tdxkPlprPk7a2M5IU9S1Rvq+FX1DpsHq79jGlr4cWGwlbTNsPIAyBhuO7OF0iSMyWL2 tH7w== X-Gm-Message-State: ABy/qLawoi20nzxLRFIxWq1UW5sXoz+8Yu/q7VhPwe6JsaOqTWxf0v0G W+mm7Ibs+Bip2XCv+V8nElGx3w== X-Google-Smtp-Source: APBJJlGt8RJK8xWb4OYVlKtW/lsZu2UwRnAUNXDIQOaNIt5YnkDoYcltwl6rIfU4HNpnK/q/d4A+rA== X-Received: by 2002:a19:7b14:0:b0:4f8:5755:5b22 with SMTP id w20-20020a197b14000000b004f857555b22mr2045199lfc.27.1690580007645; Fri, 28 Jul 2023 14:33:27 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n16-20020a056512389000b004fe13318aeesm956832lft.166.2023.07.28.14.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:33:26 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 3/7] drm/msm/mdss: export UBWC data Date: Sat, 29 Jul 2023 00:33:16 +0300 Message-Id: <20230728213320.97309-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> References: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org DPU programming requires knowledge of some of UBWC parameters. This results in duplication of UBWC data between MDSS and DPU drivers. Export the required data from MDSS driver. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 30 +++++++++++++----------------- drivers/gpu/drm/msm/msm_mdss.h | 27 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 drivers/gpu/drm/msm/msm_mdss.h diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index 67436a5a8cf1..0189811bce4d 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -13,7 +13,7 @@ #include #include -#include "msm_drv.h" +#include "msm_mdss.h" #include "msm_kms.h" #define HW_REV 0x0 @@ -26,16 +26,6 @@ #define MIN_IB_BW 400000000UL /* Min ib vote 400MB */ -struct msm_mdss_data { - u32 ubwc_enc_version; - /* can be read from register 0x58 */ - u32 ubwc_dec_version; - u32 ubwc_swizzle; - u32 ubwc_static; - u32 highest_bank_bit; - u32 macrotile_mode; -}; - struct msm_mdss { struct device *dev; @@ -185,12 +175,6 @@ static int _msm_mdss_irq_domain_add(struct msm_mdss *msm_mdss) return 0; } -#define UBWC_1_0 0x10000000 -#define UBWC_2_0 0x20000000 -#define UBWC_3_0 0x30000000 -#define UBWC_4_0 0x40000000 -#define UBWC_4_3 0x40030000 - static void msm_mdss_setup_ubwc_dec_20(struct msm_mdss *msm_mdss) { const struct msm_mdss_data *data = msm_mdss->mdss_data; @@ -236,6 +220,18 @@ static void msm_mdss_setup_ubwc_dec_40(struct msm_mdss *msm_mdss) } } +const struct msm_mdss_data *msm_mdss_get_mdss_data(struct device *dev) +{ + struct msm_mdss *mdss; + + if (!dev) + return ERR_PTR(-EINVAL); + + mdss = dev_get_drvdata(dev); + + return mdss->mdss_data; +} + static int msm_mdss_enable(struct msm_mdss *msm_mdss) { int ret; diff --git a/drivers/gpu/drm/msm/msm_mdss.h b/drivers/gpu/drm/msm/msm_mdss.h new file mode 100644 index 000000000000..02bbab42adbc --- /dev/null +++ b/drivers/gpu/drm/msm/msm_mdss.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2018, The Linux Foundation + */ + +#ifndef __MSM_MDSS_H__ +#define __MSM_MDSS_H__ + +struct msm_mdss_data { + u32 ubwc_enc_version; + /* can be read from register 0x58 */ + u32 ubwc_dec_version; + u32 ubwc_swizzle; + u32 ubwc_static; + u32 highest_bank_bit; + u32 macrotile_mode; +}; + +#define UBWC_1_0 0x10000000 +#define UBWC_2_0 0x20000000 +#define UBWC_3_0 0x30000000 +#define UBWC_4_0 0x40000000 +#define UBWC_4_3 0x40030000 + +const struct msm_mdss_data *msm_mdss_get_mdss_data(struct device *dev); + +#endif /* __MSM_MDSS_H__ */ From patchwork Fri Jul 28 21:33:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 707558 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8D8DC04A94 for ; Fri, 28 Jul 2023 21:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233621AbjG1Vdn (ORCPT ); Fri, 28 Jul 2023 17:33:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234180AbjG1Vdl (ORCPT ); Fri, 28 Jul 2023 17:33:41 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 433F244AA for ; Fri, 28 Jul 2023 14:33:31 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4fe21e7f3d1so1651049e87.3 for ; Fri, 28 Jul 2023 14:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690580009; x=1691184809; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n0nmQkrFJ1qTPckiGBd/pQx7xzpmDvjfPbdpqRUAvKg=; b=IZYBx41OdMDoVKczPPi9p+OFE/GF68QAiP/6RdFsxBz1dvHDdk1U6fApz34gJ1nkhq qFmhuqPTRH9L9sknWaTZFh/2yvxpAX5svFrnlFh5R8N3YE55Qq/AU5JKDX6iBnAZPOCy J+wOyPjYeeqAEn6AZLAZZeNZd/rH0ppH6sxk5YCrmG+N7Ypn1dKD7H+QP3CyymIRdIuz bVoG0oH3OyfBgIoMOLuizs8uPrBMN9+ky6aRh0wXzf1Zh4vBNUceCHI1jUkUuY0VXFSe tKmW5zlg1syNmrSJNEDyw2z+Z8DVkEGoX/3rggDP1V2uinIMxIM2i6yPgVyoyt9Qbf4r T+MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580009; x=1691184809; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n0nmQkrFJ1qTPckiGBd/pQx7xzpmDvjfPbdpqRUAvKg=; b=lVGMlXslIi+ldqjVgBaveHODscl/15g85Cy7l6muwLjraF9Gpe7OS08TgJDS7z1BMs 63VusP0S3IXL072RvviEtbHe0WyT8055khbSG6Uk61HkW1Qh5KvTN/zdRlnfy+chferi iKZ35tqj3nvLbqvL1cFB5J8UWaQiCIph7gVNQnGFCX57CByK7n/DFoJap8XK+jaYw/eH 1dZUyK5XJgbET7r91Uw9HMwuu6+MHabgOgii3ot+q9LLi06pXZWfxED2KHjFC3N1mg4C QX7Iq1yAj9k2NBHfWpbeRJLc3hAcZWgAV9IZeAFny4Efm/FYluG8NCy+1EVwWbHZ365c jSRQ== X-Gm-Message-State: ABy/qLbfzmTeFbnDsWznddQY6JkjKhI4+tGSKKKejuS0gBo7bz84zSN+ qF77V2JnrCu0GectOBnaIpdPUQ== X-Google-Smtp-Source: APBJJlG2M61J+6qFH5o3JAMVC7nbKN6aqxJaAONR/c9d/dlPYtaMAQvSYGfPBTm2RiGt+Zk1b6+uJA== X-Received: by 2002:ac2:5f7a:0:b0:4fe:f24:cbf3 with SMTP id c26-20020ac25f7a000000b004fe0f24cbf3mr2431232lfc.63.1690580009632; Fri, 28 Jul 2023 14:33:29 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n16-20020a056512389000b004fe13318aeesm956832lft.166.2023.07.28.14.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:33:28 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 4/7] drm/msm/mdss: populate missing data Date: Sat, 29 Jul 2023 00:33:17 +0300 Message-Id: <20230728213320.97309-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> References: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org As we are going to use MDSS data for DPU programming, populate missing MDSS data. The UBWC 1.0 and no UBWC cases do not require MDSS programming, so skip them. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index 0189811bce4d..c2b4cf9ad2eb 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -264,6 +264,10 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss) * UBWC_n and the rest of params comes from hw data. */ switch (msm_mdss->mdss_data->ubwc_dec_version) { + case 0: /* no UBWC */ + case UBWC_1_0: + /* do nothing */ + break; case UBWC_2_0: msm_mdss_setup_ubwc_dec_20(msm_mdss); break; @@ -502,10 +506,22 @@ static int mdss_remove(struct platform_device *pdev) return 0; } +static const struct msm_mdss_data msm8998_data = { + .ubwc_enc_version = UBWC_1_0, + .ubwc_dec_version = UBWC_1_0, + .highest_bank_bit = 1, +}; + +static const struct msm_mdss_data qcm2290_data = { + /* no UBWC */ + .highest_bank_bit = 0x2, +}; + static const struct msm_mdss_data sc7180_data = { .ubwc_enc_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0, .ubwc_static = 0x1e, + .highest_bank_bit = 0x3, }; static const struct msm_mdss_data sc7280_data = { @@ -558,6 +574,7 @@ static const struct msm_mdss_data sm6115_data = { .ubwc_dec_version = UBWC_2_0, .ubwc_swizzle = 7, .ubwc_static = 0x11f, + .highest_bank_bit = 0x1, }; static const struct msm_mdss_data sm6125_data = { @@ -589,8 +606,8 @@ static const struct msm_mdss_data sm8550_data = { static const struct of_device_id mdss_dt_match[] = { { .compatible = "qcom,mdss" }, - { .compatible = "qcom,msm8998-mdss" }, - { .compatible = "qcom,qcm2290-mdss" }, + { .compatible = "qcom,msm8998-mdss", .data = &msm8998_data }, + { .compatible = "qcom,qcm2290-mdss", .data = &qcm2290_data }, { .compatible = "qcom,sdm845-mdss", .data = &sdm845_data }, { .compatible = "qcom,sc7180-mdss", .data = &sc7180_data }, { .compatible = "qcom,sc7280-mdss", .data = &sc7280_data }, From patchwork Fri Jul 28 21:33:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 707557 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F814EB64DD for ; Fri, 28 Jul 2023 21:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234180AbjG1Vdn (ORCPT ); Fri, 28 Jul 2023 17:33:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234277AbjG1Vdm (ORCPT ); Fri, 28 Jul 2023 17:33:42 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D5E04686 for ; Fri, 28 Jul 2023 14:33:32 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe0eb0ca75so4462927e87.2 for ; Fri, 28 Jul 2023 14:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690580010; x=1691184810; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xI2gFf5IMmE9gmBXwnnKFQD0+it6twgnBHzxT0t82Zg=; b=CT9lFYG6HNn3CLKjlCepcsn8r8pyGc2LfFydpzn73pRPhsvCOoo+yp1TSWR23Bd/+C clOYO1q8D2BNFo5Jt/fMFP7SZTfeC1jtHEJRrbVG/ZfaDGBE2RK6sNWrFEbrJcbmDXGr UmZLipNmszolXWwEGGEpBxQuPipBVafczc1vqu9AUZK1tj1Lpd5T0oD+WJ5RY9qiJOuh BK+PBNsoFPcSkZbk48sHkKZumN2yUF9Ndm17YvWCXA0lt5GAbP/2mOtckwT83dxU53jj I/mR2Nigc88g+yrp1hiIMMexaw4vB67pFnrH7OjmiUNG8/Ww1qmAMI4aYjbwBOAc2Zmc +CVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580010; x=1691184810; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xI2gFf5IMmE9gmBXwnnKFQD0+it6twgnBHzxT0t82Zg=; b=XlukFXhNHg3Cv6DyvOKtkxVOZGrdtN9k76f6JkJw0jiGNsW6DaccVV6R3O/w3EU238 sVrMizubZ5rKFNzHXSME2u+K9eQMffAah8WT0bzsR1C63xoa1bDi6B/JETsJlnosgarK z9CPTgFgyzAxyhzBauH4dkj61zIS8+V0gsNfJVVTh6G2ra2VmXwodMpmy85hJiInnd4y 8bcK1/7UFR++9SPvHTFcSiAVmjoqp7e49AK8HE6M2o332LHky4NmbwvxomCKdYMd7ld3 OzV3Pgl2Ow7KQfd9c08o+WpKCycBRD7I15anRQiU1/Ypjwd3uJPnqPrg7SqNL1cP78TZ 4DQg== X-Gm-Message-State: ABy/qLbSze8QEx2rZaQXVptKRDIPoIM2KhMBVADznite09RU3ekU8oWR HpzbWI6EYVIqudZp+9GqD8cA9g== X-Google-Smtp-Source: APBJJlGg3+Y4Cg7SPqgz64yYfXcyw3W8+8CYxrq0ZjW67IwpAxcQ/l3rPu8d7MfJzZNyo5McDBgZ5g== X-Received: by 2002:a05:6512:3a8f:b0:4fe:ae7:d906 with SMTP id q15-20020a0565123a8f00b004fe0ae7d906mr3029305lfu.65.1690580010546; Fri, 28 Jul 2023 14:33:30 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n16-20020a056512389000b004fe13318aeesm956832lft.166.2023.07.28.14.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:33:29 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 5/7] drm/msm/dpu: use MDSS data for programming SSPP Date: Sat, 29 Jul 2023 00:33:18 +0300 Message-Id: <20230728213320.97309-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> References: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Switch to using data from MDSS driver to program the SSPP fetch and UBWC configuration. As a side-effect, this also swithes the DPU driver from DPU_HW_UBWC_VER_xx values to the UBWC_x_y enum, which reflects the hardware register values. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 18 ++++++++++-------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 6 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 16 +++++++++++++++- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 3 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 ++ 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c index b364cf75bb3f..f2192de93713 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c @@ -8,6 +8,8 @@ #include "dpu_hw_sspp.h" #include "dpu_kms.h" +#include "msm_mdss.h" + #include #define DPU_FETCH_CONFIG_RESET_VALUE 0x00000087 @@ -270,26 +272,26 @@ static void dpu_hw_sspp_setup_format(struct dpu_sw_pipe *pipe, DPU_REG_WRITE(c, SSPP_FETCH_CONFIG, DPU_FETCH_CONFIG_RESET_VALUE | ctx->ubwc->highest_bank_bit << 18); - switch (ctx->ubwc->ubwc_version) { - case DPU_HW_UBWC_VER_10: + switch (ctx->ubwc->ubwc_enc_version) { + case UBWC_1_0: fast_clear = fmt->alpha_enable ? BIT(31) : 0; DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL, fast_clear | (ctx->ubwc->ubwc_swizzle & 0x1) | BIT(8) | (ctx->ubwc->highest_bank_bit << 4)); break; - case DPU_HW_UBWC_VER_20: + case UBWC_2_0: fast_clear = fmt->alpha_enable ? BIT(31) : 0; DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL, fast_clear | (ctx->ubwc->ubwc_swizzle) | (ctx->ubwc->highest_bank_bit << 4)); break; - case DPU_HW_UBWC_VER_30: + case UBWC_3_0: DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL, BIT(30) | (ctx->ubwc->ubwc_swizzle) | (ctx->ubwc->highest_bank_bit << 4)); break; - case DPU_HW_UBWC_VER_40: + case UBWC_4_0: DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL, DPU_FORMAT_IS_YUV(fmt) ? 0 : BIT(30)); break; @@ -670,11 +672,11 @@ int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, #endif struct dpu_hw_sspp *dpu_hw_sspp_init(const struct dpu_sspp_cfg *cfg, - void __iomem *addr, const struct dpu_ubwc_cfg *ubwc) + void __iomem *addr, const struct msm_mdss_data *mdss_data) { struct dpu_hw_sspp *hw_pipe; - if (!addr || !ubwc) + if (!addr) return ERR_PTR(-EINVAL); hw_pipe = kzalloc(sizeof(*hw_pipe), GFP_KERNEL); @@ -685,7 +687,7 @@ struct dpu_hw_sspp *dpu_hw_sspp_init(const struct dpu_sspp_cfg *cfg, hw_pipe->hw.log_mask = DPU_DBG_MASK_SSPP; /* Assign ops */ - hw_pipe->ubwc = ubwc; + hw_pipe->ubwc = mdss_data; hw_pipe->idx = cfg->id; hw_pipe->cap = cfg; _setup_layer_ops(hw_pipe, hw_pipe->cap->features); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h index 085f34bc6b88..cbf4f95ff0fd 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h @@ -317,7 +317,7 @@ struct dpu_hw_sspp_ops { struct dpu_hw_sspp { struct dpu_hw_blk base; struct dpu_hw_blk_reg_map hw; - const struct dpu_ubwc_cfg *ubwc; + const struct msm_mdss_data *ubwc; /* Pipe */ enum dpu_sspp idx; @@ -333,10 +333,10 @@ struct dpu_kms; * Should be called once before accessing every pipe. * @cfg: Pipe catalog entry for which driver object is required * @addr: Mapped register io address of MDP - * @ubwc: UBWC configuration data + * @mdss_data: UBWC / MDSS configuration data */ struct dpu_hw_sspp *dpu_hw_sspp_init(const struct dpu_sspp_cfg *cfg, - void __iomem *addr, const struct dpu_ubwc_cfg *ubwc); + void __iomem *addr, const struct msm_mdss_data *mdss_data); /** * dpu_hw_sspp_destroy(): Destroys SSPP driver context diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index c1d06e19b237..2da9eef687af 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -22,6 +22,7 @@ #include "msm_drv.h" #include "msm_mmu.h" +#include "msm_mdss.h" #include "msm_gem.h" #include "disp/msm_disp_snapshot.h" @@ -1124,7 +1125,20 @@ static int dpu_kms_hw_init(struct msm_kms *kms) goto power_error; } - rc = dpu_rm_init(&dpu_kms->rm, dpu_kms->catalog, dpu_kms->mmio); + dpu_kms->mdss = msm_mdss_get_mdss_data(dpu_kms->pdev->dev.parent); + if (IS_ERR(dpu_kms->mdss)) { + rc = PTR_ERR(dpu_kms->mdss); + DPU_ERROR("failed to get MDSS data: %d\n", rc); + goto power_error; + } + + if (!dpu_kms->mdss) { + rc = -EINVAL; + DPU_ERROR("NULL MDSS data\n"); + goto power_error; + } + + rc = dpu_rm_init(&dpu_kms->rm, dpu_kms->catalog, dpu_kms->mdss, dpu_kms->mmio); if (rc) { DPU_ERROR("rm init failed: %d\n", rc); goto power_error; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index f3bdd4f11108..b6f53ca6e962 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -67,6 +67,7 @@ struct dpu_kms { struct msm_kms base; struct drm_device *dev; const struct dpu_mdss_cfg *catalog; + const struct msm_mdss_data *mdss; /* io/register spaces: */ void __iomem *mmio, *vbif[VBIF_MAX]; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index 4a53e2c931d6..f9215643c71a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -101,6 +101,7 @@ int dpu_rm_destroy(struct dpu_rm *rm) int dpu_rm_init(struct dpu_rm *rm, const struct dpu_mdss_cfg *cat, + const struct msm_mdss_data *mdss_data, void __iomem *mmio) { int rc, i; @@ -230,7 +231,7 @@ int dpu_rm_init(struct dpu_rm *rm, struct dpu_hw_sspp *hw; const struct dpu_sspp_cfg *sspp = &cat->sspp[i]; - hw = dpu_hw_sspp_init(sspp, mmio, cat->ubwc); + hw = dpu_hw_sspp_init(sspp, mmio, mdss_data); if (IS_ERR(hw)) { rc = PTR_ERR(hw); DPU_ERROR("failed sspp object creation: err %d\n", rc); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h index d62c2edb2460..2b551566cbf4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h @@ -40,11 +40,13 @@ struct dpu_rm { * for all HW blocks. * @rm: DPU Resource Manager handle * @cat: Pointer to hardware catalog + * @mdss_data: Pointer to MDSS / UBWC configuration * @mmio: mapped register io address of MDP * @Return: 0 on Success otherwise -ERROR */ int dpu_rm_init(struct dpu_rm *rm, const struct dpu_mdss_cfg *cat, + const struct msm_mdss_data *mdss_data, void __iomem *mmio); /** From patchwork Fri Jul 28 21:33:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 707556 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E9E7C001DF for ; Fri, 28 Jul 2023 21:33:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234420AbjG1Vdp (ORCPT ); Fri, 28 Jul 2023 17:33:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234246AbjG1Vdo (ORCPT ); Fri, 28 Jul 2023 17:33:44 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FD37468B for ; Fri, 28 Jul 2023 14:33:33 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4fe1344b707so4457967e87.1 for ; Fri, 28 Jul 2023 14:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690580011; x=1691184811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uCwNTtsU2HhXal0QoS0aPympsDXkORz1Veugb6v1YRo=; b=Pyo5P1NG7+mM9PMdm9ze/UIUv5enO0uwEdYmDB3eHPgW31RwPRLhsIRZo/9Vw7ocLa qLjwKT4MC/RO0R/RKsYJgtUGrEUGxA6EwS32HLcdscRDdIH8zb8Dza/UOkYhwLo3UwTw NuHALC0WkZNsxvH309mzp4j55gH3EaFIoGjpht9BR1aZKWWS0I5Wg26FmqUAr9SABR5h 7VXNAdO/nzWFYFMHIv0lT4dVtRfudW4RR21vLlVqy0RHtPAqlX1iKzBnKTkGPqGNhd7k gbsnf+X0s9MVx+wQBZInNKlGBYPhdrU5CajvaQlC1PU7dWgN9qC3LD1lOPaLvwr871xA E3jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580011; x=1691184811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uCwNTtsU2HhXal0QoS0aPympsDXkORz1Veugb6v1YRo=; b=Tl87YY/R5bq7uaIpIwoTi2GbYs18eNkGhKBTe6vxwfsxlf11KT70yZdTnN5chHPxaz feDyqBHFlVTSQZM2Fc0qKRqzKxocNpNLBkQHxEeaR9HdccI6nnVKKSxPWSx5Ln1R377c GEGzG6B8R22hZKA5cjhrg4Lj/vRpOehzz6GqO920LIgSY7znaJj4O+sA1KKx3fC1xXKi +4clPJAGgOJPFMINcmA6406eR5eZjPIIOQ2qSOcVC1IS1+/xXwd2rwu3Vpaq9aPa6vHb OrQ5Ncw22rprolnCZy7HhMbe+YmGnQ6AbCedEDh43+v+Fnjlq7H7+YQvwmmMVmoDapTc 6RDA== X-Gm-Message-State: ABy/qLYPN2LnviyMGZa7WYOSEwBhZd1p8f5e/UPQB7xz/9gLutkZr7/5 u0A1lfHYuK2AmrwQslCW3nhfqw== X-Google-Smtp-Source: APBJJlGM4DSiForv29m7O6XNJeKDM7hlfLtfTj+xTj9WRtHWyzoauKt6HWdi0PVBDp4Kr3syyNKcNQ== X-Received: by 2002:a05:6512:2812:b0:4fe:25bc:71f5 with SMTP id cf18-20020a056512281200b004fe25bc71f5mr1254834lfb.11.1690580011347; Fri, 28 Jul 2023 14:33:31 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n16-20020a056512389000b004fe13318aeesm956832lft.166.2023.07.28.14.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:33:30 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 6/7] drm/msm/dpu: drop UBWC configuration Date: Sat, 29 Jul 2023 00:33:19 +0300 Message-Id: <20230728213320.97309-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> References: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org As the DPU driver has switched to fetching data from MDSS driver, we can now drop the UBWC and highest_bank_bit parts of the DPU hw catalog. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 6 ----- .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 6 ----- .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 6 ----- .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 6 ----- .../msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 6 ----- .../msm/disp/dpu1/catalog/dpu_6_3_sm6115.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h | 5 ---- .../msm/disp/dpu1/catalog/dpu_6_9_sm6375.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 6 ----- .../msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 7 ------ .../msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 6 ----- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 25 ------------------- 17 files changed, 128 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h index b5fbac55f127..7bc7fd6d4eb9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h @@ -21,11 +21,6 @@ static const struct dpu_caps msm8998_dpu_caps = { .max_vdeci_exp = MAX_VERT_DECIMATION, }; -static const struct dpu_ubwc_cfg msm8998_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_10, - .highest_bank_bit = 0x2, -}; - static const struct dpu_mdp_cfg msm8998_mdp = { .name = "top_0", .base = 0x0, .len = 0x458, @@ -323,7 +318,6 @@ static const struct dpu_mdss_version msm8998_mdss_ver = { const struct dpu_mdss_cfg dpu_msm8998_cfg = { .mdss_ver = &msm8998_mdss_ver, .caps = &msm8998_dpu_caps, - .ubwc = &msm8998_ubwc_cfg, .mdp = &msm8998_mdp, .ctl_count = ARRAY_SIZE(msm8998_ctl), .ctl = msm8998_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h index 8000b870d3a7..d679770c16f7 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h @@ -21,11 +21,6 @@ static const struct dpu_caps sdm845_dpu_caps = { .max_vdeci_exp = MAX_VERT_DECIMATION, }; -static const struct dpu_ubwc_cfg sdm845_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_20, - .highest_bank_bit = 0x2, -}; - static const struct dpu_mdp_cfg sdm845_mdp = { .name = "top_0", .base = 0x0, .len = 0x45c, @@ -340,7 +335,6 @@ static const struct dpu_mdss_version sdm845_mdss_ver = { const struct dpu_mdss_cfg dpu_sdm845_cfg = { .mdss_ver = &sdm845_mdss_ver, .caps = &sdm845_dpu_caps, - .ubwc = &sdm845_ubwc_cfg, .mdp = &sdm845_mdp, .ctl_count = ARRAY_SIZE(sdm845_ctl), .ctl = sdm845_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h index 7ce2d69d28f6..a2041ec843ef 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h @@ -21,11 +21,6 @@ static const struct dpu_caps sm8150_dpu_caps = { .max_vdeci_exp = MAX_VERT_DECIMATION, }; -static const struct dpu_ubwc_cfg sm8150_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_30, - .highest_bank_bit = 0x2, -}; - static const struct dpu_mdp_cfg sm8150_mdp = { .name = "top_0", .base = 0x0, .len = 0x45c, @@ -383,7 +378,6 @@ static const struct dpu_mdss_version sm8150_mdss_ver = { const struct dpu_mdss_cfg dpu_sm8150_cfg = { .mdss_ver = &sm8150_mdss_ver, .caps = &sm8150_dpu_caps, - .ubwc = &sm8150_ubwc_cfg, .mdp = &sm8150_mdp, .ctl_count = ARRAY_SIZE(sm8150_ctl), .ctl = sm8150_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h index cea005382456..3e1b68ca83cf 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h @@ -21,11 +21,6 @@ static const struct dpu_caps sc8180x_dpu_caps = { .max_vdeci_exp = MAX_VERT_DECIMATION, }; -static const struct dpu_ubwc_cfg sc8180x_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_30, - .highest_bank_bit = 0x3, -}; - static const struct dpu_mdp_cfg sc8180x_mdp = { .name = "top_0", .base = 0x0, .len = 0x45c, @@ -410,7 +405,6 @@ static const struct dpu_mdss_version sc8180x_mdss_ver = { const struct dpu_mdss_cfg dpu_sc8180x_cfg = { .mdss_ver = &sc8180x_mdss_ver, .caps = &sc8180x_dpu_caps, - .ubwc = &sc8180x_ubwc_cfg, .mdp = &sc8180x_mdp, .ctl_count = ARRAY_SIZE(sc8180x_ctl), .ctl = sc8180x_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h index 5fddfcce6288..a93a62843c25 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h @@ -19,12 +19,6 @@ static const struct dpu_caps sm6125_dpu_caps = { .max_vdeci_exp = MAX_VERT_DECIMATION, }; -static const struct dpu_ubwc_cfg sm6125_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_10, - .highest_bank_bit = 0x1, - .ubwc_swizzle = 0x1, -}; - static const struct dpu_mdp_cfg sm6125_mdp = { .name = "top_0", .base = 0x0, .len = 0x45c, @@ -208,7 +202,6 @@ static const struct dpu_mdss_version sm6125_mdss_ver = { const struct dpu_mdss_cfg dpu_sm6125_cfg = { .mdss_ver = &sm6125_mdss_ver, .caps = &sm6125_dpu_caps, - .ubwc = &sm6125_ubwc_cfg, .mdp = &sm6125_mdp, .ctl_count = ARRAY_SIZE(sm6125_ctl), .ctl = sm6125_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h index 893d1271fb71..b180352a1221 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h @@ -19,12 +19,6 @@ static const struct dpu_caps sm8250_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sm8250_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_40, - .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ - .ubwc_swizzle = 0x6, -}; - static const struct dpu_mdp_cfg sm8250_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -398,7 +392,6 @@ static const struct dpu_mdss_version sm8250_mdss_ver = { const struct dpu_mdss_cfg dpu_sm8250_cfg = { .mdss_ver = &sm8250_mdss_ver, .caps = &sm8250_dpu_caps, - .ubwc = &sm8250_ubwc_cfg, .mdp = &sm8250_mdp, .ctl_count = ARRAY_SIZE(sm8250_ctl), .ctl = sm8250_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h index 61118f648cbc..224d0e64e5f4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h @@ -17,11 +17,6 @@ static const struct dpu_caps sc7180_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sc7180_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_20, - .highest_bank_bit = 0x3, -}; - static const struct dpu_mdp_cfg sc7180_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -212,7 +207,6 @@ static const struct dpu_mdss_version sc7180_mdss_ver = { const struct dpu_mdss_cfg dpu_sc7180_cfg = { .mdss_ver = &sc7180_mdss_ver, .caps = &sc7180_dpu_caps, - .ubwc = &sc7180_ubwc_cfg, .mdp = &sc7180_mdp, .ctl_count = ARRAY_SIZE(sc7180_ctl), .ctl = sc7180_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h index c0d7bb930e8a..48eb9245f29d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h @@ -17,12 +17,6 @@ static const struct dpu_caps sm6115_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sm6115_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_10, - .highest_bank_bit = 0x1, - .ubwc_swizzle = 0x7, -}; - static const struct dpu_mdp_cfg sm6115_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -144,7 +138,6 @@ static const struct dpu_mdss_version sm6115_mdss_ver = { const struct dpu_mdss_cfg dpu_sm6115_cfg = { .mdss_ver = &sm6115_mdss_ver, .caps = &sm6115_dpu_caps, - .ubwc = &sm6115_ubwc_cfg, .mdp = &sm6115_mdp, .ctl_count = ARRAY_SIZE(sm6115_ctl), .ctl = sm6115_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h index 11c50aa5034b..9e888b305f8a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h @@ -19,12 +19,6 @@ static const struct dpu_caps sm6350_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sm6350_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_20, - .ubwc_swizzle = 6, - .highest_bank_bit = 1, -}; - static const struct dpu_mdp_cfg sm6350_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -215,7 +209,6 @@ static const struct dpu_mdss_version sm6350_mdss_ver = { const struct dpu_mdss_cfg dpu_sm6350_cfg = { .mdss_ver = &sm6350_mdss_ver, .caps = &sm6350_dpu_caps, - .ubwc = &sm6350_ubwc_cfg, .mdp = &sm6350_mdp, .ctl_count = ARRAY_SIZE(sm6350_ctl), .ctl = sm6350_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h index 2182939bc026..9933cd189a42 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h @@ -16,10 +16,6 @@ static const struct dpu_caps qcm2290_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg qcm2290_ubwc_cfg = { - .highest_bank_bit = 0x2, -}; - static const struct dpu_mdp_cfg qcm2290_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -134,7 +130,6 @@ static const struct dpu_mdss_version qcm2290_mdss_ver = { const struct dpu_mdss_cfg dpu_qcm2290_cfg = { .mdss_ver = &qcm2290_mdss_ver, .caps = &qcm2290_dpu_caps, - .ubwc = &qcm2290_ubwc_cfg, .mdp = &qcm2290_mdp, .ctl_count = ARRAY_SIZE(qcm2290_ctl), .ctl = qcm2290_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h index f0c0aa90f82e..de2eb899764f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h @@ -18,12 +18,6 @@ static const struct dpu_caps sm6375_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sm6375_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_20, - .ubwc_swizzle = 6, - .highest_bank_bit = 1, -}; - static const struct dpu_mdp_cfg sm6375_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -154,7 +148,6 @@ static const struct dpu_mdss_version sm6375_mdss_ver = { const struct dpu_mdss_cfg dpu_sm6375_cfg = { .mdss_ver = &sm6375_mdss_ver, .caps = &sm6375_dpu_caps, - .ubwc = &sm6375_ubwc_cfg, .mdp = &sm6375_mdp, .ctl_count = ARRAY_SIZE(sm6375_ctl), .ctl = sm6375_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h index 2460ced03610..584d432964c2 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h @@ -19,11 +19,6 @@ static const struct dpu_caps sm8350_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sm8350_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_40, - .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ -}; - static const struct dpu_mdp_cfg sm8350_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -391,7 +386,6 @@ static const struct dpu_mdss_version sm8350_mdss_ver = { const struct dpu_mdss_cfg dpu_sm8350_cfg = { .mdss_ver = &sm8350_mdss_ver, .caps = &sm8350_dpu_caps, - .ubwc = &sm8350_ubwc_cfg, .mdp = &sm8350_mdp, .ctl_count = ARRAY_SIZE(sm8350_ctl), .ctl = sm8350_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h index a8dea8f27c41..ef590514147b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h @@ -17,12 +17,6 @@ static const struct dpu_caps sc7280_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sc7280_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_30, - .highest_bank_bit = 0x1, - .ubwc_swizzle = 0x6, -}; - static const struct dpu_mdp_cfg sc7280_mdp = { .name = "top_0", .base = 0x0, .len = 0x2014, @@ -260,7 +254,6 @@ static const struct dpu_mdss_version sc7280_mdss_ver = { const struct dpu_mdss_cfg dpu_sc7280_cfg = { .mdss_ver = &sc7280_mdss_ver, .caps = &sc7280_dpu_caps, - .ubwc = &sc7280_ubwc_cfg, .mdp = &sc7280_mdp, .ctl_count = ARRAY_SIZE(sc7280_ctl), .ctl = sc7280_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h index 397fe01125dd..938c7a92c095 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h @@ -19,12 +19,6 @@ static const struct dpu_caps sc8280xp_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sc8280xp_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_40, - .highest_bank_bit = 2, - .ubwc_swizzle = 6, -}; - static const struct dpu_mdp_cfg sc8280xp_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -453,7 +447,6 @@ static const struct dpu_mdss_version sc8280xp_mdss_ver = { const struct dpu_mdss_cfg dpu_sc8280xp_cfg = { .mdss_ver = &sc8280xp_mdss_ver, .caps = &sc8280xp_dpu_caps, - .ubwc = &sc8280xp_ubwc_cfg, .mdp = &sc8280xp_mdp, .ctl_count = ARRAY_SIZE(sc8280xp_ctl), .ctl = sc8280xp_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h index 90a8461911c8..7efc60afd04c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h @@ -19,12 +19,6 @@ static const struct dpu_caps sm8450_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sm8450_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_40, - .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ - .ubwc_swizzle = 0x6, -}; - static const struct dpu_mdp_cfg sm8450_mdp = { .name = "top_0", .base = 0x0, .len = 0x494, @@ -414,7 +408,6 @@ static const struct dpu_mdss_version sm8450_mdss_ver = { const struct dpu_mdss_cfg dpu_sm8450_cfg = { .mdss_ver = &sm8450_mdss_ver, .caps = &sm8450_dpu_caps, - .ubwc = &sm8450_ubwc_cfg, .mdp = &sm8450_mdp, .ctl_count = ARRAY_SIZE(sm8450_ctl), .ctl = sm8450_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h index c9252528136d..293a971df959 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h @@ -19,11 +19,6 @@ static const struct dpu_caps sm8550_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; -static const struct dpu_ubwc_cfg sm8550_ubwc_cfg = { - .ubwc_version = DPU_HW_UBWC_VER_40, - .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ -}; - static const struct dpu_mdp_cfg sm8550_mdp = { .name = "top_0", .base = 0, .len = 0x494, @@ -428,7 +423,6 @@ static const struct dpu_mdss_version sm8550_mdss_ver = { const struct dpu_mdss_cfg dpu_sm8550_cfg = { .mdss_ver = &sm8550_mdss_ver, .caps = &sm8550_dpu_caps, - .ubwc = &sm8550_ubwc_cfg, .mdp = &sm8550_mdp, .ctl_count = ARRAY_SIZE(sm8550_ctl), .ctl = sm8550_ctl, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h index acfe43f4918c..5c21782b2231 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -28,16 +28,6 @@ #define MAX_XIN_COUNT 16 -/** - * Supported UBWC feature versions - */ -enum { - DPU_HW_UBWC_VER_10 = 0x100, - DPU_HW_UBWC_VER_20 = 0x200, - DPU_HW_UBWC_VER_30 = 0x300, - DPU_HW_UBWC_VER_40 = 0x400, -}; - /** * MDP TOP BLOCK features * @DPU_MDP_PANIC_PER_PIPE Panic configuration needs to be done per pipe @@ -503,19 +493,6 @@ struct dpu_mdp_cfg { struct dpu_clk_ctrl_reg clk_ctrls[DPU_CLK_CTRL_MAX]; }; -/** - * struct dpu_ubwc_cfg - UBWC and memory configuration - * - * @ubwc_version UBWC feature version (0x0 for not supported) - * @highest_bank_bit: UBWC parameter - * @ubwc_swizzle: ubwc default swizzle setting - */ -struct dpu_ubwc_cfg { - u32 ubwc_version; - u32 highest_bank_bit; - u32 ubwc_swizzle; -}; - /* struct dpu_ctl_cfg : MDP CTL instance info * @id: index identifying this block * @base: register base offset to mdss @@ -818,8 +795,6 @@ struct dpu_mdss_cfg { const struct dpu_caps *caps; - const struct dpu_ubwc_cfg *ubwc; - const struct dpu_mdp_cfg *mdp; u32 ctl_count; From patchwork Fri Jul 28 21:33:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 708542 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11CC4C04FDF for ; Fri, 28 Jul 2023 21:33:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234235AbjG1Vdo (ORCPT ); Fri, 28 Jul 2023 17:33:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234392AbjG1Vdn (ORCPT ); Fri, 28 Jul 2023 17:33:43 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 228E244B0 for ; Fri, 28 Jul 2023 14:33:34 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fba86f069bso4425198e87.3 for ; Fri, 28 Jul 2023 14:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690580012; x=1691184812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tx2RpKD/I01eO5CT35reZoOMEgApWpiIpC+vQpwHVcI=; b=oZe9MPO63fYpQrpSVlsXK/PHCxZdnNgrTy/v7nCfQHVl/uY+Xy95+UvGXJzVGBwkXh dX8o/1GX8EOECZcTYOlWHl/plCPxt3yQgrhvi823KNm2BEwyFpIrI8l9ihlIrpnw/FLP 05gTkXKIvcUTEaKx+UPc/3jSmoNtRqU9rfELH4gqJHDYMPlk0LGtTHVjGNyOZTvo2C4e LhMLjBrbapwrknBfMAe+apa1rO9SBv1GrJxJquw3gcUJBhkc7bbT3+/2WMl414H84A8W kFVRLC50W1pbFz34O9rzA3GSCmLu9FcPfbTbFVSGieCHbGQelqZfU2GGjtFH8o9HsDCl KO+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690580012; x=1691184812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tx2RpKD/I01eO5CT35reZoOMEgApWpiIpC+vQpwHVcI=; b=Pt6f+2nKVVEepsALp/8Buphl0RV4L4OyEi4Z02W4TmQMVBL76bSHYUMHmtXFjZ365M lQC1Slr05lkPZeVo9/HhATfec6rEH07qSVc74jb2eyOueRf53y0rAls87cs+hjajiJaa +KpirIjkcTSLrfg8PUgiwwYWnXIZDHBOLSjbd6f7ztCEPl8ooKP3qNX6kc0JSlCUrMJ1 LCQ/XqlrIuapiwyQ1vdW5+Xr9MGyqKdpxpxs1D7gUrAcs+yTUvzFKNDKeH6HIBcyVXOK LgHZZLRl8y+lUSN6p1b4JTl0iKThptSuOGmZEiFKsKBcYdlS+KBH+ZC5JT1b5zd+zC3M AfZw== X-Gm-Message-State: ABy/qLboItZcXOmDv8j86zEfI+QB7NwfF4+4xG1KbS9VqX1AkVzQzs1c Z6Tc4dMyPxd8bj2Vm4Dtf7X5rg== X-Google-Smtp-Source: APBJJlFrDnMF7MUYSEK8kqgYUshR7olGt7XfXwiuljMDEEHN5nPcBN4uOwFbFKUhecTRWEShytcJIQ== X-Received: by 2002:a19:9158:0:b0:4fe:599:5684 with SMTP id y24-20020a199158000000b004fe05995684mr2347479lfj.34.1690580012329; Fri, 28 Jul 2023 14:33:32 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n16-20020a056512389000b004fe13318aeesm956832lft.166.2023.07.28.14.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 14:33:31 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v2 7/7] drm/msm/dpu: drop BWC features from DPU_MDP_foo namespace Date: Sat, 29 Jul 2023 00:33:20 +0300 Message-Id: <20230728213320.97309-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> References: <20230728213320.97309-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The feature bits DPU_MDP_BWC, DPU_MDP_UBWC_1_0, and DPU_MDP_UBWC_1_5 are not used by the driver, drop them completely as a followup cleanup. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h index 5c21782b2231..a5389e7759f9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -32,10 +32,6 @@ * MDP TOP BLOCK features * @DPU_MDP_PANIC_PER_PIPE Panic configuration needs to be done per pipe * @DPU_MDP_10BIT_SUPPORT, Chipset supports 10 bit pixel formats - * @DPU_MDP_BWC, MDSS HW supports Bandwidth compression. - * @DPU_MDP_UBWC_1_0, This chipsets supports Universal Bandwidth - * compression initial revision - * @DPU_MDP_UBWC_1_5, Universal Bandwidth compression version 1.5 * @DPU_MDP_PERIPH_0_REMOVED Indicates that access to periph top0 block results * in a failure * @DPU_MDP_VSYNC_SEL Enables vsync source selection via MDP_VSYNC_SEL register @@ -46,9 +42,6 @@ enum { DPU_MDP_PANIC_PER_PIPE = 0x1, DPU_MDP_10BIT_SUPPORT, - DPU_MDP_BWC, - DPU_MDP_UBWC_1_0, - DPU_MDP_UBWC_1_5, DPU_MDP_AUDIO_SELECT, DPU_MDP_PERIPH_0_REMOVED, DPU_MDP_VSYNC_SEL,