From patchwork Sat Feb 11 02:10:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 652765 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 D519DC636D4 for ; Sat, 11 Feb 2023 02:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbjBKCK7 (ORCPT ); Fri, 10 Feb 2023 21:10:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjBKCK7 (ORCPT ); Fri, 10 Feb 2023 21:10:59 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C72A67404F for ; Fri, 10 Feb 2023 18:10:57 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id qb15so18130749ejc.1 for ; Fri, 10 Feb 2023 18:10:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=ZC603h/Wh7FJFBpj8NoIQjPcoycjSSQW4waFHn2mSZw=; b=xGE4wTN7QZo2BAMaFFDeC7Sx0/EcRgzAAlaQDcWchZgUlNkE1S/7SpYXxZnWYiOEWI u8ctIMI07BdBjc8FqAlbEZ9nseYN9SwysiSzCpr33Yh5/hN1F5/6IxL6wVQO6noNgdz8 GEjt1REcGIHXl3CifCAsTtjE4wQZPnSQqB4236LuePK9hCC5Mqja/eZ4F9Vfix7gZqC/ jRZfLk1iv0kaWCWr2GsDXn4kv9uNdP+uLz/YJVaAhoH4rUw6+4E0PhrTs6xI5tstZoxP /XQxnpK1wOto8qiTxiM4TQpvuoFI6l7YvCYcpSqSD7nrSgDNGlWuAdsaqLiz+BMTLtiP kAZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ZC603h/Wh7FJFBpj8NoIQjPcoycjSSQW4waFHn2mSZw=; b=UKPA1p8aUnlaJZULJ8sGPBjKjgrIX/OcQC2KzecbGo8Ijjej8wXYF9H9dzGvRwMxTX 7lZZqUWxmzAZL8AW3/yxYKgIRA7Dd5EvYOmcdSZsutYBBPhAkN1JZvM0szP2kk4BmQk1 RxlPWM2dMPaICFH3g6owc7iPsVp5yOLwQKrHtuRICktQEAG6e/UbNaikNqh8AbQ9ydUq QHZOUsxUGJnv+0rVNe+mdXCC8Hc6X9LdD/um9QJ4E/V2auT6qjz4YXfk4vOFs5rviehX VPzrF6LQ0dAG5tOyDDZrg6BH8A6JOlGvkJhgma1KqCbrYqT+v1loJ5hSe6IzI0neenTH 0ugg== X-Gm-Message-State: AO0yUKW2cs0Ih2CLPA1wXw8vuVpqv1ZOf7J3Byh32mhGUL3R7vAkaOpT iy4u/KbL274Uv/vScQIMeZAIeg6jp++cRSpO X-Google-Smtp-Source: AK7set9ycZleEANd9Q8t5QnbZ4uCGmOVJBHkru1OUHvacU0RGlFEHpyut2gbjWPsCjGfCqUpagmwpw== X-Received: by 2002:a17:907:d2a:b0:8af:ef9a:1911 with SMTP id gn42-20020a1709070d2a00b008afef9a1911mr1875000ejc.5.1676081456416; Fri, 10 Feb 2023 18:10:56 -0800 (PST) Received: from eriador.lan (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id e20-20020a170906c01400b008ae3324c8adsm3180831ejz.214.2023.02.10.18.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 18:10:56 -0800 (PST) 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 Subject: [PATCH 01/43] drm/msm/dpu: constify DSC data structures Date: Sat, 11 Feb 2023 04:10:11 +0200 Message-Id: <20230211021053.1078648-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230211021053.1078648-1-dmitry.baryshkov@linaro.org> References: <20230211021053.1078648-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. 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 814baec38a22..5c393a822ff1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -1831,14 +1831,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 e6590302b3bf..a56581b34ddf 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -867,7 +867,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)