From patchwork Fri Dec 13 22:14:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13907952 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 EC406E7717F for ; Fri, 13 Dec 2024 22:15:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 51FFF10F0FD; Fri, 13 Dec 2024 22:15:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Q6BTzLkZ"; dkim-atps=neutral Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by gabe.freedesktop.org (Postfix) with ESMTPS id F036710F0FA for ; Fri, 13 Dec 2024 22:15:19 +0000 (UTC) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-30227ccf803so24219851fa.2 for ; Fri, 13 Dec 2024 14:15:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734128118; x=1734732918; 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=TPBrpkMr5aA0e1PABupT3RXkj7m4si362ApxB4+SXY0=; b=Q6BTzLkZSA0zPzKY/tQUBVWaScdsKijZ+U+mrO+Kzzorh9BElR6ivSO8FrSTMVPGsm YzhmXzTQHbbpddNyB2RyN5cTgnSflPR3hrrpo6jyTs6psQnvWoxssIXNHcZy7gQ0s/mg obq3xXFNGtJnOxSNPipV+F2cW6yz0JbwbKxi51MIWJz1FLCAxfB35ajFtTxo7Rurb6Xq ISmCNuGU2HrN7Mv7c3EWg5BW85rtfeVrjlKqI0fXMUJO+yLX3HKVZa4+gCuMykOzZoQy 0DraI6WcHA4e03y9ldq09UAp9IaTPZ5O0vx6wxtppp+1+Mve6AThLfFb4mKJldO+0Eem n8Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734128118; x=1734732918; 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=TPBrpkMr5aA0e1PABupT3RXkj7m4si362ApxB4+SXY0=; b=wyqgVL38gWsDCNFyon6eh6HT0sGOwvpgorvg/Krby/BTo40wR3VKGYlDRWNOyWqzhP G7qYrwXlBNmJVh3/nMF1W3GOVlio9ybkJ/VIph27b4Jc5qR+Db8vfk/CkVStXS+JfzyH qhL2SLVrElgKcR0s5zUmG48s6j8pznsue9sp8jFZ5dyPwdEAPFs9mvJEwLoU/MkA2kXY TX+1EWGIeUiS7hlJfOSQgl20Jf4R/jqK9FPQQlUzvHTyd4r18ae/xhSG7E+PnUpzBAmV BLMrqRMB4HfrvO61asHbR2JNpCMAZQVD3jzqHX0H48fPeuRmeS/Ynfio2yJF9C/0U+Wm s/Lw== X-Forwarded-Encrypted: i=1; AJvYcCUoVE3HgvV3GhVx7BswlvhKmRl60r5UCowDY6xrM2l4KHoHdmPxYMyiI7wkx1BdDwTfHDjG3xGI7lw=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyH76EqVh/bQpm45IUbA8Wx7gKThvGZQn7tUInH1Z4Axe1HQSkW VbarzCLblcmwAh5yMYdcDvPwsHI7jF91tx+HTOIHf3pYRpIl1l8VRuRidGQtVYY= X-Gm-Gg: ASbGncuwwm4yhJ3Zt2VnEGIWhtKM8plETXIpswywIG2HN9uGV/VyJwr+WCLeJVBSw3T F5VNucQTJQKdVSDrrzP+82VcjzVhT3XbEMA+vQ5zeW/giPE/SYbCn17wJxY5B9t6Vz0mOHQnFOa KJZyPEF+WG81j5tjBw0qYa/HGhQTJhlwWzVcrqLw2PZ01DN50vjt2+fj96qu6i69esjXAFuldjU c0DrppV2xN20QPkAsMyHZpLXi8v6cASl/ZwJmV0afYYtwYgpi6/luhlzgVfVQKI X-Google-Smtp-Source: AGHT+IFv9QPgKXbOdJB1ytjvhrHw6t+vStGwzXk8SNzxnnM1O77P5SPdGvdHPa/y3ZS10UbK3EjZYQ== X-Received: by 2002:a05:651c:4cb:b0:302:1b18:2c09 with SMTP id 38308e7fff4ca-3025459d284mr14895311fa.27.1734128118266; Fri, 13 Dec 2024 14:15:18 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-303441e0f43sm413451fa.125.2024.12.13.14.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 14:15:17 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 14 Dec 2024 00:14:34 +0200 Subject: [PATCH 18/35] drm/msm/dpu: get rid of DPU_PINGPONG_DSC MIME-Version: 1.0 Message-Id: <20241214-dpu-drop-features-v1-18-988f0662cb7e@linaro.org> References: <20241214-dpu-drop-features-v1-0-988f0662cb7e@linaro.org> In-Reply-To: <20241214-dpu-drop-features-v1-0-988f0662cb7e@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Vinod Koul , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=7378; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=7QgX9y6uM8IuoVXb12fNuYwwo5ohWM/78vfrldIO878=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnXLHG7/6DDe7Ilfz5k7pOBfSQ7Bn/VEgRvglmf 3GOvddDD22JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ1yxxgAKCRCLPIo+Aiko 1X6UB/4kvsMFX+8xjMj2IgYjv4Y2MY42SHb4hngMi1HbK05zGxk3Ea29QLXvPuWHkBRUlCs7NXe W69Yr+rLRNCdeSAclzIRTGS3NlVhBWt4I3quKMnbyk24uLebRdwBkbwi16i6ObBImB4n2u9vkgu r97pnamaYkYpNYS7PXMnq/XjhzuItYfdK3IzpIc/TsXFZ33SipcY024goGvL06qVXLBcABUkQhl e1i8yvW7ofiqUIGJj/t2zoOTJXC/KGCbJWLPoCJvo0XHbWRSrfJhB8YiVEL/j1CNY6vw8Rz5sKY fp+kVdNZCftZTw+409z0oJc3QBa4MyPzcHA4hxNj2djym1Jw 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" Continue migration to the MDSS-revision based checks and replace DPU_PINGPONG_DSC feature bit with the core_major_ver < 7 check. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h | 6 ++---- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 10 ++-------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 2 +- 7 files changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h index c6bf3bca200d268912ae92cb8399a7e82b0d5ae8..14069958a71141815dc3722b00900c4659c1efab 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h @@ -100,14 +100,12 @@ static const struct dpu_pingpong_cfg msm8937_pp[] = { { .name = "pingpong_0", .id = PINGPONG_0, .base = 0x70000, .len = 0xd4, - .features = PINGPONG_MSM8996_MASK, .sblk = &msm8996_pp_sblk, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12), }, { .name = "pingpong_1", .id = PINGPONG_1, .base = 0x70800, .len = 0xd4, - .features = PINGPONG_MSM8996_MASK, .sblk = &msm8996_pp_sblk, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13), diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h index bebdba68667aaf79399da8ba810ca10d70ac430f..0d43041e727e13e7a364c35090f65405c74cab32 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_15_msm8917.h @@ -93,7 +93,6 @@ static const struct dpu_pingpong_cfg msm8917_pp[] = { { .name = "pingpong_0", .id = PINGPONG_0, .base = 0x70000, .len = 0xd4, - .features = PINGPONG_MSM8996_MASK, .sblk = &msm8996_pp_sblk, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12), diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h index 598113bd59f1bf33dcf0c25ecdd81057ddf1029e..d7e8fed190800324cd4cf245fd258ef8c3187a93 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_16_msm8953.h @@ -100,14 +100,12 @@ static const struct dpu_pingpong_cfg msm8953_pp[] = { { .name = "pingpong_0", .id = PINGPONG_0, .base = 0x70000, .len = 0xd4, - .features = PINGPONG_MSM8996_MASK, .sblk = &msm8996_pp_sblk, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12), }, { .name = "pingpong_1", .id = PINGPONG_1, .base = 0x70800, .len = 0xd4, - .features = PINGPONG_MSM8996_MASK, .sblk = &msm8996_pp_sblk, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13), diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h index 6dfbd843c3b1cb0d972baab9eb463ecbb334f075..25fa0bd574894ef4d11b14af0c0ef386539e121f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_7_msm8996.h @@ -181,28 +181,26 @@ static const struct dpu_pingpong_cfg msm8996_pp[] = { { .name = "pingpong_0", .id = PINGPONG_0, .base = 0x70000, .len = 0xd4, - .features = PINGPONG_MSM8996_TE2_MASK, + .features = BIT(DPU_PINGPONG_TE2), .sblk = &msm8996_pp_sblk_te, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12), }, { .name = "pingpong_1", .id = PINGPONG_1, .base = 0x70800, .len = 0xd4, - .features = PINGPONG_MSM8996_TE2_MASK, + .features = BIT(DPU_PINGPONG_TE2), .sblk = &msm8996_pp_sblk_te, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13), }, { .name = "pingpong_2", .id = PINGPONG_2, .base = 0x71000, .len = 0xd4, - .features = PINGPONG_MSM8996_MASK, .sblk = &msm8996_pp_sblk, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14), }, { .name = "pingpong_3", .id = PINGPONG_3, .base = 0x71800, .len = 0xd4, - .features = PINGPONG_MSM8996_MASK, .sblk = &msm8996_pp_sblk, .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), .intr_rdptr = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15), diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c index b18f4848f61391b527af243e6f0866ac3811b7cd..3f9e0045d8d6268304a2d85ebf8d86db373a3028 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -95,20 +95,14 @@ #define MIXER_QCM2290_MASK \ (BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA)) -#define PINGPONG_MSM8996_MASK \ - (BIT(DPU_PINGPONG_DSC)) - -#define PINGPONG_MSM8996_TE2_MASK \ - (PINGPONG_MSM8996_MASK | BIT(DPU_PINGPONG_TE2)) - #define PINGPONG_SDM845_MASK \ - (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_DSC)) + (BIT(DPU_PINGPONG_DITHER)) #define PINGPONG_SDM845_TE2_MASK \ (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2)) #define PINGPONG_SM8150_MASK \ - (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_DSC)) + (BIT(DPU_PINGPONG_DITHER)) #define WB_SDM845_MASK (BIT(DPU_WB_LINE_MODE) | \ BIT(DPU_WB_UBWC) | \ 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 07349ba60c15387b0fa26b13cf6acaf69125b9f8..bef98e3471d4c8530e6a0fa35c8be207e080bd6c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -119,7 +119,6 @@ enum { * @DPU_PINGPONG_SPLIT PP block supports split fifo * @DPU_PINGPONG_SLAVE PP block is a suitable slave for split fifo * @DPU_PINGPONG_DITHER Dither blocks - * @DPU_PINGPONG_DSC PP block supports DSC * @DPU_PINGPONG_MAX */ enum { @@ -127,7 +126,6 @@ enum { DPU_PINGPONG_SPLIT, DPU_PINGPONG_SLAVE, DPU_PINGPONG_DITHER, - DPU_PINGPONG_DSC, DPU_PINGPONG_MAX }; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c index 36c0ec775b92036eaab26e1fa5331579651ac27c..49e03ecee9e8b567a3f809b977deb83731006ac0 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c @@ -319,7 +319,7 @@ struct dpu_hw_pingpong *dpu_hw_pingpong_init(struct drm_device *dev, c->ops.disable_autorefresh = dpu_hw_pp_disable_autorefresh; } - if (test_bit(DPU_PINGPONG_DSC, &cfg->features)) { + if (mdss_rev->core_major_ver < 7) { c->ops.setup_dsc = dpu_hw_pp_setup_dsc; c->ops.enable_dsc = dpu_hw_pp_dsc_enable; c->ops.disable_dsc = dpu_hw_pp_dsc_disable;