From patchwork Tue Apr 4 13:05:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 670116 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 2D155C761AF for ; Tue, 4 Apr 2023 13:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234768AbjDDNIo (ORCPT ); Tue, 4 Apr 2023 09:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234811AbjDDNIl (ORCPT ); Tue, 4 Apr 2023 09:08:41 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7398E1BE6 for ; Tue, 4 Apr 2023 06:08:39 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id e9so18486389ljq.4 for ; Tue, 04 Apr 2023 06:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680613718; 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=jOx9lf6aed6FSoTQsBDzqel9MF48cuFoO1q09iRRNAw=; b=ulRSoVWgLTZRYaygsqQze2UmUZt2Hkp0vkR1J7XHAlUHXfbSoB92be6i8aX8Aw3vYY ZvkMYsuuMe7k5p/7sXeiTZ0iBsZKVNvaluOfiNBmV4NTApDE7sBwOKA3LQVhnwRSS+Nw VBbNRigvMl3ZR4qtkwOUR3zmvzNo1Djs1g20vR6E39qi0b2gqHwQduBrIeo4ELnNAuoR hBZaap0yAyars1q34gLPNMauVDnnL1EajxTiz9PvuzWEZYSLCufpfrQDaWkkKER1c3qA S07KSjtJCk+7BQmP9liNtUF2t9GQScaZzegldqi7wK46S5v2iJMSjlM5GtrmIB9rDa1c C0tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680613718; 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=jOx9lf6aed6FSoTQsBDzqel9MF48cuFoO1q09iRRNAw=; b=euJUYUamq6yD2A6qzZ2mpLSFXZmCA8QM/zf8+yD894vjpe2+yrv5XszvvuzC8c5CT0 h8tdPZ45U0oH126BHjGwsDkd7Pal9PkaOH8W4KWIngO8ncjflSZcLDW7E2wk6VD744CQ wbyIoHfGTiCgU2oKkPg2jnHATnb/QS7Xs4v8J7LWBGiAEY+CjvPLkk56CMcz59CoZuzz 8+wxtnX/3Xw4jL61kn4aSswZvKfaDNr4HT0Ze/T0s0V6nfwZYh9qDvi0yNxSIJ6ZrJ8J 3Nb0Wr0M0fDVyDq+AmFBRgvY8yMEVH00V1nT4ay6p0crTjmkYKhCyem0mKjuymK/TVd1 R4LQ== X-Gm-Message-State: AAQBX9cloieAv/PFsBITccVfu4DM0rrKi7vovhpzEO/3CjvHXs278V9n BtSYJyEz6pnyL55aC+CHCblNEw== X-Google-Smtp-Source: AKy350ZCAn/ghhAlLwGs9xsruf5nmbl+irnifljSdYgZNThzxSOwuJ8ASFypwLjL66/LuO8r/2H/4g== X-Received: by 2002:a2e:9dc3:0:b0:29e:98e2:31bf with SMTP id x3-20020a2e9dc3000000b0029e98e231bfmr798891ljj.6.1680613717851; Tue, 04 Apr 2023 06:08:37 -0700 (PDT) Received: from eriador.lumag.spb.ru ([193.65.47.217]) by smtp.gmail.com with ESMTPSA id c11-20020a05651c014b00b0029e5448e752sm2304789ljd.131.2023.04.04.06.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 06:08:37 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Konrad Dybcio Subject: [PATCH v4 04/42] drm/msm/dpu: constify DSC data structures Date: Tue, 4 Apr 2023 16:05:44 +0300 Message-Id: <20230404130622.509628-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230404130622.509628-1-dmitry.baryshkov@linaro.org> References: <20230404130622.509628-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org DSC hw catalog data is not supposed to be changed, so mark it as const data. Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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 f4ffd7fc4424..2dbd4783a57b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -1836,14 +1836,14 @@ static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = { .features = _features, \ } -static struct dpu_dsc_cfg sdm845_dsc[] = { +static const struct dpu_dsc_cfg sdm845_dsc[] = { DSC_BLK("dsc_0", DSC_0, 0x80000, 0), DSC_BLK("dsc_1", DSC_1, 0x80400, 0), DSC_BLK("dsc_2", DSC_2, 0x80800, 0), DSC_BLK("dsc_3", DSC_3, 0x80c00, 0), }; -static struct dpu_dsc_cfg sm8150_dsc[] = { +static const struct dpu_dsc_cfg sm8150_dsc[] = { DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)), DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)), DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)), 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 2f532543848c..fe360fb7c77b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -872,7 +872,7 @@ struct dpu_mdss_cfg { const struct dpu_merge_3d_cfg *merge_3d; u32 dsc_count; - struct dpu_dsc_cfg *dsc; + const struct dpu_dsc_cfg *dsc; u32 intf_count; const struct dpu_intf_cfg *intf; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c index 619926da1441..4e1396575e6a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c @@ -175,7 +175,7 @@ static void dpu_hw_dsc_bind_pingpong_blk( DPU_REG_WRITE(c, dsc_ctl_offset, mux_cfg); } -static struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc, +static const struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc, const struct dpu_mdss_cfg *m, void __iomem *addr, struct dpu_hw_blk_reg_map *b) @@ -207,7 +207,7 @@ struct dpu_hw_dsc *dpu_hw_dsc_init(enum dpu_dsc idx, void __iomem *addr, const struct dpu_mdss_cfg *m) { struct dpu_hw_dsc *c; - struct dpu_dsc_cfg *cfg; + const struct dpu_dsc_cfg *cfg; c = kzalloc(sizeof(*c), GFP_KERNEL); if (!c)